Skip to content

pr_review.py comment says a quota refusal is cleared by waiting, contradicting its own exit-code contract #1647

Closed

Description

@ptr727

scripts/pr_review.py:1812 carries this inline comment:

# A file-count refusal is cleared by splitting the pull request and a quota one by waiting.

The same file's exit-code contract says the opposite of the second half. From the module docstring's description of 46:

the review carrying the head is a refusal naming the account quota specifically [...] That is an account-level state a re-request or a further wait does not clear, unlike 41's other causes (a file count over the limit, cleared by splitting the pull request), so it is its own code rather than being folded into 41: proceed on the other reviewers' coverage instead of retrying.

So the code exists precisely because waiting does not clear a quota refusal, and the comment beside the reader tells it to wait. A reader who takes the comment polls an account-level state the script already decided is terminal, which is the wait-with-no-stated-end the 46/47 pair was added to end.

Scope

One comment line. The behavior is correct and the exit codes are correct; only the comment disagrees with them.

Found by

The local review pass on the branch that folded #1164's review-loop decisions into pr-review-conduct. That branch does not touch scripts/pr_review.py, so the finding is filed rather than folded in, per GOVERNANCE.md "Verification Discipline"'s class-sweep rule: a sibling that was wrong before the change and sits in a file the diff does not touch is filed rather than widening the diff.

Metadata

Metadata

Assignees

No one assigned

    Labels

    script

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions