Repository navigation
fix(schedules): re-examine stranded schedule claims within minutes instead of seven days - #10397
Merged
Merged
Conversation
…stead of seven days
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
[Medium impact] The PR appears safe to merge; no blocking issues were found. SummaryHeld schedule claims are now checked again after ten minutes instead of waiting seven days.
|
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
lastQueuedAtwas older than the max execution timeout plus buffer (7 days + 5 min), so two cases left schedules silently stuck for a week while still showingactivewith no failures:updatedAtis the re-check clock, and re-examining a held claim leaveslastQueuedAtuntouched (it is the run's identity for the worker's claim-guarded writes), so a re-check never makes a live run look stale, and long runs are re-checked every 10 minutes rather than every ticklib/workflows/schedules/claim.ts; the remaining 7-day constant in the route is renamed toFALLBACK_SCHEDULE_EXECUTION_LEASE_MS, which is all it still doesType of Change
Testing
lib/workflows/schedules/claim.integration.tsagainst real Postgres. Red→green verified locally:lastQueuedAtas the re-check clock (re-takes a recently re-examined claim)app/api/schedules/execute/route.test.ts(37 passing)check:sql-date-binding,check:file-names,check:comment-hygiene,check:test-patterns,check:source-conventions,check:boundaries; full gate in CIChecklist
test-auditauthoring gate)