Skip to content

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) - #875

Merged
don-petry merged 3 commits into
mainfrom
claude/opening-writer-carbon
Nov 14, 2026
Merged

don-petry merged 3 commits into
mainfrom
claude/opening-writer-carbon

Conversation

@don-petry

@don-petry don-petry commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

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 The opening writer's marks refuse a re-bound path, a shadowed opened or request, and an unformatted path, and assume good faith (#868, record 0215) #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.

Case Result
The job/step split, both import forms Passes
A step that imports apply and calls the writer itself Refused (the Factory Builder's counter-example)
A step that only imports a recorder Refused
A job that opens and leaves the record to its step Refused
A call to a job function that doesn't record Refused
A recorder passed without being called Refused
A silent step that sorts last Refused, 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

Reader Head Result
Carbon #819's 70cd0b5 12 findings, sorted above
Kimi 88f4755 1 finding, not taken: the mutant it named is killed by the existing case. A case with no shadowing parameter was added anyway
Astra 88f4755 1 finding, taken: a silent module that sorts last, now refused, with a mutant for it
Claude + security 1713c6e 1 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

View guided diff Turn on auto-fix

don-petry and others added 3 commits November 14, 2026 01:39
…ow harness/ is not read as from it, and the opening's mutants each break one rule (#808, record 0215)

Carbon's read of PR 819, the findings still open on main. With two steps CALLERS lists as reaching the opening, one
that never calls opened, or cannot be read, is now named, where one that did made the check pass. `from . import
apply` in a module below harness/ resolves there, not to harness, so it records nothing. Tests add a name bound
twice whose last binding is the pulls, PUT and PATCH to the pulls, a POST to one pull request's reviews, opened from
harness.read, and the alias and root cases of harness.apply. Three mutants that broke more than their rule now break
it alone, and eight more hold the rest. A new Boundaries row in record 0215 names them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ame is held without a parameter shadowing harness (#808, record 0215)

Astra: the silent step sorted first, so a check of the first reaching step alone passed; harness/zz_silent.py sorts
last, and a mutant that reads only the first is killed by it. Kimi: the case with a parameter named harness does
kill "harness.apply imported under another name binds harness", since that parameter is harness's one binding; a
case with `harness = ap` at the top kills it too, with no parameter. A case with nothing binding harness is
refused either way, by the name bound once, and is kept as the plain refusal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… function of another that records the opening, as a step calls its job (#808, record 0215)

The Claude+security read: CALLERS lists every module that reaches a writer, the job and the step that calls it, so
the every-step rule refused the Harness's own split. The Factory Builder's ruling: a call edge, never an import. A
module that does not call opened passes when every name it holds for another reaching module, or a function of one,
is called as a function that itself records the opening, at least once, and it imports none of the writers' adapter
modules, names nothing that rebinds unseen, and makes no relative import below harness/. A step that imports apply
and calls the writer itself, one that also calls the adapter, a job's function that records nothing, a recorder
named without a call, and a job that leaves the record to its step are refused; the split passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@don-petry
don-petry requested a review from a team as a code owner November 14, 2026 08:07
@coderabbitai

coderabbitai Bot commented Nov 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@codeant-ai

codeant-ai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

CodeAnt  CodeAnt Review Status

✅  Review completed

Status Commit Started (UTC) Finished (UTC)
✅  #b7e4c Reviewed your PR 68f6c33 Nov 14, 2026 · 08:07 08:16

@codeant-ai

codeant-ai Bot commented Nov 14, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T08:12:26.597600Z 68f6c33 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sonarqubecloud

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the decision documentation and the tools/check_authority.py script to ensure that every Harness module reaching a pull request opening either records the opening itself or calls another module that does. It introduces the _calls_a_recorder helper function and updates records_the_opening and opening_problems accordingly. A review comment suggests optimizing _calls_a_recorder by caching the functions dictionary to avoid repeatedly walking the AST of imported modules.

Comment thread tools/check_authority.py Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 68f6c3371e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tools/check_authority.py Resolved
Comment thread tools/check_authority.py Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 4 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread tools/check_authority.py Resolved
Comment thread tools/check_authority.py Resolved
Comment thread tools/check_authority.py Resolved
Comment thread tools/check_authority.py Resolved
Comment thread tools/check_authority.py Resolved
@codeant-ai

codeant-ai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

CodeAnt  CodeAnt PR Risk

🟢  Low Risk

  • The PR appears safe to merge; the authority check and tests cover direct recording and supported delegation paths.
  • The documented good-faith syntax boundary leaves deliberate adapter-alias evasion to manual approval of opening-role configuration.

Assessed commit: 68f6c3371e45

@combsmith-sf-pr-review combsmith-sf-pr-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No gating findings: each step reaching the opening is now held to record it, or to call a job's function that records it, and every case named has a test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants