fix: watcher stale suppression survives restarts for done-awaiting-merge panes#2
Merged
Merged
Conversation
added 3 commits
July 18, 2026 19:11
A done-then-paused crew (a green-CI PR awaiting the captain's merge decision) refired a bare "stale: <window>" wake on every freshly-armed watcher, even though .stale-<key> already held the current pane hash. Root cause: once a stale hash is already classified and the crew's own status log still says paused:, the watcher re-derives the verdict via crew_absorb_class on every recheck. A stale/misattributed no-mistakes run-step (e.g. an aborted run whose terminal outcome predates the later paused: line) can report a non-working, non-paused verdict; the old code treated any such verdict as a first-sight surface, which also deleted the .paused-<key> flag - guaranteeing the identical misfire on the next poll or restart forever. Fixed by making only a definitive working verdict break a declared pause; any other verdict (including a misattributed run-step outcome) stays in the paused/long-recheck-cadence treatment, at all three sites that read pause_state_class/crew_absorb_class. Genuine wedge detection for a non-paused stale pane is untouched. This fixes the restart-suppression defect only. The larger question of how firstmate should distinguish a done-awaiting-merge crew from a wedged one (kunchenguid#703, kunchenguid#694) is out of scope here.
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.
Fork-main landing of the validated watcher fix (upstream PR kunchenguid#720 remains open). Regression test fails pre-fix, passes post-fix; suites green; captain pre-authorized 2026-07-18.