René's URL Explorer Experiment


Title: fix(trigger): do not alert on runs whose workspace was deleted mid-run by waleedlatif1 · Pull Request #9151 · simstudioai/sim · GitHub

Open Graph Title: fix(trigger): do not alert on runs whose workspace was deleted mid-run by waleedlatif1 · Pull Request #9151 · simstudioai/sim

X Title: fix(trigger): do not alert on runs whose workspace was deleted mid-run by waleedlatif1 · Pull Request #9151 · simstudioai/sim

Description: Summary Completes the 2026-10-16 incident fix: a Trigger.dev workflow-execution run whose owner deleted their account mid-run posted ":rotating_light: Error in workflow-execution" to Slack. #9144 made those runs end quietly in the logging layer, and #9139 stopped alerting on recorded failures. One gap was left between them: the background task still rethrew in two cases. Start-time deletion: the workspace or workflow is already gone when the run starts, and core throws ExecutionScopeDeletedError. Mid-run deletion: a block then fails (e.g. the incident's FK error on a file upload). Its failure cannot be recorded because the log row is gone, so isRecordedWorkflowFailure is false. The change: New resolveDeletedExecutionScope(error, loggingSession) in lib/workflows/executor/recorded-failure.ts. It returns the scope of an ExecutionScopeDeletedError, or getDeletedScope() once post-execution settles. workflow-execution and webhook-execution check it before the timeout rethrow and again after their own fallback completion. A deleted scope logs at info and completes with #9139's { success: false, error } result instead of failing the Trigger run. A deleted scope wins over a timeout: the owner is gone and so is the log row. getDeletedScope() is non-null only after a primary-key lookup on the primary DB proves the row absent. Archived (soft-deleted) workspaces still have rows and are unaffected. Every live-workspace path is unchanged: timeouts, unrecorded failures, infra faults and RetryableSetupError still throw. Schedule runs already swallow task errors into schedule bookkeeping, and resume runs have no task-level session, so both are unchanged. Type of Change Bug fix Testing New worker tests cover: start-time deletion; mid-run deletion with an unrecorded block error; deletion discovered by the task's own completion; timeout in a deleted workspace. The existing live-workspace tests (unrecorded error, cooperative timeout, webhook fault) still throw. 8 mutations (each guard dropped, the instanceof shortcut, the post-execution await, the timeout ordering, and a forced "deleted" result that breaks 19 live-path tests) each went red. An independent adversarial review covered how the deleted scope is detected and whether any live path changed. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced

Open Graph Description: Summary Completes the 2026-10-16 incident fix: a Trigger.dev workflow-execution run whose owner deleted their account mid-run posted ":rotating_light: Error in workflow-execution" to Slac...

X Description: Summary Completes the 2026-10-16 incident fix: a Trigger.dev workflow-execution run whose owner deleted their account mid-run posted ":rotating_light: Error in workflow-execution"...

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

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:921828a1-8d51-5926-d212-4ca56d4317ee
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCA18:39F0B6:10A9B2:17A6EE:6AFB4C7C
html-safe-nonce42869a4456eb4e2be348dd294dc72a35ff69a86ad149de31cc7d21e09d238a53
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTE4OjM5RjBCNjoxMEE5QjI6MTdBNkVFOjZBRkI0QzdDIiwidmlzaXRvcl9pZCI6IjI2MzIwOTA4MTg0NjE3ODExMTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacb875db2a7fe0476ec67450766f3a71b4dddf08710dd17fa483c3f0d908390bac
hovercard-subject-tagpull_request:4895367684
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/9151/files
twitter:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
og:image:altSummary Completes the 2026-10-16 incident fix: a Trigger.dev workflow-execution run whose owner deleted their account mid-run posted ":rotating_light: Error in workflow-execution" to Slac...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneacf7616d06cc051644705b379878c9bb13dc5e70ecf4ffd9b34140f8ac01d7e1
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
release26504db649b58525278f77a52b80ba5f10d5f4de
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/9151/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F9151%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%2F9151%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/9151/files
Reloadhttps://github.com/simstudioai/sim/pull/9151/files
Reloadhttps://github.com/simstudioai/sim/pull/9151/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
waleedlatif1https://github.com/waleedlatif1
staginghttps://github.com/simstudioai/sim/tree/staging
fix/deleted-scope-task-outcomehttps://github.com/simstudioai/sim/tree/fix/deleted-scope-task-outcome
Conversation 7 https://github.com/simstudioai/sim/pull/9151
Commits 2 https://github.com/simstudioai/sim/pull/9151/commits
Checks 52 https://github.com/simstudioai/sim/pull/9151/checks
Files changed https://github.com/simstudioai/sim/pull/9151/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9151/files
fix(trigger): do not alert on runs whose workspace was deleted mid-run https://github.com/simstudioai/sim/pull/9151/files#top
Show all changes 2 commits https://github.com/simstudioai/sim/pull/9151/files
22c5789 fix(trigger): do not alert on runs whose workspace was deleted mid-run waleedlatif1 Oct 16, 2026 https://github.com/simstudioai/sim/pull/9151/commits/22c5789d654687f74e37ede794ca6d8698f11da3
17aebe4 improvement(trigger): fold the deleted-scope log and result into one … waleedlatif1 Oct 16, 2026 https://github.com/simstudioai/sim/pull/9151/commits/17aebe445f370e8874a2367da707645a791fb955
Clear filters https://github.com/simstudioai/sim/pull/9151/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9151/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9151/files
async-preprocessing-correlation.test.ts https://github.com/simstudioai/sim/pull/9151/files#diff-ca34e4edc8b5e34181ac65445f6a7db848ace1390f962db97bf19a3e36cd13bc
webhook-execution.test.ts https://github.com/simstudioai/sim/pull/9151/files#diff-f433f35408ec79af440433628ad09b0d3585344dcdd28099fbb68a4884b6ecb3
webhook-execution.ts https://github.com/simstudioai/sim/pull/9151/files#diff-d3c199a17069fce702da388ec4cd1b4efc793e0a5968072a181280db5aafdbb1
workflow-execution.ts https://github.com/simstudioai/sim/pull/9151/files#diff-f8d70a9414b6740f6d7f47310a28af20aa45bcbfe00c399166f3f785dfc3903d
recorded-failure.ts https://github.com/simstudioai/sim/pull/9151/files#diff-f338b73fdcf2cb2dd897cc099f1d677e8cf98bd8056c6fab7e116d35cbcdd43f
apps/sim/background/async-preprocessing-correlation.test.tshttps://github.com/simstudioai/sim/pull/9151/files#diff-ca34e4edc8b5e34181ac65445f6a7db848ace1390f962db97bf19a3e36cd13bc
View file https://github.com/simstudioai/sim/blob/17aebe445f370e8874a2367da707645a791fb955/apps/sim/background/async-preprocessing-correlation.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9151/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9151/files#diff-ca34e4edc8b5e34181ac65445f6a7db848ace1390f962db97bf19a3e36cd13bc
https://github.com/simstudioai/sim/pull/9151/files#diff-ca34e4edc8b5e34181ac65445f6a7db848ace1390f962db97bf19a3e36cd13bc
https://github.com/simstudioai/sim/pull/9151/files#diff-ca34e4edc8b5e34181ac65445f6a7db848ace1390f962db97bf19a3e36cd13bc
https://github.com/simstudioai/sim/pull/9151/files#diff-ca34e4edc8b5e34181ac65445f6a7db848ace1390f962db97bf19a3e36cd13bc
apps/sim/background/webhook-execution.test.tshttps://github.com/simstudioai/sim/pull/9151/files#diff-f433f35408ec79af440433628ad09b0d3585344dcdd28099fbb68a4884b6ecb3
View file https://github.com/simstudioai/sim/blob/17aebe445f370e8874a2367da707645a791fb955/apps/sim/background/webhook-execution.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9151/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9151/files#diff-f433f35408ec79af440433628ad09b0d3585344dcdd28099fbb68a4884b6ecb3
https://github.com/simstudioai/sim/pull/9151/files#diff-f433f35408ec79af440433628ad09b0d3585344dcdd28099fbb68a4884b6ecb3
https://github.com/simstudioai/sim/pull/9151/files#diff-f433f35408ec79af440433628ad09b0d3585344dcdd28099fbb68a4884b6ecb3
https://github.com/simstudioai/sim/pull/9151/files#diff-f433f35408ec79af440433628ad09b0d3585344dcdd28099fbb68a4884b6ecb3
https://github.com/simstudioai/sim/pull/9151/files#diff-f433f35408ec79af440433628ad09b0d3585344dcdd28099fbb68a4884b6ecb3
https://github.com/simstudioai/sim/pull/9151/files#diff-f433f35408ec79af440433628ad09b0d3585344dcdd28099fbb68a4884b6ecb3
https://github.com/simstudioai/sim/pull/9151/files#diff-f433f35408ec79af440433628ad09b0d3585344dcdd28099fbb68a4884b6ecb3
https://github.com/simstudioai/sim/pull/9151/files#diff-f433f35408ec79af440433628ad09b0d3585344dcdd28099fbb68a4884b6ecb3
apps/sim/background/webhook-execution.tshttps://github.com/simstudioai/sim/pull/9151/files#diff-d3c199a17069fce702da388ec4cd1b4efc793e0a5968072a181280db5aafdbb1
View file https://github.com/simstudioai/sim/blob/17aebe445f370e8874a2367da707645a791fb955/apps/sim/background/webhook-execution.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9151/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9151/files#diff-d3c199a17069fce702da388ec4cd1b4efc793e0a5968072a181280db5aafdbb1
https://github.com/simstudioai/sim/pull/9151/files#diff-d3c199a17069fce702da388ec4cd1b4efc793e0a5968072a181280db5aafdbb1
https://github.com/simstudioai/sim/pull/9151/files#diff-d3c199a17069fce702da388ec4cd1b4efc793e0a5968072a181280db5aafdbb1
https://github.com/simstudioai/sim/pull/9151/files#diff-d3c199a17069fce702da388ec4cd1b4efc793e0a5968072a181280db5aafdbb1
https://github.com/simstudioai/sim/pull/9151/files#diff-d3c199a17069fce702da388ec4cd1b4efc793e0a5968072a181280db5aafdbb1
https://github.com/simstudioai/sim/pull/9151/files#diff-d3c199a17069fce702da388ec4cd1b4efc793e0a5968072a181280db5aafdbb1
https://github.com/simstudioai/sim/pull/9151/files#diff-d3c199a17069fce702da388ec4cd1b4efc793e0a5968072a181280db5aafdbb1
Please reload this pagehttps://github.com/simstudioai/sim/pull/9151/files
https://github.com/simstudioai/sim/pull/9151/files#diff-d3c199a17069fce702da388ec4cd1b4efc793e0a5968072a181280db5aafdbb1
apps/sim/background/workflow-execution.tshttps://github.com/simstudioai/sim/pull/9151/files#diff-f8d70a9414b6740f6d7f47310a28af20aa45bcbfe00c399166f3f785dfc3903d
View file https://github.com/simstudioai/sim/blob/17aebe445f370e8874a2367da707645a791fb955/apps/sim/background/workflow-execution.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9151/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9151/files#diff-f8d70a9414b6740f6d7f47310a28af20aa45bcbfe00c399166f3f785dfc3903d
https://github.com/simstudioai/sim/pull/9151/files#diff-f8d70a9414b6740f6d7f47310a28af20aa45bcbfe00c399166f3f785dfc3903d
https://github.com/simstudioai/sim/pull/9151/files#diff-f8d70a9414b6740f6d7f47310a28af20aa45bcbfe00c399166f3f785dfc3903d
https://github.com/simstudioai/sim/pull/9151/files#diff-f8d70a9414b6740f6d7f47310a28af20aa45bcbfe00c399166f3f785dfc3903d
https://github.com/simstudioai/sim/pull/9151/files#diff-f8d70a9414b6740f6d7f47310a28af20aa45bcbfe00c399166f3f785dfc3903d
Please reload this pagehttps://github.com/simstudioai/sim/pull/9151/files
https://github.com/simstudioai/sim/pull/9151/files#diff-f8d70a9414b6740f6d7f47310a28af20aa45bcbfe00c399166f3f785dfc3903d
apps/sim/lib/workflows/executor/recorded-failure.tshttps://github.com/simstudioai/sim/pull/9151/files#diff-f338b73fdcf2cb2dd897cc099f1d677e8cf98bd8056c6fab7e116d35cbcdd43f
View file https://github.com/simstudioai/sim/blob/17aebe445f370e8874a2367da707645a791fb955/apps/sim/lib/workflows/executor/recorded-failure.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9151/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9151/files#diff-f338b73fdcf2cb2dd897cc099f1d677e8cf98bd8056c6fab7e116d35cbcdd43f
Please reload this pagehttps://github.com/simstudioai/sim/pull/9151/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.