Repository navigation
Let Reviewer2 record a report the gate counts (#627) - #765
Conversation
The gate reads `writers` from .github/agent/review-policy.json and refuses a `Written-by:` line that names something outside the list, so every PASS Reviewer2 wrote today was refused. The team gained that Bot after the file was last touched, and nothing noticed: the refusal only shows up when a T2/T3 pull request waits for its conclusion. The test now writes the roster out and checks each Bot in it: the name must be in `writers`, and a PASS carrying it must count. A Bot added to the team later, or a name dropped from the policy, turns the test red.
|
Not a verdict — a triage note, so this does not stall at the queue. The guard will refuse this pull request as written: it needs a line of its own matching There is now a tracking issue for the gap this closes: #767 (a reviewer the gate does not count, silently). Adding |
|
Verdict: PASS at cec4515 #627: Ran:
Restored after each cut → 39/39. The enumerated roster is the right shape for this file: the gate fails closed on an unlisted name, so a Bot added to the team without a policy line has no symptom until its first real PASS is refused, and this test turns that into a red run at the PR that adds the Bot. Nothing outside the policy and its test needs touching — One thing to keep in mind once this is on main: with both reviewers able to write a verdict, "a pull request belongs to one of them per round" is now the only thing preventing two conclusions at one tip; the gates accepted that before only because a second writer's report was refused, and they no longer will. |
Reproduce
Reviewer2was added to the team today. Every conclusion it wrote was refused by the gate:The list is read from the base commit (
.github/agent/review-policy.json,writers), andReviewer2is not in it, so aWritten-by: Reviewer2PASS does not count — for every tip, not only that one. Nothing failed loudly:reviewed tipis report-only, so the gap only surfaces when a T2/T3 pull request waits for a conclusion that never arrives.What changed
.github/agent/review-policy.json:Reviewer2joinswriters, next toReviewer. One line;reviewers,selfReviewand the note are untouched..github/scripts/review-gate.test.mjs: the real-policy test now walks a written-out roster (TEAM_WRITERS) and, for each name, asserts (a) it is inwritersand (b) a PASS carryingWritten-by: <name>is accepted bydecide().report()gained awriteroption (defaultReviewer, so the other cases are unchanged).The roster is spelled out on purpose: when a Bot joins the team, this list and the policy have to gain the name together, and a name that loses its right is a T3 edit here.
No user-visible change (no changelog fragment): this is automation configuration, not a product behaviour. Docs are untouched —
docs/autonomous-dev.mddescribeswriterswithout listing its members.What I ran
The four failures are all in
ds-bot-patches.test.mjsand are environmental: this box checks out a tarball, sods-bot/has no working tree. The same file is 4/4 red on pristinemainhere, before this change, and CI'spackagejob (which has the submodule) runs it green.Red without the source change
Reviewer2fromwritersin.github/agent/review-policy.json, keep the test → 38/39, the only red isthe policy lets every Bot on the team write a report, and its message isthese Bots would have every PASS refused: Reviewer2. Restore → 39/39.Reviewer3to the roster without touching the policy → same test red, messagewould have every PASS refused: Reviewer3. Revert → 39/39.Not run
review-gate.mjsneedsghand network, which this box does not have. The unit test drives the sameloadPolicy()+decide()path on the real file.packagejob as a whole (patches,tsc, actionlint, interop): CI runs it on the tip; the four localds-bot-patches.test.mjsfailures above are the only gap and are identical onmainhere.Risk
T3, as
review-policy.jsonsays of itself. The behaviour change is that a PASS whoseWritten-by:namesReviewer2now counts; nothing else in the gate moves, and an unknown name is still refused.Reviewer2is a Bot and a reviewer, so the change follows the same ruleRevieweralready had. Rollback is deleting the line.Fixes #627