No kill in martha's tests or probes reaches past what its own code started (martha#205) #209

Manually merged
terra merged 2 commits from jupiter/205-kill-sites-floor into main 2026-11-26 01:32:55 +00:00
Member

Refs #205, #195. Threat model: issues/205#issuecomment-5167.

Every kill in martha's tests and probes goes through one pure rule, src/linux_process_identity/what_a_signal_may_reach.ts:

  • a pid, group or session is signalled only when it is a safe integer >= 2 and none of the caller's own;
  • a folder is scanned only when it is absolute, resolves, and is not /, the temporary directory or the home.

Sites 1, 8, 9, 10 and 11 are helpers. Each takes the signaller as an argument, so its test records the signal and never sends one. Their mutants are each killed in a run inside unshare --pid. Sites 2-7 are in test code: they use the same rule, and the rule's own mutants pin it.

Confined runs: the related files pass 825 and fail 8. The same 8 fail on main 37fb64bb when run confined: they are red only inside the pid namespace (#207).

🤖 Generated with Claude Code

Refs #205, #195. Threat model: issues/205#issuecomment-5167. Every kill in martha's tests and probes goes through one pure rule, `src/linux_process_identity/what_a_signal_may_reach.ts`: - a pid, group or session is signalled only when it is a safe integer >= 2 and none of the caller's own; - a folder is scanned only when it is absolute, resolves, and is not `/`, the temporary directory or the home. Sites 1, 8, 9, 10 and 11 are helpers. Each takes the signaller as an argument, so its test records the signal and never sends one. Their mutants are each killed in a run inside `unshare --pid`. Sites 2-7 are in test code: they use the same rule, and the rule's own mutants pin it. Confined runs: the related files pass 825 and fail 8. The same 8 fail on main 37fb64bb when run confined: they are red only inside the pid namespace (#207). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
No kill in martha's tests or probes reaches past what its own code started (martha#205)
All checks were successful
dependency advisories / node in . (pull_request) Successful in 13s
dependency advisories / node in installer (pull_request) Successful in 15s
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Successful in 16s
dependency advisories / node in . (container) (pull_request) Has been skipped
dependency advisories / node in installer (container) (pull_request) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been skipped
dependency advisories / advisories (pull_request) Successful in 0s
c4 model / c4-model-1 (pull_request) Successful in 7s
c4 model / c4-model (pull_request) Successful in 0s
CI / links resolve (pull_request) Successful in 6s
CI / structural floor (pull_request) Successful in 31s
CI / Martha's names are its own (pull_request) Successful in 29s
CI / no import cycle (pull_request) Successful in 28s
CI / the engine drift check bites (pull_request) Successful in 41s
CI / the posted text check bites (pull_request) Successful in 13s
CI / the host drift check bites (pull_request) Successful in 1m24s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 13s
CI / workflows are valid (pull_request) Successful in 17s
CI / gate coverage (pull_request) Successful in 18m1s
CI / installer (pull_request) Successful in 3m49s
CI / nothing private (pull_request) Has been skipped
CI / no test the base passed goes missing (pull_request) Successful in 38s
CI / the pictures change only with the version (pull_request) Successful in 19s
CI / no literal restates a defined value (pull_request) Successful in 1m12s
CI / every check runs in a job (pull_request) Successful in 14s
CI / every job has a timeout (pull_request) Successful in 14s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 42s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 19s
CI / the relay loads in the recorded host (pull_request) Successful in 15m11s
CI / the clean-install proof removes its container (pull_request) Successful in 19m51s
22ce475571
One pure rule, linux_process_identity/what_a_signal_may_reach.ts: a pid,
group or session is signalled only when it is a safe integer >= 2 and
none of the caller's own; a folder is scanned only when it is absolute,
resolves, and is not /, the temporary directory or the home.

Helpers (the signaller handed in, so tests record and never signal):
- 1 stopTheProcessesLeftIn refuses a scratch that is not a run's own,
  and the unresolved fallback is gone;
- 8 killGroup throws on 0, 1 and its own pid;
- 9 signalAGroupWith refuses pid 1, 0 and its own;
- 10 theGroupIn takes >= 2, and runTheHost removes a stale pid file;
- 11 theShellThatWaitsOnUs needs an absolute home.
Test code:
- 2 the pty test waits for a whole pid;
- 3 the installer proof takes a session only once the child leads one
  that is not the test's;
- 4 the session is asserted before it is kept;
- 5, 6 assert the spawn's pid, with no ?? 0;
- 7 the trial guards the survivor's pid.

Threat model: issues/205#issuecomment-5167. Refs #195.
r2: a scan refuses an ancestor of a shared root; a gone scratch is no refusal; every floor asks the rule (martha#205)
All checks were successful
dependency advisories / node in . (pull_request) Successful in 13s
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Successful in 11s
dependency advisories / node in . (container) (pull_request) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been skipped
dependency advisories / node in installer (container) (pull_request) Has been skipped
dependency advisories / node in installer (pull_request) Successful in 14s
dependency advisories / advisories (pull_request) Successful in 0s
c4 model / c4-model-1 (pull_request) Successful in 6s
CI / links resolve (pull_request) Successful in 7s
c4 model / c4-model (pull_request) Successful in 0s
CI / structural floor (pull_request) Successful in 29s
CI / Martha's names are its own (pull_request) Successful in 28s
CI / no import cycle (pull_request) Successful in 30s
CI / the engine drift check bites (pull_request) Successful in 33s
CI / the posted text check bites (pull_request) Successful in 12s
CI / the host drift check bites (pull_request) Successful in 1m19s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 13s
CI / workflows are valid (pull_request) Successful in 13s
CI / installer (pull_request) Successful in 3m48s
CI / nothing private (pull_request) Has been skipped
CI / no test the base passed goes missing (pull_request) Successful in 37s
CI / the pictures change only with the version (pull_request) Successful in 19s
CI / every check runs in a job (pull_request) Successful in 16s
CI / every job has a timeout (pull_request) Successful in 15s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 31s
CI / no literal restates a defined value (pull_request) Successful in 1m16s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 17s
CI / the relay loads in the recorded host (pull_request) Successful in 15m16s
CI / the clean-install proof removes its container (pull_request) Successful in 19m39s
CI / gate coverage (pull_request) Successful in 16m50s
c398d9ac6b
Neptunus r1 (all required) and Mars's fold-in:
- the rule: aPathAMatchMayName refuses '/', a shared root and any
  ancestor of one (the match is by prefix), and always counts
  SYSTEM_TEMPORARY_DIRECTORY, since the suite rewrites TMPDIR.
  aFolderAScanMayTake is built on it. Numbers are read only from
  decimal digits ('1e3' and '0x10' are refused);
- stopTheProcessesLeftIn returns [] for a scratch that is gone (its
  callers are finally blocks), and throws on the other refusals;
- prove_a_clean_install's pid and session floors (:242, :623, :718,
  :674, :785, theSessionItBegan) all go through aNumberASignalMayReach;
- launch_a_claude_code_member's killGroupsCarrying and
  killWhateverNamesTheHome take the signaller and refuse a path every
  process carries.
Mutants R1, R2, P3, L1 and L2 are each killed, confined, with a
recording signaller.
terra manually merged commit bc8c2c2582 into main 2026-11-26 01:32:55 +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!209
No description provided.