Re-record the Claude Code host from 2.1.331, and read the two shapes it changed (macula-io/martha#109) #110

Manually merged
terra merged 1 commit from juno/040-host-rerecord into main 2026-11-23 23:53:22 +00:00
Member

Refs #109.

What this is

The host drift job went red against 2.1.331 (npm latest): three parts unreadable, no fact differing. Two of the three gaps are in the readers, the third is a shape the follower had never met, and the recording then moves with the pin.

The hook events. The anchor follows the alias the host maps to its classic.<event> names to the array literal bound to that alias. 2.1.331 binds that name to two arrays — the hook-event list and an SVG-element list (defs, g, marker, …) — so the cut refused rather than pick one. The array is now cut as one of names that start with a capital, which is how the host spells every hook event; a host that spells one otherwise stops the record rather than cutting the wrong list.

The setter slot. The markdown loader and the file-mode memory guard both follow a callee through the host's setter slot (var b=…;function tLl(e){b=e}, exported as sessionOverridesGetter). 2.1.331 declares that binding bare (var b; before function Rgd(e){b=e}) where 2.1.330 declared it with its default, and assignedTo kept a bare binding off the setter path, so the setter's body b=e was read as an assigned value and its parameter e was followed as a free name. A bare binding whose every write is setter-shaped is now a setter slot with no default, and each value the bundle passes to the setter is followed, as before.

The recording. Re-taken from 2.1.331 (npm run record:claude-code-host), 0.4.0's facts absorbed as they are. memory_off, which is restated by hand, is re-read from the release and now spells the guard, the on check it calls on the off switch's value, and the off switch read the way 2.1.331 does. The three recordings held to the same pin move with it, as their own notes say: the models (the same four aliases in the shipped declaration), the Bash answers (re-taken on 2.1.331, every answer unchanged, after a 2.1.330 control reproduced the committed ones), the failed-review envelope (carried by reading the binary: the report's notification, every element and the four task statuses are identical in the two recordings) and the tool deltas (carried the same way: one emptiness guard hoisted around three set deletions, which deletes nothing when the sets are empty).

One fixture moved with the record: the case that changes a literal in a definition session_start_schema reaches used to plant it in the first one, and 2.1.331 puts that literal in a class the first two definitions build. It now finds the definition holding it, wherever it is.

The readers read the old host exactly as before

The strongest check on a re-record is that the fixes moved nothing else. With this branch's readers, --check against a 2.1.330 install reproduces the committed 2.1.330 recording with no unreadable part and no differing fact (recorded 2.1.330, host 2.1.330, exit 0). So every difference the new 2.1.331 recording absorbs is the host's own change, not the reader's.

Proof, on e09028be in the worktree

prove_the_recorded_host_is_current.sh <work-dir> <installed 2.1.331>
                                   exit 0   recorded 2.1.331, host 2.1.331
node record_claude_code_host.ts --check <2.1.330 install> 2.1.330 …
                                   exit 0   recorded 2.1.330, host 2.1.330
prove_the_bash_answers.mjs <out-dir> on 2.1.330   all 7 case(s) … answer as recorded
prove_the_bash_answers.mjs <out-dir> on 2.1.331   all 7 case(s) … answer as recorded
npm run lint                       exit 0
npx tsc --noEmit                   exit 0
npm run check:marthas-names        exit 0   1193 file(s), no name of crew-code's is Martha's
npm run check:no-import-cycle      exit 0   1131 source(s), no loop of value imports
npm run check:recorded-host-runs   exit 0   16 run(s) list every recorded-host case, each counted
npm run check:base-tests -- --base acc9015b --head HEAD   exit 0   465 test file(s) compared, every title the base passed is at the tip
npm run check:restated-values -- --range acc9015b..HEAD   exit 0   no literal restates a defined value
npm run check:pictures -- --base acc9015b --head HEAD     exit 0   no picture is touched
npm run check:private -- --range acc9015b..HEAD           exit 0   nothing private
npm run check:private -- --self-test                      exit 0   the check bites
npm run check:posted-text -- --self-test                  exit 0   the check bites
npm test                                                   exit 0   tests 5383 · pass 5346 · fail 0 · skipped 37

Mutants

  • Restoring lazy ? [] : writes.map(setterOf) fails exactly one test: a slot declared bare is read as its setters, so the setter's parameter is never followed as a callee.
  • Restoring the array's element class to [A-Za-z] fails exactly one test: a host that binds a second, lowercase-first list to the hook events' own name still reads.

Juno, builder.

Refs #109. ## What this is The host drift job went red against 2.1.331 (npm `latest`): three parts unreadable, no fact differing. Two of the three gaps are in the readers, the third is a shape the follower had never met, and the recording then moves with the pin. **The hook events.** The anchor follows the alias the host maps to its `classic.<event>` names to the array literal bound to that alias. 2.1.331 binds that name to two arrays — the hook-event list and an SVG-element list (defs, g, marker, …) — so the cut refused rather than pick one. The array is now cut as one of names that start with a capital, which is how the host spells every hook event; a host that spells one otherwise stops the record rather than cutting the wrong list. **The setter slot.** The markdown loader and the file-mode memory guard both follow a callee through the host's setter slot (`var b=…;function tLl(e){b=e}`, exported as `sessionOverridesGetter`). 2.1.331 declares that binding bare (`var b;` before `function Rgd(e){b=e}`) where 2.1.330 declared it with its default, and `assignedTo` kept a bare binding off the setter path, so the setter's body `b=e` was read as an assigned value and its parameter `e` was followed as a free name. A bare binding whose every write is setter-shaped is now a setter slot with no default, and each value the bundle passes to the setter is followed, as before. **The recording.** Re-taken from 2.1.331 (`npm run record:claude-code-host`), 0.4.0's facts absorbed as they are. `memory_off`, which is restated by hand, is re-read from the release and now spells the guard, the on check it calls on the off switch's value, and the off switch read the way 2.1.331 does. The three recordings held to the same pin move with it, as their own notes say: the models (the same four aliases in the shipped declaration), the Bash answers (re-taken on 2.1.331, every answer unchanged, after a 2.1.330 control reproduced the committed ones), the failed-review envelope (carried by reading the binary: the report's notification, every element and the four task statuses are identical in the two recordings) and the tool deltas (carried the same way: one emptiness guard hoisted around three set deletions, which deletes nothing when the sets are empty). One fixture moved with the record: the case that changes a literal in a definition `session_start_schema` reaches used to plant it in the first one, and 2.1.331 puts that literal in a class the first two definitions build. It now finds the definition holding it, wherever it is. ## The readers read the old host exactly as before The strongest check on a re-record is that the fixes moved nothing else. With this branch's readers, `--check` against a **2.1.330** install reproduces the committed 2.1.330 recording with no unreadable part and no differing fact (`recorded 2.1.330, host 2.1.330`, exit 0). So every difference the new 2.1.331 recording absorbs is the host's own change, not the reader's. ## Proof, on e09028be in the worktree ```text prove_the_recorded_host_is_current.sh <work-dir> <installed 2.1.331> exit 0 recorded 2.1.331, host 2.1.331 node record_claude_code_host.ts --check <2.1.330 install> 2.1.330 … exit 0 recorded 2.1.330, host 2.1.330 prove_the_bash_answers.mjs <out-dir> on 2.1.330 all 7 case(s) … answer as recorded prove_the_bash_answers.mjs <out-dir> on 2.1.331 all 7 case(s) … answer as recorded npm run lint exit 0 npx tsc --noEmit exit 0 npm run check:marthas-names exit 0 1193 file(s), no name of crew-code's is Martha's npm run check:no-import-cycle exit 0 1131 source(s), no loop of value imports npm run check:recorded-host-runs exit 0 16 run(s) list every recorded-host case, each counted npm run check:base-tests -- --base acc9015b --head HEAD exit 0 465 test file(s) compared, every title the base passed is at the tip npm run check:restated-values -- --range acc9015b..HEAD exit 0 no literal restates a defined value npm run check:pictures -- --base acc9015b --head HEAD exit 0 no picture is touched npm run check:private -- --range acc9015b..HEAD exit 0 nothing private npm run check:private -- --self-test exit 0 the check bites npm run check:posted-text -- --self-test exit 0 the check bites npm test exit 0 tests 5383 · pass 5346 · fail 0 · skipped 37 ``` ## Mutants - Restoring `lazy ? [] : writes.map(setterOf)` fails exactly one test: *a slot declared bare is read as its setters, so the setter's parameter is never followed as a callee*. - Restoring the array's element class to `[A-Za-z]` fails exactly one test: *a host that binds a second, lowercase-first list to the hook events' own name still reads*. Juno, builder.
Re-record the Claude Code host from 2.1.331, and read the two shapes it changed (#109)
All checks were successful
dependency advisories / node in . (pull_request) Successful in 13s
dependency advisories / node in installer (pull_request) Successful in 13s
dependency advisories / node in . (container) (pull_request) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Successful in 13s
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
dependency advisories / advisories (pull_request) Successful in 0s
c4 model / c4-model-1 (pull_request) Successful in 3s
c4 model / c4-model (pull_request) Successful in 0s
CI / links resolve (pull_request) Successful in 6s
CI / structural floor (pull_request) Successful in 27s
CI / Martha's names are its own (pull_request) Successful in 27s
CI / no import cycle (pull_request) Successful in 27s
CI / the host drift check bites (pull_request) Successful in 1m36s
CI / the engine drift check bites (pull_request) Successful in 56s
CI / the posted text check bites (pull_request) Successful in 12s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 13s
CI / workflows are valid (pull_request) Successful in 11s
CI / nothing private (pull_request) Has been skipped
CI / no test the base passed goes missing (pull_request) Successful in 32s
CI / installer (pull_request) Successful in 2m11s
CI / the pictures change only with the version (pull_request) Successful in 17s
CI / every check runs in a job (pull_request) Successful in 14s
CI / every job has a timeout (pull_request) Successful in 13s
CI / no literal restates a defined value (pull_request) Successful in 56s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 29s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 16s
host drift / the recording is of the host members run (pull_request) Successful in 1m51s
CI / the relay loads in the recorded host (pull_request) Successful in 14m30s
CI / the clean-install proof removes its container (pull_request) Successful in 19m40s
13eccc1c7e
The host binds the alias it maps to its module events to an SVG element
list too, so the hook-event list is cut as the one of names that start
with a capital; a host that spells one otherwise stops the record rather
than cutting the wrong list.

The setter slot the markdown loader and the file-mode guard read is
declared bare in 2.1.331 (`var b;` before `function Rgd(e){b=e}`), so a
bare binding whose every write is a setter is a setter slot with no
default, and the setter's parameter is never followed as a free name.

memory_off is re-read from the release and restated in its own spelling:
the guard, the on check it calls on the off switch's value, and the off
switch read are the new host's. The models (the same four aliases), the
Bash answers (re-taken on 2.1.331, every answer unchanged, after a
2.1.330 control reproduced the committed ones), the failed-review
envelope and the tool deltas carry the pin, as their own notes say.
terra manually merged commit 1f36933e53 into main 2026-11-23 23:53:22 +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!110
No description provided.