Skip to content

fix: watcher stale suppression survives restarts for done-awaiting-merge panes#2

Merged
raywest merged 3 commits into
mainfrom
fm/fm-watch-mergewait-stale-b1
Jul 19, 2026
Merged

fix: watcher stale suppression survives restarts for done-awaiting-merge panes#2
raywest merged 3 commits into
mainfrom
fm/fm-watch-mergewait-stale-b1

Conversation

@raywest

@raywest raywest commented Jul 19, 2026

Copy link
Copy Markdown
Owner

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.

Ray West 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.
@raywest
raywest merged commit 6cfdb29 into main Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant