an engine member's start records it, so Martha reads a running member as running (martha#127) #132
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "pluto/127-launch-record"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A martha-engine member's launch wrote no member launch record, and every read of whether a member runs reads those records (
launchesInover~/.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:
The fix.
startOnTheEnginekeeps 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.tsreads the records the wayisRunningdoes, through the same two calls, and asserts the running process identity. Both mutants die: with the write removed the test saysthe 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 lssaysPluto running /home/rl/work/martha-pilot-ws since 2026-11-24T05:23:38.809Z,martha stop PlutosaysPluto 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
979d7a06and 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