The recorded engine is installed by one command, and up refuses before it opens anything #121

Manually merged
terra merged 3 commits from titan/119-engine-install into main 2026-11-24 07:19:23 +00:00
Member

Purpose (fix): a martha-engine member the declaration names starts on a host that has never had the engine built, through one documented install step, instead of dying in its window.

What is here:

  • src/install_the_recorded_engine: martha engine install takes the engine repository's tree at the commit recorded_goose_engine.json names, builds it once with the Cargo.lock it carries, installs the binary at ~/.local/bin/martha-engine, and writes ~/.local/share/martha-engine/installed.json (version, commit, sha256 of the binary). The commit is the integrity anchor — git verifies the object it fetches — so no separate archive digest is kept.
    • The address comes from MARTHA_ENGINE_SOURCE: a git URL, or a local checkout that holds the commit. The repository is private, so this tree does not name it (the private gate refused a first version that did, and it was right).
    • The build is the fork's portable variant: cargo build -p goose-cli --bin martha-engine --no-default-features --features portable-default --release --locked. The default features pull local-inference, whose bindgen needs libclang, which neither host has and cannot install without root (Pluto's build, #102 c3307 thread).
  • martha up refuses before it opens anything when an engine member would start and the host's engine is missing, installed from another commit, or a binary whose bytes changed since its install: one line on the owner's terminal naming martha engine install. That is the dead-pane half of the issue, and it also ends Pluto's wrapped-sha nuisance, since the line is printed unwrapped on a terminal.
  • docs/getting-started.md: the third prerequisite, with the one command.
  • Tests: 4 in the new slice (no engine; another commit; changed bytes; the order of fetch/build/record and every refusal path), plus the workspace fixture installing a recorded engine so the 11 existing up tests keep their subject, and one test that takes the engine away and pins the refusal with nothing opened.

Proof: install_the_recorded_engine.node-test.ts 4/4; the whole dispatcher file 78/78 in the worktree; check:private on the range says nothing private. The structural checks that need typescript (check:no-literal-restates-a-value, check:every-link-resolves) cannot run in this clone — no node_modules — so CI is their first run.

Not here, and named in my approach comment: the issue's half two (re-record the pin from a tree anyone can reach) and a release-asset path, which needs the engine repository to publish one first.

Refs #119, #102

Purpose (fix): a `martha-engine` member the declaration names starts on a host that has never had the engine built, through one documented install step, instead of dying in its window. What is here: - `src/install_the_recorded_engine`: `martha engine install` takes the engine repository's tree at the commit `recorded_goose_engine.json` names, builds it once with the Cargo.lock it carries, installs the binary at `~/.local/bin/martha-engine`, and writes `~/.local/share/martha-engine/installed.json` (version, commit, sha256 of the binary). The commit is the integrity anchor — git verifies the object it fetches — so no separate archive digest is kept. - The address comes from `MARTHA_ENGINE_SOURCE`: a git URL, or a local checkout that holds the commit. The repository is private, so this tree does not name it (the private gate refused a first version that did, and it was right). - The build is the fork's portable variant: `cargo build -p goose-cli --bin martha-engine --no-default-features --features portable-default --release --locked`. The default features pull `local-inference`, whose bindgen needs libclang, which neither host has and cannot install without root (Pluto's build, #102 c3307 thread). - `martha up` refuses **before it opens anything** when an engine member would start and the host's engine is missing, installed from another commit, or a binary whose bytes changed since its install: one line on the owner's terminal naming `martha engine install`. That is the dead-pane half of the issue, and it also ends Pluto's wrapped-sha nuisance, since the line is printed unwrapped on a terminal. - `docs/getting-started.md`: the third prerequisite, with the one command. - Tests: 4 in the new slice (no engine; another commit; changed bytes; the order of fetch/build/record and every refusal path), plus the workspace fixture installing a recorded engine so the 11 existing up tests keep their subject, and one test that takes the engine away and pins the refusal with nothing opened. Proof: `install_the_recorded_engine.node-test.ts` 4/4; the whole dispatcher file 78/78 in the worktree; `check:private` on the range says nothing private. The structural checks that need `typescript` (`check:no-literal-restates-a-value`, `check:every-link-resolves`) cannot run in this clone — no node_modules — so CI is their first run. Not here, and named in my approach comment: the issue's half two (re-record the pin from a tree anyone can reach) and a release-asset path, which needs the engine repository to publish one first. Refs #119, #102
The recorded engine is installed by one command, and up refuses before it opens anything (forge martha#119)
Some checks failed
CI / gate coverage (pull_request) Has been skipped
dependency advisories / node in . (pull_request) Successful in 13s
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (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 / node in installer (pull_request) Successful in 12s
dependency advisories / advisories (pull_request) Successful in 0s
c4 model / c4-model-1 (pull_request) Successful in 5s
c4 model / c4-model (pull_request) Successful in 0s
CI / links resolve (pull_request) Successful in 6s
CI / structural floor (pull_request) Failing after 32s
CI / Martha's names are its own (pull_request) Successful in 32s
CI / no import cycle (pull_request) Successful in 27s
CI / the engine drift check bites (pull_request) Successful in 32s
CI / the posted text check bites (pull_request) Successful in 13s
CI / the host drift check bites (pull_request) Successful in 1m10s
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 12s
CI / installer (pull_request) Successful in 2m18s
CI / nothing private (pull_request) Has been skipped
CI / no test the base passed goes missing (pull_request) Successful in 35s
CI / the pictures change only with the version (pull_request) Successful in 19s
CI / every check runs in a job (pull_request) Successful in 25s
CI / every job has a timeout (pull_request) Successful in 24s
CI / no literal restates a defined value (pull_request) Failing after 1m4s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 16s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 1m49s
CI / the relay loads in the recorded host (pull_request) Has been cancelled
CI / the clean-install proof removes its container (pull_request) Has been cancelled
45b17b6b16
`martha up` opened a window for an engine member and let it die there: nothing in this tree built or installed
martha-engine, so a fresh host read "install martha-engine 1.60.0, built from commit 12574353…" in a dead pane, and
the pane wrapped the sha it named.

`martha engine install` is that way in. It takes the engine repository's tree at the commit this release records,
from the address the owner names in MARTHA_ENGINE_SOURCE (a git URL, or a local checkout that holds the commit;
the repository is private, so this tree does not name it), builds it once with the Cargo.lock it carries, and
installs the binary where the launch looks for it, with a record of the version, the commit and the bytes beside
it. The commit is the integrity anchor -- git verifies the object it fetches -- and `--locked` builds the lock in
that tree.

The build is the fork's portable variant, `--no-default-features --features portable-default`: the default features
pull local-inference, whose bindgen step needs libclang, which the hosts this runs on do not have and cannot install
without root. `acp` is not behind a feature gate, so the session an engine member needs is in both.

`up` now asks the record before it opens anything: not installed, installed from another commit, or a binary whose
bytes changed since its install is refused on the owner's terminal, naming that one command, and nothing is opened.
The tests' workspace fixture installs a recorded engine so the existing up tests keep their subject, and one test
takes it away and pins the refusal.

Not here: the issue's second half (re-recording the pin from a tree anyone can reach) and a release-asset path,
which needs the engine repository to publish one first.
The engine up checks is the engine the launch runs (forge martha#119 r=1 F1)
Some checks failed
CI / gate coverage (pull_request) Has been skipped
dependency advisories / advisories (pull_request) Has been cancelled
dependency advisories / node in . (pull_request) Has been cancelled
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Has been cancelled
dependency advisories / node in installer (pull_request) Has been cancelled
dependency advisories / node in . (container) (pull_request) Has been cancelled
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been cancelled
dependency advisories / node in installer (container) (pull_request) Has been cancelled
c4 model / c4-model (pull_request) Has been cancelled
c4 model / c4-model-1 (pull_request) Has been cancelled
CI / links resolve (pull_request) Has been cancelled
CI / structural floor (pull_request) Has been cancelled
CI / Martha's names are its own (pull_request) Has been cancelled
CI / no import cycle (pull_request) Has been cancelled
CI / the relay loads in the recorded host (pull_request) Has been cancelled
CI / the host drift check bites (pull_request) Has been cancelled
CI / the engine drift check bites (pull_request) Has been cancelled
CI / the posted text check bites (pull_request) Has been cancelled
CI / the clean-install proof removes its container (pull_request) Has been cancelled
CI / the ring reaches the owner on the live run's tmux (pull_request) Has been cancelled
CI / workflows are valid (pull_request) Has been cancelled
CI / installer (pull_request) Has been cancelled
CI / nothing private (pull_request) Has been cancelled
CI / no test the base passed goes missing (pull_request) Has been cancelled
CI / the pictures change only with the version (pull_request) Has been cancelled
CI / no literal restates a defined value (pull_request) Has been cancelled
CI / every check runs in a job (pull_request) Has been cancelled
CI / every job has a timeout (pull_request) Has been cancelled
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Has been cancelled
standalone / the pinned Node is nodejs.org's (pull_request) Has been cancelled
499bb3b206
The pin check read ~/.local/bin/martha-engine, and the launch started the first martha-engine on the owner's
PATH: a hand build earlier on PATH passed the check and ran unpinned, and with ~/.local/bin off PATH the
install's own binary was never the one started. The engine's launcher now carries the place its install
writes (placedAt), and a start runs that file by its own path, on the owner's PATH or not, so the file the
check read and the file the launch runs are one. A host with no install is refused naming the one command,
never the binary PATH happens to hold, and a file there this user cannot run is no install either.

The review's nits, taken: the cleanup test asserted a `build-` directory that mkdtemp's suffix never makes,
and now reads the share directory by the install's own prefix, with the failed build's tree held to it too;
`martha engine install` is in USAGE as it is in HELP, and the words that ask for it are pinned; a source that
is neither a repository address nor an absolute path is refused, since the git runs in the home; a copy over
a binary this host is running (ETXTBSY) stops with a line instead of throwing; a fetch by sha names both what
can fail it, so an unreadable remote is not read as a bad commit; the docs say where the binary goes, that it
replaces one already there, and that the directory need not be on PATH.

And the two checks that went red on the first run: `git`, `-p` and `1` were literals of values the tree
already exports (GIT, PACKAGE_SWITCH, STOPPED), so the build says --package, the fetch --depth=1, and GIT is
imported; installTheRecordedEngine was past the complexity cap, and its source checks, its fetch, its refusal
and its install are functions of their own now.
martha#119 r=3: a direct start runs only the recorded engine; lint, types and the engine's tests green
All checks were successful
CI / gate coverage (pull_request) Has been skipped
dependency advisories / node in . (pull_request) Successful in 11s
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Successful in 10s
dependency advisories / node in installer (pull_request) Successful in 10s
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 5s
c4 model / c4-model (pull_request) Successful in 0s
CI / links resolve (pull_request) Successful in 5s
CI / structural floor (pull_request) Successful in 22s
CI / Martha's names are its own (pull_request) Successful in 23s
CI / no import cycle (pull_request) Successful in 23s
CI / the host drift check bites (pull_request) Successful in 58s
CI / the engine drift check bites (pull_request) Successful in 24s
CI / the posted text check bites (pull_request) Successful in 10s
CI / workflows are valid (pull_request) Successful in 10s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 13s
CI / nothing private (pull_request) Has been skipped
CI / no test the base passed goes missing (pull_request) Successful in 38s
CI / the pictures change only with the version (pull_request) Successful in 18s
CI / no literal restates a defined value (pull_request) Successful in 1m15s
CI / installer (pull_request) Successful in 2m19s
CI / every check runs in a job (pull_request) Successful in 14s
CI / every job has a timeout (pull_request) Successful in 14s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 15s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 41s
CI / the relay loads in the recorded host (pull_request) Successful in 14m31s
CI / the clean-install proof removes its container (pull_request) Successful in 16m15s
1361e01e98
Mars's r=2 fold-in, on Titan's branch while he is parked:
- start_the_member_on_its_host: a placed host's launcher carries whyNotPlaced, and the engine's is
  whyTheRecordedEngineIsNotHere, so a start that skips `up` refuses an engine from another commit,
  naming `martha engine install`, instead of running it. Red test first.
- lint: the fetch loop leaves installTheRecordedEngine (max-depth); up's engine check moves to
  theEngineUpStarts in bring_up_the_declared_crew (complexity, file length).
- tsc: the install tests' messages and unused parameters; the engine act returns a Promise.
- The engine's own tests put their stand-in where the install puts it, with its record (r=2 left 22
  of them reading PATH); the floor test tries the engine's install words; the #541 start test reads
  the command the refusal names.
- install_the_recorded_engine is declared a host adapter (it runs git and cargo), and drawn in the
  ACP agent box; the getting-started block's quoting closes.
- The tests take the install place from theEngineBinPlace instead of restating it.

Refs macula-io/martha#119
terra manually merged commit 390d8e89cd into main 2026-11-24 07:19:23 +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!121
No description provided.