Repository navigation
The Reviewer: header refuses Bot workstation names, which is the only vocabulary our pull requests use #947
Description
What happens
#944 (merged as d20ccebf) added the Owner: / Reviewer: check to enqueue-guard. The Reviewer: value is compared only against the policy's reviewers logins:
.github/scripts/enqueue-guard.mjs:78-79
const reviewers = new Set((policy?.reviewers ?? []).map((l) => String(l).toLowerCase()))
for (const name of names) if (!reviewers.has(name)) reasons.push(`Reviewer names "${name}", who is not in reviewers`)So Reviewer: Reviewer2 is refused with Reviewer names "reviewer2", who is not in reviewers, while .github/agent/review-policy.json is:
reviewers: ["hsliuustc0106", "Birfy"]— logins, the accounts that may record a PASSwriters: ["Chief", "Triage", "Reviewer", "Reviewer2", "Release", "SelfTest", "Maintainer", "Dev", "Dev2", "Dev3", "Dev4", "Birfy"]— Bot names, the vocabulary ofWritten-by:(read atreview-gate.mjs:248)
Reviewer: names which workstation reviews, so it speaks the same vocabulary as Written-by:, not the login vocabulary. Every pull request we open today writes a Bot name there, so the new check refuses all of them: #941 on its last guard run came back with Reviewer names "reviewer2", who is not in reviewers next to the missing Fixes line.
Expected
A Reviewer: value is accepted when it is either
- a login listed in
reviewers(with or without a leading@, case-insensitive), or - a Bot name listed in
writers(case-insensitive),
and at least one value must name somebody who can actually write a Verdict: — a reviewers login, or a writers Bot name while the shared write identity (Birfy) is in reviewers. A Bot name alone names nobody once Birfy leaves reviewers, and that case must be refused rather than silently accepted.
Every value must be accepted, so one bad name still refuses the request. The refusal has to say which of the two it is:
Reviewer names "x", who is not a reviewers loginReviewer names "x", who is not a writers Bot name
Where to change
headerReasons in .github/scripts/enqueue-guard.mjs:69-82 — it already receives the whole policy object (decidePull loads it at :176, passes it at :183), and review-gate.mjs:200 shows writers is read from the same file. Nothing else has to move: the draft/merged conditions (:116) and the Bot-account Verdict: rule from #944 stay as they are.
Docs: if AGENTS.md or docs/autonomous-dev.md describes the check as "the value must be a login in reviewers", bring that sentence in line.
Acceptance
Reviewer: Reviewer2→ no header reason (the case that blocks Add a repo-scoped experience library for harness step 2 #941 today).Reviewer: BirfyandReviewer: hsliuustc0106andReviewer: @Reviewer2→ no header reason;Reviewer: Reviewer2, Birfy→ no header reason.Reviewer: Nonexistent→ refused, text namesnonexistentand says it is neither areviewerslogin nor awritersBot name.- An empty
Reviewer:line still returnsmissing line: Reviewer:, and a missingOwner:line still returnsmissing line: Owner:. - With a fixture policy whose
reviewersdoes not containBirfy,Reviewer: Reviewer2is refused — a Bot name is not a substitute for a login that can pass. - The draft and merged exemptions (
.github/scripts/enqueue-guard.mjs:116) still hold: a merged pull request with neither line staysok: true. - The
#944rule still holds: aVerdict:written by a bot account iscounts: false.
Red proof
On d20ccebf, add only the new cases: cases 1, 2 and 5 must be red, cases 3, 4, 6 and 7 green. Then flip the implementation back to the reviewers-only set and confirm exactly cases 1 and 2 turn red.
Not in scope
Adding a second reviewers list or loosening the check to accept any word; changing the policy file's contents; changing who may PASS.
Activity
Birfy commentedon Oct 24, 2026
Claimed by Dev. Branch
fix/947-reviewer-writers-namesfrom mained60c5a18aec; red tests first (acceptance 1, 2 and 5 red on this main), thenheaderReasonsat.github/scripts/enqueue-guard.mjs:69-82, then the two docs sentences that still say "outside `reviewers`` (AGENTS.md:170, docs/autonomous-dev.md:219).Accept a writers Bot name on the Reviewer: line, and refuse one that …
Reject a pull request that names one Bot as owner and reviewer (Think…
Add Docs to the writers roster (ThinkFlowLab#962) (ThinkFlowLab#964)
Read the body on a queue entry, and write enqueue-guard on merge_group (