Repository navigation
Kernel: a dependency update needs no model review - #70
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 7 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
d55d3ed to
37d3052
Compare
d9dd2cb to
8a600b3
Compare
A pull request of class `dependency` with green checks waited for a model review, and one was admitted. One function, required_model_lenses, now says which model Lenses an item needs, and both places that read them use it: where the Kernel waits for reviews, and where it reads gating threads. A dependency update needs none. A dependency update is a pull request of a class the configuration names in `model_not_required_for`, whose head was pushed by the identity that opened it. The class is worked out from who opened it; anyone else's push, the author Role's fix among them, puts content of their own in it, and it needs the model review again. The schema lets the configuration name only `dependency`, and a counter-example names `maintainer`. test_a_dependency_update_needs_no_model_review leaves NotYetHeld and asserts both sides. Tests join it for every other class, for a push by someone else, for each deterministic Lens failing or pending (secret-scan and code-scanning judge security), for a person's thread, for a model Lens's thread, and for the order: a Hold, an unknown merge state, a conflict, a Pause and a standing approval still bind. Each place the rule acts has a mutant, and so does each place it could be read too early. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The architect's ruling on the open question: a dependency update needs no model review, and a Finding a model Lens has already raised still gates it, whatever its class. Without that, a bot recreating its branch after someone else's push dropped the thread pr-review had opened on it, security Findings among them. gating_threads reads every configured model Lens again; required_model_lenses stays where the Kernel waits for reviews. test_a_model_lens_thread_gates_a_dependency_update replaces the test that said otherwise, and covers the recreate with the content changed and unchanged; its mutant is inverted to match. This story makes an empty list of deterministic Lenses dangerous: it would approve a dependency update with no check at all. The schema now asks for at least one, with a counter-example. A neutral deterministic check is pinned as not passing a dependency update, with a mutant that lets it pass; what each conclusion means is left to its own story. Decision 0012 gains a row, waiting on adapters, for what the port must hold: last_pusher is who GitHub records as pushing the head, and class dependency is given only for an exact App identity. Design §3.3 says what last_pusher means. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The two configuration counter-examples were drawn before `max_unmerged_closes` joined the limits on main, so each was wrong in two ways. Each is now the configuration on main with its one named fault. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
8a600b3 to
dba2a38
Compare
|
❌ The last analysis has failed. |
Closes the fourth gap of the epic "Epic: nine gaps in the Kernel, found in review": a pull request of class
dependencywith green checks waited for a model review, and one was admitted.Stacks on "Kernel: an unknown merge state defers" (#68), which stacks on "Kernel: a Pause stops approvals and merges, not only Runs" (#67). It will be rebased onto
mainonce they merge.What changes
kernel/derive.py: one function,required_model_lenses(facts, config), says which model Lenses an item needs, and the Kernel uses it where it waits for reviews. A dependency update needs none.A dependency update is a pull request of a class named in
required_lenses.model_not_required_forwhose head was pushed by the identity that opened it. The class is worked out from who opened it, and the last pusher is GitHub's record of the push, not a commit's free-text author. Anyone else's push, including the author Role's fix after a failed check, puts their content in it, and it needspr-reviewagain. No new fact is needed.Following the architect's ruling on the issue, a Finding a model Lens has already raised gates whatever the class:
gating_threadsreads every configured model Lens. A bot that recreates its branch after someone else's push therefore cannot drop a threadpr-reviewopened, a security Finding among them.config/defaults.jsonandschemas/config.schema.json: the new key, as data (§4.2). The schema allows onlydependency;examples/invalid/config.a-change-by-a-person-skips-the-model-review.jsonlistsmaintainerand is rejected.required_lenses.deterministicnow needs at least one entry, with the counter-exampleexamples/invalid/config.no-deterministic-lens.json. This story makes an empty list dangerous: it would approve a dependency update with no check at all. This is criterion 3 of "Kernel: two smaller gaps in what it is given" (Kernel: two smaller gaps in what it is given #39), and it lands here.tests/test_decide.py:test_a_dependency_update_needs_no_model_reviewloses@pending, leavesNotYetHeldand asserts both sides. Seven tests join it:secret-scanandcode-scanningjudge security;neutraldeterministic check does not pass it;tools/mutants.py: seven mutants.33 of 33 killed.
Documents:
adapters/, sayslast_pushermust be the identity GitHub records as pushing the head, never a commit's author or committer. It also says classdependencyis given only for an exact App identity, and a fork is alwaysoutside.last_pushermeans. §4.2, the dependency-update row of §4.6, the glossary's Class entry andconfig/AGENTS.mdsay how a dependency update is recognised.Acceptance criteria (from "Kernel: a dependency update needs no model review")
test_a_dependency_update_needs_no_model_reviewpasses with@pendingremoved.not held yetbeside this test.Left open, on purpose
changed_pathsfact of §3.3 and a set of manifest paths in the configuration._wanted_runreadsmodel[0], which is safe today with one model Lens.neutralconclusion means is not changed here; it is pinned only as not passing a dependency update. That is "What each check conclusion means" (Kernel: what each check conclusion means #35).maintainer, so the tests carry this rule.sim/world.pyis shared with other stories in the epic.Checks and reviews
make verifyandpython3 -m tools.mutantspass on agit archivecopy, which avoids the nested worktrees of "Verify passes in a checkout that holds other worktrees" (Verify passes in a checkout that holds other worktrees #64).neutral. Theneutralmutant survived every test until its test was added.Closes #32
🤖 Generated with Claude Code