Skip to content

Spend a Head Refusal a Later Genuine Round on That Head Answers - #2825

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

ptr727 merged 3 commits into
developfrom
feature/auto-2820

Conversation

@ptr727

@ptr727 ptr727 commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • refusing_review() returned the newest refusal on the head even where a later genuine Copilot round on that head had answered it. wait reaches that read whenever no round past --min-rounds covers the head. A genuine round at or below the baseline therefore left a spent quota refusal to report exit 46, while the digest printed refusal=no.
  • It now reads the newest review on the head and returns it only where that review is a refusal. Its docstring no longer says the caller handles the spent case.
  • local_cover reads the same function, so a refusal a later round on the head spends no longer blocks an attested local pass. Its docstring says so, and a new test pins that shape.

The exit code for the issue's shape

The issue expected 45 from wait --min-rounds 2 on [quota refusal on H, genuine round on H]. With the fix that wait exits 30 with the line naming the baseline (--min-rounds 2 waits for round 3 or later), because head_review_done counts a round only past --min-rounds, and N is the rounds= a status read before the re-request, which was 1 there. wait --min-rounds 1 and status both exit 45 (COVERAGE_IS_UNSTATED). The new test asserts all three, and none reports COPILOT_QUOTA_EXHAUSTED.

Verification

Closes on promotion: #2820

🤖 Generated with Claude Code

ptr727 and others added 2 commits October 11, 2026 09:52
refusing_review() returned the newest refusal on the head even where a
later genuine Copilot round on the same head had answered it. wait
reaches that read whenever no round past --min-rounds covers the head,
so a genuine round below the baseline left a spent quota refusal to
report exit 46, while the digest printed refusal=no.

It now reads the newest review on the head and returns it only where
that review is a refusal.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The local review pass found the refusing_review docstring claiming
every caller depends on the new reading, which holds for two of four,
and no test pinning that a refusal a later round on the head spends no
longer blocks an attested local pass. The docstring now states the
reading alone, and a test pins local_cover on that shape.

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

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 25 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b01e8733-7a1f-4686-a8c2-b071c27ff80b

📥 Commits

Reviewing files that changed from the base of the PR and between c0a0eef and 4749724.


📒 Files selected for processing (2)
  • scripts/pr_review.py
  • tests/test_pr_review.py

  • 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.

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.

🟢 Approval recommended

No blocking issues remain; only minor wording nits were identified.

2 open findings
What changed in this PR

Fixes same-head refusal handling so later genuine reviews supersede spent quota refusals.

Changes:

  • Updates refusal detection and local attestation behavior.
  • Adds regression coverage for wait, status, and local attestations.
  • Clarifies related documentation.
File Summary
tests/​test_pr_review.py Adds regression tests for later genuine rounds.
scripts/​pr_review.py Updates refusal handling and documentation.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/pr_review.py Resolved
Comment thread tests/test_pr_review.py Resolved
Both read as garbled relative clauses, per review on #2825.

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 4749724bb24429cb031a2401d702a754a97cc1c6, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@codecov

codecov Bot commented Oct 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.31%. Comparing base (c0a0eef) to head (4749724).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2825      +/-   ##
===========================================
+ Coverage    60.30%   60.31%   +0.01%     
===========================================
  Files           16       16              
  Lines         8479     8479              
===========================================
+ Hits          5113     5114       +1     
+ Misses        3366     3365       -1     
Flag Coverage Δ
python-3.13 60.31% <100.00%> (+0.01%) ⬆️

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.

@ptr727

ptr727 commented Oct 11, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ptr727
ptr727 merged commit b3d7fec into develop Oct 11, 2026
13 checks passed
@ptr727
ptr727 deleted the feature/auto-2820 branch October 11, 2026 17:16
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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants