René's URL Explorer Experiment


Title: fix(run-engine): correct park deadline and snapshot state for debounced parked runs by 0ski · Pull Request #4708 · triggerdotdev/trigger.dev · GitHub

Open Graph Title: fix(run-engine): correct park deadline and snapshot state for debounced parked runs by 0ski · Pull Request #4708 · triggerdotdev/trigger.dev

X Title: fix(run-engine): correct park deadline and snapshot state for debounced parked runs by 0ski · Pull Request #4708 · triggerdotdev/trigger.dev

Description: Two defects that surface when a run parked on an external deployment id gets pushed by a debounce key. Both were reproduced against a local instance before being fixed. 1. The run is expired before it is due now | status | statusReason | delayUntil | expiredAt 13:57:06 | EXPIRED | EXTERNAL_DEPLOYMENT_NOT_FOUND | 14:01:37 | 13:57:02 Killed 4m35s before its own scheduled start, blaming a missing deployment. Why. The park deadline is armed once, when the run is first parked, from max(now, delayUntil) + deadline. Debounce pushes delayUntil out afterwards and nothing re-arms it: rescheduleDelayedRun reschedules enqueueDelayedRun:, not expireParkedExternalDeploymentRun: the redis-worker reschedule is an update-only ZADD … XX, and a parked run has no enqueueDelayedRun job, so that call is a silent no-op Repeat triggers on one key walk delayUntil away from a deadline that no longer moves. Once it crosses, the run dies while parked and not yet due. Fix. The expiry job already loads delayUntil, so it re-arms from the current value and returns instead of expiring a run that is not due. The guard lives in the expiry job rather than the debounce path deliberately: it covers every caller that moves delayUntil, so a future call site can't reintroduce this by forgetting to re-arm. It stays bounded by the debounce max-duration contract, so a hot key can't postpone expiry indefinitely. 2. The run reports itself as delayed while it is parked RUN_CREATED | PENDING_VERSION | Run is waiting for a deployment of 'debounce-test-2' DELAYED | DELAYED | Delayed run was rescheduled to a future date ← after one debounce push The row stays PENDING_VERSION; the latest snapshot claims DELAYED, so the run page describes a parked run as delayed. Happens on the first push. Fix. rescheduleRun hardcoded DELAYED/DELAYED. The snapshot statuses are now supplied by the caller and default to DELAYED, so the ordinary delayed path is byte-identical, and rescheduleDelayedRun passes the parked statuses through when the run is parked. Reproducing Repeated triggers on one debounce key against an id that hasn't landed: curl … -d '{"options":{"externalDeploymentId":"x","debounce":{"key":"k","delay":"5m"}}}' Three triggers correctly fold into one parked run; the defects show up on the pushes. Testing Two tests, each verified red before green and failing alone: a run whose delay was pushed past the deadline stays PENDING_VERSION instead of expiring a debounce push on a parked run leaves a RUN_CREATED/PENDING_VERSION snapshot, not DELAYED 56 passed across parking, pendingVersion, delayedRunSystem and debounce; 43 passed in PostgresRunStore. Typecheck, lint, format clean. Notes Stacks on #4665, so it lands after the whole external-deployment-id series. No changeset: this fixes unreleased behaviour introduced by the stack below it, so no user has seen it. Both found by Devin's review on #4664, and both confirmed end to end on a local instance before fixing.

Open Graph Description: Two defects that surface when a run parked on an external deployment id gets pushed by a debounce key. Both were reproduced against a local instance before being fixed. 1. The run is expired before...

X Description: Two defects that surface when a run parked on an external deployment id gets pushed by a debounce key. Both were reproduced against a local instance before being fixed. 1. The run is expired before...

Opengraph URL: https://github.com/triggerdotdev/trigger.dev/pull/4708

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:78282d54-c014-c86f-c0ea-118805800924
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8F82:228216:30AC82:450B7C:6AFAFDB3
html-safe-nonce35193d40f7eb771f82ada3e30bc44f800a6d06faa892c0c4404ebc4fae9af574
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RjgyOjIyODIxNjozMEFDODI6NDUwQjdDOjZBRkFGREIzIiwidmlzaXRvcl9pZCI6Ijk3NDk2NTY5MTE4MDA1NTk4NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacb9a375dbae514791195492c3fb2185f615c9d2cad8527da44ac77ff8815d6069
hovercard-subject-tagpull_request:4314774329
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/triggerdotdev/trigger.dev/pull/4708/files
twitter:imagehttps://avatars.githubusercontent.com/u/1408674?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1408674?s=400&v=4
og:image:altTwo defects that surface when a run parked on an external deployment id gets pushed by a debounce key. Both were reproduced against a local instance before being fixed. 1. The run is expired before...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None54f7a6886649661c85eee945cca0773566bfb4065370e0429b7c8f7204184650
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/triggerdotdev/trigger.dev git https://github.com/triggerdotdev/trigger.dev.git
octolytics-dimension-user_id95297378
octolytics-dimension-user_logintriggerdotdev
octolytics-dimension-repository_id572570113
octolytics-dimension-repository_nwotriggerdotdev/trigger.dev
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id572570113
octolytics-dimension-repository_network_root_nwotriggerdotdev/trigger.dev
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
releasecf8450eb633ec589502c42ff6f4072e40db65da3
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/triggerdotdev/trigger.dev/pull/4708/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fpull%2F4708%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%2Ftriggerdotdev%2Ftrigger.dev%2Fpull%2F4708%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=triggerdotdev%2Ftrigger.dev
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4708/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4708/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4708/files
triggerdotdevhttps://github.com/triggerdotdev
trigger.devhttps://github.com/triggerdotdev/trigger.dev
Codehttps://github.com/triggerdotdev/trigger.dev
Issues203 (203)https://github.com/triggerdotdev/trigger.dev/issues
Pull requests67 (67)https://github.com/triggerdotdev/trigger.dev/pulls
Discussionshttps://github.com/triggerdotdev/trigger.dev/discussions
Actionshttps://github.com/triggerdotdev/trigger.dev/actions
Projectshttps://github.com/triggerdotdev/trigger.dev/projects
Security and quality39 (39)https://github.com/triggerdotdev/trigger.dev/security
Insightshttps://github.com/triggerdotdev/trigger.dev/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2Fnew%2Fchoose
0skihttps://github.com/0ski
oskar/feat-external-id-dashboardhttps://github.com/triggerdotdev/trigger.dev/tree/oskar/feat-external-id-dashboard
oskar/fix-park-deadline-rearmhttps://github.com/triggerdotdev/trigger.dev/tree/oskar/fix-park-deadline-rearm
Conversation 10 https://github.com/triggerdotdev/trigger.dev/pull/4708
Commits 1 https://github.com/triggerdotdev/trigger.dev/pull/4708/commits
Checks 45 https://github.com/triggerdotdev/trigger.dev/pull/4708/checks
Files changed https://github.com/triggerdotdev/trigger.dev/pull/4708/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4708/files
fix(run-engine): correct park deadline and snapshot state for debounced parked runs https://github.com/triggerdotdev/trigger.dev/pull/4708/files#top
Show all changes 1 commit https://github.com/triggerdotdev/trigger.dev/pull/4708/files
f62294a fix(run-engine): correct park deadline and snapshot state for debounc… 0ski Aug 19, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4708/commits/f62294a119f0bdca4e1e564df3768a622391a886
Clear filters https://github.com/triggerdotdev/trigger.dev/pull/4708/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4708/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4708/files
index.ts https://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-d29236a78d70dd8a019a2ec308d8eab0eda9f5fbf116d19d5c99b8f573a1b5df
delayedRunSystem.ts https://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-3a4f072e6a2c4a9d224e1488e61f4c84f8a4aa7e6bad4ebdfafcf80daead1053
pendingVersionSystem.ts https://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-675b81b290134f31c5e792ffb2ceedca10d3b6af30c47e972ea88d4910ca0445
externalDeploymentParking.test.ts https://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-18f2491fb6214c8975b2194f01ad69bf3c70ee34ecc25d008a64036ca2edae8e
PostgresRunStore.ts https://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-9c06c7000b359bcaa2f0b637af253ebfe2e2d9cf43568e42592b0e26f6910258
types.ts https://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-3b72267802fbd082b93adb08e3e014e75f40eb755c8a4f14bd7a76148f49ffe8
internal-packages/run-engine/src/engine/index.tshttps://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-d29236a78d70dd8a019a2ec308d8eab0eda9f5fbf116d19d5c99b8f573a1b5df
View file https://github.com/triggerdotdev/trigger.dev/blob/f62294a119f0bdca4e1e564df3768a622391a886/internal-packages/run-engine/src/engine/index.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4708/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-d29236a78d70dd8a019a2ec308d8eab0eda9f5fbf116d19d5c99b8f573a1b5df
https://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-d29236a78d70dd8a019a2ec308d8eab0eda9f5fbf116d19d5c99b8f573a1b5df
internal-packages/run-engine/src/engine/systems/delayedRunSystem.tshttps://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-3a4f072e6a2c4a9d224e1488e61f4c84f8a4aa7e6bad4ebdfafcf80daead1053
View file https://github.com/triggerdotdev/trigger.dev/blob/f62294a119f0bdca4e1e564df3768a622391a886/internal-packages/run-engine/src/engine/systems/delayedRunSystem.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4708/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-3a4f072e6a2c4a9d224e1488e61f4c84f8a4aa7e6bad4ebdfafcf80daead1053
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4708/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4708/files
https://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-3a4f072e6a2c4a9d224e1488e61f4c84f8a4aa7e6bad4ebdfafcf80daead1053
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4708/files
https://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-3a4f072e6a2c4a9d224e1488e61f4c84f8a4aa7e6bad4ebdfafcf80daead1053
internal-packages/run-engine/src/engine/systems/pendingVersionSystem.tshttps://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-675b81b290134f31c5e792ffb2ceedca10d3b6af30c47e972ea88d4910ca0445
View file https://github.com/triggerdotdev/trigger.dev/blob/f62294a119f0bdca4e1e564df3768a622391a886/internal-packages/run-engine/src/engine/systems/pendingVersionSystem.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4708/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-675b81b290134f31c5e792ffb2ceedca10d3b6af30c47e972ea88d4910ca0445
https://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-675b81b290134f31c5e792ffb2ceedca10d3b6af30c47e972ea88d4910ca0445
https://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-675b81b290134f31c5e792ffb2ceedca10d3b6af30c47e972ea88d4910ca0445
https://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-675b81b290134f31c5e792ffb2ceedca10d3b6af30c47e972ea88d4910ca0445
https://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-675b81b290134f31c5e792ffb2ceedca10d3b6af30c47e972ea88d4910ca0445
https://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-675b81b290134f31c5e792ffb2ceedca10d3b6af30c47e972ea88d4910ca0445
https://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-675b81b290134f31c5e792ffb2ceedca10d3b6af30c47e972ea88d4910ca0445
https://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-675b81b290134f31c5e792ffb2ceedca10d3b6af30c47e972ea88d4910ca0445
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4708/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4708/files
https://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-675b81b290134f31c5e792ffb2ceedca10d3b6af30c47e972ea88d4910ca0445
https://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-675b81b290134f31c5e792ffb2ceedca10d3b6af30c47e972ea88d4910ca0445
https://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-675b81b290134f31c5e792ffb2ceedca10d3b6af30c47e972ea88d4910ca0445
internal-packages/run-engine/src/engine/tests/externalDeploymentParking.test.tshttps://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-18f2491fb6214c8975b2194f01ad69bf3c70ee34ecc25d008a64036ca2edae8e
View file https://github.com/triggerdotdev/trigger.dev/blob/f62294a119f0bdca4e1e564df3768a622391a886/internal-packages/run-engine/src/engine/tests/externalDeploymentParking.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4708/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-18f2491fb6214c8975b2194f01ad69bf3c70ee34ecc25d008a64036ca2edae8e
https://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-18f2491fb6214c8975b2194f01ad69bf3c70ee34ecc25d008a64036ca2edae8e
internal-packages/run-store/src/PostgresRunStore.tshttps://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-9c06c7000b359bcaa2f0b637af253ebfe2e2d9cf43568e42592b0e26f6910258
View file https://github.com/triggerdotdev/trigger.dev/blob/f62294a119f0bdca4e1e564df3768a622391a886/internal-packages/run-store/src/PostgresRunStore.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4708/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-9c06c7000b359bcaa2f0b637af253ebfe2e2d9cf43568e42592b0e26f6910258
https://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-9c06c7000b359bcaa2f0b637af253ebfe2e2d9cf43568e42592b0e26f6910258
internal-packages/run-store/src/types.tshttps://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-3b72267802fbd082b93adb08e3e014e75f40eb755c8a4f14bd7a76148f49ffe8
View file https://github.com/triggerdotdev/trigger.dev/blob/f62294a119f0bdca4e1e564df3768a622391a886/internal-packages/run-store/src/types.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4708/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-3b72267802fbd082b93adb08e3e014e75f40eb755c8a4f14bd7a76148f49ffe8
https://github.com/triggerdotdev/trigger.dev/pull/4708/files#diff-3b72267802fbd082b93adb08e3e014e75f40eb755c8a4f14bd7a76148f49ffe8
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.