Repository navigation
feat(bin): absorb an unchanged dead-agent wait recheck until the daily reminder - #58
Merged
Merged
Conversation
…y reminder An unchanged recheck of a declared pause or captain-held transfer whose worker had already exited at the last surface woke the supervising session every FM_PAUSE_RESURFACE_SECS, and almost all of them ended in a plain acknowledgement. config/absorb-unchanged-pause now accepts an optional second line "daily": the rule then also absorbs that recheck, behind absorb_vetoed and counted in the absorption digest as source=rule, until FM_PAUSE_REMIND_SECS since the last surface. The first recheck, any change of status, open decisions, liveness (alive to dead included) or pane text, and the daily reminder still surface at once; homes without the second line behave as before. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…th daily reminder
alandomio
added a commit
that referenced
this pull request
Oct 7, 2026
…kers (#56) * feat(bin): let the unchanged-pause rule absorb rechecks of exited workers The deterministic unchanged-pause rule skipped a worker whose agent had exited, so every parked, exited worker re-surfaced on each recheck. The rule now treats an exited worker like a live one; captain-held transfers, changed rechecks and the FM_PAUSE_REMIND_SECS reminder valve are unchanged. Jev and the legacy absorb still skip exited workers. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> * no-mistakes(document): Note exited-worker unchanged-pause absorption in architecture doc * feat(bin): absorb an unchanged dead-agent wait recheck until the daily reminder (#58) * feat(bin): absorb an unchanged dead-agent wait recheck until the daily reminder An unchanged recheck of a declared pause or captain-held transfer whose worker had already exited at the last surface woke the supervising session every FM_PAUSE_RESURFACE_SECS, and almost all of them ended in a plain acknowledgement. config/absorb-unchanged-pause now accepts an optional second line "daily": the rule then also absorbs that recheck, behind absorb_vetoed and counted in the absorption digest as source=rule, until FM_PAUSE_REMIND_SECS since the last surface. The first recheck, any change of status, open decisions, liveness (alive to dead included) or pane text, and the daily reminder still surface at once; homes without the second line behave as before. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> * no-mistakes(document): docs: align absorb-unchanged-pause pointers with daily reminder --------- Co-authored-by: Alan Domio <[email protected]> Co-authored-by: Claude Sonnet 5.5 <[email protected]> * feat(skills): add rule classification, no-ops audit and information access to /retrospective, and prune it (#59) * feat(skills): add rule-classification, no-ops audit, review placement and information-access to /retrospective Co-Authored-By: Claude Sonnet 5.5 <[email protected]> * docs(skills): credit /retro wording Co-Authored-By: Claude Sonnet 5.5 <[email protected]> * docs(skills): prune retrospective skill; net shorter than before Co-Authored-By: Claude Sonnet 5.5 <[email protected]> --------- Co-authored-by: Alan Domio <[email protected]> Co-authored-by: Claude Sonnet 5.5 <[email protected]> * feat(bin): let the unchanged-pause rule absorb rechecks of exited workers The deterministic unchanged-pause rule skipped a worker whose agent had exited, so every parked, exited worker re-surfaced on each recheck. The rule now treats an exited worker like a live one; captain-held transfers, changed rechecks and the FM_PAUSE_REMIND_SECS reminder valve are unchanged. Jev and the legacy absorb still skip exited workers. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> * no-mistakes(document): Note exited-worker unchanged-pause absorption in architecture doc * fix(bin): let the daily reminder own exited-worker rechecks when it is on After rebasing onto main's daily reminder, an exited paused wait could be absorbed by the daily rule and then again by the unchanged-pause rule's own window, which would stretch the reminder to twice its length. With the daily line set, the daily rule now owns every exited-worker recheck; plain on keeps the unchanged-pause rule. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> --------- Co-authored-by: Alan Domio <[email protected]> Co-authored-by: Claude Sonnet 5.5 <[email protected]> Co-authored-by: Alan Domio <[email protected]>
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
Firstmate shared tracked material (load firstmate-coding-guidelines). Goal approved by the captain on 2026-10-07: the hourly recheck of an UNCHANGED declared pause must stop waking the supervising session every hour and become a daily reminder. In handle_paused_stale (bin/fm-watch.sh) and the shared rule it uses, a recheck of a declared pause - including one waiting on the captain (captain-held or 'paused: waiting for the captain ...') - whose situation is identical to the one last surfaced is absorbed until FM_PAUSE_REMIND_SECS (24 hours, existing default) has passed since the last surface, ALSO when the agent is found dead, provided 'dead' was already the state at the last surface. These stay immediate: the first recheck of a pause, any change of situation (status line, open decision set, alive->dead transition, pane change), and the existing daily safety valve. Every absorption goes through the single absorb_vetoed veto and is counted in the absorption digest with a deterministic rule source, like the existing unchanged-pause rule. Decision made by the implementer, deliberately: this EXTENDS the existing opt-in config/absorb-unchanged-pause gate with an optional second non-blank line 'daily' (rule_daily_requested, rule_absorb_unchanged_wait), rather than a new config file, so a home that has not opted in - including homes that have only the first line 'on' - sees no behaviour change; docs/configuration.md 'Deterministic unchanged-pause absorption' gains a subsection stating why captain-held waits are now included under the daily reminder (the first surface already told the captain, open decisions stay in the OPEN DECISIONS drain, and a worker dying later is a changed situation that surfaces at once). Do not weaken any guarantee about queued wakes being durable until acknowledged. Tests colocated in tests/fm-watch-triage.test.sh: unchanged recheck with a dead agent absorbed within 24 hours and surfaced after; alive->dead transition surfaced at once; captain-held wait versus plain declared pause; first recheck always surfaced; digest counter increments with source rule; open decision still surfaces; no change without the second line. Evidence: in the captain's home between 2026-10-04 and 2026-10-06, 103 of 389 presented wakes were such rechecks and 101 ended in a plain acknowledgement. Exclusions: this home's private config is not edited by this change; open PR #56 (exited-worker absorption of declared pauses) overlaps handle_paused_stale and is a separate piece of work. Known: tests/fm-watch-triage.test.sh already fails at 'round 3 (churning hash)' on unmodified origin/main in the implementer's environment, so the new rule tests were run as a subset.
What Changed
bin/fm-watch.sh: addsrule_daily_requestedandrule_absorb_unchanged_wait, and tries the new rule first inhandle_paused_stalewhen the agent is dead. Withconfig/absorb-unchanged-pausefirst lineonand second non-blank linedaily, a recheck of apaused:orcaptain-heldwait whose situation (dead agent included) equals the one recorded at its last surface is absorbed untilFM_PAUSE_REMIND_SECShas passed since that surface. It goes throughabsorb_vetoed, skips secondmates and tasks with an open decision, and is only absorbed once itssource: "rule"digest entry is written. Without thedailyline the code path is not taken.docs/configuration.mdgains a "Daily reminder for an unchanged wait whose worker has exited" subsection (why captain-held waits are included, what still surfaces immediately, the reminder as safety valve) and an updatedFM_PAUSE_REMIND_SECSnote;AGENTS.md,docs/architecture.mdand thebin/fm-watch.shheader comments point at the opt-in.tests/fm-watch-triage.test.sh: five newtest_rule_daily_*cases covering first recheck surfaced then absorbed and counted assource=ruleuntil the reminder, no change without the second line, alive-to-dead transition and pane/status change surfaced at once, a captain-held wait, and an open decision still surfacing.🤖 Generated with Claude Code
Risk Assessment
✅ Low: The new absorption is gated behind an opt-in second config line, runs only for a dead agent whose recorded situation is non-empty and unchanged, goes through absorb_vetoed and the digest, and is bounded by the surface stamp that only a real surface rewrites on this path; I found no reachable wrong-absorb path and no contradiction with the intent, only doc and test-hygiene nits.
Testing
I ran the five new daily-reminder tests and six neighbouring rule tests from tests/fm-watch-triage.test.sh as a subset, and all eleven pass. I then drove the real bin/fm-watch.sh through due rechecks for each scenario in the intent and saved the transcript: unchanged dead-worker rechecks are absorbed and counted as source=rule until the reminder, while first rechecks, alive-to-dead, pane and status changes, open decisions and vetoed rechecks all still wake the session. A home with only
onand the base commit both keep waking every recheck. The full test file was not run, and no rendered UI exists for this shell watcher, so the evidence is a CLI transcript.Evidence: Watcher transcript: every scenario on the target commit plus the base-commit comparison
Source: Watcher transcript: every scenario on the target commit plus the base-commit comparison
Evidence: Excerpt: dead worker on a declared pause, opted in to daily (wake reasons shortened)
Evidence: Excerpt: changes of situation stay immediate (wake reasons shortened)
Evidence: Excerpt: not opted in, and the base commit - both wake every recheck
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
AGENTS.md:93- The config inventory line forconfig/absorb-unchanged-pausestill describes the gate as absorbing an unchanged declared-pause recheck "(never captain-held)" and mentions only the first line. With this change an optional second linedailymakes the same file absorb a dead-agent captain-held recheck too, so the inventory now contradicts docs/configuration.md. Update the line to mention the optionaldailysecond line and that it covers captain-held waits whose worker was already dead at the last surface.bin/fm-watch.sh:35- The header sentence "With that file's second line &feat(bin): opt-in machine handoff of one home through an S3 lease #34;daily&feat(bin): opt-in machine handoff of one home through an S3 lease #34;" follows a sentence that names two files, and the nearest one isconfig/jev-absorb, so it reads as ifdailybelongs in the Jev config. The same paragraph also still says "a due PAUSED (never captain-held) recheck" a few lines above. Nameconfig/absorb-unchanged-pauseexplicitly in the new sentence.tests/fm-watch-triage.test.sh:3264-test_rule_daily_surfaces_an_alive_to_dead_transition_at_oncecallspassin the middle of the test, before the "now-dead unchanged recheck is absorbed" and "pane changed on a dead worker" rounds, so the pass line is printed before those assertions run. Its message also claims "a changed pane or status line does too", but no round in the test changes the status line. Movepassto the end of the function and either drop "or status line" from the message or add a round that appends a newpaused:line and expects a surface.tests/fm-watch-triage.test.sh- The colocated tests do not cover two points the intent names: a 'paused: waiting for the captain ...' wait, and the daily rule sitting behind absorb_vetoed (the existing veto test only exercises the live-agent rule). Both behave correctly when driven manually against the real watcher (scenarios D and G in the transcript), so this is a coverage gap, not a defect. I added no tests.tests/fm-watch-triage.test.sh- The full tests/fm-watch-triage.test.sh file was not run, in line with the targeted-validation boundary and the intent's note that it already fails at 'round 3 (churning hash)' on unmodified main. The file has no test filter, so the subset was run by sourcing its definitions and calling the selected test functions; that pre-existing failure was neither reproduced nor ruled out here.Subset oftests/fm-watch-triage.test.sh(definitions sourced, selected functions called):test_rule_daily_absorbs_an_unchanged_dead_agent_recheck_until_the_reminder,test_rule_daily_is_off_without_its_second_line,test_rule_daily_surfaces_an_alive_to_dead_transition_at_once,test_rule_daily_covers_a_captain_held_wait,test_rule_daily_never_absorbs_a_task_with_an_open_decision- all passNeighbouring regression subset from the same file:test_rule_never_absorbs_a_dead_agent_pause_recheck,test_rule_never_absorbs_a_captain_held_recheck,test_rule_absorbs_unchanged_pause_recheck,test_rule_unchanged_pause_is_behind_the_veto,test_rule_safety_valve_forces_a_real_surface_then_resets,test_exited_declared_pause_is_bounded_but_live_gate_surfaces- all passManual drive of the realbin/fm-watch.sh(test fakes for tmux and crew state, FM_POLL=1, each round one due recheck, 8s window before calling a round absorbed),on+daily, dead worker onpaused: waiting on upstream: first recheck wakes, next two absorbed with onesource: ruledigest entry each, recheck past FM_PAUSE_REMIND_SECS wakes, the one after is absorbed againSame drive with only the first lineon: every recheck wakes, no digest entriesSame drive forcaptain-held: awaiting the captain's decisionand forpaused: waiting for the captain to approve the release: first recheck wakes, unchanged dead recheck absorbed and counted assource: ruleSame drive for changes of situation: alive to dead wakes namingagent now dead, pane change wakes namingpane text changed, new status line wakes namingstatus log updated; the unchanged dead recheck after each is absorbedSame drive with an openneeds-decision: every recheck wakes, no digest entriesSame drive with an unread note (presentation cursor rewound): the unchanged dead recheck wakes viaabsorb_vetoed; once the note is presented the next one is absorbedSame drive withkind=secondmate: nosource: ruledigest entry is written; the recheck is taken only by the pre-existing live-agent comparisonSame dead-worker scenario against the base commit's watcher (git archive cfa4ac9 bin) withon+daily: every recheck wakes, no digest entries - the hourly wake the change removesdocs/configuration.md:693- Judgment call: the new subsection carried dated task evidence ("Measured over 2026-10-04 to 2026-10-06, 103 of 389 presented wakes ... 101 ...") in an operator-current page. Per the repo knowledge-placement policy (dated task evidence belongs in PR evidence), I reduced it to an undated concise rationale ("about a quarter were such rechecks, nearly all ending in a plain acknowledgement"), matching the neighbouring section's style. The exact figures should be carried in the PR description; restore them here only if the author wants them tracked.✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.