a call left open is stuck only when nothing moves inside it (martha#186) #235

Manually merged
terra merged 2 commits from hygiea/186-recorded-host-initializing into main 2026-11-26 06:41:45 +00:00
Member

The recorded-host relay class of #186: a_review_at_its_limit_on_the_recorded_host went red in ci.yml task 16921 at 1233f0a6 (186440 ms) with the host's own agent still on its terminal and the screen animating — the stand-in's 40-request ceiling never reached, so the run was cut, not stalled.

Cause, proved. redFor measured an open call's age (now - held.since > OPEN_WORK_MS), so a host that was visibly working was cut off at 180 s; 186440 ms is that budget plus overhead. That is a budget asserting the machine's speed, which #210 settled against for silence — the terminal, the model requests and the launcher's journal already refill the silence budget, and the open-call branch was the one place they did not.

The fix. Inside an open stretch the wait now spends OPEN_WORK_MS on stillness (now - Math.max(held.since, seen.moved_at)). A call that never comes back with nothing moving still fails at 180 s and is still named as the tool's — the existing #240 case for exactly that stayed green.

Red first. a_silent_host_fails_by_name.node-test.ts gains #186: a call left open while the host is still drawing is not named as a stuck tool. Before the fix it fails with The tool \Write` has not returned in 180100 ms ... while the host kept drawing`; after it, it passes.

Greens on this tip (base a10a6e98, branch worktree, runs in their own pid namespace, nice -n 10):

  • the file's 25 cases, 25 pass;
  • the whole suite 5514 pass / 5554, the two reds a_stuck_file_ends_when_its_run_is_signalled (SIGTERM/SIGINT, exit_code null !== 143/130) — green 3/3 alone on this tip, and red the same way on plain main a10a6e98 under a full run (three of them there), so they are main's own load class and not this diff;
  • npx tsc --noEmit clean, npx eslint . --max-warnings=0 clean, the installer job's steps green.

Refs #186

The recorded-host relay class of #186: `a_review_at_its_limit_on_the_recorded_host` went red in ci.yml task 16921 at 1233f0a6 (186440 ms) with the host's own agent still on its terminal and the screen animating — the stand-in's 40-request ceiling never reached, so the run was cut, not stalled. **Cause, proved.** `redFor` measured an open call's *age* (`now - held.since > OPEN_WORK_MS`), so a host that was visibly working was cut off at 180 s; 186440 ms is that budget plus overhead. That is a budget asserting the machine's speed, which #210 settled against for silence — the terminal, the model requests and the launcher's journal already refill the silence budget, and the open-call branch was the one place they did not. **The fix.** Inside an open stretch the wait now spends `OPEN_WORK_MS` on stillness (`now - Math.max(held.since, seen.moved_at)`). A call that never comes back with nothing moving still fails at 180 s and is still named as the tool's — the existing #240 case for exactly that stayed green. **Red first.** `a_silent_host_fails_by_name.node-test.ts` gains `#186: a call left open while the host is still drawing is not named as a stuck tool`. Before the fix it fails with `The tool \`Write\` has not returned in 180100 ms ... while the host kept drawing`; after it, it passes. **Greens on this tip** (base a10a6e98, branch worktree, runs in their own pid namespace, `nice -n 10`): - the file's 25 cases, 25 pass; - the whole suite 5514 pass / 5554, the two reds `a_stuck_file_ends_when_its_run_is_signalled` (SIGTERM/SIGINT, `exit_code null !== 143/130`) — green 3/3 alone on this tip, and red the same way on plain main a10a6e98 under a full run (three of them there), so they are main's own load class and not this diff; - `npx tsc --noEmit` clean, `npx eslint . --max-warnings=0` clean, the installer job's steps green. Refs #186
The recorded host's own agent can sit on the terminal past the driver's budget for an open call — under load a
subagent takes minutes to start — and the wait cut it off for the call's age alone. That is what task 16921 at
1233f0a6 did: the case red at 186440 ms with the screen still animating, the stand-in's 40-request ceiling never
reached, and the red naming a tool for what was only a slow machine.

A budget on a call's age asserts the machine's speed, which #210 settled against for silence. The wait now spends
OPEN_WORK_MS on stillness inside the call too, reading the terminal, the model requests and the launcher's journal
as it already does between calls; a call that never comes back with nothing moving is still named as the tool's, with
the call's own age in the red.

The new case reds before it with the same cut (The tool has not returned in 180100 ms while the host kept drawing) and
the file's other cases stay green, the #240 call-that-never-returns one among them.
Merge remote-tracking branch 'origin/main' into hygiea/186-recorded-host-initializing
All checks were successful
c4 model / c4-model-1 (pull_request) Successful in 7s
CI / links resolve (pull_request) Successful in 8s
c4 model / c4-model (pull_request) Successful in 0s
CI / structural floor (pull_request) Successful in 29s
CI / Martha's names are its own (pull_request) Successful in 30s
CI / no import cycle (pull_request) Successful in 30s
CI / no literal restates a defined value (pull_request) Successful in 1m9s
CI / installer (pull_request) Successful in 2m25s
CI / the host drift check bites (pull_request) Successful in 1m13s
CI / the engine drift check bites (pull_request) Successful in 22s
CI / every check runs in a job (pull_request) Successful in 15s
CI / every job has a timeout (pull_request) Successful in 12s
CI / the posted text check bites (pull_request) Successful in 16s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 15s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 9s
CI / workflows are valid (pull_request) Successful in 14s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 32s
CI / no test the base passed goes missing (pull_request) Successful in 35s
CI / the pictures change only with the version (pull_request) Successful in 17s
dependency advisories / node in . (container) (pull_request) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been skipped
dependency advisories / node in installer (container) (pull_request) Has been skipped
CI / nothing private (pull_request) Has been skipped
dependency advisories / node in . (pull_request) Successful in 16s
dependency advisories / node in installer (pull_request) Successful in 13s
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Successful in 15s
dependency advisories / advisories (pull_request) Successful in 0s
CI / the relay loads in the recorded host (pull_request) Successful in 15m14s
CI / the clean-install proof removes its container (pull_request) Successful in 22m46s
CI / gate coverage (pull_request) Successful in 18m7s
d529f4d0f0
terra manually merged commit bbaad969d4 into main 2026-11-26 06:41:45 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
martha-ai/martha!235
No description provided.