Conversation
## What `copilot_history` reads the Copilot reviewer's own review and comment history from the repository's 20 most-recently-updated pull requests (`HISTORY_PRS`), feeding both `wait`'s auto-request bot id and its repo-wide quota signal. An outage that outlasts that window leaves every one of those pull requests silent, so both readings fall back to blind polling for the rest of the outage with no way to tell that outage apart from a repository that has simply never seen a Copilot review. Reproduced today on PRs #981-984: the fast exit-46/47 quota detection worked for the first two waits, then the 20-PR window emptied out and every wait after it fell back to a full ~2700s blind poll before reporting `PENDING`. Fixes #985: `copilot_history` now retries once at a wider `HISTORY_PRS_WIDE` (100, GitHub's own per-connection ceiling) whenever the narrow window comes back with nothing at all, and only then, so the ordinary case still costs one call. `Q_BOT_ID` takes its PR count as a GraphQL variable instead of a baked-in literal, so the narrow and wide reads share one query text. Also addresses #973 in the same pass, since it sits in the same digest/`Q_FULL` code the widen fix touches: `reviewThreads(first:100)` carried no `hasNextPage` tracking at all, so a pull request with more than 100 review threads silently undercounted `threads=`/`unresolved=` with no signal anything was cut. `threads=` now prints a trailing `+` and a `THREADS TRUNCATED` block names the gap, rather than a full cursor-paginated read of the connection (the heavier of the two fixes the issue suggested), since the tracked reviewers on this repository have never come close to 100 open threads on one pull request. ## Verification - `python3 -m unittest discover -s scripts/tests`: 846 passed (7 new, covering the widen retry at both the `copilot_history` and `wait` CLI level, and the truncation guard at both the `threads_truncated` and `digest` level). - `uvx ruff@latest format --check .` / `check .`: clean. - `uvx mypy@latest`: clean. - `python3 scripts/prose_lint.py scripts/pr_review.py scripts/tests/test_pr_review.py`: clean. - `python3 scripts/repo_gate.py --check eol` / `--check sha-pin`: clean. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Review summaries now indicate when results are incomplete due to thread limits. * Repository-wide history checks automatically search a broader pull-request range when recent activity is not found. * Status messages clearly report the search ranges being checked. * **Bug Fixes** * Improved detection and reporting of incomplete review-thread results. * More reliably identifies available Copilot history across pull requests. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
PR Summary by QodoImprove Copilot History Fallback and Flag Truncated Threads
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe review flow detects truncated review threads and marks related counts. Copilot reviewer lookup widens repository history from 20 to 100 pull requests when the narrow search finds no activity. ChangesReview status flow
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The changes improve reviewer-activity fallback handling and make review-thread truncation visible; no actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Code Review by Qodo
1.
|
qodo flagged two semicolons in #986's new prose (PR #991's promotion review) that violate the fleet's no-semicolon-in-prose rule (comment-and-doc-style). Recast each as two sentences: - `request_copilot_review`'s no-bot-id fallback message - the `THREADS TRUNCATED` digest block Not squashed into #986 since it already merged; this is a small follow-up onto develop. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** * Improved punctuation in diagnostic messages for clearer readability. * Clarified the thread-truncation warning and pagination instruction. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Promotes #986 (issues #985, #973) to
main.What
copilot_historywidens its Copilot-reviewer-bot-id/quota lookbackfrom 20 to 100 most-recently-updated pull requests once the narrow
window comes back with no reviewer activity at all, so a long
outage no longer reverts
waitto a full blind poll on every call(pr_review.py wait's quota-detection lookback ages out during a long Copilot outage #985).
Q_FULL'sreviewThreads(first:100)now trackshasNextPage, andthreads=/unresolved=print a trailing+with aTHREADS TRUNCATEDblock when a pull request carries more than 100 reviewthreads, rather than undercounting silently (pr_review.py: reviewThreads(first:100) has no pagination, so unresolved counts can undercount #973).
Review
PR #986 review loop: CodeRabbit and qodo reviewed, three findings
raised and closed (two fixed, in cbb1bbc; one declined with evidence
of pre-existing precedent in the file, resolved with authorization).
Copilot's own review account is in the fleet's known repo-wide quota-
exhausted state (confirmed live via the fixed
waititself, in 6srather than the ~45-minute blind poll the unfixed version would have
spent), so this proceeded on the other two reviewers' coverage per
standing precedent.
Summary by CodeRabbit
New Features
Bug Fixes