Skip to content

fix: deliver supervision hand-backs after successor exit - #6227

Closed
alexputici wants to merge 1 commit into
kunchenguid:mainfrom
alexputici:fm/fm-host-handoff-lost
Closed

alexputici wants to merge 1 commit into
kunchenguid:mainfrom
alexputici:fm/fm-host-handoff-lost

Conversation

@alexputici

Copy link
Copy Markdown

Intent

"Replied via the dashboard, lavish says "agent not listening" so you may not have received them"
Standing instruction: "Apply that same high standard to engineering excellence: lint, test failures, and test flakiness. If you see one, even if it is not caused by what you are working on right now, still get it fixed."
Context: on 2026-09-30, on a Claude primary with the supervision host on and attended, the host latched after repeated engine errors (errors=4, cooldown 1200s). Its next failed engine turn logged a to-main hand-back ("the supervision session could not take this wake ... this wake is yours") at epoch 1790751869, but the primary session never received a Stop hook rewake. No watcher process remained, the last watcher beat stayed at epoch about 1790751784, and the claude autoarm epoch record was left at outcome=arming with a dead owner pid. The fleet then sat unsupervised for about 4.8 hours: two worker completions and three captain board answers went unseen, and the Lavish board source showed owner none until a manual reconcile. The requested outcome is that this failure path can no longer silently leave the fleet unsupervised, delivered as a maintainable upstream correction.

What Changed

  • bin/fm-supervision-host.sh now republishes the downtime recovery marker in exit_to_main before emitting a to-main hand-back, since a successor that already closed during the engine turn can no longer restore it; without this, Claude's Stop hook silently discarded the rewake and left the fleet unsupervised. If that publication fails, the host logs to-main downtime-unrestored and exits nonzero without a close, so the arm owner reports the delivery failure instead of treating it as success.
  • tests/fm-supervision-host.test.sh adds held-emptyresult/held-captain stub modes and two tests: failed probes and captain outcomes rewake main after the successor closes mid-engine-turn, and a failed downtime publication surfaces a committed arm failure (exit 2, outcome=failed) rather than losing the wake. tests/fm-supervision-host-attended-live-e2e.test.sh adds an opt-in failed-probe scenario against a real Claude primary, with FM_SUPERVISION_HOST_FAILED_PROBE_CONTROL_REF selecting a pre-fix negative control.
  • docs/supervision-host.md documents the downtime restoration in the failure direction and updates the test table; docs/verification/supervision.md records the dated 2026-09-30 live proof (Claude Code 2.1.285) and docs/verification/runtime-backends.md links to it.

Risk Assessment

✅ Low: A one-function production change that restores the recovery marker at the single shared hand-back exit point used by every failure path, verified idempotent against all reachable marker states and sibling exit paths, with behavior-level regression tests at unit and live-E2E level including a pre-fix negative control, and consistent documentation.

Testing

Drove the exact field failure live against a real installed Claude Code 2.1.285 primary in disposable labs: on the pre-fix host (eb77f02) a failed latched engine probe after its successor closed left the idle primary asleep with ledger outcome=arming and no watcher, and on the fixed host the same ordering delivered real Stop-hook feedback, the primary drained and acknowledged, and the next cycle armed a live watcher with errors=4 cooldown=1200 retained; the broader attended scenario (four hand-offs including the successor's own close, a remote-listener event, and an at-turn main-only close) also passed, and the full hermetic family suite (67 assertions through the real host, Stop hook, watcher, and drain scripts against a stub engine) passed including the new adversarial guard where a forced downtime-publication failure exits nonzero with a "watcher auto-arm FAILED" notice instead of silently losing the wake. Terminal capture of the rewoken primary is included as reviewer-visible evidence; the delivery surface is a terminal session, so the pane capture is the rendered end-user surface.

  • Live validation: ✅ go - 6 of 6 scenarios driven live against the product
Scenario Result Live Evidence
Pre-fix negative control: on the pre-fix host (eb77f02), a failed latched engine probe whose successor watcher closed during the turn leaves the idle Claude primary asleep - no Stop-hook rewake, no wa… ✅ pass live attended-live-e2e.log: failed-probe-control evidence line and ok line; real Claude 2.1.285 haiku primary in an isolated lab
Fixed host delivers the hand-back: the same failed probe ordering on the corrected host wakes the idle Claude primary through the real tracked Stop hook; the primary drains, runs the printed acknowled… ✅ pass live attended-live-e2e.log: failed-probe evidence line and ok line; positive-pane-acked.txt terminal capture shows the Stop hook feedback, drain, and acknowledgement
No regression on other hand-back paths: four further attended hand-offs (main-only pass-through, the successor's own close, a stand-in remote listener event, and a close that turns main-only at its tu… ✅ pass live attended-live-e2e.log: positive scenario steps 2-5 and its ok line
Hermetic regression pin: through the real host, Stop hook, watcher, and drain scripts with a stub engine, both a failed probe and a captain outcome rewake main after the successor closed during the en… ✅ pass live supervision-host-suite.log: 'ok - host+hook: failed probes and captain outcomes rewake main after the successor closed during the engine turn'
Adversarial guard: when the downtime republication itself fails (injected mktemp failure on the marker temp file), the host exits nonzero without an actionable close, the hook exits 2 with a 'firstmat… ✅ pass live supervision-host-suite.log: 'ok - host+hook: failed hand-back publication surfaces a committed failure instead of silently losing the wake'
Full family suite for the changed script and its modified stub stays green (60 tests, 67 ok assertions, 0 failed) ✅ pass live supervision-host-suite.log: FM_TEST_SUMMARY total=1 failed=0, EXIT=0
Evidence: Live attended e2e log (pre-fix control, fixed failed-probe, positive scenario)

Source: Live attended e2e log (pre-fix control, fixed failed-probe, positive scenario)

FM_TEST_BEGIN 2026-09-30T12:34:51Z tests/fm-supervision-host-attended-live-e2e.test.sh family=live-harness-optin expected_gate_skip=live-capability
# 06:35:07 failed-probe-control step 1: primary idle (claude pid 78904, 2.1.285 (Claude Code), model haiku); tracked Stop hook registered; config/supervision-host present; host pid 92482 parked on watcher 93290; listener runner 94093; captain prompts so far: 1
# 06:35:07 failed-probe-control transcript: ~/.claude/projects/-private-var-folders-wp-05fsx4zj5z34mby9-bfg2lch0000gn-T-fm-sh-attended-live-0kCTrw-failed-probe-control-fm/3871f4ab-1cf0-467b-9c96-94ab129146af.jsonl
# 06:35:28 failed probe control (eb77f02b16aeca9533102070de34b1f8812f4fa2): no rewake, no watcher, ledger outcome=arming after 15s
ok - attended failed probe live (2.1.285 (Claude Code)): failed-probe-control
# 06:35:45 failed-probe step 1: primary idle (claude pid 25342, 2.1.285 (Claude Code), model haiku); tracked Stop hook registered; config/supervision-host present; host pid 42999 parked on watcher 43834; listener runner 44873; captain prompts so far: 1
# 06:35:45 failed-probe transcript: ~/.claude/projects/-private-var-folders-wp-05fsx4zj5z34mby9-bfg2lch0000gn-T-fm-sh-attended-live-0kCTrw-failed-probe-fm/00ca4493-039a-47d6-918b-f0e5a0e1cbdc.jsonl
# 06:36:00 failed probe: Stop-hook feedback delivered; primary drained and acknowledged; next cycle has live watcher; errors=4 cooldown=1200
ok - attended failed probe live (2.1.285 (Claude Code)): failed-probe
skip: control: set FM_SUPERVISION_HOST_ATTENDED_LIVE_CONTROL_REF to a pre-fix ref to run the negative control
# 06:36:17 positive step 1: primary idle (claude pid 82338, 2.1.285 (Claude Code), model haiku); tracked Stop hook registered; config/supervision-host present; host pid 6754 parked on watcher 7678; listener runner 9187; captain prompts so far: 1
# 06:36:17 positive transcript: ~/.claude/projects/-private-var-folders-wp-05fsx4zj5z34mby9-bfg2lch0000gn-T-fm-sh-attended-live-0kCTrw-positive-fm/d00ea647-3734-4d63-a8d9-f4f17f04cfa2.jsonl
# 06:36:17 positive step 2: event 1 appended at 1790771777 (demo.status needs-decision)
# 06:36:19 positive step 2: host log: 1790771778	pass-through	attended	main-only
# 06:36:19 positive step 2: successor watcher pid 15856 alive; ledger: epoch=1 owner_pid=5088 outcome=arming updated_at=1790771775; marker: announced:downtime:7678.1790771777.u5wE5I
# 06:36:26 positive step 2: rewake delivered at 1790771779 (Stop hook exited 2 with the banner); ledger: epoch=1 owner_pid=5088 outcome=rewake updated_at=1790771779 session_pid=82338 recovery_generation=7678.1790771777.u5wE5I
# 06:36:26 positive step 2: primary turn ran: bin/fm-wake-drain.sh;bin/fm-wake-drain.sh --ack-through 4 --recovery-generation 7678.1790771777.u5wE5I;
# 06:36:27 positive step 3: turn end re-armed: 1790771787	start	gen=host-38323-1790771787; still following successor 15856
# 06:36:31 positive step 3: event 2 appended at 1790771791
# 06:36:49 positive step 3/4: successor 15856 closed: arm_pid=38949 watcher_pid=15856 origin=attached started_at=1790771787 ended_at=1790771803 exit_code=unknown signal=unknown reason=attached-delivered-wake
# 06:36:49 positive step 3/4: its close was delivered: rewake at 1790771804; host log: 1790771803	pass-through	attended	main-only
# 06:36:53 positive step 4: event 3 appended to the stand-in remote log at 1790771813
# 06:37:14 positive step 4: listener mirrored it (1 ingested) and it was delivered at 1790771828; listener runner 9187 -> 9187, owned at every check
# 06:37:18 positive step 5: event 4, a routine working line on task demo2, appended at 1790771838
# 06:37:32 positive step 5: the host accepted it and confirmed its successor's handling handoff (marker announced:handling:18818.1790771840.25BLqu at 1790771852); a needs-decision on demo2 landed then, before the turn's start
# 06:37:32 positive step 5: host log: 1790771852	pass-through	attended	main-only; no engine turn
# 06:37:33 positive step 5: rewake delivered at 1790771852; ledger: epoch=4 owner_pid=34857 outcome=rewake updated_at=1790771852 session_pid=82338 recovery_generation=18818.1790771840.25BLqu
# 06:37:37 positive step 5: primary turn ran: bin/fm-wake-drain.sh;bin/fm-wake-drain.sh --ack-through 12 --recovery-generation 18818.1790771840.25BLqu;
# 06:37:39 positive step 5: turn end re-armed: 1790771858	start	gen=host-92575-1790771858; watcher 93158 live; listener runner 9187 still owned
# 06:37:39 positive: captain prompts after setup: 0 (mirror holds only the setup prompt)
ok - attended live (2.1.285 (Claude Code)): an idle primary is woken for four hand-offs, the successor's own close and a close that turned main-only at its turn included, with the listener owned throughout
FM_TEST_END 2026-09-30T12:37:45Z tests/fm-supervision-host-attended-live-e2e.test.sh exit=0 duration_ms=173922 gate_skip=false
FM_TEST_SUMMARY total=1 failed=0 skipped_gate=0 duration_ms=173987
FM_TEST_SUMMARY_FAMILY family=live-harness-optin count=1 duration_ms=173922 failed=0
FM_TEST_SLOWEST rank=1 script=tests/fm-supervision-host-attended-live-e2e.test.sh duration_ms=173922
EXIT=0
Evidence: Hermetic supervision-host family suite log (67 ok, 0 failed)

Source: Hermetic supervision-host family suite log (67 ok, 0 failed)

FM_TEST_BEGIN 2026-09-30T12:34:54Z tests/fm-supervision-host.test.sh family=afk expected_gate_skip=none
ok - report surface: only the branch actor's current turn may report, and only on the tasks its wake names
ok - report surface: visible late outcomes queue a relay, while silent outcomes remain stored without a wake or note
ok - dispatch entry: the host reads branch eligibility, the offer rule, and the wake prompt from the Pi branch's own owner
ok - drain: BRANCH OUTCOMES runs on a Claude home by default and on another primary with the file, never with off, and never on Pi
ok - drain: captain outcomes come first, and routine overflow collapses into a count one drain clears
ok - drain: repeated captain outcomes collapse per task, and the byte cap presents only the run its acknowledgement covers
ok - drain: a long away window costs one short drain, captain outcomes collapsed per task and routine overflow counted, and nothing from it is shown again
ok - drain: the BRANCH OUTCOMES budgets count bytes, cutting multibyte summaries by whole characters in any locale
ok - drain: branch outcomes stay unread when a projection of the store fails
ok - drain: branch outcomes stay unread and the drain fails when jq is missing
ok - drain: branch outcomes stay unread when the drain cannot print them
ok - drain: a legacy backlog is presented with each outcome's age and a check-first instruction, never adopted
ok - drain: a keyed decision survives acknowledgement through a newer outcome for its task
ok - drain: an outcome carried across a switch off Pi comes back with its age, never adopted
ok - drain: an outcome nothing has shown is presented until acknowledged, and a repeated acknowledgement changes nothing
ok - drain: an outcome the host drain presented but main never acknowledged stays unprocessed across a switch to Pi
ok - drain: an outcome the host drain presented but main never acknowledged survives an outcome index repair
ok - host: an attended wake the branch may take is handled on the engine, and its routine outcome never wakes main
ok - host: an attended captain outcome wakes main once and stays in its drain until main acknowledges it
ok - host: a captain outcome recorded after the captain left waits for the return, then reaches main's drain
ok - host: a quiet record without its daemon is a present captain, so outcomes and decisions reach main
ok - host: an attended decision close stays main's exactly as the plain arm delivers it
ok - host: an off written while the host is parked sends the next attended close to main, naming the opt-out
ok - host: a main-only pass-through leaves the successor watcher running and the close undelivered for main
ok - host: an attended close whose main session cannot be identified reaches main and runs no engine turn
ok - host: a decision close accepted away whose turn starts attended still reaches main unchanged
ok - host: an attended close whose task turns main-only before its turn still reaches main unchanged
ok - host+hook: an attended main-only pass-through rewakes main and keeps its successor watcher
ok - host+hook: a captain outcome beside a quiet record rewakes the present captain with no away note
ok - host+hook: failed probes and captain outcomes rewake main after the successor closed during the engine turn
ok - host+hook: failed hand-back publication surfaces a committed failure instead of silently losing the wake
ok - host+hook: a Claude home without config/supervision-host runs the host at the default engine, and an off file restores the plain arm
ok - host+hook: a close that turns main-only at its turn rewakes main and keeps its successor watcher
ok - host+hook: failed at-turn downtime write notifies main despite a healthy successor
ok - host+hook: a successor close that lands during main's turn is delivered at the next turn end
ok - host: a primary with no verified dialog mirror keeps every attended close on main, and its away posture still runs
ok - host: each wake carries the captain's dialog since the last wake, without operational input
ok - host: the dialog mirror, its feed, and the wake file are owner-only
ok - host: dialog a turn never completed with its report (a park boundary, a stopped turn, no report) reaches the next turn
ok - host: an attended wake whose mirror is missing, cannot be read (at the feed or at the prompt), or holds a malformed entry reaches main before any engine turn, and the cursor stays put
ok - host: an away wake is handled on the engine through the branch contract and never reaches main
ok - host: an engine turn that records no outcome hands its durable wake to main
ok - host: a captain return during an engine turn hands that turn's outcomes to main
ok - host: silent outcomes are excluded from both captain-return handoff paths
ok - host: an early visible outcome survives more than 1,000 same-turn receipts
ok - host: an outcome lookup failure forces a visible main handoff
ok - host: an outcome recorded after the return reaches main even when its host dies at the turn's end
ok - host: a killed predecessor's engine is reaped and the next host removes its turn files
ok - host: a turn that reports but leaves its granted rows queued hands the wake to main
ok - host: a captain return during a failed engine turn still hands that turn's outcomes to main
ok - host: an engine turn whose result is incomplete hands its wake to main
ok - host: two engine errors latch the session, main keeps every away wake in the cooldown, a failed probe doubles it up to its cap, and a report recovers it silently
ok - host: an attended close in a latched session reaches main as the arm printed it and leaves the latch as it was, and a home that opted out with off never reads it
ok - host: attended, two engine errors latch the session, main keeps every close unchanged in the cooldown, a failed probe doubles it up to its cap, and a routine probe's recovery stays in the ledger, off main
ok - host: an engine turn is bounded, and tool processes outside its process group are reaped
ok - host: a restarted host stops, by recorded identity, the cycle a killed predecessor left running
ok - host: the park ends itself with a boundary wake and a stopped watcher
ok - host: waiting closes cannot carry the park past its boundary
ok - host: a close whose margin runs out while the successor starts reaches main at the boundary without a turn
ok - host: the park's test clock is inert without the test marker
ok - host: a park at or beyond the Stop-hook registration falls back to the default boundary
ok - host: an owner's later park limit lets a turn outlive the boundary, and no other limit does
ok - host: the first cycle's status streams once, --restart replaces a stale watcher, and an owner predecessor makes a handling successor
ok - host: an unchanged held outcome reaches the captain once across cadences, and a later decision on the task still does
ok - host: a home naming an unverified engine hands every away wake to main with the reason
ok - host: a host outside the session-lock owner stands down without arming
ok - host: a host under a superseded auto-arm generation stands down without touching the owner
FM_TEST_END 2026-09-30T12:44:09Z tests/fm-supervision-host.test.sh exit=0 duration_ms=555219 gate_skip=false
FM_TEST_SUMMARY total=1 failed=0 skipped_gate=0 duration_ms=555286
FM_TEST_SUMMARY_FAMILY family=afk count=1 duration_ms=555219 failed=0
FM_TEST_SLOWEST rank=1 script=tests/fm-supervision-host.test.sh duration_ms=555219
EXIT=0
Evidence: Terminal capture: real Claude primary handling a Stop-hook rewake (drain + acknowledgement)

Source: Terminal capture: real Claude primary handling a Stop-hook rewake (drain + acknowledgement)



✻ Cooked for 5s · done 6:36 AM

⏺ Stop hook feedback

⏺ Bash(bin/fm-wake-drain.sh)
  ⎿  1790771815 8       signal  labremote.status        needs-decision: /private/var/folders/wp/05fsx4zj5z34mby9_bfg2lch0000gn/T/fm-sh-attended-live.0kCTrw/positive/fm/state/labremote.status
     WAKE_ACK_REQUIRED: after handling completes run bin/fm-wake-drain.sh --ack-through 8 --recovery-generation 74468.1790771815.VWcYUM
     wake annotation: latest wake-EVENT observed at drain, not current state: labremote.status: needs-decision [at=1790771813] [key=lab-e3]: remote asks: approve the lab deploy?
     OPEN DECISIONS (still open, folded from the durable status logs - not just the latest line):
     demo [key=lab-e1] needs-decision: pick export format A or B
     demo [key=lab-e2] needs-decision: pick region east or west
     labremote [key=lab-e3] needs-decision: remote asks: approve the lab deploy?
     OPEN DECISIONS: close one by answering it: bin/fm-send.sh <task> --resolve-key <key> '<answer>'
     WARNING: queued wakes pending - drain them with bin/fm-wake-drain.sh before anything else.

⏺ Bash(bin/fm-wake-drain.sh --ack-through 8 --recovery-generation 74468.1790771815.VWcYUM)
  ⎿  (No output)

⏺ ACKED

✻ Worked for 6s · done 6:37 AM

⏺ Stop hook feedback

⏺ Bash(bin/fm-wake-drain.sh)
  ⎿  1790771853 12      signal  demo2.status    needs-decision: /private/var/folders/wp/05fsx4zj5z34mby9_bfg2lch0000gn/T/fm-sh-attended-live.0kCTrw/positive/fm/state/demo2.status
     WAKE_ACK_REQUIRED: after handling completes run bin/fm-wake-drain.sh --ack-through 12 --recovery-generation 18818.1790771840.25BLqu
     wake annotation: unread wake-EVENT since last drain, not current state: demo2.status: working [at=1790771838]: rollout prep started
     wake annotation: latest wake-EVENT observed at drain, not current state: demo2.status: needs-decision [at=1790771838] [key=lab-e4]: pick a rollout window
     OPEN DECISIONS (still open, folded from the durable status logs - not just the latest line):
     demo [key=lab-e1] needs-decision: pick export format A or B
     demo [key=lab-e2] needs-decision: pick region east or west
     demo2 [key=lab-e4] needs-decision: pick a rollout window
     labremote [key=lab-e3] needs-decision: remote asks: approve the lab deploy?
     OPEN DECISIONS: close one by answering it: bin/fm-send.sh <task> --resolve-key <key> '<answer>'
     WARNING: queued wakes pending - drain them with bin/fm-wake-drain.sh before anything else.

⏺ Bash(bin/fm-wake-drain.sh --ack-through 12 --recovery-generation 18818.1790771840.25BLqu)
  ⎿  (No output)

· Gallivanting… (5s · ↓ 339 tokens · thinking)
  ⎿  Tip: Send messages to Claude while it works to steer Claude in real-time
                                                                                                                                                                                                              58648 tokens
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
❯ 
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  /p/v/f/w/0/T/f/p/fm ⎇main Hk·xh @alex c:29%
  ⏵⏵ bypass permissions on (shift+tab to cycle) · ← 1 agent
Evidence: Key live evidence lines
# 06:35:28 failed probe control (eb77f02b16aeca9533102070de34b1f8812f4fa2): no rewake, no watcher, ledger outcome=arming after 15s
ok - attended failed probe live (2.1.285 (Claude Code)): failed-probe-control
# 06:36:00 failed probe: Stop-hook feedback delivered; primary drained and acknowledged; next cycle has live watcher; errors=4 cooldown=1200
ok - attended failed probe live (2.1.285 (Claude Code)): failed-probe
ok - attended live (2.1.285 (Claude Code)): an idle primary is woken for four hand-offs, the successor's own close and a close that turned main-only at its turn included, with the listener owned throughout

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.

  • Live validation: ✅ go - 6 of 6 scenarios driven live against the product
Scenario Result Live Evidence
Pre-fix negative control: on the pre-fix host (eb77f02), a failed latched engine probe whose successor watcher closed during the turn leaves the idle Claude primary asleep - no Stop-hook rewake, no wa… ✅ pass live attended-live-e2e.log: failed-probe-control evidence line and ok line; real Claude 2.1.285 haiku primary in an isolated lab
Fixed host delivers the hand-back: the same failed probe ordering on the corrected host wakes the idle Claude primary through the real tracked Stop hook; the primary drains, runs the printed acknowled… ✅ pass live attended-live-e2e.log: failed-probe evidence line and ok line; positive-pane-acked.txt terminal capture shows the Stop hook feedback, drain, and acknowledgement
No regression on other hand-back paths: four further attended hand-offs (main-only pass-through, the successor's own close, a stand-in remote listener event, and a close that turns main-only at its tu… ✅ pass live attended-live-e2e.log: positive scenario steps 2-5 and its ok line
Hermetic regression pin: through the real host, Stop hook, watcher, and drain scripts with a stub engine, both a failed probe and a captain outcome rewake main after the successor closed during the en… ✅ pass live supervision-host-suite.log: 'ok - host+hook: failed probes and captain outcomes rewake main after the successor closed during the engine turn'
Adversarial guard: when the downtime republication itself fails (injected mktemp failure on the marker temp file), the host exits nonzero without an actionable close, the hook exits 2 with a 'firstmat… ✅ pass live supervision-host-suite.log: 'ok - host+hook: failed hand-back publication surfaces a committed failure instead of silently losing the wake'
Full family suite for the changed script and its modified stub stays green (60 tests, 67 ok assertions, 0 failed) ✅ pass live supervision-host-suite.log: FM_TEST_SUMMARY total=1 failed=0, EXIT=0
  • FM_SUPERVISION_HOST_ATTENDED_LIVE_E2E=1 FM_SUPERVISION_HOST_FAILED_PROBE_CONTROL_REF=eb77f02b16aeca9533102070de34b1f8812f4fa2 FM_SUPERVISION_HOST_ATTENDED_LIVE_CONTROL_SECONDS=15 bash bin/fm-test-run.sh tests/fm-supervision-host-attended-live-e2e.test.sh (exit 0, 174s, 3 ok: failed-probe-control, failed-probe, positive; real interactive Claude Code 2.1.285 haiku primary in isolated labs on private tmux sockets)
  • bash bin/fm-test-run.sh tests/fm-supervision-host.test.sh (exit 0, 555s, 67 ok, 0 failed; includes the two new regression tests: successor-closed hand-back delivery for failed probes and captain outcomes, and failed hand-back publication surfacing a committed failure)
  • tmux capture-pane of the live lab primary while it handled a Stop-hook rewake (drain, WAKE_ACK_REQUIRED acknowledgement, open decisions), saved as positive-pane-acked.txt
  • post-run checks: git status clean in the worktree; lab homes, tmux servers, and Claude project transcripts removed by the tests' own teardown
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Restore downtime explicitly before returning a host-owned wake to main.
If the successor closed before the engine drained its grant, no watcher
remains to restore that marker and the Claude Stop hook otherwise drops
the rewake with exit 0. Report restoration failures through the existing
arm-owner failure path.

Cover failed latched probes, captain outcomes, and publication failures
with real-script regressions and an interactive Claude negative control.

Refs kunchenguid#5943
@greptile-apps

greptile-apps Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Adds recovery marker publication to supervision hand-back logic.

The PR appears safe to merge; no actionable issue was established.

Reviews (1) · Last reviewed commit: "fix: deliver supervision hand-backs afte..."

@alexputici

Copy link
Copy Markdown
Author

Superseded by #6462, which narrows the change to the remaining publication-failure gap after #6355 merged.

@alexputici alexputici closed this Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant