Record a bundled mesh server as one tarball, and install it by its integrity #168

Closed
opened 2026-11-25 05:00:25 +00:00 by pluto · 3 comments
Member

Purpose (product): martha records a bundled mesh server as ONE tarball, and installs it by the integrity npm publishes, so a member's mesh server comes from the forge with npmjs unreachable.

Moved here from macula-io/macula-mcp#4 by the Supervisor's ruling of 2026-11-25: the packages are published and proven, and what is left is martha's own tree model, not theirs.

What is true today (measured 2026-11-25)

  • @macula-io/mcp 0.51.6 is on macula-pub, tagged and built by forge CI (release run 4137). With registry.npmjs.org unable to resolve or connect, npm install @macula-io/mcp@0.51.6 from macula-pub says "added 1 package" and the server answers initialize as macula-mcp 0.51.6.
  • martha cannot record it: its tree model is a registry-resolvable lock plus npm ci. The lock the recorder makes for a bundled server has 127 inBundle entries with no resolved, which refusalOfLocked refuses; and npm ci from that lock with only macula-pub reachable dies 404 resolving fast-uri@^3.0.1 (ajv's range, which the publisher's root-only overrides rewrites).

Approach (for review before any code)

  1. The pin is the tarball. For a server whose manifest declares bundleDependencies, the recorded tree holds: the version, the URL the recorded registry serves for it, and the sha512 integrity npm publishes for that tarball. No lock, no per-package entries.
  2. The install is that tarball. Fetch it from the recorded registry, let npm verify the integrity, extract it where the tree goes. The bundle carries its own dependencies, so nothing is resolved and no other host is contacted.
  3. The record keeps what the server reads. settings as today, and environment_reads attributed from the tarball's own node_modules layout (each bundled package is its own prefix), so known_environment_reads still means what it means.
  4. The file list: I propose keeping it, and here is the harm it stops. changesInTree compares the recorded files against the placed tree before a start, and there is a test that a file changed, removed or added since the install refuses the next placement, naming it. The tarball's integrity covers transit, not a tree altered after extraction. If the ruling prefers the simpler pin, that behaviour retires for bundled servers and I will say so in the change rather than let it lapse quietly.
  5. The flip comes with it. The recording's registry moves to https://git.macula.io/api/packages/macula-pub/npm/, and 0.51.0/0.51.2, recorded from npmjs, retire in the same change.

Done-when

  • A bundled server records from the forge registry: version, URL, integrity, settings, reads.
  • A fresh place of that tree, with npmjs unable to resolve or connect, installs it and the recorded bin answers as 0.51.6.
  • The recording names the forge, and no version recorded from npmjs is left in it.
  • The recited behaviour for a non-bundled server is unchanged: its lock path and its tests still pass.

Refs macula-io/macula-mcp#4.

Purpose (product): martha records a bundled mesh server as ONE tarball, and installs it by the integrity npm publishes, so a member's mesh server comes from the forge with npmjs unreachable. Moved here from macula-io/macula-mcp#4 by the Supervisor's ruling of 2026-11-25: the packages are published and proven, and what is left is martha's own tree model, not theirs. ## What is true today (measured 2026-11-25) - `@macula-io/mcp` 0.51.6 is on macula-pub, tagged and built by forge CI (release run 4137). With `registry.npmjs.org` unable to resolve or connect, `npm install @macula-io/mcp@0.51.6` from macula-pub says "added 1 package" and the server answers `initialize` as `macula-mcp 0.51.6`. - martha cannot record it: its tree model is a registry-resolvable lock plus `npm ci`. The lock the recorder makes for a bundled server has 127 `inBundle` entries with no `resolved`, which `refusalOfLocked` refuses; and `npm ci` from that lock with only macula-pub reachable dies `404` resolving `fast-uri@^3.0.1` (ajv's range, which the publisher's root-only `overrides` rewrites). ## Approach (for review before any code) 1. **The pin is the tarball.** For a server whose manifest declares `bundleDependencies`, the recorded tree holds: the version, the URL the recorded registry serves for it, and the sha512 integrity npm publishes for that tarball. No lock, no per-package entries. 2. **The install is that tarball.** Fetch it from the recorded registry, let npm verify the integrity, extract it where the tree goes. The bundle carries its own dependencies, so nothing is resolved and no other host is contacted. 3. **The record keeps what the server reads.** `settings` as today, and `environment_reads` attributed from the tarball's own `node_modules` layout (each bundled package is its own prefix), so `known_environment_reads` still means what it means. 4. **The file list: I propose keeping it, and here is the harm it stops.** `changesInTree` compares the recorded files against the placed tree before a start, and there is a test that a file changed, removed or added since the install refuses the next placement, naming it. The tarball's integrity covers transit, not a tree altered after extraction. If the ruling prefers the simpler pin, that behaviour retires for bundled servers and I will say so in the change rather than let it lapse quietly. 5. **The flip comes with it.** The recording's `registry` moves to `https://git.macula.io/api/packages/macula-pub/npm/`, and 0.51.0/0.51.2, recorded from npmjs, retire in the same change. ## Done-when - A bundled server records from the forge registry: version, URL, integrity, settings, reads. - A fresh place of that tree, with npmjs unable to resolve or connect, installs it and the recorded bin answers as 0.51.6. - The recording names the forge, and no version recorded from npmjs is left in it. - The recited behaviour for a non-bundled server is unchanged: its lock path and its tests still pass. Refs macula-io/macula-mcp#4.
Author
Member

Done in PR martha-ai/martha#170 (branch pluto/168-bundled-tarball, base 052a7306, tip 49a2d698), four forge runs green on the tip: 1387 (advisories), 1388 (c4-model), 1389 (ci), 1390 (standalone).

Each Done-when line, and where it is proved:

  • A bundled server records from the forge registry: version, URL, integrity, settings, reads. recorded_mesh_server_trees.json now holds 0.51.6 with tarball = https://git.macula.io/api/packages/macula-pub/npm/%40macula-io%2Fmcp/-/0.51.6/mcp-0.51.6.tgz, integrity = sha512 RufLxFU2XVFCKRSnh3VgIsdNF6PHSjO6gcU7jBkljSbpIAGrTZICndmRLygUhJnZGqCIGijkNnGGpXSN0Zdmlw==, 23 settings, 15 packages with environment reads, and no lock.
  • A fresh place installs it with npmjs unable to resolve or connect, and the recorded bin answers as 0.51.6. In a mount namespace (hosts naming only the forge, empty resolv.conf, hosts: files): npmjs http=000, forge http=200; startOfARecordedBin (the function theRecordedNodeIdOf starts macula-mcp-node-id with, and a member's launch path) installed the one tarball into an empty root, 4513 files, and one initialize answered serverInfo {"name":"macula-mcp","version":"0.51.6"}.
  • The recording names the forge, and no version recorded from npmjs is left in it. registry is https://git.macula.io/api/packages/macula-pub/npm/; 0.51.0 and 0.51.2 are retired from both recordings in the same commit, since their locks name registry.npmjs.org and refusalOfLocked refuses them once the registry flips.
  • A non-bundled server's behaviour is unchanged: its lock path, its install and its tests still run. 34/34 in the recorder's test file, 92/92 across the three affected files, and the parallel stage of npm test 5411 tests, 0 fail.

Also in the change: a defect the real recording found in the first commit of this branch. record:mesh-tools read extracted/package, which the new recorder no longer writes (ENOENT), and then walked the bundled dependencies, where an @modelcontextprotocol/sdk example registers a tool by a computed name. The recording, the launch and the script now unpack a tarball through one rule (unpackServerTarball) and read a server's own files by one rule (ownCodeOf).

Two changes to reviewed text worth a reviewer's eye: the two recordings' _why texts now describe both shapes (lock and one tarball) and name the two-argument record command; the plugin-dirs rationale names 0.51.6, the recorded tree, instead of the retired ones.

Done in PR martha-ai/martha#170 (branch `pluto/168-bundled-tarball`, base `052a7306`, tip `49a2d698`), four forge runs green on the tip: 1387 (advisories), 1388 (c4-model), 1389 (ci), 1390 (standalone). Each Done-when line, and where it is proved: - A bundled server records from the forge registry: version, URL, integrity, settings, reads. `recorded_mesh_server_trees.json` now holds 0.51.6 with `tarball` = `https://git.macula.io/api/packages/macula-pub/npm/%40macula-io%2Fmcp/-/0.51.6/mcp-0.51.6.tgz`, `integrity` = sha512 `RufLxFU2XVFCKRSnh3VgIsdNF6PHSjO6gcU7jBkljSbpIAGrTZICndmRLygUhJnZGqCIGijkNnGGpXSN0Zdmlw==`, 23 settings, 15 packages with environment reads, and no lock. - A fresh place installs it with npmjs unable to resolve or connect, and the recorded bin answers as 0.51.6. In a mount namespace (hosts naming only the forge, empty resolv.conf, `hosts: files`): npmjs `http=000`, forge `http=200`; `startOfARecordedBin` (the function `theRecordedNodeIdOf` starts `macula-mcp-node-id` with, and a member's launch path) installed the one tarball into an empty root, 4513 files, and one `initialize` answered `serverInfo {"name":"macula-mcp","version":"0.51.6"}`. - The recording names the forge, and no version recorded from npmjs is left in it. `registry` is `https://git.macula.io/api/packages/macula-pub/npm/`; 0.51.0 and 0.51.2 are retired from both recordings in the same commit, since their locks name registry.npmjs.org and `refusalOfLocked` refuses them once the registry flips. - A non-bundled server's behaviour is unchanged: its lock path, its install and its tests still run. 34/34 in the recorder's test file, 92/92 across the three affected files, and the parallel stage of `npm test` 5411 tests, 0 fail. Also in the change: a defect the real recording found in the first commit of this branch. `record:mesh-tools` read `extracted/package`, which the new recorder no longer writes (ENOENT), and then walked the bundled dependencies, where an `@modelcontextprotocol/sdk` example registers a tool by a computed name. The recording, the launch and the script now unpack a tarball through one rule (`unpackServerTarball`) and read a server's own files by one rule (`ownCodeOf`). Two changes to reviewed text worth a reviewer's eye: the two recordings' `_why` texts now describe both shapes (lock and one tarball) and name the two-argument record command; the plugin-dirs rationale names 0.51.6, the recorded tree, instead of the retired ones.
Author
Member

Why the four recordings that still name 0.51.0 and 0.51.2 stay behind in this change, and where they go.

They are recorded_mesh_answer_shapes.json, recorded_ring_result_keys.json, recorded_host_ring_answers.json and recorded_petnames.json. What blocked them was code, and that is fixed here: record_ring_results read a directory the recorder no longer writes (ENOENT for any server) and both it and record_mesh_answers started the server from a tree only the lock path creates, so neither could record a bundled version. One rule now names the tree a recording leaves, treeWithItsDependencies, and both scripts use it.

What still stands in the way is the act itself: both recorders join the live mesh. record:mesh-answers takes a station as host:port@<node id> and names https://realm.beam-campus.net as the realm; record:ring-results puts two agents on that station and rings one from the other. A fleet act on the DEV realm is not something to take in the middle of a review, and it wants one round covering all four recordings rather than a partial one.

Filed as martha-ai/martha#176: one round, on realm.beam-campus.net, with every agent it admits revoked at the end, and 0.51.0/0.51.2 retired from those four in the same reviewed commit.

Until then the four still pin 0.51.0/0.51.2 behaviour, which is what the answer-shape, ring-key, host-ring-answer and petname gates read. They do not gate installation: 0.51.6 is the only version a member can install.

Why the four recordings that still name 0.51.0 and 0.51.2 stay behind in this change, and where they go. They are `recorded_mesh_answer_shapes.json`, `recorded_ring_result_keys.json`, `recorded_host_ring_answers.json` and `recorded_petnames.json`. What blocked them was code, and that is fixed here: `record_ring_results` read a directory the recorder no longer writes (ENOENT for any server) and both it and `record_mesh_answers` started the server from a tree only the lock path creates, so neither could record a bundled version. One rule now names the tree a recording leaves, `treeWithItsDependencies`, and both scripts use it. What still stands in the way is the act itself: both recorders join the live mesh. `record:mesh-answers` takes a station as `host:port@<node id>` and names `https://realm.beam-campus.net` as the realm; `record:ring-results` puts two agents on that station and rings one from the other. A fleet act on the DEV realm is not something to take in the middle of a review, and it wants one round covering all four recordings rather than a partial one. Filed as martha-ai/martha#176: one round, on realm.beam-campus.net, with every agent it admits revoked at the end, and 0.51.0/0.51.2 retired from those four in the same reviewed commit. Until then the four still pin 0.51.0/0.51.2 behaviour, which is what the answer-shape, ring-key, host-ring-answer and petname gates read. They do not gate installation: 0.51.6 is the only version a member can install.
Author
Member

Landed on main as 5c36f101e0, a no-ff merge of 78c6ed23 onto c373344a (PR martha-ai/martha#170, merged 09:57:17Z).

The Purpose is met: martha records a bundled mesh server as ONE tarball, and installs it by the integrity npm publishes, so a member's mesh server comes from the forge with npmjs unreachable.

Each Done-when line, and where it is proved:

  • A bundled server records from the forge registry: version, URL, integrity, settings, reads. recorded_mesh_server_trees.json holds one version, 0.51.6, with tarball https://git.macula.io/api/packages/macula-pub/npm/%40macula-io%2Fmcp/-/0.51.6/mcp-0.51.6.tgz, its sha512 integrity, 23 settings, 15 packages with environment reads, and 4513 files with their own sha512 each; no lock. recorded_mesh_server_tools.json holds 0.51.6, server_bin macula-mcp, 35 tools, 7 bins.
  • A fresh place of that tree, with npmjs unable to resolve or connect, installs it and the recorded bin answers as 0.51.6. In a mount namespace naming only the forge (hosts: files, empty resolv.conf): npmjs http=000, forge http=200. The install fetched that one URL, refused any URL outside the recorded registry, checked the bytes against the recorded integrity before writing any file, and placed the tree, 5158 entries on disk holding 4513 files. One initialize answered serverInfo {"name":"macula-mcp","version":"0.51.6"}, and the recorded node-id bin answered with the same 64-character id twice.
  • The recording names the forge, and no version recorded from npmjs is left in it. registry is https://git.macula.io/api/packages/macula-pub/npm/; 0.51.0 and 0.51.2 retired in the same change, because their locks name registry.npmjs.org and refusalOfLocked refuses them once the registry flips.
  • A non-bundled server's behaviour is unchanged: its lock path and its tests still pass. 96/96 on the three affected files on the merged tree; the bounded full suite on fcac4483: 5418 tests, 5380 pass, 0 fail, 38 skipped.

CI on the landed tip 78c6ed23, per job, by API run id (index_in_repo in brackets). Every ci.yml job has a green on that exact tip:

  • 4342 [1451], the PR's own run: 17 jobs green, among them "gate coverage" (job 13594, green 09:58:21Z), "no test the base passed goes missing" (13469) and "the pictures change only with the version" (13470); "nothing private" skipped, as it is on every run. Red there: "the relay loads in the recorded host" (13459) and "the clean-install proof removes its container" (13464).
  • 4353 [1453], one dispatched ci.yml: those two are green, "the relay loads in the recorded host" (13533) at 09:44:55Z and "the clean-install proof removes its container" (13537) at 09:52:09Z. Red there only the two jobs a dispatched run cannot pass because it has no base ref, "no test the base passed goes missing" (13542) and "the pictures change only with the version" (13543), each saying "the base [] is not a commit in .". Both are green in 4342.
  • 4340 advisories, 4341 c4-model, 4343 standalone: green.

Also in the change, the review's fold-in: one rule names where a recording leaves its tree (treeWithItsDependencies with packageDirInTree) and one rule the unpack (unpackServerTarball). Before it, record_ring_results read a directory the recorder no longer writes and died ENOENT for any server, and both recording scripts started from a tree only the lock path creates. Mutants, each planted alone on the final tree: record-time integrity check dropped 36/37, install-time check 36/37, tree comparison skipped for a lockless tree 35/37, URL guard dropped 36/37, the tree rule wrong for a bundled server 0/1.

Not part of this Purpose: the four live-mesh recordings, recorded_mesh_answer_shapes.json, recorded_ring_result_keys.json, recorded_host_ring_answers.json and recorded_petnames.json. They still pin 0.51.0 and 0.51.2 behaviour because recording them means joining the live mesh on realm.beam-campus.net, which is a fleet act and not one to take inside this change; they do not gate installation, since 0.51.6 is the only version a member can install. That is martha-ai/martha#176: one round on the DEV realm covering all four, with every agent it admits revoked at the end.

Refs macula-io/macula-mcp#4.

Landed on main as **5c36f101e0fce9432a09ad2c2f5e5023e4a7b36e**, a no-ff merge of `78c6ed23` onto `c373344a` (PR martha-ai/martha#170, merged 09:57:17Z). **The Purpose is met**: martha records a bundled mesh server as ONE tarball, and installs it by the integrity npm publishes, so a member's mesh server comes from the forge with npmjs unreachable. Each Done-when line, and where it is proved: - **A bundled server records from the forge registry: version, URL, integrity, settings, reads.** `recorded_mesh_server_trees.json` holds one version, 0.51.6, with `tarball` `https://git.macula.io/api/packages/macula-pub/npm/%40macula-io%2Fmcp/-/0.51.6/mcp-0.51.6.tgz`, its sha512 integrity, 23 settings, 15 packages with environment reads, and 4513 files with their own sha512 each; no lock. `recorded_mesh_server_tools.json` holds 0.51.6, `server_bin` `macula-mcp`, 35 tools, 7 bins. - **A fresh place of that tree, with npmjs unable to resolve or connect, installs it and the recorded bin answers as 0.51.6.** In a mount namespace naming only the forge (`hosts: files`, empty resolv.conf): npmjs `http=000`, forge `http=200`. The install fetched that one URL, refused any URL outside the recorded registry, checked the bytes against the recorded integrity before writing any file, and placed the tree, 5158 entries on disk holding 4513 files. One `initialize` answered `serverInfo {"name":"macula-mcp","version":"0.51.6"}`, and the recorded node-id bin answered with the same 64-character id twice. - **The recording names the forge, and no version recorded from npmjs is left in it.** `registry` is `https://git.macula.io/api/packages/macula-pub/npm/`; 0.51.0 and 0.51.2 retired in the same change, because their locks name registry.npmjs.org and `refusalOfLocked` refuses them once the registry flips. - **A non-bundled server's behaviour is unchanged: its lock path and its tests still pass.** 96/96 on the three affected files on the merged tree; the bounded full suite on `fcac4483`: 5418 tests, 5380 pass, 0 fail, 38 skipped. CI on the landed tip `78c6ed23`, per job, by API run id (`index_in_repo` in brackets). Every `ci.yml` job has a green on that exact tip: - **4342** [1451], the PR's own run: 17 jobs green, among them "gate coverage" (job 13594, green 09:58:21Z), "no test the base passed goes missing" (13469) and "the pictures change only with the version" (13470); "nothing private" skipped, as it is on every run. Red there: "the relay loads in the recorded host" (13459) and "the clean-install proof removes its container" (13464). - **4353** [1453], one dispatched `ci.yml`: those two are green, "the relay loads in the recorded host" (13533) at 09:44:55Z and "the clean-install proof removes its container" (13537) at 09:52:09Z. Red there only the two jobs a dispatched run cannot pass because it has no base ref, "no test the base passed goes missing" (13542) and "the pictures change only with the version" (13543), each saying "the base [] is not a commit in .". Both are green in 4342. - **4340** advisories, **4341** c4-model, **4343** standalone: green. Also in the change, the review's fold-in: one rule names where a recording leaves its tree (`treeWithItsDependencies` with `packageDirInTree`) and one rule the unpack (`unpackServerTarball`). Before it, `record_ring_results` read a directory the recorder no longer writes and died ENOENT for any server, and both recording scripts started from a tree only the lock path creates. Mutants, each planted alone on the final tree: record-time integrity check dropped 36/37, install-time check 36/37, tree comparison skipped for a lockless tree 35/37, URL guard dropped 36/37, the tree rule wrong for a bundled server 0/1. **Not part of this Purpose**: the four live-mesh recordings, `recorded_mesh_answer_shapes.json`, `recorded_ring_result_keys.json`, `recorded_host_ring_answers.json` and `recorded_petnames.json`. They still pin 0.51.0 and 0.51.2 behaviour because recording them means joining the live mesh on realm.beam-campus.net, which is a fleet act and not one to take inside this change; they do not gate installation, since 0.51.6 is the only version a member can install. That is martha-ai/martha#176: one round on the DEV realm covering all four, with every agent it admits revoked at the end. Refs macula-io/macula-mcp#4.
pluto closed this issue 2026-11-25 10:00:26 +00:00
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#168
No description provided.