Repository navigation
fix(cron): skip a shutdown-killed recurring slot instead of pausing (RIG-8801) - #47
Merged
mattwilkinsonn merged 5 commits intoNov 10, 2026
Conversation
…RIG-8801) A recurring job whose run was killed by a gateway shutdown and whose outcome is unknown now skips only that slot and stays scheduled. Any pause that remains notifies through the cron failure delivery path once. Co-authored-by: Matt Wilkinson <matt@rigel.build>
…RIG-8801) Co-authored-by: Matt Wilkinson <matt@rigel.build>
…(RIG-8801) Co-authored-by: Matt Wilkinson <matt@rigel.build>
…IG-8801) Co-authored-by: Matt Wilkinson <matt@rigel.build>
…very (RIG-8801) Co-authored-by: Matt Wilkinson <matt@rigel.build>
Collaborator
Author
|
Review rounds (single
All-clear on 7a5ccaf. Tests: |
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.
What does this PR do?
A recurring cron job whose run is killed by a gateway shutdown no longer pauses forever. On mattmini,
nemo-dev-oversightended paused with "Canonical cron unknown" and missed about 100 runs silently.Related Issue
RIG-8801 (Linear).
Type of Change
Changes Made
cron/jobs.py: a shutdown kill stampsshutdown_interrupted_executionwith the run's execution id. Newskip_unknown_occurrencebooks that slot as skipped, advancesnext_run_at, keeps the job scheduled, does not spend a repeat count, and lifts the recovery pause.cron/scheduler_authority.py: anunknownreceipt follows one ordered, retry-safe path. If already booked, or its slot already completed (for example by the feat(cron): keep a run cut off by a gateway restart as pending replay (RIG-8084) #45 replay), the receipt is retired. If it matches the shutdown stamp, the slot is skipped. Anything else pauses once and sends one notice via_deliver_crash_failure.cron/executions.py,cron/scheduler.py: the execution id goes through the shutdown sweep and the skip is recorded in run history.How to Test
tests/cron/test_unknown_outcome_pause.py: 11 passed. The first 3 cases failed before the fix ('paused' == 'scheduled',0 == 1notices). Also covered: both shutdown phases, replay ordering, crashes between writes, a missing ledger row.scripts/run_tests.sh tests/cron -j 2: 1547 passed. The 2 failures aretest_cron_script.pycases that already fail onrigel-release.Checklist
Code
Documentation & Housekeeping
cron-internals.mdupdatedFor New Skills
N/A.
Screenshots / Logs
N/A.
Refs RIG-8801
Co-authored-by: Matt Wilkinson matt@rigel.build