Every Harness module that reaches the opening records it, or reaches it only through a call into one that does (Carbon on #819, record 0215)

Merged
DO
6d ago
+179-18

Follow-on to #819 (record 0215), from Carbon's read of #819, which merged before Carbon could read it. Per the Factory Builder, findings on a merged pull request go in a follow-on.

Carbon's 12 findings on #819, sorted against main

  • Already fixed by #870 (2): a module-level name read in the function's scope, and bindings other than assignment.
  • Not real (2):
    • The pulls path is matched whole (fullmatch). This PR adds a case for POST to /repos/%s/pulls/1/reviews.
    • "A step need not record the opening" wasn't a weak mutant. It is retargeted anyway, because its line changed.
  • Declined (2): annotated assignments, and ..apply at level two. Both only refuse a valid writer; record 0215 accepts that.
  • Fixed here (6):
    • double binding tested with the valid path last;
    • steps that reach the opening without recording it (below);
    • opened from another Harness module, and relative imports below harness/;
    • three weak mutants replaced with targeted ones: verbs other than POST, asname, and the harness root;
    • missing cases for import harness.apply as …, other.apply.opened and harness.read.opened.

The rule for modules that reach the opening (confirmed by the Factory Builder, 2026-11-14)

tools/check_writes.py's CALLERS lists every Harness module that reaches the opening writer. Before, one recording module was enough, so a second one could skip opened.

Now each one must record the opening, with one exception. A module that doesn't call opened passes only if it reaches the opening solely by calling a function of another reaching module that does, the way approve_step calls approve.job. It must also hold to all of these:

  • it calls no writer directly, and imports none of the opener's adapter modules;
  • every name it holds for such a module is used only as a call;
  • it names nothing from the dynamic-rebinding list;
  • it makes no relative import below harness/.

Importing a recorder never counts. A module that can't be parsed is silent. A chain longer than one step fails closed.

CaseResult
The job/step split, both import formsPasses
A step that imports apply and calls the writer itselfRefused (the Factory Builder's counter-example)
A step that only imports a recorderRefused
A job that opens and leaves the record to its stepRefused
A call to a job function that doesn't recordRefused
A recorder passed without being calledRefused
A silent step that sorts lastRefused, and named

This stays within 0215's "a step that records nothing does not count". The new Boundaries row says so, and no existing row changes.

Held by

  • tests/test_tools.py::test_a_role_named_to_open_pull_requests_waits_on_its_writer.
  • All 153 mutants of tools/check_authority.py and tools/check_examples.py are killed; 16 of them are new or retargeted.
  • make checks passes on this head, with main merged in.

Second readers

ReaderHeadResult
Carbon#819's 70cd0b5f12 findings, sorted above
Kimi88f475521 finding, not taken: the mutant it named is killed by the existing case. A case with no shadowing parameter was added anyway
Astra88f475521 finding, taken: a silent module that sorts last, now refused, with a mutant for it
Claude + security1713c6ec1 major, taken: CALLERS lists modules, so the every-step rule refused the Harness's own job/step split. That led to the call-edge rule above, which the Factory Builder tightened from "imports a recorder"
Carbon on this follow-on—not run: owed, given this week's quota
Muse—not run (quota: the window resets 2026-11-16), owed

šŸ¤– Generated with Claude Code