Skip to content

test: widen supervision host handoff waits for slower fork CI runners - #55

Merged
jredgard merged 2 commits into
mainfrom
fm/fm-supervision-host-ci-wait-budgets
Oct 23, 2026
Merged

jredgard merged 2 commits into
mainfrom
fm/fm-supervision-host-ci-wait-budgets

Conversation

@jredgard

@jredgard jredgard commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Intent

firstmate fork CI: tests/fm-supervision-host.test.sh keeps failing on the fork's slower runners (return-fail at line 3159 and noack, both 250-poll handled waits); widen those waits the way PR 52 widened the tagged test so main and task PRs stop going red on 'Behavior portable serial 2'.

Context. Evidence from 2026-10-23: the fork's main run 39990793849 (the merge of upstream-sync PR 52) failed the 'Behavior portable serial 2' job on the noack case ("noack: the host counted an unacknowledged wake handled"); PR 53 run 39996795159 failed the same job twice on the return-fail case ("return-fail: the host did not hand the wake to main", wait_until 250 host_exited at tests/fm-supervision-host.test.sh:3159); PR 54 run 40008604559 failed on return-fail again. Both PRs touched nothing near this suite and were merged with a captain waiver of that single check. PR 52's commit message documented the root cause: the fork's CI runners run this suite about 2x slower than upstream's, so a 250-poll handled wait that passes upstream in about 23 s runs out here; it widened only the tagged test's handled wait from 250 to 450 polls with a two-line comment, and earlier fork merges had widened watcher_live to 450 and hook_exited to 600 in the same suite. The suite is otherwise identical to upstream's and the code under test is unchanged.

What Changed

  • Raised 99 handoff waits in tests/fm-supervision-host.test.sh to 450 polls: the host_exited, handled_at_least, hook_exited, captain_rows_at_least, and similar host/engine waits. Most were at 250 and a few at 150 or 200. This covers the two that keep failing on the fork's slower runners: the noack wait and the return-fail wait (the host did not hand the wake to main).
  • Every widened wait gets the same one-line comment (# The fork's slower CI runners need headroom for this host/engine wait.), following how PR feat(bin): merge upstream main while preserving fork delivery and supervision deltas #52 widened the tagged test's wait.
  • The clock-boundary and fallback waits keep their original budgets, and the code under test is unchanged. Only wait budgets and comments differ.

🤖 Generated with Claude Code

Risk Assessment

✅ Low: Only 99 asynchronous fail-on-timeout handling and handoff poll budgets and their 99 short comments change. The original 150-poll injected-clock boundary window and 200-poll non-failing restart fallback are retained. Assertions, fixtures, polling cadence and production code are preserved. Longer budgets can delay a failing test; they retain every assertion.

Testing

I ran the changed suite end to end through bin/fm-test-run.sh: it passed in about 413 s with no gate skips. To reproduce the fork's slower runners, I ran the two failing cases under a 10% CPU quota. The base commit failed both with the same messages CI showed (noack and return-fail, 250/250 polls, timed out). This commit passed both, using 290 and 323 of 450 polls. A disposable mutant host that ignores the injected test clock was caught by the restored 150-poll boundary wait (failed at about 15 s) and by the widened clock-armed wait (failed at about 45 s, against a 27000 s default park). So the review-decided invariant holds. A static diff audit shows that only budgets changed (92× 250→450, 4× 200→450, 3× 150→450) plus 99 comments, with both review restorations in place. That audit is not a live run, so its scenario is recorded as untested. There is no UI surface, so no visual evidence applies.

  • Live validation: ✅ go - 5 of 6 scenarios driven live against the product
Scenario Result Live Evidence
On a slowed runner, the noack case (report without acknowledgement) now passes, where the old 250-poll budget failed with the CI message ✅ pass live slow-runner-repro.txt: CPUQuota=10%; base budget=250 used=250 TIMEOUT 'noack: the host counted an unacknowledged wake handled'; head budget=450 used=290 ok
On a slowed runner, the return-fail case (captain return during a failed turn) now hands the wake to main, where the old 250-poll budget failed at the CI line ✅ pass live slow-runner-repro.txt: CPUQuota=10%; base budget=250 used=250 TIMEOUT 'return-fail: the host did not hand the wake to main'; head budget=450 used=323 ok
The whole fm-supervision-host suite still passes with the widened budgets (assertions and fixtures unchanged) ✅ pass live full-suite-head.log: FM_TEST_END tests/fm-supervision-host.test.sh exit=0 duration_ms=412567 gate_skip=false; full-suite-timing.json
Adversarial: with the clock-boundary wait restored to 150 polls, a host that ignores the injected test clock still fails the boundary test instead of passing on real seconds ✅ pass live clock-invariant-mutation.txt: mutant 'not ok - boundary: the host did not end its park' after 150/150 polls (15.1s, below the 60s real park); unmutated head passes
Adversarial: the widened clock-armed wait still catches a host that ignores the marked test clock ✅ pass live clock-invariant-mutation.txt: mutant 'not ok - clock-armed: the marked test clock did not end the park' at 450/450 polls (45.3s, against a 27000s default park); head passes
Review decisions honored: only fail-on-timeout waits widened, the trip_latch 'second close' fallback is back at 200, the boundary exit wait is back at 150, and nothing besides budgets and comments cha… ⏸️ untested no The prior payload established this only through a static diff audit of test source (diff-audit.txt), not a live run, so it does not support a pass. The runtime effects of the restored 150-poll boundar…
Evidence: Slow-runner reproduction: base fails noack/return-fail at 250 polls, head passes within 450

Source: Slow-runner reproduction: base fails noack/return-fail at 250 polls, head passes within 450

[base] noack -> not ok - noack: the host counted an unacknowledged wake handled (budget=250 used=250 TIMEOUT) [base] return-fail -> not ok - return-fail: the host did not hand the wake to main (budget=250 used=250 TIMEOUT) [head] noack -> ok (budget=450 used=290) [head] return-fail -> ok (budget=450 used=323)

# Slow-runner reproduction: focused cases run under a systemd --user scope with CPUQuota=10%
# Same suite fixtures; only difference between trees is the committed poll budget.
# base = c2895c2d (250-poll budget), head = 84ef2f1b (450-poll budget)
[base] test_report_without_acknowledgement_hands_the_wake_to_main -> not ok - noack: the host counted an unacknowledged wake handled: 1792791873	start	gen=host-819933-1792791872	primary=claude
[base] test_return_during_a_failed_turn_still_hands_its_outcomes_to_main -> not ok - return-fail: the host did not hand the wake to main
[head] test_report_without_acknowledgement_hands_the_wake_to_main -> ok - host: a turn that reports but leaves its granted rows queued hands the wake to main
[head] test_return_during_a_failed_turn_still_hands_its_outcomes_to_main -> ok - host: a captain return during a failed engine turn still hands that turn's outcomes to main

## base wait_until instrumentation (polls used / budget)
wait_until budget=150 used=21 wall=2.7s ok watcher_live /tmp/fm-supervision-host.9lK47S/away-noack
wait_until budget=250 used=250 wall=29.1s TIMEOUT host_exited /tmp/fm-supervision-host.9lK47S/away-noack
wait_until budget=150 used=21 wall=2.7s ok watcher_live /tmp/fm-supervision-host.Cg0fle/away-return-fail
wait_until budget=250 used=250 wall=29.3s TIMEOUT host_exited /tmp/fm-supervision-host.Cg0fle/away-return-fail
## head wait_until instrumentation (polls used / budget)
wait_until budget=150 used=22 wall=2.7s ok watcher_live /tmp/fm-supervision-host.0ZSKKY/away-noack
wait_until budget=450 used=290 wall=34.5s ok host_exited /tmp/fm-supervision-host.0ZSKKY/away-noack
wait_until budget=150 used=18 wall=2.3s ok watcher_live /tmp/fm-supervision-host.A1czrF/away-return-fail
wait_until budget=450 used=323 wall=38.4s ok host_exited /tmp/fm-supervision-host.A1czrF/away-return-fail

## Calibration (unloaded / other quotas, head tree)
unloaded:
wait_until budget=150 used=2 wall=0,0s ok watcher_live /tmp/fm-supervision-host.nGhBMa/away-noack
wait_until budget=450 used=19 wall=2,0s ok host_exited /tmp/fm-supervision-host.nGhBMa/away-noack
wait_until budget=150 used=2 wall=0,0s ok watcher_live /tmp/fm-supervision-host.nGhBMa/away-return-fail
wait_until budget=450 used=20 wall=2,0s ok host_exited /tmp/fm-supervision-host.nGhBMa/away-return-fail
quota 10% (first run):
wait_until budget=150 used=22 wall=2.7s ok watcher_live /tmp/fm-supervision-host.kAFMVz/away-noack
wait_until budget=450 used=313 wall=37.3s ok host_exited /tmp/fm-supervision-host.kAFMVz/away-noack
wait_until budget=150 used=20 wall=2.5s ok watcher_live /tmp/fm-supervision-host.W4M7eA/away-return-fail
wait_until budget=450 used=320 wall=38.6s ok host_exited /tmp/fm-supervision-host.W4M7eA/away-return-fail
quota 5% (too slow for either budget):
wait_until budget=150 used=38 wall=6.4s ok watcher_live /tmp/fm-supervision-host.nXOsMn/away-noack
wait_until budget=450 used=450 wall=66.6s TIMEOUT host_exited /tmp/fm-supervision-host.nXOsMn/away-noack
wait_until budget=150 used=36 wall=6.5s ok watcher_live /tmp/fm-supervision-host.PpwSbr/away-return-fail
wait_until budget=450 used=450 wall=65.9s TIMEOUT host_exited /tmp/fm-supervision-host.PpwSbr/away-return-fail
Evidence: Injected-clock invariant mutation check

Source: Injected-clock invariant mutation check

[head] park_boundary -> ok (150 budget, used 10) [mutant] park_boundary -> not ok - boundary: the host did not end its park (150/150, 15.1s) [head] park_test_clock_requires_the_marker -> ok [mutant] -> not ok - clock-armed: the marked test clock did not end the park (450/450, 45.3s)

# Injected-clock invariant mutation check
# mutant = head tree with park_elapsed forced to ignore FM_TEST_SUPERVISION_HOST_CLOCK (bin/fm-supervision-host.sh:506 'if false && ...'), disposable copy only
[head] test_park_boundary_ends_the_park_before_the_hook_timeout -> ok - host: the park ends itself with a boundary wake and a stopped watcher (1s)
[mutant] test_park_boundary_ends_the_park_before_the_hook_timeout -> not ok - boundary: the host did not end its park (16s)
[head] test_park_test_clock_requires_the_marker -> ok - host: the park's test clock is inert without the test marker (2s)
[mutant] test_park_test_clock_requires_the_marker -> not ok - clock-armed: the marked test clock did not end the park (46s)
## boundary-head
wait_until budget=150 used=3 wall=0.3s ok watcher_live /tmp/fm-supervision-host.PztEp2/boundary
wait_until budget=150 used=10 wall=1.0s ok host_exited /tmp/fm-supervision-host.PztEp2/boundary
## boundary-mutant
wait_until budget=150 used=3 wall=0.3s ok watcher_live /tmp/fm-supervision-host.fDzJSz/boundary
wait_until budget=150 used=150 wall=15.1s TIMEOUT host_exited /tmp/fm-supervision-host.fDzJSz/boundary
## clockarmed-head
wait_until budget=450 used=3 wall=0.3s ok host_exited /tmp/fm-supervision-host.4f1xje/clock-armed
wait_until budget=150 used=2 wall=0.2s ok watcher_live /tmp/fm-supervision-host.4f1xje/clock-unmarked
wait_until budget=450 used=17 wall=1.7s ok handled_at_least /tmp/fm-supervision-host.4f1xje/clock-unmarked
## clockarmed-mutant
wait_until budget=450 used=450 wall=45.3s TIMEOUT host_exited /tmp/fm-supervision-host.lpZo2O/clock-armed
Evidence: Full suite run log (exit 0)

Source: Full suite run log (exit 0)

FM_TEST_BEGIN 2026-10-23T21:34:23Z tests/fm-supervision-host.test.sh family=afk expected_gate_skip=none
ok - host+hook: a main-only close after a handled turn restores inherited handling and rewakes main
ok - host+hook: a refused inherited handling restore delivers a failure instead of silent success
ok - host+hook: a driver returning to an idle worker is stale-handled while attended
ok - host+hook: a driver returning to an idle worker is stale-handled while away
ok - host+hook: a successor closed before exit_to_main does not suppress the branch-outcome rewake
ok - host+hook: a successor that closes during a held engine turn does not suppress the branch-outcome rewake
ok - host+hook: a refused hand-back becomes a delivered failure notice
ok - host+hook: a refused hand-back on an announced handling marker becomes a delivered failure notice
ok - host: parked child-exit sampling uses ordinary half-second sleeps
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
(node:3171051) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file://~/.no-mistakes/worktrees/551ff26a6b1c/01M5NA2T29ZZV99BGNJR9N2JKH/.pi/extensions/lib/fm-branch-dispatch.ts is not specified and it doesn't parse as CommonJS.
Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
To eliminate this warning, add "type": "module" to ~/package.json.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:3171141) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file://~/.no-mistakes/worktrees/551ff26a6b1c/01M5NA2T29ZZV99BGNJR9N2JKH/.pi/extensions/lib/fm-branch-dispatch.ts is not specified and it doesn't parse as CommonJS.
Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
To eliminate this warning, add "type": "module" to ~/package.json.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:3171240) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file://~/.no-mistakes/worktrees/551ff26a6b1c/01M5NA2T29ZZV99BGNJR9N2JKH/.pi/extensions/lib/fm-branch-dispatch.ts is not specified and it doesn't parse as CommonJS.
Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
To eliminate this warning, add "type": "module" to ~/package.json.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:3171296) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file://~/.no-mistakes/worktrees/551ff26a6b1c/01M5NA2T29ZZV99BGNJR9N2JKH/.pi/extensions/lib/fm-branch-dispatch.ts is not specified and it doesn't parse as CommonJS.
Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
To eliminate this warning, add "type": "module" to ~/package.json.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:3171353) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file://~/.no-mistakes/worktrees/551ff26a6b1c/01M5NA2T29ZZV99BGNJR9N2JKH/.pi/extensions/lib/fm-branch-dispatch.ts is not specified and it doesn't parse as CommonJS.
Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
To eliminate this warning, add "type": "module" to ~/package.json.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:3171450) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file://~/.no-mistakes/worktrees/551ff26a6b1c/01M5NA2T29ZZV99BGNJR9N2JKH/.pi/extensions/lib/fm-branch-dispatch.ts is not specified and it doesn't parse as CommonJS.
Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
To eliminate this warning, add "type": "module" to ~/package.json.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:3171552) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file://~/.no-mistakes/worktrees/551ff26a6b1c/01M5NA2T29ZZV99BGNJR9N2JKH/.pi/extensions/lib/fm-branch-dispatch.ts is not specified and it doesn't parse as CommonJS.
Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
To eliminate this warning, add "type": "module" to ~/package.json.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:3171689) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file://~/.no-mistakes/worktrees/551ff26a6b1c/01M5NA2T29ZZV99BGNJR9N2JKH/.pi/extensions/lib/fm-branch-dispatch.ts is not specified and it doesn't parse as CommonJS.
Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
To eliminate this warning, add "type": "module" to ~/package.json.
(Use `node --trace-warnings ...` to show where the warning was created)
ok - dispatch entry: the host reads branch eligibility, the offer rule, and the wake prompt from the Pi branch's own owner
ok - away reports: progress, resolved decisions and captain holds stay parked; terminal outcomes, freed slots and unanswered input hand back
ok - away merge handback: only the exact reported lane receives a derived dispatch
ok - away batched merge: a sibling signal can precede the handed lane, and MAIN receives only its merge handback
ok - away explicit decisions: sibling wakes and terminal events cannot relabel a lane's input handback
ok - away dispatch handback: derived terminal reports collapse per turn and task while explicit actions and outcomes survive
ok - routine unsticking: four remedies deliver and close blockers without MAIN handback
ok - merged sweep: absent owners skip teardown, active cleanup hands back, and new owners cannot trigger merge dispatch
ok - merged sweep: every merged PR in flattened mixed and closed-only rows is handled
ok - away handback: MAIN work survives engine acknowledgement and a dropped close, then the same posture resumes routine supervision
ok - away worker input reaches MAIN, while explicit captain-owned holds stay for return
ok - away handback: the engine acknowledges other handled lanes first; MAIN drains only the named handback lane
ok - away handback: receipt and pending-row paths preserve all lanes and actions in one reason line
(node:3356476) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file://~/.no-mistakes/worktrees/551ff26a6b1c/01M5NA2T29ZZV99BGNJR9N2JKH/.pi/extensions/lib/fm-branch-dispatch.ts is not specified and it doesn't parse as CommonJS.
Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
To eliminate this warning, add "type": "module" to ~/package.json.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:3356945) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file://~/.no-mistakes/worktrees/551ff26a6b1c/01M5NA2T29ZZV99BGNJR9N2JKH/.pi/extensions/lib/fm-branch-dispatch.ts is not specified and it doesn't parse as CommonJS.
Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
To eliminate this warning, add "type": "module" to ~/package.json.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:3357176) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file://~/.no-mistakes/worktrees/551ff26a6b1c/01M5NA2T29ZZV99BGNJR9N2JKH/.pi/extensions/lib/fm-branch-dispatch.ts is not specified and it doesn't parse as CommonJS.
Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
To eliminate this warning, add "type": "module" to ~/package.json.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:3357592) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file://~/.no-mistakes/worktrees/551ff26a6b1c/01M5NA2T29ZZV99BGNJR9N2JKH/.pi/extensions/lib/

... [3800 bytes truncated] ...

k, 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: a host stopped right after a handled wake exits and leaves the wake queue usable
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 - quiet words reach the generated wake interface with present-captain reporting and immediate outcomes
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
(node:3496574) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file://~/.no-mistakes/worktrees/551ff26a6b1c/01M5NA2T29ZZV99BGNJR9N2JKH/.pi/extensions/lib/fm-branch-dispatch.ts is not specified and it doesn't parse as CommonJS.
Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
To eliminate this warning, add "type": "module" to ~/package.json.
(Use `node --trace-warnings ...` to show where the warning was created)
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: an inbox note queued while the host is parked on a handled wake's successor rewakes main
ok - host+hook: a captain outcome beside a quiet record rewakes the present captain with no away note
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: the successor a close that turns main-only at its turn leaves for main survives the hook's process group teardown
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+hook: the successor a pass-through leaves for main survives the hook's process group teardown
ok - host+hook: the next park takes over the cycle a main-only pass-through left, so one arm owns it
ok - host+hook: a park stopped mid take-over leaves the take-over to the next park
ok - host+hook: a successor that cannot be recorded is stopped, and main's next turn end arms a fresh cycle
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 Windows-tagged session-lock holder reaches the engine's lease whole
ok - host: a host under a superseded auto-arm generation stands down without touching the owner
FM_TEST_END 2026-10-23T21:41:16Z tests/fm-supervision-host.test.sh exit=0 duration_ms=412567 gate_skip=false
FM_TEST_SUMMARY total=1 failed=0 skipped_gate=0 duration_ms=412646
FM_TEST_SUMMARY_FAMILY family=afk count=1 duration_ms=412567 failed=0
FM_TEST_SLOWEST rank=1 script=tests/fm-supervision-host.test.sh duration_ms=412567
fm-test-run: wrote timing artifact: ~/.no-mistakes/evidence/01M5NA2T29ZZV99BGNJR9N2JKH/full-suite-timing.json
taskset -c 4-15 env -u NO_MISTAKES_GATE bash bin/fm-test-run.sh  --json   378,07s user 197,54s system 139% cpu 6:52,72 total
exit=0
Evidence: Full suite timing JSON

Source: Full suite timing JSON

{
  "families": [
    {
      "count": 1,
      "duration_ms": 412567,
      "failed": 0,
      "name": "afk"
    }
  ],
  "finished_at": "2026-10-23T21:41:16Z",
  "run_id": "fm-test-run-1792791263766-3085826",
  "scripts": [
    {
      "duration_ms": 412567,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "afk",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-supervision-host.test.sh"
    }
  ],
  "selection": "scripts;jobs=1",
  "started_at": "2026-10-23T21:34:23Z",
  "summary": {
    "duration_ms": 412646,
    "failed": 0,
    "skipped_gate": 0,
    "total": 1
  }
}
Evidence: Diff audit: budget-only changes and restored budgets

Source: Diff audit: budget-only changes and restored budgets

removed lines: 99
added non-comment lines: 99
added comment lines: 99
budget transitions (old->new):
      3 150	450
      4 200	450
     92 250	450
non-budget differences after normalizing the poll count:
none
restored per review decision:
3334:  wait_until 150 host_exited "$home" || fail "boundary: the host did not end its park"
3564:  wait_until 200 host_exited "$home" || append_status "$home" 'second close' 'done'
3 x 150->450 lines:
| fail "the watcher's downtime resurface did not reach main: $(cat "$1/host.out")"|+  wait_until 450 host_exited "$1" || fail "the watcher's downtime resurface did not reach main: $(cat "$1/host.out")"
| fail "clock-armed: the marked test clock did not end the park"|+  wait_until 450 host_exited "$home" || fail "clock-armed: the marked test clock did not end the park"
| fail "held: the escalating turn never finished"|+  wait_until 450 handled_at_least "$home" 1 || fail "held: the escalating turn never finished"
Complete asynchronous-wait audit (236 waits)

All line numbers below refer to the pre-change file. A poll sleeps 0.1 seconds plus predicate and scheduler time, so these are iteration budgets, not wall deadlines.

Original line Case/helper What the wait observes Old polls New polls
582 away_merge_handback_in_a_batch watcher_live "$home" 150 150
584 away_merge_handback_in_a_batch sh -c '[ -e "$1" ]' _ "$home/scope-ready" 250 250
588 away_merge_handback_in_a_batch host_exited "$home" 250 450
637 away_explicit_decision_trigger_is_lane_local host_exited "$home" 250 450
700 away_handback_survives_ack_and_resumes_host_after_main watcher_live "$home" 150 150
702 away_handback_survives_ack_and_resumes_host_after_main host_exited "$home" 250 450
713 away_handback_survives_ack_and_resumes_host_after_main host_exited "$home" 250 450
717 away_handback_survives_ack_and_resumes_host_after_main watcher_live "$home" 150 150
720 away_handback_survives_ack_and_resumes_host_after_main handled_at_least "$home" "$((calls + 1))" 250 450
724 away_handback_survives_ack_and_resumes_host_after_main handled_at_least "$home" "$((calls + 2))" 250 450
728 away_handback_survives_ack_and_resumes_host_after_main sh -c '! kill -0 "$1" 2>/dev/null' _ "$watcher" 100 100
737 away_worker_input_handback_and_captain_hold watcher_live "$home" 150 150
739 away_worker_input_handback_and_captain_hold host_exited "$home" 250 450
748 away_worker_input_handback_and_captain_hold watcher_live "$home" 150 150
750 away_worker_input_handback_and_captain_hold handled_at_least "$home" 1 250 450
755 away_worker_input_handback_and_captain_hold handled_at_least "$home" 2 250 450
778 away_handback_drains_only_the_handed_lane host_exited "$home" 250 450
808 away_multiple_handbacks_keep_one_complete_reason_line host_exited "$home" 250 450
820 away_multiple_handbacks_keep_one_complete_reason_line host_exited "$home" 250 450
1505 attended_routine_wake_is_handled_on_the_engine_and_stays_off_main watcher_live "$home" 150 150
1507 attended_routine_wake_is_handled_on_the_engine_and_stays_off_main handled_at_least "$home" 1 250 450
1542 host_stopped_right_after_a_handled_wake_exits_and_frees_the_queue watcher_live "$home" 150 150
1544 host_stopped_right_after_a_handled_wake_exits_and_frees_the_queue handled_at_least "$home" 1 250 450
1549 host_stopped_right_after_a_handled_wake_exits_and_frees_the_queue bash -c '! kill -0 "$1" 2>/dev/null' _ "$pid" 100 100
1562 attended_captain_outcome_reaches_main_through_branch_outcomes watcher_live "$home" 150 150
1564 attended_captain_outcome_reaches_main_through_branch_outcomes host_exited "$home" 250 450
1593 captain_leaving_mid_turn_keeps_its_captain_outcome_for_the_return watcher_live "$home" 150 150
1595 captain_leaving_mid_turn_keeps_its_captain_outcome_for_the_return handled_at_least "$home" 1 250 450
1616 quiet_record_without_its_daemon_is_a_present_captain watcher_live "$home" 150 150
1618 quiet_record_without_its_daemon_is_a_present_captain host_exited "$home" 250 450
1632 quiet_record_without_its_daemon_is_a_present_captain watcher_live "$home" 150 150
1634 quiet_record_without_its_daemon_is_a_present_captain host_exited "$home" 250 450
1648 quiet_words_reach_the_engine_and_report_now watcher_live "$home" 150 150
1650 quiet_words_reach_the_engine_and_report_now host_exited "$home" 250 450
1670 attended_main_only_close_passes_straight_to_main watcher_live "$home" 150 150
1672 attended_main_only_close_passes_straight_to_main host_exited "$home" 250 450
1689 off_written_while_parked_passes_the_next_attended_close_to_main watcher_live "$home" 150 150
1692 off_written_while_parked_passes_the_next_attended_close_to_main host_exited "$home" 250 450
1711 main_only_pass_through_leaves_the_successor_watcher_running watcher_live "$home" 150 150
1713 main_only_pass_through_leaves_the_successor_watcher_running host_exited "$home" 250 450
1745 attended_close_with_unidentified_main_session_passes_to_main watcher_live "$home" 150 150
1747 attended_close_with_unidentified_main_session_passes_to_main host_exited "$home" 250 450
1802 attended_close_that_turns_main_only_before_its_turn_passes_to_main watcher_live "$home" 150 150
1804 attended_close_that_turns_main_only_before_its_turn_passes_to_main host_exited "$home" 250 450
1901 claude_stop_hook_delivers_a_main_only_pass_through watcher_live "$home" 150 150
1903 claude_stop_hook_delivers_a_main_only_pass_through hook_exited "$home" 250 450
1941 assert_main_only_close_after_handled_turn watcher_live "$home" 150 150
1943 assert_main_only_close_after_handled_turn test -e "$home/before-drain.ready" 250 250
1947 assert_main_only_close_after_handled_turn bash -c '! kill -0 "$1" 2>/dev/null' _ "$successor" 250 250
1950 assert_main_only_close_after_handled_turn test -e "$home/before-return.ready" 250 450
1955 assert_main_only_close_after_handled_turn hook_exited "$home" 250 450
2008 assert_returned_driver_is_caught watcher_live "$home" 150 150
2010 assert_returned_driver_is_caught handled_at_least "$home" 1 250 450
2024 assert_returned_driver_is_caught stale_handled_after_resolved "$home" "$posture" 1200 1200
2027 assert_returned_driver_is_caught watcher_live "$home" 250 250
2053 claude_stop_hook_rewakes_main_for_an_inbox_note_after_a_handled_wake watcher_live "$home" 150 150
2055 claude_stop_hook_rewakes_main_for_an_inbox_note_after_a_handled_wake handled_at_least "$home" 1 600 600
2057 claude_stop_hook_rewakes_main_for_an_inbox_note_after_a_handled_wake watcher_live "$home" 150 150
2063 claude_stop_hook_rewakes_main_for_an_inbox_note_after_a_handled_wake hook_exited "$home" 600 600
2082 claude_stop_hook_restores_handoff_when_successor_closed_before_exit_to_main watcher_live "$home" 150 150
2084 claude_stop_hook_restores_handoff_when_successor_closed_before_exit_to_main hook_exited "$home" 600 600
2109 assert_claude_stop_hook_notifies_when_closed_successor_downtime_restore_fails watcher_live "$home" 150 150
2111 assert_claude_stop_hook_notifies_when_closed_successor_downtime_restore_fails test -s "$home/stub-ready" 250 250
2114 assert_claude_stop_hook_notifies_when_closed_successor_downtime_restore_fails bash -c '! kill -0 "$1" 2>/dev/null' _ "$successor" 250 250
2128 assert_claude_stop_hook_notifies_when_closed_successor_downtime_restore_fails hook_exited "$home" 250 450
2153 claude_stop_hook_restores_handoff_when_successor_closed_mid_engine_turn watcher_live "$home" 150 150
2155 claude_stop_hook_restores_handoff_when_successor_closed_mid_engine_turn test -s "$home/stub-ready" 600 600
2158 claude_stop_hook_restores_handoff_when_successor_closed_mid_engine_turn bash -c '! kill -0 "$1" 2>/dev/null' _ "$successor" 600 600
2166 claude_stop_hook_restores_handoff_when_successor_closed_mid_engine_turn hook_exited "$home" 600 600
2189 claude_stop_hook_rewakes_a_present_captain_beside_a_quiet_record watcher_live "$home" 150 150
2191 claude_stop_hook_rewakes_a_present_captain_beside_a_quiet_record hook_exited "$home" 250 450
2214 claude_stop_hook_runs_the_host_without_the_file_and_off_opts_out watcher_live "$home" 150 150
2217 claude_stop_hook_runs_the_host_without_the_file_and_off_opts_out handled_at_least "$home" 1 250 450
2232 claude_stop_hook_runs_the_host_without_the_file_and_off_opts_out watcher_live "$home" 150 150
2234 claude_stop_hook_runs_the_host_without_the_file_and_off_opts_out hook_exited "$home" 250 450
2252 claude_stop_hook_delivers_a_close_that_turns_main_only_at_its_turn watcher_live "$home" 150 150
2254 claude_stop_hook_delivers_a_close_that_turns_main_only_at_its_turn hook_exited "$home" 250 450
2271 successor_left_at_the_turn_survives_the_hook_process_group_teardown watcher_live "$home" 150 150
2273 successor_left_at_the_turn_survives_the_hook_process_group_teardown hook_exited "$home" 250 450
2302 claude_stop_hook_notifies_when_at_turn_downtime_write_fails watcher_live "$home" 150 150
2304 claude_stop_hook_notifies_when_at_turn_downtime_write_fails hook_exited "$home" 600 600
2322 successor_close_during_main_turn_is_delivered_at_the_next_turn_end watcher_live "$home" 150 150
2324 successor_close_during_main_turn_is_delivered_at_the_next_turn_end hook_exited "$home" 250 450
2329 successor_close_during_main_turn_is_delivered_at_the_next_turn_end bash -c '! kill -0 "$1" 2>/dev/null' _ "$successor" 250 250
2334 successor_close_during_main_turn_is_delivered_at_the_next_turn_end hook_exited "$home" 250 450
2354 pass_through_successor_survives_the_hook_process_group_teardown watcher_live "$home" 150 150
2356 pass_through_successor_survives_the_hook_process_group_teardown hook_exited "$home" 250 450
2410 leave_a_cycle_for_main_and_restart watcher_live "$home" 150 150
2412 leave_a_cycle_for_main_and_restart hook_exited "$home" 250 450
2425 leave_a_cycle_for_main_and_restart sh -c '! kill -0 "$1" 2>/dev/null' _ "$first_session" 100 100
2438 next_park_takes_over_the_cycle_a_pass_through_left_for_main host_owns_the_only_cycle "$home" 150 150
2448 next_park_takes_over_the_cycle_a_pass_through_left_for_main hook_exited "$home" 250 450
2470 a_park_stopped_mid_take_over_leaves_the_take_over_to_the_next_park test -e "$home/marker-lock-held" 100 100
2472 a_park_stopped_mid_take_over_leaves_the_take_over_to_the_next_park grep -q "\ttake-over\tarm=$LEFT_ARM\$" "$home/state/.supervision-host.log" 150 150
2478 a_park_stopped_mid_take_over_leaves_the_take_over_to_the_next_park sh -c '! kill -0 "$1" 2>/dev/null' _ "$host" 150 150
2482 a_park_stopped_mid_take_over_leaves_the_take_over_to_the_next_park host_owns_the_only_cycle "$home" 150 150
2500 unrecorded_successor_is_stopped_rather_than_left_for_main watcher_live "$home" 150 150
2502 unrecorded_successor_is_stopped_rather_than_left_for_main hook_exited "$home" 250 450
2507 unrecorded_successor_is_stopped_rather_than_left_for_main no_home_arms "$home" 100 100
2515 unrecorded_successor_is_stopped_rather_than_left_for_main host_owns_the_only_cycle "$home" 150 150
2541 close_accepted_away_that_turns_attended_passes_to_main watcher_live "$home" 150 150
2543 close_accepted_away_that_turns_attended_passes_to_main host_exited "$home" 250 450
2566 primary_without_a_verified_mirror_runs_away_only watcher_live "$home" 150 150
2568 primary_without_a_verified_mirror_runs_away_only host_exited "$home" 200 450
2577 primary_without_a_verified_mirror_runs_away_only watcher_live "$home" 150 150
2579 primary_without_a_verified_mirror_runs_away_only handled_at_least "$home" 1 250 450
2585 primary_without_a_verified_mirror_runs_away_only host_exited "$home" 200 200
2596 attended_wake_carries_the_dialog_mirror watcher_live "$home" 150 150
2598 attended_wake_carries_the_dialog_mirror handled_at_least "$home" 1 250 450
2605 attended_wake_carries_the_dialog_mirror handled_at_least "$home" 2 250 450
2640 dialog_bearing_files_are_owner_only watcher_live "$home" 150 150
2642 dialog_bearing_files_are_owner_only handled_at_least "$home" 1 250 450
2683 park_after_stop host_exited "$1" 150 450
2712 undelivered_dialog_is_fed_again_on_the_next_turn handled_at_least "$home" 1 250 450
2715 undelivered_dialog_is_fed_again_on_the_next_turn host_exited "$home" 200 200
2722 undelivered_dialog_is_fed_again_on_the_next_turn host_exited "$home" 400 400
2731 undelivered_dialog_is_fed_again_on_the_next_turn handled_at_least "$home" 2 250 450
2740 undelivered_dialog_is_fed_again_on_the_next_turn host_exited "$home" 200 200
2744 undelivered_dialog_is_fed_again_on_the_next_turn test -e "$home/engine-call.3" 250 250
2747 undelivered_dialog_is_fed_again_on_the_next_turn host_exited "$home" 200 200
2751 undelivered_dialog_is_fed_again_on_the_next_turn handled_at_least "$home" 3 250 450
2759 undelivered_dialog_is_fed_again_on_the_next_turn host_exited "$home" 200 200
2763 undelivered_dialog_is_fed_again_on_the_next_turn host_exited "$home" 250 450
2769 undelivered_dialog_is_fed_again_on_the_next_turn handled_at_least "$home" 4 250 450
2786 attended_wake_with_an_unreadable_mirror_reaches_main handled_at_least "$home" 1 250 450
2791 attended_wake_with_an_unreadable_mirror_reaches_main host_exited "$home" 250 450
2804 attended_wake_with_an_unreadable_mirror_reaches_main host_exited "$home" 250 450
2819 attended_wake_with_an_unreadable_mirror_reaches_main host_exited "$home" 250 450
2831 attended_wake_with_an_unreadable_mirror_reaches_main host_exited "$home" 250 450
2847 attended_latch_keeps_closes_on_main_and_records_recovery_off_main host_exited "$home" 250 450
2855 attended_latch_keeps_closes_on_main_and_records_recovery_off_main host_exited "$home" 250 450
2863 attended_latch_keeps_closes_on_main_and_records_recovery_off_main host_exited "$home" 250 450
2874 attended_latch_keeps_closes_on_main_and_records_recovery_off_main host_exited "$home" 250 450
2883 attended_latch_keeps_closes_on_main_and_records_recovery_off_main host_exited "$home" 250 450
2893 attended_latch_keeps_closes_on_main_and_records_recovery_off_main handled_at_least "$home" $((handled + 1)) 250 450
2896 attended_latch_keeps_closes_on_main_and_records_recovery_off_main host_exited "$home" 20 20
2910 away_wake_is_handled_on_the_engine_and_never_reaches_main watcher_live "$home" 150 150
2912 away_wake_is_handled_on_the_engine_and_never_reaches_main handled_at_least "$home" 1 250 450
2942 away_wake_is_handled_on_the_engine_and_never_reaches_main handled_at_least "$home" 2 250 450
2954 away_wake_is_handled_on_the_engine_and_never_reaches_main host_exited "$home" 200 200
2956 away_wake_is_handled_on_the_engine_and_never_reaches_main sh -c '! kill -0 "$1" 2>/dev/null' _ "$watcher" 100 100
2966 away_turn_without_a_report_hands_the_wake_to_main watcher_live "$home" 150 150
2968 away_turn_without_a_report_hands_the_wake_to_main host_exited "$home" 250 450
2988 return_during_an_engine_turn_hands_its_outcomes_to_main watcher_live "$home" 150 150
2990 return_during_an_engine_turn_hands_its_outcomes_to_main host_exited "$home" 250 450
3012 silent_outcomes_are_not_relayed_when_the_captain_returns watcher_live "$home" 150 150
3016 silent_outcomes_are_not_relayed_when_the_captain_returns handled_at_least "$home" 1 250 450
3021 silent_outcomes_are_not_relayed_when_the_captain_returns host_exited "$home" 200 200
3023 silent_outcomes_are_not_relayed_when_the_captain_returns host_exited "$home" 250 450
3040 large_turn_relays_an_early_visible_outcome watcher_live "$home" 150 150
3042 large_turn_relays_an_early_visible_outcome host_exited "$home" 2000 2000
3058 outcome_lookup_failure_is_not_treated_as_silence watcher_live "$home" 150 150
3060 outcome_lookup_failure_is_not_treated_as_silence host_exited "$home" 2000 2000
3077 outcome_after_the_return_survives_a_host_killed_at_the_turn_end watcher_live "$home" 150 150
3079 outcome_after_the_return_survives_a_host_killed_at_the_turn_end grep -qs 'supervision-host-return:1' "$home/state/.wake-queue" 250 450
3083 outcome_after_the_return_survives_a_host_killed_at_the_turn_end host_exited "$home" 250 250
3094 outcome_after_the_return_survives_a_host_killed_at_the_turn_end host_exited "$home" 250 450
3110 next_host_clears_a_turn_its_killed_predecessor_left watcher_live "$home" 150 150
3112 next_host_clears_a_turn_its_killed_predecessor_left grep -qs 'supervision-host-return:1' "$home/state/.wake-queue" 250 450
3116 next_host_clears_a_turn_its_killed_predecessor_left host_exited "$home" 100 100
3118 next_host_clears_a_turn_its_killed_predecessor_left sh -c '! kill -0 "$1" 2>/dev/null' _ "$engine" 100 100
3122 next_host_clears_a_turn_its_killed_predecessor_left host_exited "$home" 250 450
3137 report_without_acknowledgement_hands_the_wake_to_main watcher_live "$home" 150 150
3139 report_without_acknowledgement_hands_the_wake_to_main host_exited "$home" 250 450
3157 return_during_a_failed_turn_still_hands_its_outcomes_to_main watcher_live "$home" 150 150
3159 return_during_a_failed_turn_still_hands_its_outcomes_to_main host_exited "$home" 250 450
3175 incomplete_engine_result_hands_the_wake_to_main watcher_live "$home" 150 150
3177 incomplete_engine_result_hands_the_wake_to_main host_exited "$home" 250 450
3194 engine_turn_is_bounded_and_its_descendants_reaped watcher_live "$home" 150 150
3196 engine_turn_is_bounded_and_its_descendants_reaped host_exited "$home" 300 300
3199 engine_turn_is_bounded_and_its_descendants_reaped sh -c '! kill -0 "$1" 2>/dev/null' _ "$orphan" 50 50
3208 restarted_host_stops_what_a_killed_predecessor_left watcher_live "$home" 150 150
3216 restarted_host_stops_what_a_killed_predecessor_left sh -c '! kill -0 "$1" 2>/dev/null && ! kill -0 "$2" 2>/dev/null' _ "$arm" "$watcher" 200 200
3218 restarted_host_stops_what_a_killed_predecessor_left sh -c 'grep -q "\tstart\tgen=host-" "$1" && [ "$(grep -c "\tstart\t" "$1")" -ge 2 ]' _ "$home/state/.supervision-host.log" 100 100
3239 park_exit_probe_uses_half_second_child_sleeps watcher_live "$home" 150 150
3243 park_exit_probe_uses_half_second_child_sleeps test -s "$home/park-sleeps" 100 100
3256 park_boundary_ends_the_park_before_the_hook_timeout watcher_live "$home" 150 150
3258 park_boundary_ends_the_park_before_the_hook_timeout host_exited "$home" 150 150
3287 park_boundary_holds_under_back_to_back_closes watcher_live "$home" 150 150
3289 park_boundary_holds_under_back_to_back_closes sh -c '[ -e "$1/engine-call.1" ] || [ -s "$1/host.rc" ]' _ "$home" 450 450
3297 park_boundary_holds_under_back_to_back_closes host_exited "$home" 450 450
3336 park_boundary_rechecked_just_before_the_engine_turn watcher_live "$home" 150 150
3338 park_boundary_rechecked_just_before_the_engine_turn sh -c '[ -s "$1/host-record-at-render" ] || [ -s "$1/host.rc" ]' _ "$home" 300 300
3345 park_boundary_rechecked_just_before_the_engine_turn host_exited "$home" 300 300
3367 park_test_clock_requires_the_marker host_exited "$home" 150 450
3373 park_test_clock_requires_the_marker watcher_live "$home" 150 150
3375 park_test_clock_requires_the_marker handled_at_least "$home" 1 250 450
3390 park_outcome watcher_live "$home" 150 150
3392 park_outcome sh -c '[ -s "$1/host.rc" ] || grep -q "\thandled\t" "$1/state/.supervision-host.log" 2>/dev/null' _ "$home" 250 450
3400 park_outcome host_exited "$home" 200 200
3425 park_limit_lets_a_turn_outlive_the_boundary watcher_live "$home" 150 150
3427 park_limit_lets_a_turn_outlive_the_boundary sh -c '[ -s "$1/host.rc" ] || grep -q "\thandled\t" "$1/state/.supervision-host.log" 2>/dev/null' _ "$home" 250 450
3435 park_limit_lets_a_turn_outlive_the_boundary host_exited "$home" 200 200
3449 first_cycle_status_streams_and_owner_options_reach_it grep -qs '^watcher: started pid=' "$home/host.out" 150 150
3453 first_cycle_status_streams_and_owner_options_reach_it host_exited "$home" 200 450
3467 first_cycle_status_streams_and_owner_options_reach_it grep -qs '^watcher: started pid=' "$home/stale-arm.out" 150 150
3469 first_cycle_status_streams_and_owner_options_reach_it watcher_live "$home" 150 150
3478 first_cycle_status_streams_and_owner_options_reach_it sh -c 'grep -qs "^watcher: started pid=" "$1/host.out" || [ -s "$1/host.rc" ]' _ "$home" 150 150
3482 first_cycle_status_streams_and_owner_options_reach_it sh -c '! kill -0 "$1" 2>/dev/null' _ "$stale" 100 100
3483 first_cycle_status_streams_and_owner_options_reach_it host_exited "$home" 200 200
3484 first_cycle_status_streams_and_owner_options_reach_it host_exited "$home" 200 450
3495 first_cycle_status_streams_and_owner_options_reach_it grep -qs '^watcher: started pid=' "$home/host.out" 150 150
3501 first_cycle_status_streams_and_owner_options_reach_it host_exited "$home" 200 200
3544 park_again watcher_live "$1" 150 150
3567 trip_latch host_exited "$1" 250 450
3574 trip_latch host_exited "$1" 250 450
3590 latch_trips_after_two_engine_errors_then_probes_and_recovers host_exited "$home" 250 450
3601 latch_trips_after_two_engine_errors_then_probes_and_recovers host_exited "$home" 250 450
3610 latch_trips_after_two_engine_errors_then_probes_and_recovers host_exited "$home" 250 450
3619 latch_trips_after_two_engine_errors_then_probes_and_recovers handled_at_least "$home" 1 250 450
3641 latch_keeps_attended_closes_on_main_and_skips_unopted_homes host_exited "$home" 250 450
3652 latch_keeps_attended_closes_on_main_and_skips_unopted_homes host_exited "$home" 250 450
3706 unchanged_held_outcome_reaches_the_captain_once_until_a_new_event captain_rows_at_least "$home" 1 250 450
3709 unchanged_held_outcome_reaches_the_captain_once_until_a_new_event handled_at_least "$home" 1 150 450
3716 unchanged_held_outcome_reaches_the_captain_once_until_a_new_event scan_ran "$home" 150 150
3717 unchanged_held_outcome_reaches_the_captain_once_until_a_new_event scan_idle "$home" 150 150
3718 unchanged_held_outcome_reaches_the_captain_once_until_a_new_event flood_signal "$home" 10 10
3726 unchanged_held_outcome_reaches_the_captain_once_until_a_new_event captain_rows_at_least "$home" 2 250 450
3737 unchanged_held_outcome_reaches_the_captain_once_until_a_new_event host_exited "$home" 200 200
3738 unchanged_held_outcome_reaches_the_captain_once_until_a_new_event sh -c '! kill -0 "$1" 2>/dev/null' _ "$watcher" 100 100
3746 unverified_engine_hands_every_away_wake_to_main watcher_live "$home" 150 150
3748 unverified_engine_hands_every_away_wake_to_main host_exited "$home" 200 450
3791 tagged_lock_holder_reaches_the_engine_whole watcher_live "$home" 150 150
3795 tagged_lock_holder_reaches_the_engine_whole handled_at_least "$home" 1 450 450
3801 tagged_lock_holder_reaches_the_engine_whole host_exited "$home" 200 200
3820 superseded_host_leaves_the_owner_untouched watcher_live "$home" 150 150
3828 superseded_host_leaves_the_owner_untouched sh -c '[ -s "$1" ]' _ "$home/host2.rc" 200 200
3839 superseded_host_leaves_the_owner_untouched sh -c '! kill -0 "$1" 2>/dev/null && ! kill -0 "$2" 2>/dev/null' _ "$owner" "$watcher" 200 200
3862 routine_unsticking_closes_each_stop_without_main_handback watcher_live "$home" 450 450
3864 routine_unsticking_closes_each_stop_without_main_handback handled_at_least "$home" 1 250 450
3898 merged_sweep_skips_already_closed_tasks watcher_live "$home" 450 450
3907 merged_sweep_skips_already_closed_tasks host_exited "$home" 250 450
3912 merged_sweep_skips_already_closed_tasks handled_at_least "$home" 1 250 450
4007 merged_sweep_handles_every_report_in_a_row watcher_live "$home" 450 450
4010 merged_sweep_handles_every_report_in_a_row host_exited "$home" 250 450
4016 merged_sweep_handles_every_report_in_a_row handled_at_least "$home" 1 250 450

Equivalent asynchronous loops and blocking fixture waits (all unchanged):

Original line(s) Budget/cadence What it waits for
185 100 x 0.05s Stub waits for TERM-stopped successor watcher to die.
207 100 x 0.05s Recovery-marker holder publishes marker-held.
238 50 x 0.1s Cleanup waits for TERM-stopped host to die.
2664 50 x 0.1s Fixture waits for TERM-stopped pass-through successor to die.
337 Caller-supplied polls x 0.1s Shared wait_until implementation; each caller is listed above.
1851, 3526 Until session.stop; 0.1s Fake harness sessions consume stop.go / park.go until fixture teardown.
1920, 1924 Until release file; 0.1s Delayed engine waits for before-drain.release / before-return.release.
2466 Until release file; 0.1s Marker-lock fixture waits for holder release.
3815 Until go-second; 0.1s Owner harness waits before launching superseding host.
125, 574, 3329 FIFO read until explicit release Held engine / scope stub / render stub synchronize with the test.
201, 2464 Until acquired; 0.1s Marker-lock fixture acquires its lock through fm_lock_acquire_wait (unbounded fixture synchronization).
250, 1861, 2480, 3471 Child wait until exit Reap stopped harness / hook / marker-lock holder / killed stale arm.
90, 92, 196 FM_TEST_STUB_MAX_BLOCK_SECONDS (default 120s) Deliberately hung descendant/engine or return-first turn; host timeout/signal ends it.
203, 1722, 2058, 2278, 2362, 2442, 2475, 3213, 3498, 3758 Fixed 1/2/3/30 seconds Marker-lock hold, negative stability observations, stopped-arm/crash setup, or fake process lifetime.

The other while/for loops iterate finite data rather than waiting for asynchronous progress.

Pipeline

Updates from git push no-mistakes

  • ✅ intent - passed
  • ✅ rebase - passed
  • ⚠️ review - 2 issues found → auto-fixed ✅
  • ✅ test - passed
  • ✅ document - passed
  • ✅ lint - passed
  • ✅ push - passed
  • ⚠️ pr - running
  • ⚠️ ci - pending

@jredgard
jredgard merged commit 97277a4 into main Oct 23, 2026
20 checks passed
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