martha#344: a reading hold holds every Developer tool that reads; an exact kept line says so #350

Manually merged
terra merged 2 commits from venus/344-reading-holds into main 2026-12-01 10:04:05 +00:00
Member

Refs #344 (threat model and Done-when: #344 (comment))

  • Reading hold. A deny or ask on Read, Read(./.env), Grep or Glob now holds every Developer tool that the recorded hints do not mark as writing, the shell aside: tree, view and read_image. This applies whether the launch's rules, a keep or an /allow-always would run the call (theReadsHeld in the_rules_for_a_launch.ts). No tool name is written into the code.
  • Glob. The owner's reading tools are now READ_ONLY_TOOLS (Read, Grep, Glob, src/shell_tools). The launch and the tests read that through a single theLaunchsNamingIn. #969's CLAUDE_CODE_READING_TOOLS is left as it is.
    • Side effect: a Glob deny or ask no longer counts as "another tool", so it holds the readers and no longer holds write or edit.
  • Receipt. A whole kept shell line is printed as Bash(<line>) (this line exactly), so an exact ls :* cannot be read as Bash(ls:*).

Tests, each seen red against its mutant:

  • One test per reading tool (Read, Read(./.env), Grep, Glob), each with deny and ask, and each with keep and /allow-always.
    • Narrowing the hold back to the reads alone fails all 4.
    • Dropping Glob fails the Glob test only.
  • The receipt test fails when the exact-line mark is dropped.

Local at ee691cb6:

  • tsc and lint clean.
  • npm test: 169 + 5918 pass, 0 fail.
  • check:private, restated-values, marthas-names, no-import-cycle and base-tests (510 files) clean.
  • No new check or job.
Refs #344 (threat model and Done-when: https://git.macula.io/martha-ai/martha/issues/344#issuecomment-7109) - **Reading hold.** A deny or ask on `Read`, `Read(./.env)`, `Grep` or `Glob` now holds every Developer tool that the recorded hints do not mark as writing, the shell aside: `tree`, `view` and `read_image`. This applies whether the launch's rules, a keep or an `/allow-always` would run the call (`theReadsHeld` in the_rules_for_a_launch.ts). No tool name is written into the code. - **Glob.** The owner's reading tools are now `READ_ONLY_TOOLS` (`Read`, `Grep`, `Glob`, src/shell_tools). The launch and the tests read that through a single `theLaunchsNamingIn`. #969's `CLAUDE_CODE_READING_TOOLS` is left as it is. - Side effect: a `Glob` deny or ask no longer counts as "another tool", so it holds the readers and no longer holds write or edit. - **Receipt.** A whole kept shell line is printed as `Bash(<line>) (this line exactly)`, so an exact `ls :*` cannot be read as `Bash(ls:*)`. **Tests**, each seen red against its mutant: - One test per reading tool (Read, Read(./.env), Grep, Glob), each with deny and ask, and each with keep and /allow-always. - Narrowing the hold back to the reads alone fails all 4. - Dropping Glob fails the Glob test only. - The receipt test fails when the exact-line mark is dropped. **Local at ee691cb6:** - tsc and lint clean. - npm test: 169 + 5918 pass, 0 fail. - check:private, restated-values, marthas-names, no-import-cycle and base-tests (510 files) clean. - No new check or job.
A deny or ask on Read, Grep or Glob now holds every Developer tool the recorded hints do not mark as writing (tree,
view and read_image), whether the launch's rules, a keep or an /allow-always would run it. Glob joins the owner's
reading tools through READ_ONLY_TOOLS, which the launch and the tests now read through one theLaunchsNamingIn.

The receipt of a whole kept shell line ends in "(this line exactly)", so `ls :*` kept exactly no longer reads as the
prefix rule Bash(ls:*).

Refs #344
terra manually merged commit 8d0d79c951 into main 2026-12-01 10:04:04 +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!350
No description provided.