Repository navigation
Fork review gate: enforce the owner's rules (#82, #99, #100) - #943
scuttletoby wants to merge 1 commit into
Conversation
The review block of .github/fork-pr-queue.json moves from shadow to enforce: workflow and gate-setting files need the merge-path and state lenses (#82), an open blocker or major fails the head (#99), the approach lens joins from round 3 and round 5 needs a person (#100). No override_authors yet (#78). A dry run over the newest merged pull requests showed the old .github/** rule made seam announcements and test-list lines critical, so plain app changes needed the gate lenses and no code lens. The gate rule now names the .github files one by one; the seam list and the test list stay normal, and a test fails when a new .github file is in neither list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
lens: merge-path · reviewer: lens agent (Opus 5.5) · read at: 0795fae |
|
lens: state · reviewer: state lens agent (Opus 5.5) · read at: 0795fae |
Part of #82, part of #99, part of #100 (see "Why not Fixes" below).
What
The
reviewblock of.github/fork-pr-queue.jsongoes fromshadowtoenforce, for exactly the rules the owner decided on 2026-11-14:gaterule (critical,min_lenses.critical2) needsmerge-pathandstate; everything else isnormaland needscode.blocker:ormajor:line, or has no findings section (findings: true). Only a person's override passes a wrong finding.approachlens is required from round 3 (rounds.approach_at3); past round 4 (rounds.max) only a person's override passes.override_authors. Agents still post from the owner's login, so no override counts yet. A wrong finding is fixed by a new clean report, not by an override.One rule change, found by the dry run.
.github/**made two bookkeeping lists critical:.github/fork-seams.json(seam announcements) and.github/fork-ci-tests.txt(the test list). Most fork pull requests add a line to one of them, so plain app changes needed only the gate lenses and nocodelens. That is wrong under #82, which covers "workflow files or gate settings". The glob dialect has no negation, and the order check refuses a normal rule above a critical one. So the gate rule now names the.githubfiles one by one:.github/*/*/**(every subfolder: workflows, actions, scripts, issue templates, …),*.md,*.td,*.yml,*.yamland each JSON or text setting file. A test walks.githuband fails when a new top-level file is in neither the gate rule nor the two-entry bookkeeping list. So a new gate file cannot stay normal unnoticed. (An earlier.github/*/**draft was caught by that test:**matches zero folders.)What enforce does on the fork today: nothing yet. No fork workflow calls the head gate. There is no gate App (#81) and no
head-gateenvironment, and themainruleset does not requirehead_check. The switch puts the config in its decided end state, so the gate enforces it from its first run once those parts exist. Until then, lens discipline on fork pull requests stays a process rule.Dry run: the newest 22 merged fork pull requests
How it was run: the gate's own
head_check.decide(), with this branch's config forced to each mode. Base = the squash commit's first parent, head = the PR head as merged. Comments and reviews came fromgh pr view/ GraphQL (read-only, about 3 calls per PR). "Old rule" =.github/**.merge-pathreported amajor:(the "Fixes" wording) and no later report cleared it (#99).github/scripts)code r2says NOT SAFE (read as a blocker) and the fix was pushed with no new report (#99). Shadow fails it too: the head is not the read changemerge-path/stateon a seam-announcement PRfork-ci/**)merge-pathread it;statemissing (#82)bsays NOT SAFE; the override came from the owner's login, which does not count yet (#78)a/b(not config names); round 3 withoutapproach(#100)state;codemissing## Lens Acomments (no lens header)fork-release.yml)codesecurity,state; the config namescodecode r3withoutapproach(#100)Under the old rule, 8 more PRs needed
merge-path+stateinstead ofcode. Under the new rule, every refusal has a real cause: the comments do not follow the lens format (the review skill from #845 came later), a lens is missing, a finding is still open, a round is missing, or a push came after the review. Shadow (today's rules) already fails 9 of the 22 (#922 #909 #840 #835 #826 #825 #824 #823 #820). They merged because the fork runs no gate.Tests
review_judge.test.pyForkConfig:enforcewith 3/4 rounds,findingstrue, no override author and no order warning;.githubentry is critical except the two bookkeeping lists, and a new unsorted file fails;code.head_check.test.pyForkConfigRules(+Bare), on a base holding the fork's real config and lens prompts:fork-cichange with onlycodefails, with one gate lens fails, and withmerge-path+statepasses. An app change plus a seam or test-list line passes withcodeand fails with only the gate lenses.major:orblocker:fails, and an owner-login override does not clear it. A report with no findings section fails; a clean report passes.approachand passes with it. Round 5 fails at the cap, and an override does not help with no override author.shadowpasses all three (missing gate lenses, an open major, round 5) and only writes the(shadow)rows.State question
## Lens A) or old lens names (a,security) then fails. It needs new reports in thelens: <config name> · reviewer: … · read at: <head sha>format withblocker:/major:lines (thefork-kit/reviewskill writes them), on its current head. A PR with an open finding needs a new clean report from that lens. A PR past round 4 needs a person's override, which needs Owner question: may your own GitHub login leave the agent machine? #78 first, or it is closed.ci/vNagainst this file. Releases ci/v15–ci/v20 parse this config (they knowroundsandfindingsas keys, and it has nooverride_authors) and enforce the path rules (Owner question: extra reviewer for workflow and gate changes? #82). They do not judge findings or rounds, so Owner question: should the merge gate block a PR when a reviewer reported a blocker or major finding? #99 and Owner question: cap review rounds at 4, then a person decides (override or close)? #100 hold only from ci/v21 (latest ci/v22). A caller must pin ci/v21 or later for all three rules."mode": "shadow". While the base is inenforce, that PR is judged by the enforce rules, so it needsmerge-pathandstate(it changes the config). After it merges, the rows only report, as the shadow test shows.Why not "Fixes"
Each issue is covered as config plus tests. On the fork, though, nothing enforces it until a gate caller, the shared gate App (#81) and a ruleset entry for
head_checkexist. The "a person's override" half of #99 and #100 waits on #78 (override_authorsstays empty while agents post from the owner's login).Docs
fork-ci/actions/pr-queue/README.md("Turning it on"): the fork's config moved from step 3 (shadow) to step 5 (enforce). The step now notes the explicit gate list and the drift test, and says that the fork runs no gate yet.General vs project
.github/fork-pr-queue.jsonand the tests that pin what it decides for the fork.Checks run
review_judge.test.py: 51 OKreview_config.test.py: 51 OKhead_check.test.py: 258 OK, 1 skippedfork-contracts.test.py: 716 okorigin/main: only the pinned seamsvp fmt --checkon the touched JSON and Markdown: clean🤖 Generated with Claude Code