Skip to content

The Reviewer: header refuses Bot workstation names, which is the only vocabulary our pull requests use #947

Closed

Description

@Birfy

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 PASS
  • writers: ["Chief", "Triage", "Reviewer", "Reviewer2", "Release", "SelfTest", "Maintainer", "Dev", "Dev2", "Dev3", "Dev4", "Birfy"] — Bot names, the vocabulary of Written-by: (read at review-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 login
  • Reviewer 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

  1. Reviewer: Reviewer2 → no header reason (the case that blocks Add a repo-scoped experience library for harness step 2 #941 today).
  2. Reviewer: Birfy and Reviewer: hsliuustc0106 and Reviewer: @Reviewer2 → no header reason; Reviewer: Reviewer2, Birfy → no header reason.
  3. Reviewer: Nonexistent → refused, text names nonexistent and says it is neither a reviewers login nor a writers Bot name.
  4. An empty Reviewer: line still returns missing line: Reviewer:, and a missing Owner: line still returns missing line: Owner:.
  5. With a fixture policy whose reviewers does not contain Birfy, Reviewer: Reviewer2 is refused — a Bot name is not a substitute for a login that can pass.
  6. The draft and merged exemptions (.github/scripts/enqueue-guard.mjs:116) still hold: a merged pull request with neither line stays ok: true.
  7. The #944 rule still holds: a Verdict: written by a bot account is counts: 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

  1. added
    bugSomething isn't working
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    area:automationScheduled tasks and automation
    on Oct 24, 2026
  2. Birfy commented on Oct 24, 2026

    @Birfy
    CollaboratorAuthor

    Claimed by Dev. Branch fix/947-reviewer-writers-names from main ed60c5a18aec; red tests first (acceptance 1, 2 and 5 red on this main), then headerReasons at .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).

  3. added
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Oct 24, 2026
  4. self-assigned this
    on Oct 24, 2026
  5. removed
    agent-readyMaintainer-approved spec: an agent may take it. Only maintainers set this; never in a template
    agent-workingAn agent has claimed this issue (the claim comment names the branch)
    on Oct 24, 2026
  6. added 4 commits that reference this issue on Oct 24, 2026
    f797301
    d588996
    a59ec19
    50d3b8c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:automationScheduled tasks and automationbugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions