René's URL Explorer Experiment


Title: fix(execution): stop run-buffer failures from stranding resumed executions by waleedlatif1 · Pull Request #6187 · simstudioai/sim · GitHub

Open Graph Title: fix(execution): stop run-buffer failures from stranding resumed executions by waleedlatif1 · Pull Request #6187 · simstudioai/sim

X Title: fix(execution): stop run-buffer failures from stranding resumed executions by waleedlatif1 · Pull Request #6187 · simstudioai/sim

Description: Summary A failed run-buffer terminal event publish no longer decides the outcome of a resume whose workflow already ran. The buffer is a replay convenience for stream readers; the durable execution record is authoritative. Previously the failure threw, the resume was marked failed, and the execution stayed paused permanently — and because that path is not retryable, the next attempt re-ran the workflow's side effects. It now degrades: records the terminal status on the stream meta so readers aren't left polling an active stream, logs, and lets the resume settle on its real result. Per-user Redis byte budget keys now get a fixed window instead of a sliding one. The TTL was refreshed on every accepted write, so for a user who never went a full TTL without writing, the key never expired — while the per-execution data it accounted for did. The counter accrued bytes Redis had already dropped and drifted to the ceiling, after which every write for that user was rejected until they went a full TTL idle. Applied across all five Lua scripts that touch the key so the writers can't drift apart. Execution-scoped budget keys keep sliding — they're refreshed on the same schedule as the data they account for, so counter and bytes stay in step. Drops the now-unreachable TERMINAL_PUBLISH_ERROR constant and its branch. Pre-execution buffer failures stay fatal and retryable, since no work has happened yet. Type of Change Bug fix Testing New apps/sim/lib/execution/redis-budget.server.test.ts plus two cases in event-buffer.test.ts. Both new guards verified to fail when the fix is reverted. tsc -p apps/sim, biome, and check:api-validation pass. 649 tests pass across lib/execution, lib/workflows/executor, lib/uploads, and app/api/resume. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Open Graph Description: Summary A failed run-buffer terminal event publish no longer decides the outcome of a resume whose workflow already ran. The buffer is a replay convenience for stream readers; the durable executio...

X Description: Summary A failed run-buffer terminal event publish no longer decides the outcome of a resume whose workflow already ran. The buffer is a replay convenience for stream readers; the durable executio...

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

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:bca12c1f-7672-1742-d324-2f3e46063f54
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8168:2F4711:B217:FDD1:6AFB47B8
html-safe-nonce114e73e4a7841d4d152bdd3dbe1ee7cb2b17cccf049583abc222527dd3c6c5a1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MTY4OjJGNDcxMTpCMjE3OkZERDE6NkFGQjQ3QjgiLCJ2aXNpdG9yX2lkIjoiNjAzNDQyNzIxMDEzMzg4MjgwOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac259ee921239a02cd046679cf9455e46ab193ea03935678808ad03c6476683785
hovercard-subject-tagpull_request:4186726597
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/6187/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 A failed run-buffer terminal event publish no longer decides the outcome of a resume whose workflow already ran. The buffer is a replay convenience for stream readers; the durable executio...
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/6187/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6187%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%2F6187%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/6187/files
Reloadhttps://github.com/simstudioai/sim/pull/6187/files
Reloadhttps://github.com/simstudioai/sim/pull/6187/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests199 (199)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/run-buffer-resume-resiliencehttps://github.com/simstudioai/sim/tree/fix/run-buffer-resume-resilience
Conversation 10 https://github.com/simstudioai/sim/pull/6187
Commits 4 https://github.com/simstudioai/sim/pull/6187/commits
Checks 27 https://github.com/simstudioai/sim/pull/6187/checks
Files changed https://github.com/simstudioai/sim/pull/6187/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6187/files
fix(execution): stop run-buffer failures from stranding resumed executions https://github.com/simstudioai/sim/pull/6187/files#top
Show all changes 4 commits https://github.com/simstudioai/sim/pull/6187/files
20d6f49 fix(resume): stop a failed run-buffer publish from stranding a resume… waleedlatif1 Aug 2, 2026 https://github.com/simstudioai/sim/pull/6187/commits/20d6f49bf51fee29e3a60b19fb2817864df673ea
22f03db fix(execution): give per-user Redis budget keys a fixed window waleedlatif1 Aug 2, 2026 https://github.com/simstudioai/sim/pull/6187/commits/22f03db64857f6ab49fddf6a33038a2cceab3cd0
4c7df92 fix(execution): heal a user budget key that somehow has no expiry waleedlatif1 Aug 2, 2026 https://github.com/simstudioai/sim/pull/6187/commits/4c7df926eae4f52f36b7f469ad8fd8dc0152ff67
7bb2ca6 fix(stream): end a replay cleanly when terminal metadata has no termi… waleedlatif1 Aug 2, 2026 https://github.com/simstudioai/sim/pull/6187/commits/7bb2ca6ea6e4e6d41d66ae96c35f0550df293982
Clear filters https://github.com/simstudioai/sim/pull/6187/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6187/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6187/files
route.test.ts https://github.com/simstudioai/sim/pull/6187/files#diff-8350821470c98c66e60f2e1e0c797dc56ddd4f23b2b94234b24af3bb40b115b0
route.ts https://github.com/simstudioai/sim/pull/6187/files#diff-1c3863e776a156c97a882a927fd26a057f55a1079f8cd23464e7893cccb77b20
event-buffer.test.ts https://github.com/simstudioai/sim/pull/6187/files#diff-96e6a19189fb5b803c6648633ad07c7f9cc7cc68f3926fbbd46bc4bc20b9f9da
event-buffer.ts https://github.com/simstudioai/sim/pull/6187/files#diff-7d7525d18ecf7583efaa0d408ec6beace469e423fbbf40183f61673a4f0fc802
redis-budget.server.test.ts https://github.com/simstudioai/sim/pull/6187/files#diff-eea3bba0edab094730c69f9d71f043cac47fc6537d3589123814879dc7c78ce5
redis-budget.server.ts https://github.com/simstudioai/sim/pull/6187/files#diff-ef75a1d85215e0147119836b4684db6c1c9df11fee79d06b56b0293ba8ab57ce
user-file-base64.server.ts https://github.com/simstudioai/sim/pull/6187/files#diff-df6aa2815c3351b752a7e2ae94c7769597ae4291706c82f4bd4138969a389f02
human-in-the-loop-manager.ts https://github.com/simstudioai/sim/pull/6187/files#diff-bb1129b15dc9783d16371ddc2f8992d36e41c60787a458e77e1c59a7e721d292
apps/sim/app/api/workflows/[id]/executions/[executionId]/stream/route.test.tshttps://github.com/simstudioai/sim/pull/6187/files#diff-8350821470c98c66e60f2e1e0c797dc56ddd4f23b2b94234b24af3bb40b115b0
View file https://github.com/simstudioai/sim/blob/7bb2ca6ea6e4e6d41d66ae96c35f0550df293982/apps/sim/app/api/workflows/%5Bid%5D/executions/%5BexecutionId%5D/stream/route.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6187/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6187/files#diff-8350821470c98c66e60f2e1e0c797dc56ddd4f23b2b94234b24af3bb40b115b0
https://github.com/simstudioai/sim/pull/6187/files#diff-8350821470c98c66e60f2e1e0c797dc56ddd4f23b2b94234b24af3bb40b115b0
https://github.com/simstudioai/sim/pull/6187/files#diff-8350821470c98c66e60f2e1e0c797dc56ddd4f23b2b94234b24af3bb40b115b0
apps/sim/app/api/workflows/[id]/executions/[executionId]/stream/route.tshttps://github.com/simstudioai/sim/pull/6187/files#diff-1c3863e776a156c97a882a927fd26a057f55a1079f8cd23464e7893cccb77b20
View file https://github.com/simstudioai/sim/blob/7bb2ca6ea6e4e6d41d66ae96c35f0550df293982/apps/sim/app/api/workflows/%5Bid%5D/executions/%5BexecutionId%5D/stream/route.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6187/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6187/files#diff-1c3863e776a156c97a882a927fd26a057f55a1079f8cd23464e7893cccb77b20
https://github.com/simstudioai/sim/pull/6187/files#diff-1c3863e776a156c97a882a927fd26a057f55a1079f8cd23464e7893cccb77b20
apps/sim/lib/execution/event-buffer.test.tshttps://github.com/simstudioai/sim/pull/6187/files#diff-96e6a19189fb5b803c6648633ad07c7f9cc7cc68f3926fbbd46bc4bc20b9f9da
View file https://github.com/simstudioai/sim/blob/7bb2ca6ea6e4e6d41d66ae96c35f0550df293982/apps/sim/lib/execution/event-buffer.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6187/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6187/files#diff-96e6a19189fb5b803c6648633ad07c7f9cc7cc68f3926fbbd46bc4bc20b9f9da
https://github.com/simstudioai/sim/pull/6187/files#diff-96e6a19189fb5b803c6648633ad07c7f9cc7cc68f3926fbbd46bc4bc20b9f9da
https://github.com/simstudioai/sim/pull/6187/files#diff-96e6a19189fb5b803c6648633ad07c7f9cc7cc68f3926fbbd46bc4bc20b9f9da
https://github.com/simstudioai/sim/pull/6187/files#diff-96e6a19189fb5b803c6648633ad07c7f9cc7cc68f3926fbbd46bc4bc20b9f9da
apps/sim/lib/execution/event-buffer.tshttps://github.com/simstudioai/sim/pull/6187/files#diff-7d7525d18ecf7583efaa0d408ec6beace469e423fbbf40183f61673a4f0fc802
View file https://github.com/simstudioai/sim/blob/7bb2ca6ea6e4e6d41d66ae96c35f0550df293982/apps/sim/lib/execution/event-buffer.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6187/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6187/files#diff-7d7525d18ecf7583efaa0d408ec6beace469e423fbbf40183f61673a4f0fc802
https://github.com/simstudioai/sim/pull/6187/files#diff-7d7525d18ecf7583efaa0d408ec6beace469e423fbbf40183f61673a4f0fc802
https://github.com/simstudioai/sim/pull/6187/files#diff-7d7525d18ecf7583efaa0d408ec6beace469e423fbbf40183f61673a4f0fc802
https://github.com/simstudioai/sim/pull/6187/files#diff-7d7525d18ecf7583efaa0d408ec6beace469e423fbbf40183f61673a4f0fc802
https://github.com/simstudioai/sim/pull/6187/files#diff-7d7525d18ecf7583efaa0d408ec6beace469e423fbbf40183f61673a4f0fc802
apps/sim/lib/execution/redis-budget.server.test.tshttps://github.com/simstudioai/sim/pull/6187/files#diff-eea3bba0edab094730c69f9d71f043cac47fc6537d3589123814879dc7c78ce5
View file https://github.com/simstudioai/sim/blob/7bb2ca6ea6e4e6d41d66ae96c35f0550df293982/apps/sim/lib/execution/redis-budget.server.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6187/{{ revealButtonHref }}
apps/sim/lib/execution/redis-budget.server.tshttps://github.com/simstudioai/sim/pull/6187/files#diff-ef75a1d85215e0147119836b4684db6c1c9df11fee79d06b56b0293ba8ab57ce
View file https://github.com/simstudioai/sim/blob/7bb2ca6ea6e4e6d41d66ae96c35f0550df293982/apps/sim/lib/execution/redis-budget.server.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6187/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6187/files#diff-ef75a1d85215e0147119836b4684db6c1c9df11fee79d06b56b0293ba8ab57ce
https://github.com/simstudioai/sim/pull/6187/files#diff-ef75a1d85215e0147119836b4684db6c1c9df11fee79d06b56b0293ba8ab57ce
Please reload this pagehttps://github.com/simstudioai/sim/pull/6187/files
https://github.com/simstudioai/sim/pull/6187/files#diff-ef75a1d85215e0147119836b4684db6c1c9df11fee79d06b56b0293ba8ab57ce
apps/sim/lib/uploads/utils/user-file-base64.server.tshttps://github.com/simstudioai/sim/pull/6187/files#diff-df6aa2815c3351b752a7e2ae94c7769597ae4291706c82f4bd4138969a389f02
View file https://github.com/simstudioai/sim/blob/7bb2ca6ea6e4e6d41d66ae96c35f0550df293982/apps/sim/lib/uploads/utils/user-file-base64.server.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6187/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6187/files#diff-df6aa2815c3351b752a7e2ae94c7769597ae4291706c82f4bd4138969a389f02
https://github.com/simstudioai/sim/pull/6187/files#diff-df6aa2815c3351b752a7e2ae94c7769597ae4291706c82f4bd4138969a389f02
https://github.com/simstudioai/sim/pull/6187/files#diff-df6aa2815c3351b752a7e2ae94c7769597ae4291706c82f4bd4138969a389f02
https://github.com/simstudioai/sim/pull/6187/files#diff-df6aa2815c3351b752a7e2ae94c7769597ae4291706c82f4bd4138969a389f02
apps/sim/lib/workflows/executor/human-in-the-loop-manager.tshttps://github.com/simstudioai/sim/pull/6187/files#diff-bb1129b15dc9783d16371ddc2f8992d36e41c60787a458e77e1c59a7e721d292
View file https://github.com/simstudioai/sim/blob/7bb2ca6ea6e4e6d41d66ae96c35f0550df293982/apps/sim/lib/workflows/executor/human-in-the-loop-manager.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6187/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6187/files#diff-bb1129b15dc9783d16371ddc2f8992d36e41c60787a458e77e1c59a7e721d292
https://github.com/simstudioai/sim/pull/6187/files#diff-bb1129b15dc9783d16371ddc2f8992d36e41c60787a458e77e1c59a7e721d292
https://github.com/simstudioai/sim/pull/6187/files#diff-bb1129b15dc9783d16371ddc2f8992d36e41c60787a458e77e1c59a7e721d292
https://github.com/simstudioai/sim/pull/6187/files#diff-bb1129b15dc9783d16371ddc2f8992d36e41c60787a458e77e1c59a7e721d292
https://github.com/simstudioai/sim/pull/6187/files#diff-bb1129b15dc9783d16371ddc2f8992d36e41c60787a458e77e1c59a7e721d292
https://github.com/simstudioai/sim/pull/6187/files#diff-bb1129b15dc9783d16371ddc2f8992d36e41c60787a458e77e1c59a7e721d292
https://github.com/simstudioai/sim/pull/6187/files#diff-bb1129b15dc9783d16371ddc2f8992d36e41c60787a458e77e1c59a7e721d292
https://github.com/simstudioai/sim/pull/6187/files#diff-bb1129b15dc9783d16371ddc2f8992d36e41c60787a458e77e1c59a7e721d292
https://github.com/simstudioai/sim/pull/6187/files#diff-bb1129b15dc9783d16371ddc2f8992d36e41c60787a458e77e1c59a7e721d292
https://github.com/simstudioai/sim/pull/6187/files#diff-bb1129b15dc9783d16371ddc2f8992d36e41c60787a458e77e1c59a7e721d292
https://github.com/simstudioai/sim/pull/6187/files#diff-bb1129b15dc9783d16371ddc2f8992d36e41c60787a458e77e1c59a7e721d292
Please reload this pagehttps://github.com/simstudioai/sim/pull/6187/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.