René's URL Explorer Experiment


Title: fix(background): recategorize user/recovery failures as errors, not trigger faults by TheodoreSpeaks · Pull Request #4860 · simstudioai/sim · GitHub

Open Graph Title: fix(background): recategorize user/recovery failures as errors, not trigger faults by TheodoreSpeaks · Pull Request #4860 · simstudioai/sim

X Title: fix(background): recategorize user/recovery failures as errors, not trigger faults by TheodoreSpeaks · Pull Request #4860 · simstudioai/sim

Description: Problem #eng-errors is flooded with webhook-execution trigger.dev run failures, and a trickle of schedule-execution ones. The errors are almost all things that shouldn't fault a background job: Webhook — user-caused workflow failures, already recorded in the user's execution logs: Gmail 2 is missing required fields: Label (serializer validation) Knowledge 2: "semantic_query" doesn't exist on block "restructure" (invalid field reference) Firecrawl 1: Invalid URL, Router 1: Invalid request body, provider 401/400/404, etc. Schedule — a secondary DB failure during error recovery (e.g. a transient blip while releasing the claim), which double-faults during cleanup. webhook-execution re-threw every error; with maxAttempts: 1 any throw marks the run failed and alerts — even for a user/workflow problem. schedule-execution already treats workflow failures as recorded errors (not faults), but its outermost catch's own recovery code was unguarded, so a cleanup-write failure escaped run(). Changes webhook-execution.ts — fault vs error await loggingSession.waitForPostExecution() before reading the finalized flag (set inside a fire-and-forget post-execution promise; the read must be reliable once branches diverge). Finalized by core (workflow ran, failure already in execution logs = user/workflow error) → return { success: false, ... }; the run completes, no alert. Not finalized (error from the webhook pipeline itself) → record and re-throw to fault the run, preserving alerting on genuine problems. Every error in the logs is thrown from inside executeWorkflowCore (serializer validation at execution-core.ts:474, or block/provider failures via the DAG executor), which force-starts logging and finalizes before re-throwing — so they're all finalized-by-core and stop faulting. Verified against prod run run_cmpwquraf4tb60iogze9dg1fr. schedule-execution.ts — guard the recovery path The outermost catch already turns workflow failures into schedule-state updates without faulting. Its own recovery calls (infra-retry, releaseClaim) were unguarded — wrap them in a try/catch that logs and records the exception on the span without re-throwing. The claim expires on its TTL and the next tick re-claims the schedule, so swallowing a cleanup-write failure is safe. Both — keep investigability The exception is recorded on the run's OTel span via recordException (no ERROR status, so it doesn't fault the run) so these stay visible in Tempo; they also remain in the execution logs and logger.error → Loki. Notes / risk No retry behavior changes — webhook-execution is maxAttempts: 1, so nothing was ever retried; only the run's final status changes (FAILED → COMPLETED). Schedule's recovery swallow is also safe (TTL + next tick). Webhook idempotency marker flips failed→completed; since webhookIdempotency is retryFailures: false, this reduces alerts (duplicate deliveries of a failed webhook previously re-threw and re-faulted). The one genuine tradeoff: a real in-core bug now shows as a completed run instead of failed — but it stays fully investigable via execution logs + the recorded span exception (Tempo) + logger.error (Loki). The knowledge knowledge-process-document task (maxAttempts: 3, Unsupported fileUrl scheme user error) is a separate follow-up. Test plan bun run test background/webhook-execution.test.ts — added cases: finalized → resolves { success: false } + records span exception; non-finalized → throws + logs. bun run type-check — clean. bun run lint:check — clean (2 warnings are pre-existing in untouched service.ts). Prod sanity check via trigger MCP. 🤖 Generated with Claude Code

Open Graph Description: Problem #eng-errors is flooded with webhook-execution trigger.dev run failures, and a trickle of schedule-execution ones. The errors are almost all things that shouldn't fault a background job:...

X Description: Problem #eng-errors is flooded with webhook-execution trigger.dev run failures, and a trickle of schedule-execution ones. The errors are almost all things that shouldn't fault a background ...

Opengraph URL: https://github.com/simstudioai/sim/pull/4860

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:57ffb90e-24dc-a80e-ab75-dfab8187a80b
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCA18:47529:8AD44C:C4E634:6AFB509E
html-safe-nonced3695f59b92b08a99cf9cdc6f48d517099765133307ca9ef2a5cf8d2946244f7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTE4OjQ3NTI5OjhBRDQ0QzpDNEU2MzQ6NkFGQjUwOUUiLCJ2aXNpdG9yX2lkIjoiNjM4MDk2NDYzOTYzNTc0NDMwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac79c1ac7cc894bf4416d63c09f32966b4751eccd7c4424ceecedf1bf3ae0916bb
hovercard-subject-tagpull_request:3792514778
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/4860/files
twitter:imagehttps://avatars.githubusercontent.com/u/19564703?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/19564703?s=400&v=4
og:image:altProblem #eng-errors is flooded with webhook-execution trigger.dev run failures, and a trickle of schedule-execution ones. The errors are almost all things that shouldn't fault a background job:...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7122bb414b542dba14d71a3f0b9f6fd2abce715b9f5912d082800563e6c806d1
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasecbf66c024bb6d10e6955baa7413c54cf13a201bb
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/4860/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F4860%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F4860%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/4860/files
Reloadhttps://github.com/simstudioai/sim/pull/4860/files
Reloadhttps://github.com/simstudioai/sim/pull/4860/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests197 (197)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
TheodoreSpeakshttps://github.com/TheodoreSpeaks
staginghttps://github.com/simstudioai/sim/tree/staging
fix/recategorize-trigger-faultshttps://github.com/simstudioai/sim/tree/fix/recategorize-trigger-faults
Conversation 9 https://github.com/simstudioai/sim/pull/4860
Commits 3 https://github.com/simstudioai/sim/pull/4860/commits
Checks 13 https://github.com/simstudioai/sim/pull/4860/checks
Files changed https://github.com/simstudioai/sim/pull/4860/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/4860/files
fix(background): recategorize user/recovery failures as errors, not trigger faults https://github.com/simstudioai/sim/pull/4860/files#top
Show all changes 3 commits https://github.com/simstudioai/sim/pull/4860/files
0957246 fix(webhook): don't fault trigger run on user/workflow execution errors TheodoreSpeaks Jun 3, 2026 https://github.com/simstudioai/sim/pull/4860/commits/095724603de93799da4c3b57ed286a795a6d310d
682477a fix(schedule): don't fault trigger run on error-recovery failures TheodoreSpeaks Jun 3, 2026 https://github.com/simstudioai/sim/pull/4860/commits/682477a434cebfc99ffc575104c3add845e6ea73
3fbd65f test(webhook): assert waitForPostExecution runs on the non-finalized … TheodoreSpeaks Jun 3, 2026 https://github.com/simstudioai/sim/pull/4860/commits/3fbd65fbb6b94c3819c82d0301b6553925bb7e53
Clear filters https://github.com/simstudioai/sim/pull/4860/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/4860/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/4860/files
schedule-execution.ts https://github.com/simstudioai/sim/pull/4860/files#diff-c9c5a894650376fd9b109f150455a416252960499a892b1371b297af299db347
webhook-execution.test.ts https://github.com/simstudioai/sim/pull/4860/files#diff-f433f35408ec79af440433628ad09b0d3585344dcdd28099fbb68a4884b6ecb3
webhook-execution.ts https://github.com/simstudioai/sim/pull/4860/files#diff-d3c199a17069fce702da388ec4cd1b4efc793e0a5968072a181280db5aafdbb1
apps/sim/background/schedule-execution.tshttps://github.com/simstudioai/sim/pull/4860/files#diff-c9c5a894650376fd9b109f150455a416252960499a892b1371b297af299db347
View file https://github.com/simstudioai/sim/blob/3fbd65fbb6b94c3819c82d0301b6553925bb7e53/apps/sim/background/schedule-execution.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/4860/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/4860/files#diff-c9c5a894650376fd9b109f150455a416252960499a892b1371b297af299db347
https://github.com/simstudioai/sim/pull/4860/files#diff-c9c5a894650376fd9b109f150455a416252960499a892b1371b297af299db347
https://github.com/simstudioai/sim/pull/4860/files#diff-c9c5a894650376fd9b109f150455a416252960499a892b1371b297af299db347
apps/sim/background/webhook-execution.test.tshttps://github.com/simstudioai/sim/pull/4860/files#diff-f433f35408ec79af440433628ad09b0d3585344dcdd28099fbb68a4884b6ecb3
View file https://github.com/simstudioai/sim/blob/3fbd65fbb6b94c3819c82d0301b6553925bb7e53/apps/sim/background/webhook-execution.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/4860/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/4860/files#diff-f433f35408ec79af440433628ad09b0d3585344dcdd28099fbb68a4884b6ecb3
https://github.com/simstudioai/sim/pull/4860/files#diff-f433f35408ec79af440433628ad09b0d3585344dcdd28099fbb68a4884b6ecb3
https://github.com/simstudioai/sim/pull/4860/files#diff-f433f35408ec79af440433628ad09b0d3585344dcdd28099fbb68a4884b6ecb3
Please reload this pagehttps://github.com/simstudioai/sim/pull/4860/files
apps/sim/background/webhook-execution.tshttps://github.com/simstudioai/sim/pull/4860/files#diff-d3c199a17069fce702da388ec4cd1b4efc793e0a5968072a181280db5aafdbb1
View file https://github.com/simstudioai/sim/blob/3fbd65fbb6b94c3819c82d0301b6553925bb7e53/apps/sim/background/webhook-execution.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/4860/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/4860/files#diff-d3c199a17069fce702da388ec4cd1b4efc793e0a5968072a181280db5aafdbb1
https://github.com/simstudioai/sim/pull/4860/files#diff-d3c199a17069fce702da388ec4cd1b4efc793e0a5968072a181280db5aafdbb1
https://github.com/simstudioai/sim/pull/4860/files#diff-d3c199a17069fce702da388ec4cd1b4efc793e0a5968072a181280db5aafdbb1
Please reload this pagehttps://github.com/simstudioai/sim/pull/4860/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.