A recorded-host run that ended before its switch fails by name, not at a missing record (martha#227) #243

Manually merged
terra merged 2 commits from vesta/227-recorded-host-model-record into main 2026-11-27 01:15:04 +00:00
Member

Purpose (flake class): a recorded-host run that reported success while the model record its case then read was never
written. This makes such a run fail by name, at the run, instead of at a readFileSync ENOENT.

What run 5176 actually was

ci.yml on PR 200 (martha#197), run 5176, job "the relay loads in the recorded host", task 17042. The case
a_switch_does_not_move_the_owners_default.node-test.ts:173 failed with:

Error: ENOENT: no such file or directory, open '…/crews/756ad7a6…/model/builder.model.json'
    at theRecordOf (…:116:21)
    at … (:188:16)

and took 5.8 s where its two neighbours in the same file took 35 s and 38 s. That is the whole of it: in
5.8 s the setup and martha start had been made and the member had already ended — the run answered no model
request at all
. Nothing was switched, so no model record was owed, and the case read its absence.

The case could not say so, for two reasons:

  1. whatTheRunSaw discarded the run's exit_code and returned whatever it had, so "the member exited before doing
    anything" was indistinguishable from "the run finished".
  2. That case was the one in the file that never asserted the switch was made: its only pre-read assertion was that the
    owner's settings file was unchanged, which is equally true of a run that did nothing. Its two neighbours assert the
    host answered the model command; it did not.

So the red named a missing file in a file the package never touched, and cost martha#197 a round — as filed.

What changed (one file)

  • whatTheRunSaw is handed the request count its script gives it and refuses a run that answered fewer: on a normal
    early return with the member's own exit code and the end of its terminal, and by re-throwing the named stop a wait
    threw. A stop after every request is answered is still the observation these cases want — that is the host holding
    its own switch confirmation open, which the file's own note describes.
  • The case now asserts the switch was made (the host's Set model to Opus), as its two neighbours already do, so
    its premise is checked before anything is read off the disk. The three copies of that assertion are now one helper.
  • theRecordOf says "no model record was written at " instead of letting the read raise ENOENT, so an absence
    is the case's own assertion and it says whether the record is there.

Proof

Driven through the relay script's own command for one file (node --test, --test-concurrency=1, the force-exit and
the guard), inside the namespace wrapper, with a host binary that exits at once — the shape run 5176 had:

  • main's file, same command: the case fails at theRecordOf with
    ENOENT … model/builder.model.json after 2.6 s — the flake reproduced exactly.
  • this file: all three cases fail by name, with no ENOENT anywhere:
    the run ended after 0 of the 2 model requests its script gives it, so nothing this case asserts was done: martha start exited with 1. The terminal last showed: … The member is not started: … does not load Martha's relay …

Offline: tsc --noEmit clean, eslint --max-warnings=0 on the file clean, the file's three cases skip cleanly
without MARTHA_RECORDED_HOST (0 fail), check:recorded-host-runs, check:restated-values, check:base-tests --base 74041d92 --head a0b60fef (475 files, every base title at the tip) and check:private all pass.

The recorded-host cases themselves run only in ci.yml's relay job, which is where this change is proved end to end.

Refs martha-ai/martha#227, martha-ai/martha#197 (PR 200), PR 200 comment 5407, run 5176 / task 17042.

Purpose (flake class): a recorded-host run that reported success while the model record its case then read was never written. This makes such a run fail by name, at the run, instead of at a `readFileSync` ENOENT. ## What run 5176 actually was `ci.yml` on PR 200 (martha#197), run 5176, job "the relay loads in the recorded host", task 17042. The case `a_switch_does_not_move_the_owners_default.node-test.ts:173` failed with: Error: ENOENT: no such file or directory, open '…/crews/756ad7a6…/model/builder.model.json' at theRecordOf (…:116:21) at … (:188:16) and took **5.8 s** where its two neighbours in the same file took **35 s** and **38 s**. That is the whole of it: in 5.8 s the setup and `martha start` had been made and the member had already ended — the run answered **no model request at all**. Nothing was switched, so no model record was owed, and the case read its absence. The case could not say so, for two reasons: 1. `whatTheRunSaw` discarded the run's `exit_code` and returned whatever it had, so "the member exited before doing anything" was indistinguishable from "the run finished". 2. That case was the one in the file that never asserted the switch was made: its only pre-read assertion was that the owner's settings file was unchanged, which is equally true of a run that did nothing. Its two neighbours assert the host answered the model command; it did not. So the red named a missing file in a file the package never touched, and cost martha#197 a round — as filed. ## What changed (one file) - **`whatTheRunSaw` is handed the request count its script gives it** and refuses a run that answered fewer: on a normal early return with the member's own exit code and the end of its terminal, and by re-throwing the named stop a wait threw. A stop *after* every request is answered is still the observation these cases want — that is the host holding its own switch confirmation open, which the file's own note describes. - **The case now asserts the switch was made** (the host's `Set model to Opus`), as its two neighbours already do, so its premise is checked before anything is read off the disk. The three copies of that assertion are now one helper. - **`theRecordOf` says "no model record was written at <path>"** instead of letting the read raise ENOENT, so an absence is the case's own assertion and it says whether the record is there. ## Proof Driven through the relay script's own command for one file (`node --test`, `--test-concurrency=1`, the force-exit and the guard), inside the namespace wrapper, with a host binary that exits at once — the shape run 5176 had: - **main's file**, same command: the case fails at `theRecordOf` with `ENOENT … model/builder.model.json` after 2.6 s — the flake reproduced exactly. - **this file**: all three cases fail by name, with no ENOENT anywhere: `the run ended after 0 of the 2 model requests its script gives it, so nothing this case asserts was done: martha start exited with 1. The terminal last showed: … The member is not started: … does not load Martha's relay …` Offline: `tsc --noEmit` clean, `eslint --max-warnings=0` on the file clean, the file's three cases skip cleanly without `MARTHA_RECORDED_HOST` (0 fail), `check:recorded-host-runs`, `check:restated-values`, `check:base-tests --base 74041d92 --head a0b60fef` (475 files, every base title at the tip) and `check:private` all pass. The recorded-host cases themselves run only in `ci.yml`'s relay job, which is where this change is proved end to end. Refs martha-ai/martha#227, martha-ai/martha#197 (PR 200), PR 200 comment 5407, run 5176 / task 17042.
A recorded-host run that ended before its switch fails by name, not at a missing record (martha#227)
Some checks failed
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 22s
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Successful in 15s
dependency advisories / node in installer (pull_request) Successful in 12s
dependency advisories / advisories (pull_request) Successful in 0s
c4 model / c4-model-1 (pull_request) Successful in 6s
c4 model / c4-model (pull_request) Successful in 0s
CI / links resolve (pull_request) Successful in 7s
CI / structural floor (pull_request) Successful in 32s
CI / Martha's names are its own (pull_request) Successful in 31s
CI / no import cycle (pull_request) Successful in 30s
CI / the posted text check bites (pull_request) Successful in 9s
CI / the engine drift check bites (pull_request) Successful in 49s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 13s
CI / the host drift check bites (pull_request) Successful in 1m25s
CI / workflows are valid (pull_request) Successful in 17s
CI / the pictures change only with the version (pull_request) Successful in 18s
CI / no test the base passed goes missing (pull_request) Successful in 37s
CI / every check runs in a job (pull_request) Successful in 11s
CI / every job has a timeout (pull_request) Successful in 20s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 20s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 35s
CI / no literal restates a defined value (pull_request) Successful in 1m4s
CI / installer (pull_request) Successful in 3m47s
CI / the relay loads in the recorded host (pull_request) Successful in 16m7s
CI / gate coverage (pull_request) Successful in 21m28s
CI / the clean-install proof removes its container (pull_request) Has been cancelled
a0b60fef53
Run 5176's red on martha#197 read as a code red: `theRecordOf` threw
`readFileSync`'s ENOENT at model/builder.model.json, in a case that had
asserted only that the owner's settings were unchanged — which is true of a
run that did nothing. The case took 5.8 s where its neighbours in the same
file took 35 s and 38 s: `martha start` exited at once, no model request was
ever made, and the case went on to read a record no run had owed.

Three changes, all in that one file:

- `whatTheRunSaw` is handed the request count its script gives, and refuses a
  run that answered fewer — on a normal early return with the member's exit
  code, or by re-throwing the stop a wait named. A stop after every request
  is answered is still the observation the case wants: that is the host
  holding its own confirmation open.
- The case with no model in the owner's settings now asserts the host
  answered its model command, as its two neighbours already did, so its
  premise — a switch that was made — is checked before anything is read.
- `theRecordOf` says "no model record was written at <path>" instead of
  letting the read raise ENOENT, so an absence is the case's own assertion.

Proved by driving the file with a host that exits at once, on the relay
script's own command: main's file reproduces the flake exactly (ENOENT at
builder.model.json, 2.6 s), this file fails all three cases with the run's
own words — "the run ended after 0 of the 2 model requests … martha start
exited with 1. The terminal last showed: The member is not started: …".
terra manually merged commit 61ec8da029 into main 2026-11-27 01:15:04 +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!243
No description provided.