Skip to content

Let a Round on the Head Outrank pr_review.py wait's Repo-Wide Quota Reading - #2784

Merged
ptr727 merged 11 commits into
developfrom
feature/auto-2781
Oct 11, 2026
Merged

ptr727 merged 11 commits into
developfrom
feature/auto-2781

Conversation

@ptr727

@ptr727 ptr727 commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

pr_review.py wait decided its repo-wide quota arm, exit 47 with status=COPILOT_QUOTA_EXHAUSTED_REPO_WIDE, from repository history read when the wait began. At the timeout that arm ranked above the final read of the pull request, so a genuine round covering the head below --min-rounds still printed that the head carried no Copilot review of its own.

  • A new standing_quota reads the repo-wide quota signal as this pull request's own read leaves it. It is None where a genuine round covers the head. Otherwise it runs quota_signal over the history merged with this pull request's own reviews, so a review of it on any head submitted after the refusal answers that refusal, the way one anywhere in the repository would.
  • wait calls it on the opening snapshot, which gates the auto-request skip and the poll skip, and on the final read, which gates the 47 arm. A round landing during the wait that --min-rounds does not credit now reads as the existing min-rounds PENDING line, exit 30. A push moving the head off the reviewed commit still reaches 47.
  • history_entry and newest_first are pulled out of _copilot_history_window so the merge spells the entry and the order the same way.
  • The wait help text says all of this, that the auto-request skips only a head covered past --min-rounds, and that 48 ranks under 46 and above 47.
  • Tests cover the issue's constructed example on the head and on a superseded head, a round already on the head, a push off the reviewed head, a newer genuine round and a newer file-count refusal on a superseded head, and an off-head round newer than the refusal at the opening read. Each was proven by reverting the clause it targets.

Local strict review

The local passes' findings were each fixed in a later push, and the last pass over the current head found none. One was declined: a pass asked to keep skipping the request where a head's round predates a quota refusal elsewhere. The issue rules 47 out for a head carrying a genuine round, and skipping the request and poll there leaves the wait ending at once on a bare 30 that no later wait changes, so the request runs as usual.

Closes on promotion: #2781

🤖 Generated with Claude Code

ptr727 and others added 3 commits October 11, 2026 01:27
…eading

The 47 arm read a quota signal taken when the wait began and fired even
where the final read showed a genuine Copilot round on the head, below
--min-rounds, printing that the head carried no review of its own. It now
fires only where the final read shows no such round, and the wait falls
through to its min-rounds PENDING line instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The quota reading skipped the request and the poll on a head that already
carried a genuine round, so with the 47 line gated the wait ended at once on
a bare pending line. The reading is now not taken where the wait's opening
snapshot shows a genuine round on the head, and the tests cover a round
landing on a superseded head as well.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI lite review requested due to automatic review settings October 11, 2026 08:38
@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 874316c7-4f9e-45f8-a8a1-ae22df2763e5

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Dropping the reading where the opening snapshot showed a head round left the
final 47 arm unreachable after a push moved the head during the wait. The
reading now stands, and only the request skip and the poll skip are gated on
the opening snapshot. The request comment and the help text wrap follow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ptr727 ptr727 added the comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses label Oct 11, 2026
@codecov

codecov Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@f65e325). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #2784   +/-   ##
==========================================
  Coverage           ?   60.16%           
==========================================
  Files              ?       16           
  Lines              ?     8442           
  Branches           ?        0           
==========================================
  Hits               ?     5079           
  Misses             ?     3363           
  Partials           ?        0           
Flag Coverage Δ
python-3.13 60.16% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The quota signal can be lost during a head change, and a help-text line exceeds the repository limit.

2 open findings
What changed in this PR

Updates pr_review.py wait so genuine reviews on the current head take precedence over repository-wide quota signals.

Changes:

  • Refines quota handling and wait documentation.
  • Adds regression tests for current and superseded heads.
  • Open issues remain in quota-signal preservation and help-text line length.
File Summary
scripts/​pr_review.py Updates wait decision logic and help text; preserves quota signals and wraps documentation within the configured limit.
tests/​test_pr_review.py Adds regression coverage for quota precedence and head-review scenarios.

🧠 Review effort: Lite


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/pr_review.py Resolved
Comment thread scripts/pr_review.py Resolved
ptr727 and others added 7 commits October 11, 2026 01:43
A genuine round on this pull request newer than the refusal answers it, as
quota_signal reads one anywhere, so the 47 arm no longer fires after a push
left such a round off the head. The 47 and 48 help text now state their order.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The 47 gate spelled the answered-refusal rule a second time and dropped every
refusal, so a newer file-count refusal on this pull request left 47 firing.
It now runs quota_signal over the history and this pull request's reviews.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The final 47 gate rebuilt the history entry and its newest-first order inline,
already without the kind tag. Both now come from one helper each. The 48 help
text ranks it under 46, which an --ignore-quota-signal request can meet.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The opening gate read the quota signal from the history window alone, which
can leave this pull request out, so it could skip the request and the poll on
a refusal the final gate then read as answered, ending on an instant bare 30.
Both gates now call standing_quota, which merges this pull request's reviews.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ptr727

ptr727 commented Oct 11, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head f33f78db7dc03a8a4ecffdcdeac1cb0d37842395, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@ptr727
ptr727 merged commit adc6c0c into develop Oct 11, 2026
13 checks passed
@ptr727
ptr727 deleted the feature/auto-2781 branch October 11, 2026 09:18
ptr727 added a commit that referenced this pull request Oct 11, 2026
…ilure Reporting Fixes to Main (#2816)

## Summary

Promotes these pull requests from develop to main:

- #2832 Require Every CLI Script to Answer Help and Refuse Unknown
Arguments
- #2833 Exempt nopep8 as a Leading Directive in the Prose Gate
- #2815 Bind the Workspace-Edit Rule Only to an Agent Running Inside VS
Code
- #2813 Record HomeAssistant-Config's Incidental Python as a driftNote
- #2827 Read nopep8 in Any Letter Case in the Prose Gate
- #2825 Spend a Head Refusal a Later Genuine Round on That Head Answers
- #2819 Read noqa and CSpell Directives in Any Letter Case
- #2814 Judge the Prose in Front of a Trailing noqa or pylint Directive
- #2811 Name Why a Windows Tool Install Failed and Print Docker's Status
in UTF-8
- #2808 Read a Tool Name as a Prose Gate Directive Only Where It Opens
the Comment
- #2802 Name a File the Prose Gate Cannot Decode in Its Scope Line
- #2800 Read a First-Line Comment After a Byte Order Mark as Leading in
Every Language
- #2797 Name a Python File the Prose Gate Cannot Parse in Its Scope Line
- #2794 Let the Unattended Orchestrator Retry a Transient Dispatch
Failure
- #2792 Close the Remaining Blocked-Promotion Gaps in the Unattended
Worker
- #2790 Read a Carried Change Set Past the Compare Endpoint's 300-File
Ceiling
- #2784 Let a Round on the Head Outrank pr_review.py wait's Repo-Wide
Quota Reading
- #2782 Say What pr_review.py wait --min-rounds Counts and Name It at
the Timeout
- #2778 Share the Bounded Step Reader Across the Test Harnesses
- #2776 Pin the Prose Gate's Override Wiring by Structure
- #2773 Exempt a List Item's Label Separator from the Dash Rule for
Every Marker and Bold Spelling
- #2771 Strip a List Item's Opening Label for Every Marker and Bold
Spelling in the Prose Gate
- #2768 Page pr_review.py's Changed-File List Past 100 So a Large
Promotion Can State Coverage
- #2765 Let an Attested Local Pass Cover a Head Beside a Table-Less
Copilot Round

Closes #2285
Closes #2820
Closes #2818
Closes #2809
Closes #2807
Closes #1659
Closes #2796
Closes #2798
Closes #2163
Closes #1984
Closes #2614
Closes #2767
Closes #2781
Closes #2741
Closes #2775
Closes #1665
Closes #2770
Closes #2738
Closes #2758
Closes #2739

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants