Repository navigation
fix: stop repeated stale-pane wakes from resetting the rearm resurface bound - #304
Merged
Merged
Conversation
sKeLe100
force-pushed
the
fm/watch-stale-resurface-loop
branch
from
November 22, 2026 15:41
6c47e16 to
60b8118
Compare
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.
Intent
Watcher fix: in this home, stale-pane wakes re-fire about every 10 seconds (wakes 301-306 on 2026-11-20). The rearm bound only trips on an unchanged queue, and each new stale wake changes the queue, so the bound never trips. Fix it so a repeated stale wake for the same pane or task is suppressed or counted toward the bound, and add a test. Keep it minimal and upstream-shaped.
What Changed
fm_rearm_resurface_decideinbin/fm-wake-lib.shno longer fingerprints the raw queue bytes. It now checksums a normalized view in which a repeatedstalewake for an already-queued key collapses to that key's first row. A pane that stays stale re-announces with a fresh epoch/sequence and idle-age payload. That used to change the fingerprint on every poll and keep the bound from tripping. A new stale key, any other wake, an acknowledgement, or a session restart still starts a fresh streak. An unreadable queue falls back toabsent.docs/watcher-continuity.md("Resurface bound") and the function's header comment now describe the normalized fingerprint and the stale-wake collapse.tests/fm-watch-recovery-loop.test.sh.tests/fm-test-compute.test.shgets a one-line change that isolates it fromFM_PC02_HOSTNAME.Risk Assessment
✅ Low: The change is a small, fail-open normalization of the resurface fingerprint that collapses repeated stale rows per key, backed by a behavioral regression test and an updated owning doc.
Testing
Baseline changed-tests passed. I ran the recovery-loop test against the real watcher scripts in a disposable state dir. It passes with the fix and fails against the base lib, so it reproduces the reported bug. Worktree is clean.
Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
🔧 **Rebase** - 2 issues found → auto-fixed ✅
bin/fm-test-run.sh- merge conflict rebasing onto origin/maindocs/fm-test-portable-shards.md- merge conflict rebasing onto origin/main🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
bin/fm-test-run.sh --changed --exclude-family real-herdr-gated --exclude-quarantined --pc02-if-idlebash tests/fm-watch-recovery-loop.test.shon the fix (all 5 pass)same test with pre-fix bin/fm-wake-lib.sh (new test fails: streak reset to 1), then restored✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.