an engine member's start records it, so Martha reads a running member as running (martha#127) #132

Manually merged
terra merged 1 commit from pluto/127-launch-record into main 2026-11-24 06:51:20 +00:00
Member

A martha-engine member's launch wrote no member launch record, and every read of whether a member runs reads those records (launchesIn over ~/.local/state/martha/<sha256 of the workspace path>/launches/). So a running engine member was reported stopped everywhere the owner looks.

What it looked like on the 0.4.0 pilot, with the engine alive and its ACP session open:

$ martha ls            -> Pluto  stopped  deepseek-flash
$ martha stop Pluto    -> martha: Pluto is not running, so nothing was stopped.   (rc 0)
$ martha restart Pluto -> martha: Pluto is not running, so nothing was restarted. (rc 1)

The fix. startOnTheEngine keeps the member's launch record from the engine's own pid (member name, node id, checkout, start time), and the member's end takes it away. The write sits where the member's life is held, so both end paths, the owner's stop and the engine's own exit, pass through it. A member that cannot be recorded is not started, by the same words a Claude Code launch gives.

Proof. A new test in start_an_engine_member.node-test.ts reads the records the way isRunning does, through the same two calls, and asserts the running process identity. Both mutants die: with the write removed the test says the start left no launch record for the member, so Martha reads a member that runs as stopped; with the drop removed, the launch record outlived the member. tsc and eslint clean, the file's 25 tests pass.

End to end on the pilot workspace, with #124's store fix beside it: martha ls says Pluto running /home/rl/work/martha-pilot-ws since 2026-11-24T05:23:38.809Z, martha stop Pluto says Pluto is stopped, and the record file is gone.

On the full suite: 5383 pass, 2 fail. Neither is this change. One is the red on main filed as macula-io/martha#131 (the same failure on main 979d7a06 and on a branch without this commit); the other passes when its file runs alone on both main and this branch.

Refs macula-io/martha#127

A martha-engine member's launch wrote no member launch record, and every read of whether a member runs reads those records (`launchesIn` over `~/.local/state/martha/<sha256 of the workspace path>/launches/`). So a running engine member was reported stopped everywhere the owner looks. What it looked like on the 0.4.0 pilot, with the engine alive and its ACP session open: ``` $ martha ls -> Pluto stopped deepseek-flash $ martha stop Pluto -> martha: Pluto is not running, so nothing was stopped. (rc 0) $ martha restart Pluto -> martha: Pluto is not running, so nothing was restarted. (rc 1) ``` **The fix.** `startOnTheEngine` keeps the member's launch record from the engine's own pid (member name, node id, checkout, start time), and the member's end takes it away. The write sits where the member's life is held, so both end paths, the owner's stop and the engine's own exit, pass through it. A member that cannot be recorded is not started, by the same words a Claude Code launch gives. **Proof.** A new test in `start_an_engine_member.node-test.ts` reads the records the way `isRunning` does, through the same two calls, and asserts the running process identity. Both mutants die: with the write removed the test says `the start left no launch record for the member, so Martha reads a member that runs as stopped`; with the drop removed, `the launch record outlived the member`. tsc and eslint clean, the file's 25 tests pass. End to end on the pilot workspace, with #124's store fix beside it: `martha ls` says `Pluto running /home/rl/work/martha-pilot-ws since 2026-11-24T05:23:38.809Z`, `martha stop Pluto` says `Pluto is stopped`, and the record file is gone. **On the full suite**: 5383 pass, 2 fail. Neither is this change. One is the red on main filed as macula-io/martha#131 (the same failure on main 979d7a06 and on a branch without this commit); the other passes when its file runs alone on both main and this branch. Refs macula-io/martha#127
an engine member's start records it, so Martha reads a running member as running (martha#127)
All checks were successful
CI / gate coverage (pull_request) Has been skipped
dependency advisories / node in . (pull_request) Successful in 12s
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Successful in 12s
dependency advisories / node in installer (pull_request) Successful in 12s
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
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 5s
CI / structural floor (pull_request) Successful in 31s
CI / Martha's names are its own (pull_request) Successful in 26s
CI / no import cycle (pull_request) Successful in 28s
CI / the host drift check bites (pull_request) Successful in 1m3s
CI / the engine drift check bites (pull_request) Successful in 29s
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 12s
CI / workflows are valid (pull_request) Successful in 10s
CI / installer (pull_request) Successful in 2m11s
CI / nothing private (pull_request) Has been skipped
CI / no test the base passed goes missing (pull_request) Successful in 33s
CI / the pictures change only with the version (pull_request) Successful in 17s
CI / no literal restates a defined value (pull_request) Successful in 55s
CI / every check runs in a job (pull_request) Successful in 12s
CI / every job has a timeout (pull_request) Successful in 12s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 27s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 14s
CI / the relay loads in the recorded host (pull_request) Successful in 14m29s
CI / the clean-install proof removes its container (pull_request) Successful in 16m0s
1f323383fc
A martha-engine member's launch wrote no member launch record, and every read of
whether a member runs reads those records:  said stopped, the crew strip
said offline, and  and  answered 'not running' while the
engine ran. The start keeps the record now, from the engine's own pid, and the end
takes it away.
terra manually merged commit dcd2023007 into main 2026-11-24 06:51:20 +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!132
No description provided.