Skip to content

Stop pr_review.py wait Reporting a Repo-Wide Quota Over a Round on the Head #2781

Closed

Description

@ptr727

Problem

pr_review.py wait decides its repo-wide quota arm, exit 47 with status=COPILOT_QUOTA_EXHAUSTED_REPO_WIDE, from repository history it read when the wait began. At the timeout that arm ranks above what the final read of this pull request shows. Where a genuine round covers the head but sits at or below --min-rounds, the wait reaches that arm and prints that the head "carries no Copilot review or comment of its own", which the same payload contradicts.

Constructed example

A pull request carries three Copilot rounds on its head and a pending re-request. The reviewer's newest activity elsewhere in the repository is a quota refusal on another pull request. wait --min-rounds 4 --timeout 150 runs, and a fourth genuine round lands on the head mid-wait at position 3. At the timeout the wait exits 47 with the line above rather than 30.

Done looks like

The 47 arm fires only where the final read shows no genuine round on the head, or a reading of this pull request's own final payload outranks it. A test feeds the constructed example above and asserts the wait does not exit 47.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpre-existingReview finding classed pre-existing per local-strict-review Disposing of FindingsscriptA defect in hub tooling

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions