martha#191: a crew that declares a mesh starts with .mcp.json pinning the recorded mesh server #323

Manually merged
terra merged 0 commits from neptunus/191-init-mcp-json into main 2026-12-01 02:11:34 +00:00
Member

Refs #191. Based on main 2f59758b.

martha init now writes .mcp.json beside the other starter files when the declaration has a mesh block. It pins the newest recorded @macula-io/mcp by version and bin, in the shape .mcp.json's server check accepts. The 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 with the kept key (#158). Nothing in the launch changed.

  • A crew with no mesh gets no file and no setting.
  • A .mcp.json the owner already has 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 (#181) now uses too, so the pin is no longer written in two places.
  • docs/getting-started.md says what the file is.
  • Engine members are not changed (#181).

Tests:

  • the_files_a_crew_starts_with.node-test.ts: a fresh crew with a mesh (the pin, the launch's server check passes, the stations and realm key handed); no mesh, no file; a crew whose own file already pins the server keeps it byte for byte and is handed the mesh; no recorded server.
  • the_crew_editor_acts.node-test.ts: a martha config save, with and without a mesh, and with a file already there.
  • No test installs a server or reaches a host: the environment comes from meshServerEnvironments, which only reads the config.
  • Mutants: no file ever written, every crew taken as declaring a mesh, and the config guard dropped. Each one fails a test.

Proof:

  • typecheck 0;
  • the whole npm run verify 0;
  • the whole npm test through run_the_tests_in_a_namespace_of_their_own.sh: 5874 tests, 0 fail (installer job 169/169);
  • check:private clean.

Not done here: an owner's existing .mcp.json that pins no mesh server is left as it is, so its members still have no mesh server. Init says it left the file.

Refs #191. Based on main `2f59758b`. `martha init` now writes `.mcp.json` beside the other starter files when the declaration has a `mesh` block. It pins the newest recorded `@macula-io/mcp` by version and bin, in the shape `.mcp.json`'s server check accepts. The 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` with the kept key (#158). Nothing in the launch changed. - A crew with no mesh gets no file and no setting. - A `.mcp.json` the owner already has 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 (#181) now uses too, so the pin is no longer written in two places. - `docs/getting-started.md` says what the file is. - Engine members are not changed (#181). Tests: - `the_files_a_crew_starts_with.node-test.ts`: a fresh crew with a mesh (the pin, the launch's server check passes, the stations and realm key handed); no mesh, no file; a crew whose own file already pins the server keeps it byte for byte and is handed the mesh; no recorded server. - `the_crew_editor_acts.node-test.ts`: a `martha config` save, with and without a mesh, and with a file already there. - No test installs a server or reaches a host: the environment comes from `meshServerEnvironments`, which only reads the config. - Mutants: no file ever written, every crew taken as declaring a mesh, and the config guard dropped. Each one fails a test. Proof: - typecheck 0; - the whole `npm run verify` 0; - the whole `npm test` through run_the_tests_in_a_namespace_of_their_own.sh: 5874 tests, 0 fail (installer job 169/169); - check:private clean. Not done here: an owner's existing `.mcp.json` that pins no mesh server is left as it is, so its members still have no mesh server. Init says it left the file.
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
Collaborator

CI coordinator: round r=1: dispatched ci.yml on 7a0eee060d, run 6025 (base 2f59758b26).

CI coordinator: round r=1: dispatched ci.yml on 7a0eee060d1fcae04a1ec56ec1a5d92413ee48ac, run 6025 (base 2f59758b26a5c2eddb3e5aa2cdece8bce0c595ad).
Collaborator

CI coordinator: round r=1: dispatched suite.yml on 7a0eee060d, run 6026 (base 2f59758b26).

CI coordinator: round r=1: dispatched suite.yml on 7a0eee060d1fcae04a1ec56ec1a5d92413ee48ac, run 6026 (base 2f59758b26a5c2eddb3e5aa2cdece8bce0c595ad).
Collaborator

CI coordinator: round r=1: dispatched c4-model.yml on 7a0eee060d, run 6027 (base 2f59758b26).

CI coordinator: round r=1: dispatched c4-model.yml on 7a0eee060d1fcae04a1ec56ec1a5d92413ee48ac, run 6027 (base 2f59758b26a5c2eddb3e5aa2cdece8bce0c595ad).
Collaborator

CI coordinator: round r=1: dispatched standalone.yml on 7a0eee060d, run 6028 (base 2f59758b26).

CI coordinator: round r=1: dispatched standalone.yml on 7a0eee060d1fcae04a1ec56ec1a5d92413ee48ac, run 6028 (base 2f59758b26a5c2eddb3e5aa2cdece8bce0c595ad).
terra manually merged commit dc79b38bec into main 2026-12-01 02:11:34 +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!323
No description provided.