Repository navigation
Report a Copilot Review Request That Records Nothing Instead of Waiting It Out - #2046
Conversation
`pr_review.py wait` now reads the pull request's review-request state before its auto-request and compares it with the state the mutation answers with. A request that returns success and leaves neither a pending reviewer nor a new review-request event ends the wait at once as `REQUEST_NOT_RECORDED`, exit 48, naming the Copilot allowance or entitlement as the likely cause, instead of polling the full timeout as if the review were slow. The runbook, `pr-review-conduct`, and the reviewer reference name the state beside the clear-and-re-request recovery, since that recovery does not clear it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A request answered under a login that reads as the reviewer's but is spelled otherwise now reads as unknown rather than unrecorded, so the poll that reports the drift still runs. The docstring states the missing-field contract as the code applies it, and the carried sentence names only the cause observed. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A request the final read shows pending no longer exits 48 beside a digest printing `requested=yes`. The status line names only the observed cause and routes the state to the maintainer, as the carried rule does, and the exit-code list places 48 under 44 as well. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
When a request recorded nothing and the repo-wide quota signal also holds, the wait exits 48, so the note it prints is now the 48 note rather than the quota note, whose --ignore-quota-signal advice cannot clear that state. The test asserts the note text. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A mutation answer that lags the request it reports no longer ends the wait: one read of the pull request confirms the request left nothing before the poll is skipped, and that same read decides the digest and exit 48. A null request-state field is read as unread, the request-state read covers up to 100 pending reviewers, and the stale ranking comment above exit 47 is removed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
An answer reading as unrecorded is read again with the request-state query and judged by the same test, so a request whose event or pending entry lands after the mutation answers is recorded rather than reported as exit 48. The comment saying no re-read follows the request is removed, since one now does. Co-Authored-By: Claude Opus 5.5 <[email protected]>
An answer reading as unrecorded is now confirmed after the first poll delay rather than straight away, so a request GitHub records a few seconds late is polled for instead of exiting 48. The tests pin the delay, its place before the confirming read, and its absence for a recorded answer. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2046 +/- ##
==========================================
Coverage ? 55.89%
==========================================
Files ? 16
Lines ? 7356
Branches ? 0
==========================================
Hits ? 4112
Misses ? 3244
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
It changes critical fleet PR-review automation with eventual-consistency timing semantics, a new exit-code contract, and an explicitly-accepted residual race window, plus fleet-wide governance docs, warranting final human judgment even though no defects were found.
Review effort: Balanced
Findings: None
What changed in this PR
This PR extends pr_review.py wait to distinguish an exhausted Copilot allowance from a merely slow review. Previously, an auto-request that GitHub accepted but recorded nothing (no pending reviewer, no review_requested timeline event) was indistinguishable from a queued review, so the command polled the full --timeout before reporting PENDING. Now the wait compares the pull request's review-request state before and after the request, and after a one-poll-interval settle it exits with a new terminal code 48 / REQUEST_NOT_RECORDED that routes the state to the maintainer. This tooling governs the fleet's automated PR-review loop, and the accompanying governance/reference docs are updated so drivers know that clear-and-re-request does not recover this state.
Changes:
- Add
REQUEST_STATE/Q_REQUEST_STATEfragments and extendM_REQUEST_REVIEWSto readreviewRequestsandREVIEW_REQUESTED_EVENTtimeline items; addnewest_request_eventandrequest_recordedhelpers; reworkrequest_copilot_reviewto return(line, recorded)and re-check once after a settle delay. - Wire the new
recorded is Falsestate intowait: print a note, skip polling, and return exit48ranked above the repo-wide quota signal (47) and below every concrete on-PR reading; update the exit-code docstring. - Document the
REQUEST_NOT_RECORDEDstate in.github/copilot-instructions.md,docs/pr-reviewer-reference.md, and thepr-review-conductskill (source + generated copies + digest), plus comprehensive unit tests.
| File | Description |
|---|---|
| scripts/pr_review.py | Core logic: new state-comparison helpers, reworked request function, exit-code 48 wiring, and docstring. |
| tests/test_pr_review.py | New test helpers (request_state, answer_request, RECORDED) and cases covering recorded/unrecorded/drift/null/lagging paths. |
| docs/pr-reviewer-reference.md | Adds the REQUEST_NOT_RECORDED recovery note next to the clear-and-re-request guidance. |
| .agents/skills/pr-review-conduct/SKILL.md | Authored source: same REQUEST_NOT_RECORDED note appended to the recovery paragraph. |
| .github/copilot-instructions.md | Copilot runbook: documents exit 48 as distinct from the pending-request recovery path. |
| .github/skills/pr-review-conduct/SKILL.md | Generated copy of the skill source (not independently reviewed per generated-file policy). |
| .claude-plugin/fleet-skills/skills/pr-review-conduct/SKILL.md | Generated copy of the skill source. |
| .claude-plugin/fleet-skills/.source-digests/pr-review-conduct | Regenerated source digest for the skill. |
I verified the changed logic: the sole caller of request_copilot_review is updated, the constructed GraphQL documents are brace-balanced and valid, the exit-code precedence in the code matches the docstring (48 after 40/41/46/report_verdict, before 47), both Python files compile, and the added prose contains no mid-sentence semicolons or non-ASCII characters. The known residual race window (an event landing only on the final digest read after the reviewer has left the pending set) was explicitly accepted by the maintainer's decision, so I did not raise it. I found no objective defects to comment on.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
It changes core PR-review automation gate behavior (a new terminal exit code, GraphQL queries, and main() control flow) and carried fleet governance content, and its correctness hinges on GitHub API timing that cannot be fully verified here, warranting final human review.
Review effort: Balanced
Findings: None
…d Effort (#2104) ## Summary Copilot code review's default effort moved from Lite to Balanced on 2026-09-28. Balanced rounds write the `ccr-overview-v2` body with a per-file table and almost never a coverage statement. So `pr_review.py` read every such pull request as `COVERAGE_IS_UNSTATED` (exit 45) and parked it on a maintainer decision (#2103, #2095, #2089, #2082, #2077). Measured over the Copilot rounds on the 40 newest pull requests here, 25 of 29 Lite rounds carried the `fleet-review` marker, against 1 of 22 Balanced rounds. Stating the marker literally in the runbook did not help. A Balanced round on this branch read that instruction, quoted it in its own summary, and still left the marker out. So the tooling now accepts a coverage reading that works at any effort level, instead of depending on one setting. ### The rule A head that no coverage statement reaches, meaning none is stated on it and none is carried to it, now reads `coverage=table` and passes when all of these hold: - A round covering the head has its own file table naming exactly the changed files. - No Copilot round on the pull request, on any commit, states or appears to state partial coverage. The scan reads each round body in 12 ways: raw, entity-decoded, and compatibility-folded, each with tags kept and stripped three ways. A partial found in any reading counts. - The whole review history is in view. - The changed-file list is present, well-formed, non-empty, and within the 100-file window. A statement that reaches the head always wins, so a stated partial still blocks. A pull request that ever had a partial round goes to the maintainer. When no table stands in, the digest prints the reason as `NO FILE TABLE STANDS IN: <reason>`. The rule is stated in `GOVERNANCE.md` "PR Review Etiquette", in the `pr-review-conduct` Merge Gate (source and generated copies), in the runbook, in `scripts/README.md`, and in the script's own docstring and exit-45 message. Measured live with this branch: #2102, #2094, #2088, #2081, #2076, #2050, #2046, #2039 and #2033 read `coverage=table`. #2098, which carries the marker, still reads `full`. ## Known limits, all failing closed unless noted - **Glob rows.** Copilot sometimes collapses generated skill copies into glob rows such as `.../skills/*/references/*.md`, so on those pull requests the table does not match and they go to the maintainer. #2053 and #2021 are examples. - **Marker quoted near digits.** A round that quotes the marker next to digits reads as a partial. That includes this pull request's own first round, so this PR goes to the maintainer. - **Early-closed fences.** A fence that Markdown closes early, through a list item or an HTML block, masks a real table after it. - **Prose partials (fail-open).** A partial worded in prose that none of the patterns anticipate can still pass. The scan narrows this gap but cannot close it. - **Malformed marker before a full one (pre-existing, not introduced here).** On the head, a malformed marker followed by a well-formed full marker is read as full by the existing coverage reader. - **Unpinned readings.** Tests do not pin each of the 12 readings individually, the echoed snippet can carry raw control characters into the digest line, and two docstrings overstate slightly. None of these affects a verdict. ## Verification - `python3 -m unittest discover -s tests`: 1841 tests pass. The new tests were mutation-checked, and each guard fails its test when removed. - ruff, mypy, the prose gate, markdownlint, `build_dist.py --check`, `spec/validate.py`, and the eol gate are clean. - The local strict review ran across several rounds, and the last pass found no fail-open. Its differential fuzz over 150k bodies found nothing the previous commit flagged that this one misses. Its receipt is recorded. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
…pilot Coverage at Balanced Effort (#2105) ## Summary Promotes develop to main, carrying 14 pull requests: - [#2076](#2076) Read the Guard's Token Fallback With a Bash-Aware Context Scan - [#2081](#2081) Keep the Guard's Quote Mask When an Escape Sits Outside the Loop Condition - [#2094](#2094) Reconfigure pr_review.py's Console Streams to UTF-8 - [#2088](#2088) Guard check_settings' Live Read of the Repository Response - [#2102](#2102) Skip a Blockquoted List Marker in the Prose Gate's Dash Rule - [#2104](#2104) Accept a Head Round's Exact File Table as Copilot Coverage at Balanced Effort - [#2098](#2098) Quote the Review Engine's Remaining Bare Shell Placeholders - [#2050](#2050) Hand Unstated Coverage to the Maintainer Instead of Prescribing a Re-Request - [#2046](#2046) Report a Copilot Review Request That Records Nothing Instead of Waiting It Out - [#2053](#2053) State the Python Build Profile by Its Trait, Not One of Its Forms - [#2068](#2068) Strip the CR From configure.sh's Environment-Name Encoding - [#2033](#2033) Bound the Guard's Stdin Descriptor Before int() - [#2036](#2036) Guard ruleset_id() Against Malformed Array Elements - [#2039](#2039) Strip the CR From configure.sh's Workflow-Model Read The lead change is #2104. Copilot code review's default effort moved from Lite to Balanced on 2026-09-28, and Balanced rounds write a per-file table but almost never a coverage statement. `pr_review.py` now accepts a head round's file table as coverage when it names exactly the changed files and no Copilot round on the pull request has ever stated or appeared to state partial coverage. Before this, every pull request reviewed at Balanced effort parked on a maintainer decision. The other pull requests are guard, configure, prose-gate, and review-engine fixes that were waiting on that decision or landed earlier. #2076 leaves #1910, #1958, and #1959 open, per #1960. Closes #1998 Closes #2091 Closes #1260 Closes #1190 Closes #1652 Closes #2047 Closes #1904 Closes #1947 Closes #1882 Closes #2028 Closes #1987 Closes #1881 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Summary
pr_review.py waitnow tells a Copilot review request that recorded nothing apart from a slow review. Before this change it polled the full--timeouteither way.status=REQUEST_NOT_RECORDEDonly when the request still reads unrecorded and the digest read does not show the reviewer pending. That status names an exhausted Copilot allowance as the likely cause and routes it to the maintainer..github/copilot-instructions.md,docs/pr-reviewer-reference.md, and thepr-review-conductskill (source and generated copies) name this state next to the clear-and-re-request recovery. Clearing and re-requesting does not fix this state.The one-interval confirmation follows the maintainer's answer on #2024. The earlier note-precedence fix follows #1978.
Verification
python3 -m unittest discover -s tests: 1805 tests, all pass.build_dist.py --check,spec/validate.py,repo_gate.py, and the prose gate on the branch diff.Closes on promotion: #1904
🤖 Generated with Claude Code