Skip to content

Say What pr_review.py wait --min-rounds Counts and Name It at the Timeout - #2782

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

ptr727 merged 7 commits into
developfrom
feature/auto-2741

Conversation

@ptr727

@ptr727 ptr727 commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

pr_review.py wait --min-rounds N waits for a round past the Nth, so N is the rounds= count a status read before a re-request. That counting is by design: the help already said "exceed N", and the head_review_done docstring and its tests state it. A caller passing one above the count waits for the round after the one it wanted, and the timeout printed a bare status=PENDING that reads exactly like no round at all. This takes the issue's documented arm and makes the timeout say why.

  • The --min-rounds help states N is the count already seen, with a worked example.
  • At the timeout, where a round landing during the wait covers the head but none past N does, the status=PENDING line names the round counts before and after and the position it waits for. Otherwise the bare line stays.
  • scripts/README.md states what the flag counts.
  • Tests: the issue's shape (three rounds on the head, a fourth landing mid-wait, N=3 returns and N=4 times out with the line), a late superseded-commit round keeping the bare line with and without an older round on the head, and a reviewer that never answers keeping the bare line.

Filed along the way: #2780 (the flag name reads as a count to reach, options to remove the trap) and #2781 (the repo-wide quota arm outranks a round on the head at the timeout, pre-existing).

Closes on promotion: #2741

Local strict review

Seven passes recorded, the last raising 0 findings. The README overclaim the fifth pass listed as introduced is fixed in 83f16c7, and a test gap the sixth raised in 43d85b8. The pre-existing finding that the repo-wide quota arm shadows the new line is filed as #2781.

🤖 Generated with Claude Code

ptr727 and others added 5 commits October 11, 2026 00:48
…eout

`--min-rounds N` waits for a round past the Nth, so N is the `rounds=`
a `status` read before a re-request. A caller passing one above that
count waits for the round after the one it wanted, and the timeout
printed a bare `status=PENDING` that reads exactly like no round at all.

- The `--min-rounds` help states N is the count already seen, with a
  worked example.
- At the timeout, where a round covers the head but none past the
  baseline does, the `status=PENDING` line names the baseline, the
  position it waits for, and the round count.
- `scripts/README.md` states what the flag counts.
- A test lands a round mid-wait on a head already carrying three:
  `--min-rounds 3` returns on it, and `--min-rounds 4` times out
  with the explaining line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A case with only a superseded-head round under --min-rounds asserts the
timeout prints the bare status=PENDING, so the new line cannot claim a
round covers the head where none does. The README paragraph splits two
sentences the sentence-length check flagged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The timeout hint now fires only where the round count rose during the
wait, so a reviewer that simply never answered keeps the bare
status=PENDING rather than a misdiagnosis inviting a lower N. The line
states the count before and after the wait apart from the position.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The superseded-head case now raises the round count mid-wait, so only
the coverage clause keeps the bare status=PENDING there. The --min-rounds
guard is dropped, since a covered head with a zero baseline returns
before this line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The line read coverage and the count rise separately, so a late round on
a superseded commit beside an older round on the head told a caller with
the right N to lower it. It now asks head_review_done for a round past
the count the wait began with, and a case pins that shape.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings October 11, 2026 08:09
@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: 3b46f03f-a4ad-4b74-b2dc-dc16d232bd0f

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

…-Wait

A round already on the pull request when wait began leaves the bare
status=PENDING, since nothing then tells it apart from a correct count,
and the README now says so rather than promising the named line always.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@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@bae8827). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #2782   +/-   ##
==========================================
  Coverage           ?   60.11%           
==========================================
  Files              ?       16           
  Lines              ?     8431           
  Branches           ?        0           
==========================================
  Hits               ?     5068           
  Misses             ?     3363           
  Partials           ?        0           
Flag Coverage Δ
python-3.13 60.11% <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

Clarify that the named timeout position is conditional on a qualifying round arriving during the wait.

1 open finding
What changed in this PR

Clarifies --min-rounds counting and improves timeout diagnostics with focused regression tests.

Changes:

  • Updates CLI and README documentation.
  • Adds contextual timeout output.
  • Adds coverage for qualifying and non-qualifying rounds.
File Summary
tests/​test_pr_review.py Tests round counting and timeout behavior.
scripts/​README.md Documents semantics and timeout behavior.
scripts/​pr_review.py Implements contextual timeout diagnostics.

🧠 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/README.md Outdated
The bare-line case passed N equal to the count the wait began with, where
the line cannot fire, so dropping its coverage clause failed nothing. It
now passes N one above, the only case the line fires in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ptr727

ptr727 commented Oct 11, 2026

Copy link
Copy Markdown
Owner Author

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

@ptr727
ptr727 merged commit f65e325 into develop Oct 11, 2026
13 checks passed
@ptr727
ptr727 deleted the feature/auto-2741 branch October 11, 2026 08:23
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