the host contract test reads the adapter's processes from where they are defined (#82) #95

Manually merged
terra merged 1 commit from juno/82-contract-test-stopof into main 2026-11-23 10:35:07 +00:00
Member

Refs #82 (fix after ship). One commit on main 3bfa04c1, test file only.

The host contract test at src/claude_code_host/claude_code_host.node-test.ts no longer pins the adapter's processes as a literal. It now reads the expected list from thisMachine.processes, where the processes are defined. That list includes stopOf from 756dc596 (#70 / PR 76), which the old test was missing. Main's gate coverage task 5432 is red on 3bfa04c1 because of that missing stopOf.

Builder: Juno. Red first on 3bfa04c1: 34 pass, 1 fail. After the commit: 35/35. Mutant (a sixth process): optional → the test passes unedited; required and not implemented → tsc fails by name.

Purpose: main's gate coverage turns green after the land; then #82 and #73 close with that task id.

Review: Mars (fable), r=1.

🤖 Generated with Claude Code

Refs #82 (fix after ship). One commit on main 3bfa04c1, test file only. The host contract test at src/claude_code_host/claude_code_host.node-test.ts no longer pins the adapter's processes as a literal. It now reads the expected list from `thisMachine.processes`, where the processes are defined. That list includes stopOf from 756dc596 (#70 / PR 76), which the old test was missing. Main's gate coverage task 5432 is red on 3bfa04c1 because of that missing stopOf. Builder: Juno. Red first on 3bfa04c1: 34 pass, 1 fail. After the commit: 35/35. Mutant (a sixth process): optional → the test passes unedited; required and not implemented → tsc fails by name. Purpose: main's gate coverage turns green after the land; then #82 and #73 close with that task id. Review: Mars (fable), r=1. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
test: the host contract test reads the adapter's processes from where they are defined (macula-io/martha#82)
All checks were successful
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been skipped
c4 model / c4-model-1 (pull_request) Successful in 3s
CI / gate coverage (pull_request) Has been skipped
dependency advisories / node in installer (container) (pull_request) Has been skipped
c4 model / c4-model (pull_request) Successful in 0s
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Successful in 13s
dependency advisories / node in . (pull_request) Successful in 13s
dependency advisories / node in installer (pull_request) Successful in 13s
dependency advisories / advisories (pull_request) Successful in 0s
CI / links resolve (pull_request) Successful in 5s
CI / structural floor (pull_request) Successful in 29s
CI / no import cycle (pull_request) Successful in 29s
CI / Martha's names are its own (pull_request) Successful in 29s
CI / the posted text check bites (pull_request) Successful in 16s
CI / the engine drift check bites (pull_request) Successful in 30s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 12s
CI / workflows are valid (pull_request) Successful in 12s
CI / the host drift check bites (pull_request) Successful in 1m13s
CI / nothing private (pull_request) Has been skipped
CI / no test the base passed goes missing (pull_request) Successful in 34s
CI / the pictures change only with the version (pull_request) Successful in 18s
CI / no literal restates a defined value (pull_request) Successful in 54s
CI / installer (pull_request) Successful in 2m9s
CI / every check runs in a job (pull_request) Successful in 15s
CI / every job has a timeout (pull_request) Successful in 14s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 31s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 17s
host drift / the recording is of the host members run (pull_request) Successful in 1m55s
CI / the relay loads in the recorded host (pull_request) Successful in 15m24s
CI / the clean-install proof removes its container (pull_request) Successful in 16m2s
5f67fa11c3
The expected list was the four processes written out as a literal, so martha#70's stopOf, added in 756dc596 and
landed with PR 76, left it stale: the suite failed on main from that landing, hidden by #82's own red until PR 89
let `npm test` reach it again.

The expected processes now come from thisMachine.processes, where the host's processes are defined, so a process
added there cannot hide behind a literal (Raf, 2026-11-05). The contract's required parts are not pinned by a
count: `processes: Processes` enforces them by type, and stopOf stays optional there, as its doc says.

Refs #82
Author
Member

VERDICT macula-io/martha#82 3bfa04c1..5f67fa11 r=1 PASS (Mars, fable review; ci = runs 2499-2503 on 5f67fa11: 26 tasks success, 5 skipped by design: gate coverage and nothing private are main-only, plus the 3 container arms)

  • Is the new assertion blind? No. adapterIn (claude_code_host.node-test.ts:58-65) builds the real claudeCodeHost, and its processes are not faked, so thisMachine.processes is the right source. The adapter passes them by reference (claude_code_host.ts:146). The line still catches the drift class it is meant for: the adapter building its own processes object and losing a part.
  • Mutants, run on the one test file at 5f67fa11 (baseline 35/35):
    • KILLED (34/1): the adapter drops stopOf; the adapter hand-builds the four required parts; a 6th part at the definition with the adapter hand-building five.
    • Red first confirmed: the old literal reverted gives 34/1.
    • M1 (a 6th optional part, implemented at the definition): 35/35, tsc 0.
    • M2 (a 6th required part, not implemented): tsc fails by name (12 error lines, not 13; the substance holds).
  • No literal restates a defined value: check_no_literal_restates_a_value over the range is clean.

Notes (not required):

  • N1: if the definition itself drops stopOf, nothing fails (it is optional at host_contract.ts:438). The old literal never pinned it either, so this is no regression. It belongs with martha#70's caller, which "must refuse by name".
  • N2: the test title still says "five parts", and lines 81-82 keep literal key lists for host and stores. Both predate this change and pass the gate.
  • N3: the "2026-11-05" date in the comment matches ci.yml:1143-1145 (martha#289). That text doesn't name Raf, so the name itself is unverified from the repo.

Purpose, after the land: main's "gate coverage" job is green. Then #82 and #73 close with that task id.

VERDICT macula-io/martha#82 3bfa04c1..5f67fa11 r=1 PASS (Mars, fable review; ci = runs 2499-2503 on 5f67fa11: 26 tasks success, 5 skipped by design: gate coverage and nothing private are main-only, plus the 3 container arms) - Is the new assertion blind? No. `adapterIn` (claude_code_host.node-test.ts:58-65) builds the real `claudeCodeHost`, and its processes are not faked, so `thisMachine.processes` is the right source. The adapter passes them by reference (claude_code_host.ts:146). The line still catches the drift class it is meant for: the adapter building its own processes object and losing a part. - Mutants, run on the one test file at 5f67fa11 (baseline 35/35): - KILLED (34/1): the adapter drops stopOf; the adapter hand-builds the four required parts; a 6th part at the definition with the adapter hand-building five. - Red first confirmed: the old literal reverted gives 34/1. - M1 (a 6th optional part, implemented at the definition): 35/35, tsc 0. - M2 (a 6th required part, not implemented): tsc fails by name (12 error lines, not 13; the substance holds). - No literal restates a defined value: check_no_literal_restates_a_value over the range is clean. Notes (not required): - N1: if the definition itself drops `stopOf`, nothing fails (it is optional at host_contract.ts:438). The old literal never pinned it either, so this is no regression. It belongs with martha#70's caller, which "must refuse by name". - N2: the test title still says "five parts", and lines 81-82 keep literal key lists for host and stores. Both predate this change and pass the gate. - N3: the "2026-11-05" date in the comment matches ci.yml:1143-1145 (martha#289). That text doesn't name Raf, so the name itself is unverified from the repo. Purpose, after the land: main's "gate coverage" job is green. Then #82 and #73 close with that task id.
terra manually merged commit 9f8d64515a into main 2026-11-23 10:35:07 +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!95
No description provided.