A crew that declares a mesh, with its own .mcp.json pinning no mesh server, still starts its Claude Code members with no mesh server #324

Closed
opened 2026-11-30 22:43:26 +00:00 by neptunus · 1 comment
Member

Purpose (fix): a Claude Code member of a crew that declares mesh gets the recorded mesh server even when the owner's own .mcp.json was already there and pins no mesh server.

Refs martha-ai/martha#191.

What happens: since #191 (PR #323), martha init writes .mcp.json pinning the newest recorded @macula-io/mcp when the declaration has a mesh block, and martha config writes it after a save that declares a mesh. Both write only when no .mcp.json is there. When the owner already has one that names other servers and no mesh server, it is left as it is, and init says "Left ... as it is". The crew declares a mesh, yet its members start with no mesh server: the same state #191 found on martha#158's live run, only now for an owner who had their own .mcp.json.

Found by Saturnus's r1 review of PR #323 (note 2). #191's Done-when covered the fresh crew and the crew whose own file already pins the server, not this case.

Not decided: whether Martha adds the mesh entry to the owner's .mcp.json, which martha approve then shows, or a launch adds it without changing the owner's file, or init and martha up only say that the members will have no mesh server. The starter files' rule so far is that Martha never rewrites a file the owner already had.

Done when: a crew that declares mesh, and whose own .mcp.json pins no mesh server, either starts every Claude Code member with the recorded mesh server (handed MACULA_MESH_STATIONS and, for a realm written by its name, MACULA_MESH_REALMS) or is told so by name at martha up, as ruled; a test covers that crew and reaches no outside host.

Purpose (fix): a Claude Code member of a crew that declares `mesh` gets the recorded mesh server even when the owner's own `.mcp.json` was already there and pins no mesh server. Refs martha-ai/martha#191. What happens: since #191 (PR #323), `martha init` writes `.mcp.json` pinning the newest recorded `@macula-io/mcp` when the declaration has a `mesh` block, and `martha config` writes it after a save that declares a mesh. Both write only when no `.mcp.json` is there. When the owner already has one that names other servers and no mesh server, it is left as it is, and init says "Left ... as it is". The crew declares a mesh, yet its members start with no mesh server: the same state #191 found on martha#158's live run, only now for an owner who had their own `.mcp.json`. Found by Saturnus's r1 review of PR #323 (note 2). #191's Done-when covered the fresh crew and the crew whose own file already pins the server, not this case. Not decided: whether Martha adds the mesh entry to the owner's `.mcp.json`, which `martha approve` then shows, or a launch adds it without changing the owner's file, or init and `martha up` only say that the members will have no mesh server. The starter files' rule so far is that Martha never rewrites a file the owner already had. Done when: a crew that declares `mesh`, and whose own `.mcp.json` pins no mesh server, either starts every Claude Code member with the recorded mesh server (handed `MACULA_MESH_STATIONS` and, for a realm written by its name, `MACULA_MESH_REALMS`) or is told so by name at `martha up`, as ruled; a test covers that crew and reaches no outside host.
Author
Member

Done-when check against main 3f092f10 (PR #335 at 906ec7f1, Uranus PASS r=1, landed by Terra). Ruling: option (b), Supervisor 2026-12-01.

  • "a crew that declares mesh, whose own .mcp.json pins no mesh server, either starts every Claude Code member with the recorded mesh server (handed MACULA_MESH_STATIONS and, for a realm written by its name, MACULA_MESH_REALMS) or is told so at martha up, as ruled": MET, the first branch. withTheCrewsMeshServer (src/place_the_hosts_settings/the_hosts_settings.ts) adds the newest recorded pin to the launch's own snapshot copy of the servers file. That copy is what the member starts with, and the existing placement starts it from the recorded tree with the crew's stations and realm key. The owner's .mcp.json is never touched, and an owner entry that installs the mesh server, or any entry under macula, wins. A checkout with no .mcp.json gets the copy named with --mcp-config. A crew that declares no mesh is handed none (aCrewDeclaresAMesh, shared with the engine start).
  • "a test covers that crew and reaches no outside host": MET. launch_a_claude_code_member.node-test.ts, the five "#324" tests, start a real member on the fake host and read the server config it was handed:
    • the owner's file names only another server: the member gets macula placed from the newest recorded tree, with MACULA_MESH_STATIONS and MACULA_MESH_REALMS, and the owner's file is byte-identical afterwards;
    • a checkout with no .mcp.json;
    • the owner's own mesh entry wins;
    • an owner's server under macula is never replaced;
    • a crew with no mesh.
      The recorded tree comes from the loopback fake registry. Six mutants each fail a test.

Every line is met. Closing.

**Done-when check against main `3f092f10`** (PR #335 at `906ec7f1`, Uranus PASS r=1, landed by Terra). Ruling: option (b), Supervisor 2026-12-01. - "a crew that declares `mesh`, whose own `.mcp.json` pins no mesh server, either starts every Claude Code member with the recorded mesh server (handed `MACULA_MESH_STATIONS` and, for a realm written by its name, `MACULA_MESH_REALMS`) or is told so at `martha up`, as ruled": **MET, the first branch**. `withTheCrewsMeshServer` (`src/place_the_hosts_settings/the_hosts_settings.ts`) adds the newest recorded pin to the launch's own snapshot copy of the servers file. That copy is what the member starts with, and the existing placement starts it from the recorded tree with the crew's stations and realm key. The owner's `.mcp.json` is never touched, and an owner entry that installs the mesh server, or any entry under `macula`, wins. A checkout with no `.mcp.json` gets the copy named with `--mcp-config`. A crew that declares no mesh is handed none (`aCrewDeclaresAMesh`, shared with the engine start). - "a test covers that crew and reaches no outside host": **MET**. `launch_a_claude_code_member.node-test.ts`, the five "#324" tests, start a real member on the fake host and read the server config it was handed: - the owner's file names only another server: the member gets `macula` placed from the newest recorded tree, with `MACULA_MESH_STATIONS` and `MACULA_MESH_REALMS`, and the owner's file is byte-identical afterwards; - a checkout with no `.mcp.json`; - the owner's own mesh entry wins; - an owner's server under `macula` is never replaced; - a crew with no mesh. The recorded tree comes from the loopback fake registry. Six mutants each fail a test. Every line is met. Closing.
Sign in to join this conversation.
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#324
No description provided.