Repository navigation
Conversation
Confidence Score: 4/5The PR should not merge until distinct replacement waits are prevented from inheriting an unrelated declaration's long suppression window. Timestamp-only pause throttling suppresses a changed pause reason or captain-held key because both signal and stale handling continue to treat it as the already-inspected declaration. Files Needing Attention: bin/fm-watch.sh, tests/fm-watch-triage.test.sh Reviews (1): Last reviewed commit: "fix(watch): hold the declared-wait caden..." | Re-trigger Greptile |
| if [ -e "$STATE/.paused-$key" ] \ | ||
| && [ "$(age_of "$STATE/.paused-resurfaced-$key")" -lt "$PAUSE_RESURFACE_SECS" ]; then |
There was a problem hiding this comment.
Replacement waits inherit suppression
When a worker changes directly to a different paused: reason or captain-held decision key, the existing timestamp-only marker suppresses the new declaration because neither signal handling nor pause cleanup distinguishes its identity, causing the replacement obligation to remain hidden until the previous PAUSE_RESURFACE_SECS window expires.
Knowledge Base Used:
|
Speaking as Kun's firstmate: this is waiting on the author. Reviewed body + Security: clean. No Contract-class: restore. Declared-wait / pause cadence already exists; this stops status-append / pane-churn from re-arming stale wakes while the same declaration is held. Unconfigured run is meant to match the already-promised bounded pause behavior, not add a new always-on product path. VISION:
Greptile FAILURE (P1): distinct replacement waits / changed pause reason or captain-held key can inherit an unrelated declaration's long suppression window after the one-shot live inspection + throttle change. Please address or rebut with a test before we treat this as merge-ready. Attestation: MISSING on tip Workflow approval this pass (tip action_required after diff review):
Land-eligible: NO until MATCH + green CI/NM + Greptile P1 cleared. Waiting on you, not the captain. |
Problem
A live worker on a current declared wait can keep emitting stale wakes when its status log appends another still-declaring line.
The status-file signature changes on every append, so the watcher treats each append as a new cadence even though the wait never ended.
The regression was added and run against upstream/main at
353a8f0fbefore the implementation:Fix
Treat the live-agent inspection as one-shot once the declaration-held pause marker exists.
Keep the long-cadence throttle across pane changes, watcher restarts, and later
paused:or same-keycaptain-heldappends.Continue to clear the cadence when the last status stops declaring a wait or authoritative state proves work resumed.
Keep
needs-decision,blocked, anddoneimmediately actionable on both signal and stale paths.Tests
bin/fm-test-run.sh tests/fm-watch-triage.test.sh- passed, 1 suite and 0 failures.bin/fm-lint.sh- passed with ShellCheck 0.11.0 and actionlint 1.7.12.bin/fm-doc-audience-check.sh- passed with 89 surfaces and 302 local links.git diff --check- passed.A broader
bin/fm-test-run.sh --changed --base upstream/mainrun passed 17 of 18 selected suites.The unrelated
tests/fm-wake-queue.test.shlock fixture failed immediately witha subshell reclaimed its parent live hold (rc=13)and reproduced standalone; this patch does not modify its lock implementation or fixture.Evidence
The final commit is based directly on current upstream/main
1c00e86c.The regression now reports:
The diff is limited to
bin/fm-watch.sh,tests/fm-watch-triage.test.sh, and the watcher contract indocs/architecture.md.