0.21.2: a run killed by a redeploy no longer parks its source for a whole cadence - #90
Merged
Conversation
…hole cadence startRun pushes next_run_at a cadence forward before the run begins, and a container that dies mid-run leaves that in place: the tick's reaper marked the run abandoned but left the source parked. For a bulk list of ten thousand pages read once a month, a redeploy in the wrong minute meant a month with nothing to show. The reaper now asks the source to run again at once (paused sources excepted), so the walk resumes from its cursor at the next tick. Two tests against the in-process Postgres. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MwAoNvWzezmBHeT7oDHo3C
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.
Found while watching the first bulk list on nichedb.dev: today's redeploys can kill a run mid-walk, and
startRunhad already pushednext_run_ata full cadence out. The tick'sreapStaleRunsmarked such a run abandoned but left the source parked, which for a monthly bulk list of ten thousand pages meant a month with nothing to show.reapStaleRunsnow returns the reaped runs' sources and sets theirnext_run_at = now()(paused sources excepted), so the walk resumes from its cursor at the next tick.test/rollout-recovery.test.jsrun the same statements against the in-process Postgres: an abandoned run is marked and its source is due again; a run inside its window and a paused source are left alone.Version 0.21.2.
🤖 Generated with Claude Code
https://claude.ai/code/session_01MwAoNvWzezmBHeT7oDHo3C