process: Copilot review check: judge by whether a review arrives, not by its message
Back to our planType
process
Summary
The review skill's step 0 says how to tell when GitHub Copilot's review agent is out, so a fresh reviewer session takes over. Today it leans on the words Copilot posts. Those words aren't documented and can change. This issue makes the check rest on what actually happens: Copilot is available only if its review shows up on the PR's current head within the wait.
Filed at the owner's request (2026-11-07, relayed by the Claude Code session that filed this). It refines the merged rule from #779.
Problem
.agents/skills/pr-review/SKILL.md step 0 ("How to tell") counts Copilot as out when it posts a message about quota or limits, or when no review appears after a wait. Matching message text is fragile: GitHub doesn't document the message, so a reworded one would be missed, and a message can be missing altogether.
What was checked for a machine-readable signal:
- GitHub's REST endpoint Get billing premium request usage report for a user, opens in a new tab (
GET /users/{username}/settings/billing/premium_request/usage) needs the fine-grained Plan user permission and covers only a Copilot plan the person bought themselves (not one billed through an organization). It reports what was used (gross, discount and net quantities and amounts). It has no field for the remaining allowance or for a budget block. - The token in cloud sessions is scoped to the repository and can't call user-level paths at all.
- So there is no reliable signal here that says "Copilot is blocked". What we can always observe is whether its review arrived.
Proposed fix
Rewrite step 0's "How to tell" around the observed outcome, as principles (no dates, no "until ...", no figures from one session):
- Primary signal: the outcome. Request Copilot's review when the PR leaves draft, then wait the skill's set time. Copilot counts as available only if a Copilot review exists on the PR's current head within that wait. No review on the current head after the wait means out, whatever any message says or doesn't say.
- Secondary evidence only. A Copilot message saying it couldn't review, and the usage report (only where a token with the right permission exists), may explain why. They never override the outcome: a "can't review" message with no review is out; no message and no review is also out.
- Once out, stop waiting. Later PRs in the same session skip the wait and go straight to the fallback, but re-test Copilot periodically (request it again on a later PR) rather than assuming it stays out for good.
- The fallback is unchanged. It is always a fresh reviewer session or a new subagent that didn't write the PR, running the whole skill, and never the author's own session.
- Record on the PR which signal decided it (review present, or none after the wait).
Keep the rest of step 0 (which session, which model, how the review is posted) as it is.
Native first: GitHub's own review list on the PR is the signal; nothing new is built.
Acceptance criteria
- Not done: Step 0 makes "a Copilot review on the current head within the wait" the test for available, and its absence after the wait the test for out.
- Not done: Message text and the usage report are described as secondary evidence that can't override the outcome, and the skill says the usage report has no remaining-allowance field and needs a token with the Plan permission.
- Not done: Once out, later PRs in the session skip the wait, with a periodic re-test stated as a principle (no dates or fixed counts).
- Not done: The fallback is still a fresh session or subagent, never the author's session.
- Not done: No dates, quoted messages, quota figures or "until ..." in the rule text.
- Not done: Reviewed as a policy change;
PR Policy,PrettierandAgent contextpass.
Files likely touched
.agents/skills/pr-review/SKILL.md(step 0 only)
Must not touch
- The rest of the review skill,
CLAUDE.mdand the agent definitions in.claude/agents/.
Open questions
None.
Area
tooling, ci
Priority
medium
Generated by Claude Code, opens in a new tab