Stop Excluding the Current PR From the Repo-Wide Quota Signal - #972
Conversation
The prior fix (PR #969) excluded the current pull request's own history entries from quota_signal entirely, reasoning that its own head is already read directly. That reasoning covers the current head only: a genuine Copilot review on an *earlier* head of the same pull request, superseded since by a push, is real evidence about the account, not a self-reference to discard. Excluding it could let a strictly older refusal on some other pull request read as the newest activity instead, producing exit 47 even though this pull request's own more-recent history says otherwise. Reverted to passing quota_signal the same unfiltered history copilot_bot_id already reads. A refusal on this pull request's own current head still never reaches this signal at all: it is caught directly, at higher priority, before either reading is consulted. Replaced the test that exercised the exclusion with one proving the scenario it got wrong (a genuine review on this pull request's own earlier head correctly outranks an older refusal elsewhere) and one documenting the accepted symmetric case (this pull request's own older refusal is exactly as much evidence as anyone else's). 274 tests (2 new), ruff, ruff-format, mypy, and prose_lint all clean. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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 (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthrough
ChangesQuota history evaluation
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk:⚪ Minimal · up to This localized change restores the quota signal's intended history handling, with the reported test and lint checks passing; no actionable merge-blocking risk remains beyond normal review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
PR Summary by QodoStop excluding current PR history from repo-wide quota_signal
AI Description
Diagram
High-Level Assessment
Files changed (2) |
Uh oh!
There was an error while loading. Please reload this page.
Code Review by Qodo
1. Wrapped sentences in copilot_history docstring |
Qodo finding on PR #970 (the develop -> main promotion PR, whose head is
develop so this fix lands here first): the prior fix that excluded the
current pull request's own history from
quota_signal(PR #969) over-corrected. A genuine Copilot review on an earlier head of the same
pull request, superseded since by a push, is real evidence about the
account rather than a self-reference to discard, and excluding it could
let a strictly older refusal elsewhere read as the newest activity
instead.
Reverted
quota_signalto read the same unfiltered historycopilot_bot_idalready does. A refusal on this pull request's owncurrent head still never reaches this signal: it is caught directly, at
higher priority, before either reading is consulted.
274 tests (2 new), ruff, ruff-format, mypy, and prose_lint all clean.
Summary by CodeRabbit