Repository navigation
fix(workflows): scope wait, timer, and join replay markers to claim epoch (#760) - #780
Merged
Merged
Conversation
rcbevans
force-pushed
the
fix/760-snooze-wait-cursors
branch
from
November 26, 2026 06:29
306b69f to
e0fbbb9
Compare
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 changed
Scopes wait, timer, and child-join replay markers to the executing
claim_epochso a node re-claimed at a refunded attempt ordinal (afterSnoozeor a non-consuming deferral) does not inherit a replay marker written by an earlier execution and re-hold on an already-answered wait, fired timer, or expired join.src/taskq/workflows/api/_ctx_wait.py,_ctx_timer.py,_childflow.py):read_claim_marker/write_claim_markerhelpers storing{epoch, ...}under a new per-attempt key family so rows stamped by older releases read as no marker and older workers never attempt an integer cast on a JSON object.claim_epochat replay-consuming sites while preservingreassert_hold's standing-hold re-entry contract.docs/guides/workflows.md, anddocs/api-reference/workflows.mdW5, and addedtests/test_wf_snooze_wait_cursors_pins.py(20 integration tests covering both non-consuming deferral forms across all three sites, direct and fleet execution, loop bodies, and zero-epoch refusals).Verification
.venv/bin/pytest tests/test_wf_snooze_wait_cursors_pins.py -q: 20 passed.venv/bin/pytest tests/test_docs_pins.py -q: 9 passed.venv/bin/ruff check,.venv/bin/ruff format --check,.venv/bin/pyrighton changed files: 0 errors, 0 warningsCloses #760