An engine member runs the crew's own tools unasked, and martha up says when no owner rules are found (martha#283) #287

Manually merged
terra merged 7 commits from neptunus/283-own-tools-approved into main 2026-11-27 04:24:19 +00:00
Member

Purpose (fix): an unattended crew on martha up runs its own martha_crew__* tools without asking the owner per call, and martha up says in one line when no owner rules are found.

Scope as ruled: DECIDED 2026-11-27 "Fix Martha first (Recommended)" (Raf, relayed by Mars). Threat model: #283 comment 6184.

  • theRulesForAnEngineLaunch approves each crew tool by its whole engine name (the server key the launcher hands in, the engine's separator, the tool), with no prefix match. The owner's deny and ask rules still win. NO_RULES is gone. The result carries owners_rules_found.
  • start_an_engine_member passes { server: THE_CREWS_TOOL_SERVER, tools: CREW_TOOL_NAMES }, so the rules slice imports no host glue.
  • martha up prints one notice line (ownersRulesLineOf) when an engine member starts and <root>/.claude/settings.json is absent.
  • No new check beyond that.

Left open on #283: the issue's Done-when also names a declared list of approved calls. That is wider than the ruling, so it is not in this PR.

Proof on 8770f835 (main 7add9fe3 merged): whole npm test in its own namespace rc=0 (5691 pass, 0 fail); npm run verify rc=0; check:private on 7add9fe3..HEAD reports nothing private; workflows diff 0 lines. The tests failed before the fix (2 fails); mutants M1-M5 on the name matcher were all killed.

Refs #283, #239, #241

🤖 Generated with Claude Code

Purpose (fix): an unattended crew on `martha up` runs its own `martha_crew__*` tools without asking the owner per call, and `martha up` says in one line when no owner rules are found. Scope as ruled: DECIDED 2026-11-27 "Fix Martha first (Recommended)" (Raf, relayed by Mars). Threat model: #283 comment 6184. - `theRulesForAnEngineLaunch` approves each crew tool by its whole engine name (the server key the launcher hands in, the engine's separator, the tool), with no prefix match. The owner's deny and ask rules still win. `NO_RULES` is gone. The result carries `owners_rules_found`. - `start_an_engine_member` passes `{ server: THE_CREWS_TOOL_SERVER, tools: CREW_TOOL_NAMES }`, so the rules slice imports no host glue. - `martha up` prints one notice line (`ownersRulesLineOf`) when an engine member starts and `<root>/.claude/settings.json` is absent. - No new check beyond that. Left open on #283: the issue's Done-when also names a declared list of approved calls. That is wider than the ruling, so it is not in this PR. Proof on 8770f835 (main 7add9fe3 merged): whole `npm test` in its own namespace rc=0 (5691 pass, 0 fail); `npm run verify` rc=0; check:private on 7add9fe3..HEAD reports nothing private; workflows diff 0 lines. The tests failed before the fix (2 fails); mutants M1-M5 on the name matcher were all killed. Refs #283, #239, #241 🤖 Generated with [Claude Code](https://claude.com/claude-code)
An unattended crew with no .claude/settings.json stalled at its first call: every martha_crew__* call went to the
owner. theRulesForAnEngineLaunch now approves the tools the crew's server serves (CREW_TOOL_NAMES), each by its whole
engine name, martha_crew and the engine's separator before it, never by a prefix, whether or not the launch carried
the owner's settings. The owner's deny and ask rules still hold them as they hold any call, and the gate still stands
before every rule. Every other call is as martha#241 left it.

martha up prints one line before the crew starts when an engine member is to start and the workspace holds no owner
rules file: the crew's own tools run unasked, every other call is asked, and permissions.allow there is where to say
more. The threat model is martha#283 comment 6184.

Drops-test: src/carry_the_owners_allow_rules_to_an_engine/the_rules_for_a_launch.node-test.ts :: a launch that carried no settings carries no rule, and says nothing is left behind (r2 R4: no file is no rule, not a refusal)
only_the_launcher_writes_launch_records and no_setting_outside_the_declaration failed on the first commit: the_rules_for_a_launch.ts imported the_tool_servers_words.ts, which is not a slice. start_an_engine_member, which may, now passes the server key with the tool names.
Required 1 (Jupiter): a deny of mcp__martha__land_batch, mcp__martha__* or mcp__martha reads as a hold on martha__..., which
no engine call is named, so the crew tool it named ran unasked. Each hold under the relay's name (THE_RELAYS_NAME, the
manifest's) is now held again under the engine's server key. Required 2: the header no longer says a launch with no copy
asks every call. The launcher's own tools are one constant (THE_CREWS_OWN_TOOLS), pinned to the manifest's name, and no
crew tool name holds the separator. Two assertions that read a stand-in are dropped, and the allow case uses another server.
# Conflicts:
#	src/bring_up_the_declared_crew/bring_up_the_declared_crew.ts
#	src/run_the_martha_command/run_the_martha_command.ts
THE_RELAYS_NAME, a second constant of 'martha', made the restated-values range check judge every 'martha' in the tree
against it. The name is now written in THE_CREWS_OWN_TOOLS as the literal, declared a coincidence of STATE_ROOT_NAME with
THE_REPOSITORYS_OWN_NAME, as the tree's other plugin-name sites are, and the wiring test still reads it from the manifest.
tsc refused the r2 test line: theRulesForAnEngineLaunch({}, ...) may be a refusal,
and the assert above it narrowed only the other launch's rules.

Refs #283
terra manually merged commit e1561073e5 into main 2026-11-27 04:24:19 +00:00
Sign in to join this conversation.
No reviewers
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!287
No description provided.