The first model request can arrive before the launcher's first journal line, so a recorded-host case reds under load with "the launcher wrote no line to the journal" #246

Open
opened 2026-11-26 07:23:41 +00:00 by ceres · 2 comments
Member

Purpose (bug): a recorded-host case reds only for a real fault and never because the box was busy, so a red on main means a broken main — and when it does red, the red names which side was silent.

Filed on the Supervisor's ruling of 2026-11-26, from the two main reds of the relay job that came after both of this issue's predecessors' fixes landed. It is filed, not built.

What happened

Both are main runs of ci.yml, job "the relay loads in the recorded host", after PR 78 (ea64dfa6, 2026-11-23) and after cause 2's fix (dc8f6d5e, 2026-11-24), on tips whose diffs touch nothing of the relay. Read from the saved job logs (GET /api/v1/repos/martha-ai/martha/actions/jobs/<job_id>/logs, forge 17), the failing block only.

run job task tip at (UTC) case lasted
4212 16603 12825 052a7306 2026-11-25 06:29:40 own_writes_on_the_recorded_host: "a member's own Write over a file whose lines end in CRLF does not stop it" 10,024 ms
4314 17211 13330 09a775b2 2026-11-25 08:35:24 every_turn_on_the_model_runs: "#440 on the recorded host: a prompt the owner types into a running turn does not swallow the next crew message" 27,543 ms

Both end in the same line:

ALaunchThatStopped: The launcher wrote no line to the journal at …/relay-journal by the host's first model request,
so this run read no journal: a tool that outlasts the silence budget would red it as it did before martha#240

and above it, in both, the launcher's own line:

martha: The crew declares no billing; the owner is not signed in, so the member is billed by api_key.

So the sign-in probe answered (loggedIn: false, the api_key path) and the member started. Neither red is a credential one, and cause 2's refusal path is not involved.

What the code says, and why it is an ordering fault rather than a spent budget

journalNeverWritten (src/drive_the_recorded_host/drive_the_recorded_host.ts:407) is handed to the run as the wait's cannotHappen (:509). It returns its message as soon as the stand-in has heard a model request (heard.length > 0) and no launch in the project's state has a line in its journal — evaluated at each poll, not after a period. So the wait does not run out: the case fails the moment the first request is answered while the launcher's first journal line has not landed yet.

That is why both cases died long before the wait's own budget: HOST_SILENCE_MS is 120,000 ms (src/drive_the_recorded_host/wait_while_the_host_keeps_showing.ts:36) and these failed at 10.0 s and 27.5 s.

What this adds to the record

  1. It is not one case. martha-ai/martha#171 named the CRLF instance — exactly run 4212 above — and closed at 2026-11-25T12:44:51Z with PR 178 landed at 740ed295, which types the owner's turn only after this run's launch journal has received the relay's session_started. That closes the window for the turn path, and journalNeverWritten stays as the guard behind it. The second instance, #440, is a case #171 does not name, and it is the one that shows the class is wider than the path #171 fixed.
  2. Neither saved log carries #171's mechanism marker. There is no "martha was unloaded: it crashed the hooks worker" line and no written:0 in either log, so whether #440's red is that mechanism is not known from these two logs.

Measured since the fix

Every ci.yml run on main back to 2026-11-24 21:26Z was read for this job: the only relay failures are the two above; from 2026-11-25 09:02Z on every relay job on main is green, the latest at 2026-11-26 06:15Z, and the cancelled ones are tips superseded by a later push. There is no recurrence after 740ed295 to read.

Done when

  • the wait does not fail on an ordering that a loaded box can produce: either the first request is allowed to wait for the launcher's first journal line (bounded by the silence budget, so a launcher that never writes one is still named), or the red says which side was silent and why that is not the case's fault;
  • a red-first reproduction shows it — a case whose stand-in answers the host's first request before the launcher's first journal line fails before the fix and passes after it, on a box loaded the way the two runs above were;
  • five runs in a row on one unchanged tip agree (this issue's Done-when, unmeasured today).

Refs martha-ai/martha#19, martha-ai/martha#171.

Purpose (bug): a recorded-host case reds only for a real fault and never because the box was busy, so a red on `main` means a broken `main` — and when it does red, the red names which side was silent. Filed on the Supervisor's ruling of 2026-11-26, from the two `main` reds of the relay job that came after both of this issue's predecessors' fixes landed. It is filed, not built. ## What happened Both are `main` runs of `ci.yml`, job "the relay loads in the recorded host", after PR 78 (`ea64dfa6`, 2026-11-23) and after cause 2's fix (`dc8f6d5e`, 2026-11-24), on tips whose diffs touch nothing of the relay. Read from the saved job logs (`GET /api/v1/repos/martha-ai/martha/actions/jobs/<job_id>/logs`, forge 17), the failing block only. | run | job | task | tip | at (UTC) | case | lasted | |---|---|---|---|---|---|---| | 4212 | 16603 | 12825 | `052a7306` | 2026-11-25 06:29:40 | `own_writes_on_the_recorded_host`: "a member's own Write over a file whose lines end in CRLF does not stop it" | 10,024 ms | | 4314 | 17211 | 13330 | `09a775b2` | 2026-11-25 08:35:24 | `every_turn_on_the_model_runs`: "#440 on the recorded host: a prompt the owner types into a running turn does not swallow the next crew message" | 27,543 ms | Both end in the same line: ``` ALaunchThatStopped: The launcher wrote no line to the journal at …/relay-journal by the host's first model request, so this run read no journal: a tool that outlasts the silence budget would red it as it did before martha#240 ``` and above it, in both, the launcher's own line: ``` martha: The crew declares no billing; the owner is not signed in, so the member is billed by api_key. ``` So the sign-in probe answered (`loggedIn: false`, the api_key path) and the member started. Neither red is a credential one, and cause 2's refusal path is not involved. ## What the code says, and why it is an ordering fault rather than a spent budget `journalNeverWritten` (`src/drive_the_recorded_host/drive_the_recorded_host.ts:407`) is handed to the run as the wait's `cannotHappen` (`:509`). It returns its message as soon as the stand-in has heard a model request (`heard.length > 0`) and no launch in the project's state has a line in its journal — evaluated at each poll, not after a period. So the wait does not run out: the case fails the moment the first request is answered while the launcher's first journal line has not landed yet. That is why both cases died long before the wait's own budget: `HOST_SILENCE_MS` is 120,000 ms (`src/drive_the_recorded_host/wait_while_the_host_keeps_showing.ts:36`) and these failed at 10.0 s and 27.5 s. ## What this adds to the record 1. **It is not one case.** martha-ai/martha#171 named the CRLF instance — exactly run 4212 above — and closed at 2026-11-25T12:44:51Z with PR 178 landed at `740ed295`, which types the owner's turn only after this run's launch journal has received the relay's `session_started`. That closes the window for the turn path, and `journalNeverWritten` stays as the guard behind it. The second instance, #440, is a case #171 does not name, and it is the one that shows the class is wider than the path #171 fixed. 2. **Neither saved log carries #171's mechanism marker.** There is no "martha was unloaded: it crashed the hooks worker" line and no `written:0` in either log, so whether #440's red is that mechanism is not known from these two logs. ## Measured since the fix Every `ci.yml` run on `main` back to 2026-11-24 21:26Z was read for this job: the only relay failures are the two above; from 2026-11-25 09:02Z on every relay job on `main` is green, the latest at 2026-11-26 06:15Z, and the cancelled ones are tips superseded by a later push. There is no recurrence after `740ed295` to read. ## Done when - the wait does not fail on an ordering that a loaded box can produce: either the first request is allowed to wait for the launcher's first journal line (bounded by the silence budget, so a launcher that never writes one is still named), or the red says which side was silent and why that is not the case's fault; - a red-first reproduction shows it — a case whose stand-in answers the host's first request before the launcher's first journal line fails before the fix and passes after it, on a box loaded the way the two runs above were; - five runs in a row on one unchanged tip agree (this issue's Done-when, unmeasured today). Refs martha-ai/martha#19, martha-ai/martha#171.
Member

Attempt 1, martha#251 PR 253 at 4cb4ee53, run 5596 job 23897 (the relay loads in the recorded host): #984: a member the table grants no work is handed no crew state failed with ALaunchThatStopped: The launcher wrote no line to the journal ... by the host's first model request. Not from the fold (the relay job block is unchanged but for comments). No separate job rerun: the branch took one push (d929ec4b, merging PR 244's tip) for a real gate red, and that push re-runs this job.

Attempt 1, martha#251 PR 253 at 4cb4ee53, run 5596 job 23897 (the relay loads in the recorded host): `#984: a member the table grants no work is handed no crew state` failed with `ALaunchThatStopped: The launcher wrote no line to the journal ... by the host's first model request`. Not from the fold (the relay job block is unchanged but for comments). No separate job rerun: the branch took one push (d929ec4b, merging PR 244's tip) for a real gate red, and that push re-runs this job.
Member

Fixed locally on pluto/246-first-request-before-journal-line at ec8a4eea, not pushed: the full freeze is on, so this is a HANDOFF with ci=none:owed.

What the guard did. journalNeverWritten returned its message at each poll as soon as the stand-in had heard one model request and no launch in the project had a line in its journal. The host-side request and the launcher-side line are written by two processes either side of a socket, so on a loaded box the request lands first and the run is named in 10 s to 28 s of a budget it had barely started spending.

What it does now. It returns nothing until a whole silence budget has passed since the first request, counted from that request own received_at, and the budget is the wait s own silence_ms rather than a new constant. The ordering a busy box produces is waited out; a launcher that keeps no journal at all is still named, and its message now says how long it had.

Proof.

  • Red first: the two new cases are 0 pass / 2 fail against the unfixed source and green on the fix.
  • a_silent_host_fails_by_name.node-test.ts 27/27, and nine concurrent copies of it over two rounds, 27/27 each.
  • Whole npm test locally: 5578 tests, 5539 pass, 38 skipped, and one red that was my own uncommitted tree (the_bash_answers_bite asserts a clean git status); that file is 9/9 green after the commit.
  • The relay job own stage, locally with Claude Code 2.1.332: all 17 recorded-host runs whole, twice, exit 0 both times, the second under load.

The new cases are #246: a host request that beats the launcher first line is waited for, and the run goes on and #246: a launcher that writes no line at all is still named once the silence budget has passed.

Unmeasured, and left on this issue: five runs in a row on one unchanged tip. Two runs of the recorded-host stage agree here; the CI relay job own runs are the place that reaches five.

Refs martha-ai/martha#19, martha-ai/martha#171.

Fixed locally on `pluto/246-first-request-before-journal-line` at `ec8a4eea`, not pushed: the full freeze is on, so this is a HANDOFF with ci=none:owed. **What the guard did.** `journalNeverWritten` returned its message at each poll as soon as the stand-in had heard one model request and no launch in the project had a line in its journal. The host-side request and the launcher-side line are written by two processes either side of a socket, so on a loaded box the request lands first and the run is named in 10 s to 28 s of a budget it had barely started spending. **What it does now.** It returns nothing until a whole silence budget has passed since the first request, counted from that request own `received_at`, and the budget is the wait s own `silence_ms` rather than a new constant. The ordering a busy box produces is waited out; a launcher that keeps no journal at all is still named, and its message now says how long it had. **Proof.** - Red first: the two new cases are 0 pass / 2 fail against the unfixed source and green on the fix. - `a_silent_host_fails_by_name.node-test.ts` 27/27, and nine concurrent copies of it over two rounds, 27/27 each. - Whole `npm test` locally: 5578 tests, 5539 pass, 38 skipped, and one red that was my own uncommitted tree (`the_bash_answers_bite` asserts a clean `git status`); that file is 9/9 green after the commit. - The relay job own stage, locally with Claude Code 2.1.332: all 17 recorded-host runs whole, twice, exit 0 both times, the second under load. The new cases are `#246: a host request that beats the launcher first line is waited for, and the run goes on` and `#246: a launcher that writes no line at all is still named once the silence budget has passed`. Unmeasured, and left on this issue: five runs in a row on one unchanged tip. Two runs of the recorded-host stage agree here; the CI relay job own runs are the place that reaches five. Refs martha-ai/martha#19, martha-ai/martha#171.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
3 participants
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#246
No description provided.