fix: make Pi primary watcher away-mode aware and retire watcher markers on teardown - #14
Open
BohnBawerick wants to merge 5 commits into
Open
fix: make Pi primary watcher away-mode aware and retire watcher markers on teardown#14BohnBawerick wants to merge 5 commits into
BohnBawerick wants to merge 5 commits into
Conversation
Generated ship, scout, dreamer, and secondmate briefs now include literal needs-decision and resolved lines with [key=<slug>] before the colon, matching the documented position.
…osts Linux remote-job start stacked supervisors when worker.pid was stale, so heavy e2e scripts leaked process groups and missed observable waits. Stop stray supervisors for that code root before launching another. Tests now wait on observables instead of pid 1 or tick counts, reap daemons by pid, skip a herdr pane that never becomes ready, and hoist repeated PR-check fixtures.
BohnBawerick
force-pushed
the
fm/fm-pi-watch-afk-double-presentation
branch
from
August 21, 2026 18:56
0101618 to
672c6d0
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
Make the Pi primary watcher extension away-mode aware so the same wake is never presented twice while state/.afk exists, and retire window-keyed and task-keyed watcher internal markers during cleanup in bin/fm-teardown.sh alongside the status-presentation row so a torn-down task's pane can no longer produce stale wakes. Provide test coverage for away-mode wake suppression and marker retirement.
What Changed
isAfkActive()checks in.pi/extensions/fm-primary-pi-watch.tsto suppress wake message delivery, arm process spawning, actionable close restoration, and continuity retries whilestate/.afkis active.fm_wake_retire_task_markersinbin/fm-wake-lib.shand called it during task teardown inbin/fm-teardown.shto clean up task-keyed and window-keyed watcher internal markers.docs/and added regression tests intests/fm-pi-watch-extension.test.shandtests/fm-teardown.test.sh.Risk Assessment
✅ Low: The change cleanly implements away-mode awareness in the Pi watcher extension and marker retirement during task teardown with thorough behavioral tests.
Testing
Executed targeted automated test suites for the Pi watcher extension, task teardown, away-mode lifecycle, and wake triage, followed by end-to-end evidence captures demonstrating away-mode wake suppression and task marker retirement; all checks passed.
Evidence: Pi watch extension away-mode wake suppression and stand-down log
Source: Pi watch extension away-mode wake suppression and stand-down log
Demonstrates Pi primary watcher extension checking state/.afk: startArm stands down with away-mode guidance, wake delivery via sendUserMessage is suppressed during away mode, and normal wake delivery resumes after away mode is cleared.Evidence: fm-teardown.sh window-keyed and task-keyed marker retirement log
Source: fm-teardown.sh window-keyed and task-keyed marker retirement log
Demonstrates bin/fm-teardown.sh retiring all 11 task-keyed (.seen-*, .hb-surfaced-*) and window-keyed (.stale-*, .hash-*, .count-*, .wedge-escalations-*, .paused-*) watcher markers during task cleanup so torn-down panes cannot produce stale wakes.Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
./tests/fm-pi-watch-extension.test.sh./tests/fm-teardown.test.sh./tests/fm-afk-return.test.sh./tests/fm-afk-launch.test.sh./tests/fm-wake-queue.test.sh./tests/fm-wake-drain-unread-status.test.sh./tests/fm-watch-arm.test.sh./tests/fm-watch-checkpoint.test.sh./tests/fm-watch-triage.test.shnode /tmp/generate_pi_afk_evidence.mjs/tmp/generate_teardown_marker_evidence.sh✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.