Repository navigation
fix(run-tracker): retire a run on every keyed run-done verdict so set-visibility is not blocked - #406
Merged
danielhanold merged 7 commits intoOct 8, 2026
Conversation
…sibility and cannot be cancelled
run-unclaimed and no-attributable-claim now drive the same ownership closeout as run-complete, so run.json leaves active instead of stranding the run for the live-run scan. runTrackerCompleteRun carries the outcome token so success lines are unchanged; its one direct test caller passes VerdictRunComplete.
…lete (review finding: run-unclaimed retirement dead-ends resume) Retiring a run-unclaimed run to completed left run.json naming its change, so a later run start --resume for that change found it and answered "nothing to resume", which run cancel cannot clear. FindRunByChange now skips a completed run whose run-tracker record's latest report line is not run-done ... run-complete; such a run owns no worktree and holds no reservation, so the resume mints a fresh run. A run-complete line, or an unreadable record, still refuses as before.
…spatch returns (review finding: verdict remedy can end a live unclaimed dispatch) liveRunsUnder cannot tell a finished run that claimed nothing from a live dispatch that has not claimed yet; running the keyed verdict on the live one makes the record terminal and the child's claim is refused. The remedy now reads "once its dispatch has returned, run `docket run verdict <key>`".
… every refused run (review finding: verdict remedy loops on a halted change) For a run cancel refuses (authority-unavailable, claim-mismatch), the keyed verdict retires the run only on a run-done outcome; a run-stop verdict leaves run.json active. Soften liveRunsUnder's comment to promise only that.
danielhanold
deleted the
fix/a-finished-run-left-active-in-run-json-blocks-set-visibility
branch
October 8, 2026 09:34
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
A run that ended with a keyed
run-doneverdict other thanrun-complete(no-attributable-claim,run-unclaimed) leftrun.jsonatactive.set-visibilitythen refused as if a run were live and namedrun cancel, which refuses unclaimed runs, so nothing but a hand edit could clear it.run-doneverdict now retires its run through the existing successful-run closeout (run.jsonendscompleted); report lines unchanged; a blocked closeout reportsrun-stop … completion-unaccountedand replays on a repeat verdict.runCancelOwner): cancel when it would accept, "once its dispatch has returned, rundocket run verdict <key>" otherwise, by hand for a cancelling run with no claim.FindRunByChangeskips a completed run whose latest report line is notrun-complete, so resume still works for a change whose earlier run endedrun-unclaimed.Review (deep tier)
run-unclaimedrun retired tocompleteddead-ends a laterrun start --resumedocket run verdict <key>remedy could end a still-live, not-yet-claimed dispatchliveRunsUndercomment overstated what the verdict remedy guaranteesTest plan
go run ./cmd/docket development test).run-unclaimed; guards mutation-tested.