martha P7: the mesh declaration takes a LAN entry address, and the owner's step records the member in lan_members #372

Open
opened 2026-12-02 14:56:49 +00:00 by vesta · 0 comments
Member

Purpose (feature): a crew on one LAN can point its members at the LAN entry point beside the mesh, and the owner's step that reads each member's node id also records that member in lan_members, so the entry point admits it.

P7 of the mcl-lan design (macula-services/mcl-core docs/DESIGN.md §4.2 and §4.3; §7 row P7), on martha-ai/martha. Builder: Vesta. Reviewer: Jupiter. Dispatcher: Mars.
Raf 2026-12-02: "we won't loose the mesh! I just don't want to pitch Martha as mesh-only" — so the entry sits BESIDE the mesh, never instead of it, and unset means no change at all.

What changes

  1. The mesh declaration accepts an entry address (§4.3). The mesh block gains entry: one address, http://<node>:<port>, the LAN entry point of §4.2. stations stays as it is and both may be declared: the entry is beside the mesh, and a crew that names no entry keeps today's settings byte for byte.
    • Reads: src/declare_crew/the_crews_workspace.ts (MESH_KEYS), src/declare_crew/the_declarations_schema.ts (the editor's mesh tab, and schema/martha.schema.json which the_schema_is_the_one_committed.node-test.ts keeps in step).
    • Validated as one address and nothing else, the way a_realm_name.ts validates a station: http:// host (a name, an IPv4 or a bracketed IPv6) and a port, no path, no credentials, no whitespace. Refused by name, with what was found.
    • Written for a member: src/install_the_recorded_mesh_server/install_the_recorded_mesh_server.ts:400 — "the crew's declared mesh, as settings of the server (martha#158): its stations and its realm's key" — hands it to the server as MACULA_LAN_ENTRY, the name P6 defines (macula-io/macula-mcp#11, PR 12 at 3ce2e4f). prove_the_mesh_server_bytes plans its MACULA_* settings from the server's own code (:111), so a version of the server that does not read the name is where this is refused, by that check, not here.
  2. The owner's step records the member in lan_members (§4.2). §4.2 says the owner's key step "adds a line, and the factory copies the file to every node". In Martha the step that already knows each team member's node id, offline, from its own key, is the roster (src/write_the_crews_roster/write_the_crews_roster.ts: theCrewsRoster, run by martha up, kept as roster.json, whole and owner-only). The same step writes lan_members in Martha's state for the crew beside the roster: one line per member, <node id> <role>, the role from the declaration (owner for the owner, member for everyone else), owner-only and whole.
    • A member the roster leaves out (its key could not be read, it shares another's key, or the bin gave no node id) is left out here too, and named in the same line the roster names it.
    • A solo crew writes none, as it has no roster and no keys.
    • The node id is the roster's own value, never text typed in the declaration: the list is the cluster's member list, so it may hold only ids a key proved.
    • Removing a member is the same write, one member short: the file is written whole, never patched. §4.2: a token already issued stops working at the member's next call because every call reads the list.

Threat model first (§4.2's harms, as they reach Martha)

  • The list is the cluster's member list. Whoever an entry point admits can call every members capability of the cluster. So lan_members is written only by the owner's step, owner-only, and every line comes from a key the roster read — never from the declaration, an environment variable or a member's word. A member must not be able to add itself.
  • A wrong entry address sends member calls, and the tokens they mint, to another box. The entry is read from the owner's declaration alone, is one private-LAN address, and the token is minted per call against that address; no secret travels in the address. An address that cannot be parsed is refused by name, never half-written.
  • Unset means no change. A crew naming no entry gets the settings it has today, byte for byte, and no lan_members file. This is what keeps a crew that only ever used the mesh working exactly as it did.
  • Memory stays on the mesh (Supervisor ruling on macula-io/macula-mcp#11, comment c8553: the entry point's reply does not say which member served it, which crew memory's corpus check needs; follow-up macula-services/mcl-core#13). Martha's declaration routes calls to the entry beside the mesh; it must not route memory to it.

Done-when

  • A declaration naming mesh.entry: 'http://192.168.1.10:8443' is accepted, its schema/documented hint shows it, and the member's server settings carry MACULA_LAN_ENTRY=http://192.168.1.10:8443; a test fails by name when the setting is dropped.
  • A declaration naming stations and no entry produces settings with no MACULA_LAN_ENTRY and the same stations as before: a test compares the whole settings block to today's, so "unset means no change" fails by name.
  • Each of host:port/path, http://host, https://host:8443, http://user:pass@host:8443, http://host:8443 (trailing space) and a bare 192.168.1.10:8443 is refused by name, with what was found, and nothing is written.
  • A team crew whose two members' keys read gives lan_members with exactly two lines, <node id> <role> each, the ids the roster holds, owner-only (mode 600), written whole.
  • A member the roster leaves out (key unreadable) has no line in lan_members, and the line that names it in the roster's output is the same line that says why it is not in the list.
  • A solo crew writes no lan_members.
  • A rewritten list drops the member that was removed: the file is the roster's members, whole, never an append.
  • lan_members never takes a line from the declaration text: a declaration naming an id in entry or a member block that the keys do not give puts no line in the file.

Out of scope

P6's backend (macula-io/macula-mcp#11), P8 (lazymartha's calls through the entry), P9 (the clustered release), and any change to the mesh path itself: this package adds the entry beside it.

Refs macula-services/mcl-core docs/DESIGN.md §4.2, §4.3, §7 (P7); macula-io/macula-mcp#11 (PR 12, 3ce2e4f; comment c8553 for the memory departure); martha-ai/lazymartha#6; martha#368 (the declaration's declare --from, which this branch is cut after).

Purpose (feature): a crew on one LAN can point its members at the LAN entry point beside the mesh, and the owner's step that reads each member's node id also records that member in `lan_members`, so the entry point admits it. P7 of the mcl-lan design (`macula-services/mcl-core` `docs/DESIGN.md` §4.2 and §4.3; §7 row P7), on martha-ai/martha. Builder: Vesta. Reviewer: Jupiter. Dispatcher: Mars. Raf 2026-12-02: "we won't loose the mesh! I just don't want to pitch Martha as mesh-only" — so the entry sits BESIDE the mesh, never instead of it, and unset means no change at all. ## What changes 1. **The mesh declaration accepts an entry address (§4.3).** The `mesh` block gains `entry`: one address, `http://<node>:<port>`, the LAN entry point of §4.2. `stations` stays as it is and both may be declared: the entry is beside the mesh, and a crew that names no entry keeps today's settings byte for byte. - Reads: `src/declare_crew/the_crews_workspace.ts` (`MESH_KEYS`), `src/declare_crew/the_declarations_schema.ts` (the editor's mesh tab, and `schema/martha.schema.json` which `the_schema_is_the_one_committed.node-test.ts` keeps in step). - Validated as one address and nothing else, the way `a_realm_name.ts` validates a station: `http://` host (a name, an IPv4 or a bracketed IPv6) and a port, no path, no credentials, no whitespace. Refused by name, with what was found. - Written for a member: `src/install_the_recorded_mesh_server/install_the_recorded_mesh_server.ts:400` — "the crew's declared mesh, as settings of the server (martha#158): its stations and its realm's key" — hands it to the server as `MACULA_LAN_ENTRY`, the name P6 defines (`macula-io/macula-mcp#11`, PR 12 at 3ce2e4f). `prove_the_mesh_server_bytes` plans its `MACULA_*` settings from the server's own code (`:111`), so a version of the server that does not read the name is where this is refused, by that check, not here. 2. **The owner's step records the member in `lan_members` (§4.2).** §4.2 says the owner's key step "adds a line, and the factory copies the file to every node". In Martha the step that already knows each team member's node id, offline, from its own key, is the roster (`src/write_the_crews_roster/write_the_crews_roster.ts`: `theCrewsRoster`, run by `martha up`, kept as `roster.json`, whole and owner-only). The same step writes `lan_members` in Martha's state for the crew beside the roster: one line per member, `<node id> <role>`, the role from the declaration (`owner` for the owner, `member` for everyone else), owner-only and whole. - A member the roster leaves out (its key could not be read, it shares another's key, or the bin gave no node id) is left out here too, and named in the same line the roster names it. - A solo crew writes none, as it has no roster and no keys. - The node id is the roster's own value, never text typed in the declaration: the list is the cluster's member list, so it may hold only ids a key proved. - Removing a member is the same write, one member short: the file is written whole, never patched. §4.2: a token already issued stops working at the member's next call because every call reads the list. ## Threat model first (§4.2's harms, as they reach Martha) - **The list is the cluster's member list.** Whoever an entry point admits can call every `members` capability of the cluster. So `lan_members` is written only by the owner's step, owner-only, and every line comes from a key the roster read — never from the declaration, an environment variable or a member's word. A member must not be able to add itself. - **A wrong entry address sends member calls, and the tokens they mint, to another box.** The entry is read from the owner's declaration alone, is one private-LAN address, and the token is minted per call against that address; no secret travels in the address. An address that cannot be parsed is refused by name, never half-written. - **Unset means no change.** A crew naming no `entry` gets the settings it has today, byte for byte, and no `lan_members` file. This is what keeps a crew that only ever used the mesh working exactly as it did. - **Memory stays on the mesh** (Supervisor ruling on `macula-io/macula-mcp#11`, comment c8553: the entry point's reply does not say which member served it, which crew memory's corpus check needs; follow-up `macula-services/mcl-core#13`). Martha's declaration routes calls to the entry beside the mesh; it must not route memory to it. ## Done-when - A declaration naming `mesh.entry: 'http://192.168.1.10:8443'` is accepted, its schema/documented hint shows it, and the member's server settings carry `MACULA_LAN_ENTRY=http://192.168.1.10:8443`; a test fails by name when the setting is dropped. - A declaration naming `stations` and no `entry` produces settings with no `MACULA_LAN_ENTRY` and the same stations as before: a test compares the whole settings block to today's, so "unset means no change" fails by name. - Each of `host:port/path`, `http://host`, `https://host:8443`, `http://user:pass@host:8443`, `http://host:8443 ` (trailing space) and a bare `192.168.1.10:8443` is refused by name, with what was found, and nothing is written. - A team crew whose two members' keys read gives `lan_members` with exactly two lines, `<node id> <role>` each, the ids the roster holds, owner-only (mode 600), written whole. - A member the roster leaves out (key unreadable) has no line in `lan_members`, and the line that names it in the roster's output is the same line that says why it is not in the list. - A solo crew writes no `lan_members`. - A rewritten list drops the member that was removed: the file is the roster's members, whole, never an append. - `lan_members` never takes a line from the declaration text: a declaration naming an id in `entry` or a member block that the keys do not give puts no line in the file. ## Out of scope P6's backend (`macula-io/macula-mcp#11`), P8 (lazymartha's calls through the entry), P9 (the clustered release), and any change to the mesh path itself: this package adds the entry beside it. Refs macula-services/mcl-core `docs/DESIGN.md` §4.2, §4.3, §7 (P7); macula-io/macula-mcp#11 (PR 12, 3ce2e4f; comment c8553 for the memory departure); martha-ai/lazymartha#6; martha#368 (the declaration's `declare --from`, which this branch is cut after).
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#372
No description provided.