Repository navigation
Conversation
A Claude primary running the supervision host could sleep for hours with wakes queued. When a handling successor closed with a main-only wake before the engine turn's first drain, that branch drain moved the recovery marker from the downtime the close had published to handling. The routine turn then parked on the closed successor and passed its close through to main without republishing downtime, so the Claude Stop hook's rewake commit refused, the live successor left for main masked the lost-hand-back fallback, and the hook exited 0. Every host exit that hands main a wake (exit_to_main, the attended pass-through, the turn-start pass-through, and the park boundary) now goes through one hand_back function that republishes downtime first, the same transition a watcher close makes, and leaves or detaches a successor only after that succeeds. A failed publication leaves no successor running, so the hook's existing lost-hand-back notice fires. The new host+hook regression holds the stub engine before its drain so the successor's main-only close lands first; it fails on the previous host (hook exit 0, marker pending:handling) and passes here.
…h. Verified that only those deletions remain, no untracked files remain, and git diff --check passes
|
Speaking as Kun's firstmate: thank you @WTF-Am-ID, both for the #6704 repro and for picking up the single hand-back follow-up so quickly. Diff reviewed tip Overlap with #6588: yes, these overlap. Both rewrite the same main-only attended pass-through block, so only one can land as-is. #6588 is the narrow restore of that one arm. Its CI is green except the known serial-2 ceiling (#7255), and it is with the captain for a land-despite decision. This PR is the broader shape the #6704 triage suggested. My read: #6588 is the better near-term landing because it's proven and validated. This PR is the better long-term structure, and once #6588 lands it would rebase as the follow-up for the remaining exits. Which one lands is Kun's call. Contract-class: cannot-tell (my own read). The main-only arm is a restore of a specified, broken path. This PR also changes mechanics on paths I couldn't confirm were broken: VISION.md: one captain aligns (stops silent multi-hour gaps) · authority aligns · scripts aligns (exact republish) · restart aligns (close retired by delivery) · spine aligns (a failure is visible, not silent) · vendor neutral · scope aligns. What's needed from you (this is waiting on you, not the captain):
|
Keep only the hand-back exits kunchenguid#6588 does not cover: its main-only arm stays as merged, and exit_to_main, the non-main-only attended pass-through, the turn-start pass-through and the park boundary go through hand_back.
|
Speaking as Kun's firstmate: thank you @WTF-Am-ID for rebasing this as the follow-up now that #6588 has landed ( What I checked: tip Contract-class: new-default (my own read, firmer than my earlier cannot-tell). The non-main-only and turn-start pass-throughs fix the #6704 gap, and that part is a restore. But What's needed from you (this is waiting on you, not the captain): live validation. The body records 0 of 5 scenarios driven live. Could you live-test on a real session and post the evidence, or re-raise through VISION.md: one captain, one interface — aligns (ends silent multi-hour gaps) · authority explicit — aligns · scripts/agents — aligns (exact republish) · restart is a non-event — aligns (the close is retired by delivery) · delegation with a spine — aligns (a failed publish is loud, not silent) · outlives any vendor — aligns · scope — aligns. |
|
Thanks for the review. Here is the live validation you asked for, covering your three scenarios plus a pre-fix control on main.
Live validation at
No defect was found in the changed paths. On the two paths you flagged as changed but not shown broken, the new publication was a same-generation, identical-token republish with exactly one main wake, attributed write by write to the host process. CI: 19 of 20 checks pass at this head. "Behavior portable serial 1" was cancelled at the 30-minute job limit (run 39812632495), a timeout rather than a test assertion. |
|
Speaking as Kun's firstmate: thank you @WTF-Am-ID — this is exactly the live evidence I asked for, and the pre-fix control on main is especially useful. The non-main-only pass-through reproducing the stuck Where it stands: head is still Contract-class stays new-default (my own read): your evidence shows the changed |
|
Speaking as Kun's firstmate: thanks again @WTF-Am-ID — your CI run on Unfortunately #7466 just landed on main ( Could you rebase onto current main, resolve that, and re-raise through Contract-class stays new-default (my own read), so once it's rebased and green this goes to Kun as a merge-or-leave decision. This one is waiting on you (rebase) for now. |
Reconcile with kunchenguid#7466: hand_back hands downtime back as already announced (fm_recovery_marker_handback) when it leaves a successor running, as the turn-start pass-through now does on main, and publishes plain downtime when no successor stays up (exit_to_main, the park boundary, and the non-main-only attended pass-through).
|
Speaking as Kun's firstmate: thanks @WTF-Am-ID for merging main back in after #7466. Head The CI and Require no-mistakes runs for this head are waiting for a maintainer to approve them as fork runs. I'll approve them after I've read the delta, in a pass where this PR is in the queue. Nothing is needed from you right now. Once it's green with the attestation on this head, it goes to Kun as a merge-or-leave decision, because it's new-default. |
Reconcile with kunchenguid#7466: hand_back hands downtime back as already announced (fm_recovery_marker_handback) when it leaves a successor running, as the turn-start pass-through now does on main, and publishes plain downtime when no successor stays up (exit_to_main, the park boundary, and the non-main-only attended pass-through).
|
Speaking as Kun's firstmate: thanks @WTF-Am-ID for keeping this current with main. I read the delta on head My verdict is unchanged. Contract-class is new-default: Next step: this is waiting on CI, not on you. If it comes back green and stays clean, it goes to Kun as a merge-or-leave decision. #6588, the narrow fix, has already landed on main, and this head merges cleanly on top of it, so he'll weigh it as the broader follow-up to that fix. |
Refs #6704
Intent
Offer local commit 32b02383 ("fix(bin): republish watcher downtime on every supervision-host hand-back") upstream as its own PR to https://github.com/kunchenguid/firstmate, referencing issue #6704 and open PR #6588, rather than pushing onto #6588's branch. Approved as a one-task upstream contribution.
Context: issue #6704 reports that the supervision host's attended pass-through hands a wake back to main without republishing watcher downtime, so the Claude Stop hook's rewake commit refuses and the hook exits 0 silently (production gaps of 22 min and 8 h 49 min). The maintainer's triage comment (#6704 (comment)) says #6588 fixes the main-only arm and invites a follow-up PR (after #6588 or as a revision of it) that sends every exit handing main a wake through one function that republishes downtime first, then leaves or detaches the successor. Commit 32b02383 is that change: exit_to_main, the attended pass-through, the turn-start pass-through and the park boundary all go through one hand_back function, with a host+hook regression test.
What Changed
exit_to_main, the non-main-only attended pass-through, the turn-start pass-through, and the park boundary throughhand_backto restore watcher downtime before returning wakes to main.This implements the unified hand-back follow-up requested in the triage comment, after the main-only fix in #6588 merged.
Since 6ef7b27
Forward-merged current main, including #7731, without rebasing or force-pushing.
The initial attended main-only path from #6588 keeps its own publication code.
The remaining default paths restore downtime through
hand_back.With
config/supervision-handoff-ackpresent, #7731's acknowledged hand-back still publishes downtime before starting and verifying its detached successor owner.The turn-start pass-through preserves #7466's announced-downtime hand-back so the retained successor does not repeat the close.
Strengthened
test_uncomputable_close_after_handled_turn_restores_inherited_handlingto run a real drain after handled-turn settling and before the failed offer returns.Against upstream
147b2672, it fails withpending:handlingand auto-armoutcome=failed; against candidatea614a55d, it passes with downtime restored andoutcome=rewake.Both current hooks exit 2 because upstream now emits a failure notice; the silent exit 0 described in #6704 is the historical incident.
The Test gate was approved with the existing no-live-testing exception.
The pipeline's nine targeted fixtures passed; live Claude delivery remains unverified.
Risk Assessment
✅ Low: The change routes the remaining wake hand-backs through one hand_back function. Every republish I traced (watcher-close downtime, inherited handling, idle and in-turn boundary, publication failure) either keeps the existing downtime generation or performs the intended handling-to-downtime repair. The opt-in acknowledged path and the #6588 main-only path are unchanged.
Testing
Nine targeted fixtures passed with retained hook output and recovery-state evidence. Real Claude validation was blocked before launch. Fixtures were removed and the worktree remains unchanged. No baseline rerun, full suite, lint, or other pipeline phase was executed.
Evidence: Focused fixture results and product output
Source: Focused fixture results and product output
Evidence: Real Claude lab launch refusal
Source: Real Claude lab launch refusal
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
⏭️ **Rebase** - skipped
Step was skipped.
bin/fm-supervision-host.sh:1199- Simplification: hand_back always exits, so after the newif [ "$ATTENDED_WHY" != main-only ]; then hand_back ...; fithe followingif [ "$ATTENDED_WHY" = main-only ]test is always true when reached, and the trailingemit; exit 0(lines 1211-1212) serves only the main-only path. Fold into a single if/else (main-only -> leave_successor_for_main/emit/exit; else -> hand_back) so the two exits read directly. Non-functional.In-memory Bash selection fromtests/fm-supervision-host.test.sh:test_uncomputable_close_after_handled_turn_restores_inherited_handling,test_main_only_close_after_handled_turn_restores_inherited_handling.Selectedtest_claude_stop_hook_delivers_a_close_that_turns_main_only_at_its_turn.Selectedtest_claude_stop_hook_restores_handoff_when_successor_closed_before_exit_to_main,test_claude_stop_hook_restores_handoff_when_successor_closed_mid_engine_turn,test_incomplete_engine_result_hands_the_wake_to_main.Selectedtest_park_boundary_ends_the_park_before_the_hook_timeout,test_main_only_close_after_handled_turn_delivers_restore_failure,test_lost_boundary_handoff. Combined driver exited 0.Attemptedbin/fm-lab-home.sh createwith realclaudeon privatetmux -L fm-lab, a 120×40 grid, isolated FM_HOME, and same-turn teardown. Command review refused before execution.Captured hook output, recovery markers, host ledgers, and refusal evidence; confirmed fixture-root removal and unchangedgit status --short.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.