Skip to content

pr_review.py wait Returns at Once When a Fresh Request Is Pending on an Already-Reviewed Head #1897

Description

@ptr727

Observed

wait exits when reviewed_head(pr) is true, meaning any Copilot review covers the current head. When a review is re-requested on the same head, for example to get a round that states coverage after status reports COVERAGE_IS_UNSTATED or COVERAGE IS NOT CARRIED, the earlier round already satisfies done. So wait returns without waiting for the round it was asked to watch for.

This was seen twice on one pull request in succession. Both runs printed requested=yes and waited=2s. The new round landed about five minutes later, and the next status showed rounds=3 coverage=full.

Why It Matters

The status guidance for unstated coverage is to request another review. The wait that normally follows then reports the old state as final. An agent either reads the stale verdict as the new round's, or has to hand-roll a sleep loop, which is the pattern wait exists to replace.

Expected

When a Copilot request is outstanding, wait keeps polling until a review newer than that request lands, rather than returning on an earlier round of the same head. It could key on a round count greater than the count at entry, or on a review submitted after the request.

Measured at hub main 4566946 (2.0.685), scripts/pr_review.py main loop.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingscriptA defect in hub tooling

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions