martha#317 L4: martha config and init start lazymartha #328

Manually merged
terra merged 0 commits from saturnus/317-l4 into main 2026-12-01 02:45:30 +00:00
Member

Refs #317 (L4, design r1 §1, §3, §4, note (d)). Built on Pallas's pallas/317-l4-launch (11fc5165); this range also carries batch #327 (dc79b38b) until it lands.

  • §1: config and init start lazymartha with --schema --in --out [--new] [--message]. Exit 0 saved, 3 quit, anything else crashed. A refused save restarts the editor with --message. The work files live under Martha's state dir and are removed after the run.
  • §3: the editor is found at <release>/bin/lazymartha, then on PATH. When it is missing, config prints the one line and exits EXIT_REFUSED; init prints one line and falls back to the questions.
  • Note (d): a schema-major refusal from a PATH lazymartha names that lazymartha's --version.
  • Pin: lazymartha 0.1.0 with its sha256. pack_a_release.sh fetches it into bin/, checks the digest, and refuses a tree without schema/martha.schema.json.
  • #191: config still writes .mcp.json after a save that declares a mesh, when none exists.
  • My commits: init's save loop is now awaited inside its try/finally (the work dir was being removed mid-loop), the fetch is a program (release:fetch-lazymartha) rather than a slice, and tests pin the pack script's schema guard and fetch line.

Tests use a stand-in binary and a fake fetch: nothing reaches an outside host.

Refs #317 (L4, design r1 §1, §3, §4, note (d)). Built on Pallas's pallas/317-l4-launch (11fc5165); this range also carries batch #327 (dc79b38b) until it lands. - §1: config and init start lazymartha with `--schema --in --out [--new] [--message]`. Exit 0 saved, 3 quit, anything else crashed. A refused save restarts the editor with `--message`. The work files live under Martha's state dir and are removed after the run. - §3: the editor is found at `<release>/bin/lazymartha`, then on PATH. When it is missing, config prints the one line and exits EXIT_REFUSED; init prints one line and falls back to the questions. - Note (d): a schema-major refusal from a PATH lazymartha names that lazymartha's `--version`. - Pin: lazymartha 0.1.0 with its sha256. pack_a_release.sh fetches it into bin/, checks the digest, and refuses a tree without schema/martha.schema.json. - #191: config still writes .mcp.json after a save that declares a mesh, when none exists. - My commits: init's save loop is now awaited inside its try/finally (the work dir was being removed mid-loop), the fetch is a program (release:fetch-lazymartha) rather than a slice, and tests pin the pack script's schema guard and fetch line. Tests use a stand-in binary and a fake fetch: nothing reaches an outside host.
A new slice, install_the_recorded_claude_code, installs the Claude Code version this
release is recorded against from registry.npmjs.org, pinned by npm's own lock (sha512),
under ~/.local/share/martha/claude-code/<version>, for linux-x64 alone. The owner's own
claude is left as it is.

- `martha claude-code install` installs it; `martha up` installs it itself when a Claude
  Code member starts and the copy is missing; `martha sign-in` starts it to sign in.
- A Claude Code member starts from that copy, never a claude on the PATH.
- The clean-install proof installs by the command and checks the container has no claude.
- Tests use a stand-in npm and a stand-in copy; none reaches a registry.
- A start no longer looks for claude on the PATH, so the #541 refusal of a host missing
  from the PATH is replaced by the refusal of a home without Martha's own copy.

Refs #305

Drops-test: src/start_a_member/start_a_member.node-test.ts :: #541: a host whose command is not on the path is refused, naming the install, with nothing started
# Conflicts:
#	src/run_the_martha_command/run_the_martha_command.ts
martha init writes .mcp.json beside the other starters when the declaration has
a mesh block, naming the newest recorded @macula-io/mcp by version and bin. A
launch then places it from its recorded tree and hands it MACULA_MESH_STATIONS
and, for a realm written by its name, MACULA_MESH_REALMS (martha#158). A crew
with no mesh gets no file; a .mcp.json already there is left exactly as it is.
martha config writes the same file after a save that declares a mesh, when none
is there. The pin is built by one function, aPinOfTheMeshServer, which the
engine member's mesh server (martha#181) now uses too.

Refs #191
run_the_martha_command.ts had grown to 1134 lines against the 1105 cap. The engine,
claude-code install and sign-in words and acts now live in
the_installs_martha_makes.ts; the command file is 1102 lines.

Refs #305
martha config and martha init launch lazymartha (the Go editor) through the
child-process handshake, and a save is validated by the reader and written by the
guarded writer; a refused save restarts the editor with the reader's line. The
editor is found beside the release (bin/lazymartha) then on PATH, and a missing
editor falls back (config refuses; init asks the questions). The init declare
path moves out of the TS editor into the_lazymartha_declares.ts. The pin facts
file (0.1.0 + sha256) is committed; the release-build fetch is the next commit.
The upstream sync (martha-ai/martha-engine#20) renamed the goose-* crates to oi-kit-*, so five
parts read from their new files: modes, the OpenAI provider, the stdio
extension, the tool name parts, and the session key, now declared in
oi-kit-agent's MCP client.

Upstream #13605 removed the approval's filter that let a call to a tool never
advertised skip the permission check: the engine now answers such a call with
an error before the approval, so it never runs. approve_mode_unasked loses its
`unadvertised` field, and the reader now requires the approval to hand every
call to the check; a filter there is a way to go unasked it does not know, so
the part is unreadable.

The recording gains `view` (ViewParams, on `path`, read-only, local), which the
decisions take as a search on its path: the design-table test names its row,
and its title says so.

Refs martha#953

Drops-test: src/launch_a_goose_member/the_engines_decisions.node-test.ts :: on the recording, the rows are the design table, keyed by the name a call carries: write and edit one file, tree every file below, shell a command, read_image none (#541 package A, design G1)
Drops-test: src/know_the_goose_engines_facts/the_engines_facts_in_its_source.node-test.ts :: what approve mode runs unasked is read as the engine writes it: each user permission level that allows, past a level that asks and a smart-approve-only allow, and the filter before the check (#541 package A, design r=6 R1''; mutants: the smart-approve allow counted, every level read)
Drops-test: src/know_the_goose_engines_facts/the_engines_facts_in_its_source.node-test.ts :: an approve-mode allow this reader does not know, or an approval that no longer allows what its filter keeps out, is unreadable by name (#541 package A; mutants: either throw dropped)
The Developer tools whose recorded hints say they only read and reach nothing
past the machine run unasked, by whole engine name, as the crew's own and the
mesh server's tools do. The engine's decisions pick them (theDevelopersReads)
and the launcher hands them to the rules slice, which imports no host glue. The gate is read first and judges the path each names,
so one runs unasked only where the gate passed it.

An owner's deny or ask rule on a reading tool (Read, Grep, bare or with a
pattern) holds every one of them, read wider than written; before this, such a
rule held nothing, since no read ran unasked.

Refs martha#953 (Uranus's review R2 on martha-ai/martha-engine#24)
The Supervisor's ruling on r1 (Saturnus's note 1): a read is itself the
sending of what it reads to the model's provider, so a developer__view of
~/.ssh that runs unasked has sent the key before any later gate could stop
it. R2 meant "unasked when the path is safe".

theDevelopersReads now takes the launch's checkout and says, per call,
whether the tool's path argument resolves inside it: resolved as the engine
resolves it, against the checkout, with its links followed, so a link in the
checkout to a folder outside is outside. A call with no path, or one that is
not text, is asked. The rules slice runs a read unasked only when that check
passes and no hold names it; every other read is asked of the owner as before.

Mutants caught: the inside check dropped (in the rules and in the
decisions), links not followed, the kind filter dropped, the hold dropped.

Refs martha#953
Land martha-ai/martha#326 (PASS r=2)
All checks were successful
dependency advisories / node in . (container) (push) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (push) Has been skipped
dependency advisories / node in installer (container) (push) Has been skipped
c4 model / c4-model-1 (push) Successful in 3s
c4 model / c4-model (push) Successful in 0s
CI / links resolve, workflows are valid (push) Successful in 6s
dependency advisories / node in . (push) Successful in 13s
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (push) Successful in 13s
dependency advisories / node in installer (push) Successful in 15s
dependency advisories / advisories (push) Successful in 0s
engine drift / the recording says what the engine says (push) Successful in 44s
heavy / installer (push) Successful in 2m28s
standalone / standalone Martha runs alone (ubuntu-latest) (push) Successful in 32s
suite / the ring reaches the owner on the live run's tmux (push) Successful in 15s
CI / checks (push) Successful in 4m13s
heavy / the relay loads in the recorded host (push) Successful in 15m39s
suite / gate coverage (push) Successful in 19m30s
heavy / the clean-install proof removes its container (push) Successful in 19m57s
dc79b38bec
pack_a_release.sh fetches lazymartha 0.1.0 (sha256 the pin's) into the release
layer's bin/, refuses a wrong digest or a binary already there, and guards that
the archived tree carries schema/martha.schema.json. The editor's binary name
reads from the pin, not a second literal.
Keeps #191's .mcp.json write in the config save path (the lazymartha handshake) and moves its config test to the_lazymartha_editor_acts.node-test.ts.

Drops-test-file: src/run_the_martha_command/the_crew_editor_acts.node-test.ts
Extract the config and init save loops into helpers (max-depth), split the fetch's
body read from its request (complexity), and drop the init loop's dead declared
holder.
theCrewTheLazymarthaDeclares returned the save loop's promise from inside try/finally without awaiting it, so the
work directory was removed while the loop still ran: a refused save restarted lazymartha on files already gone. A test
now runs a refused-then-saved new crew and checks the work directory is gone only after; dropping the await fails it.
A second test ties pack_a_release.sh's schema guard to THE_SCHEMA_FILE and its fetch line.
martha#317 L4: the lazymartha fetch is a program the release runs, not a slice
All checks were successful
dependency advisories / node in . (container) (push) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (push) Has been skipped
dependency advisories / node in installer (container) (push) Has been skipped
c4 model / c4-model-1 (push) Successful in 9s
c4 model / c4-model (push) Successful in 0s
dependency advisories / node in . (push) Successful in 13s
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (push) Successful in 14s
dependency advisories / node in installer (push) Successful in 14s
dependency advisories / advisories (push) Successful in 0s
CI / links resolve, workflows are valid (push) Successful in 8s
heavy / installer (push) Successful in 2m39s
standalone / standalone Martha runs alone (ubuntu-latest) (push) Successful in 33s
suite / the ring reaches the owner on the live run's tmux (push) Successful in 14s
CI / checks (push) Successful in 4m15s
heavy / the relay loads in the recorded host (push) Successful in 16m7s
heavy / the clean-install proof removes its container (push) Successful in 20m40s
suite / gate coverage (push) Successful in 20m57s
876a3dc6a2
src/fetch_the_pinned_lazymartha reaches the machine and the network, so the slice rules refused it. package.json now
runs it (release:fetch-lazymartha), which makes it a program; the C4 page and architecture/README.md name it left
out with why; its test removes its scratch with removeTheTree (martha#272).
Collaborator

CI coordinator: round r=1: dispatched ci.yml on 876a3dc6a2, run 6049 (base dc79b38bec).

CI coordinator: round r=1: dispatched ci.yml on 876a3dc6a2b371596e05fa916b2764120d9ab31e, run 6049 (base dc79b38bec04246d3fdec730f4f1732cbebd65ca).
Collaborator

CI coordinator: round r=1: dispatched suite.yml on 876a3dc6a2, run 6050 (base dc79b38bec).

CI coordinator: round r=1: dispatched suite.yml on 876a3dc6a2b371596e05fa916b2764120d9ab31e, run 6050 (base dc79b38bec04246d3fdec730f4f1732cbebd65ca).
Collaborator

CI coordinator: round r=1: dispatched heavy.yml on 876a3dc6a2, run 6051 (base dc79b38bec).

CI coordinator: round r=1: dispatched heavy.yml on 876a3dc6a2b371596e05fa916b2764120d9ab31e, run 6051 (base dc79b38bec04246d3fdec730f4f1732cbebd65ca).
Collaborator

CI coordinator: round r=1: dispatched c4-model.yml on 876a3dc6a2, run 6052 (base dc79b38bec).

CI coordinator: round r=1: dispatched c4-model.yml on 876a3dc6a2b371596e05fa916b2764120d9ab31e, run 6052 (base dc79b38bec04246d3fdec730f4f1732cbebd65ca).
Collaborator

CI coordinator: round r=1: dispatched standalone.yml on 876a3dc6a2, run 6053 (base dc79b38bec).

CI coordinator: round r=1: dispatched standalone.yml on 876a3dc6a2b371596e05fa916b2764120d9ab31e, run 6053 (base dc79b38bec04246d3fdec730f4f1732cbebd65ca).
Collaborator

CI coordinator: round r=1: dispatched advisories.yml on 876a3dc6a2, run 6054 (base dc79b38bec).

CI coordinator: round r=1: dispatched advisories.yml on 876a3dc6a2b371596e05fa916b2764120d9ab31e, run 6054 (base dc79b38bec04246d3fdec730f4f1732cbebd65ca).
terra manually merged commit 876a3dc6a2 into main 2026-12-01 02:45:30 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
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!328
No description provided.