Repository navigation
fix: treat quiet records as attended across supervision - #6064
Conversation
|
| fm_afk_contract_validate "$record" || return 1 | ||
| fm_afk_contract_log "away posture already recorded at $(fm_afk_contract_read_field "$record" entered); a refresh leaves it untouched" | ||
| standing=$(fm_afk_contract_record_mode "$record") | ||
| [ "$standing" = quiet ] || FM_AFK_CONTRACT_ENTRY_MODE=away |
There was a problem hiding this comment.
Quiet daemon under away record
On a non-host home with a live away record, /quiet proceeds to entry and daemon start. This line keeps the record away, but the quiet procedure passes FM_AFK_MODE=quiet to start or start-native, which writes a quiet daemon flag. The daemon can then operate in quiet mode while record consumers still treat the captain as away. Refuse quiet entry over the away record before the daemon flag can change; the captain’s return must come first.
There was a problem hiding this comment.
Known limitation, not fixed in this PR. This /quiet-over-a-live-away-record edge is in the code from #6033 (now on main), not this PR's diff. It is tracked as its own follow-up (fm-quiet-daemon-host-away-handoff-r1, behind AFK rung 3e).
…nd watcher A quiet record left without its daemon (a quiet start that never ran or was interrupted) was read as away by the supervision host, so it parked a present captain's main and held captain outcomes for a return that never comes, and the watcher and daemon silenced captain-held rechecks on record presence. The host's posture checks, the watcher's and daemon's captain-held silencing, and the host's outcome path (branch report, drain BRANCH OUTCOMES, relocated branch authority, the owners' away wake note, and the Codex checkpoint bound) now ask the record owner's away-or-quiet reading, so only an away record is away. A live away record keeps today's behavior.
8827a5d to
b12f916
Compare
…6064) * fix(bin): read a live quiet record as a present captain at the host and watcher A quiet record left without its daemon (a quiet start that never ran or was interrupted) was read as away by the supervision host, so it parked a present captain's main and held captain outcomes for a return that never comes, and the watcher and daemon silenced captain-held rechecks on record presence. The host's posture checks, the watcher's and daemon's captain-held silencing, and the host's outcome path (branch report, drain BRANCH OUTCOMES, relocated branch authority, the owners' away wake note, and the Codex checkpoint bound) now ask the record owner's away-or-quiet reading, so only an away record is away. A live away record keeps today's behavior. * no-mistakes(document): Correct quiet-record documentation and supervision guidance * no-mistakes(document): Clarify quiet-record posture and captain-held rechecks * no-mistakes(document): Clarify quiet-record posture in documentation
…6064) * fix(bin): read a live quiet record as a present captain at the host and watcher A quiet record left without its daemon (a quiet start that never ran or was interrupted) was read as away by the supervision host, so it parked a present captain's main and held captain outcomes for a return that never comes, and the watcher and daemon silenced captain-held rechecks on record presence. The host's posture checks, the watcher's and daemon's captain-held silencing, and the host's outcome path (branch report, drain BRANCH OUTCOMES, relocated branch authority, the owners' away wake note, and the Codex checkpoint bound) now ask the record owner's away-or-quiet reading, so only an away record is away. A live away record keeps today's behavior. * no-mistakes(document): Correct quiet-record documentation and supervision guidance * no-mistakes(document): Clarify quiet-record posture and captain-held rechecks * no-mistakes(document): Clarify quiet-record posture in documentation
…6064) * fix(bin): read a live quiet record as a present captain at the host and watcher A quiet record left without its daemon (a quiet start that never ran or was interrupted) was read as away by the supervision host, so it parked a present captain's main and held captain outcomes for a return that never comes, and the watcher and daemon silenced captain-held rechecks on record presence. The host's posture checks, the watcher's and daemon's captain-held silencing, and the host's outcome path (branch report, drain BRANCH OUTCOMES, relocated branch authority, the owners' away wake note, and the Codex checkpoint bound) now ask the record owner's away-or-quiet reading, so only an away record is away. A live away record keeps today's behavior. * no-mistakes(document): Correct quiet-record documentation and supervision guidance * no-mistakes(document): Clarify quiet-record posture and captain-held rechecks * no-mistakes(document): Clarify quiet-record posture in documentation
Stack
This PR builds on #6033 (now merged to main), whose
fm_afk_contract_away_presentit reuses; the branch is rebased onto main, so the diff is this change alone.Known limitations, not fixed here
/afkflips the record to away but the quiet daemon keeps supervising, so the return catch-up may load/quietinstead of/afk. Pre-existing and tracked separately./quietentered over a live away record on a non-host home can leave a quiet daemon beside an away record (Review finding atbin/fm-afk-contract.sh:510and the Greptile thread). That code is fix: stop quiet mode from holding requested actions for return #6033's, not this PR's diff; it is a known limitation tracked separately. The Risk Assessment line below refers to it.Live verification provenance (read with the Testing section)
The pipeline Test step did not re-drive every scenario itself. Provenance, plainly:
doneoutcome handledposture=attended, the Stop hook rewoke the primary, and the primary drained BRANCH OUTCOMES and asked for the merge call): live-verified with real Claude Code primaries and the real Claude host engine on the pre-pipeline fix commit1f965e6f(patch-identical to this PR's fix commit), not re-driven by the pipeline test step. A pre-fix run on the fix: stop quiet mode from holding requested actions for return #6033 head reproduced the bug: hostposture=away, three captain outcomes withheld, primary never woken for 18+ minutes.1f965e6f, not re-driven by the pipeline test step./afkover a quiet record: record rewritten to away, hostposture=away, outcome held for return (unchanged away behavior), same commit.34e5d854(the pushed headb12f9165adds only comment and documentation changes). Under the quiet record the host loggedboundary after 60sand the checkpoint returnedno actionable wake within 60s(attended bound kept); under the away record the host parked withFM_SUPERVISION_HOST_PARK_SECONDS=3600and no boundary at 91s (bound raised).The regression tests for these paths each failed on the fix: stop quiet mode from holding requested actions for return #6033 head and passed on the fix.
Intent
yes
Context: that "yes" approved routing two /quiet fixes found during the /quiet live validation (AFK revamp rung 3c-4, landed as #5928). This is the second: a live quiet record is treated as away by the supervision host and watcher posture checks, parking a present captain. Evidence (review finding quiet-fallback-parks-present-captain on the 3c-4 re-land): a quiet fallback records
mode: quiet, but bin/fm-supervision-host.sh's posture checks treat any existing quiet or away record as away. When a quiet record is live with no daemon flag (for example after a failed daemon start restored its backup and left the record), the host parks the present captain and withholds outcomes, and bin/fm-watch.sh afk_record_present silences captain-held rechecks on record presence alone. The fix makes a live quiet record mean a present captain at those consumers. The watcher part changes daemon-backed quiet mode on every home (captain-held items are rechecked while a quiet daemon runs); that is intended, since a quiet captain is present.The first fix, routed together and landed before this one, made daemon-backed quiet mode stop writing a hold-for-return reading of the record.
The AFK revamp's standing words apply: "2 should be done by opus crewmates" and "this is a major architectural revamp so i want it to do very careful live validation including regression in isolated live environments with some real complex sessions before calling it done. it's ok to use my real llm tokens here".
What Changed
Risk Assessment
✅ Low: The posture changes are bounded to the intended consumers, and this review found no new material source defect beyond previously declined concerns.
Testing
The checkpoint test and focused behavioral checks passed; a real Claude lab confirmed quiet mode, and the contract CLI distinguished quiet from away. Full host and watcher scripts timed out, and no real host-engine wake or live watcher recheck was completed.
Evidence: Claude lab quiet-mode interaction
Source: Claude lab quiet-mode interaction
Evidence: Disposable lab posture CLI output
Source: Disposable lab posture CLI output
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 1 issue found ✅
bin/fm-afk-contract.sh:510- On a non-host home with a live away record,/quietfollows its documented quiet-check → enter → start path. This line silently keeps the record away, butbin/fm-afk-launch.sh:422uses the explicitFM_AFK_MODE=quietto write a quiet daemon flag; both thestartpath at :730 andstart-nativeat :791 can do so. The daemon then operates as quiet while record consumers still treat the captain as away. Refuse the quiet entry over an away record before either start can change the flag, so the documented return happens first.✅ No issues found.
claudeCLI on its privatetmux -L fm-labsocket. Tmux refused the worktree-confined socket path with “File name too long”; a s…bin/fm-afk-contract.sh enter,mode, andreadbackagainst a disposable home, including an attempted quiet entry over an away recordbash tests/fm-afk-contract.test.shbash tests/fm-afk-launch.test.shFM_TEST_ONLY=test_captain_held_rechecked_under_a_quiet_record bash tests/fm-watch-triage.test.shFM_TEST_ONLY=test_captain_held_never_rechecked_while_away_record_exists bash tests/fm-watch-triage.test.shbash tests/fm-supervision-host.test.sh(timed out after reaching the quiet-record and captain-rewake cases)Attempted a disposable real-Claude primary on the lab’s private tmux socket; tmux refused the socket path as too longLive validation:⚠️ inconclusive - 1 of 4 scenarios driven live against the product
bash tests/fm-watch-checkpoint.test.shFocusedfm-supervision-host.test.shcases for quiet-record outcomes, decisions, and Stop-hook rewakeFocusedfm-watch-triage.test.shcases for quiet rechecks and away suppressionRan the real Claude CLI in a disposable lab home; entered quiet mode and read back its modeRanfm-afk-contract.shagainst a disposable lab home to compare quiet and away postureAttempted the full host and watcher test scripts; both timed out before completing✅ **Document** - passed
✅ No issues found.
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ No issues found.
✅ **Push** - passed
✅ No issues found.
✅ No issues found.