Skip to content

Hold pr_review.py merge for a Hosted Review Whose Status Has Not Registered Yet #3806

Closed

Description

@ptr727

#3789's fix holds pr_review.py wait and refuses merge while a CodeRabbit or Qodo check on the head is still settling. It sees only a check that has already registered on the head.

#3789 names a second factor that this does not cover. CodeRabbit's status can register several minutes after the other checks finish. A head whose required checks all pass before CodeRabbit posts its pending status reads CLEAN or UNSTABLE with no hosted check in the rollup. So merge can still land before the review starts. That failure is silent.

Closing it needs a signal that a hosted reviewer is going to review this head. Nothing on the pull request states that today. Candidate signals:

  • The reviewer reviewed an earlier head of the same pull request, so a review of this head is expected.
  • The repository's reviewer configuration says the reviewer runs on this base branch.
  • A short grace period after the last check finishes, read against the head's push time.

Each has a false-hold cost on a pull request the reviewer skips, such as an incremental review CodeRabbit declines. Choosing one is a design decision.

Activity

  1. added
    agents
    gate
    on Nov 2, 2026
  2. ptr727 commented on Nov 2, 2026

    @ptr727
    OwnerAuthor

    Held back by the backlog-burndown away run (2026-11-02, round 2): the signal choice is filed as decision #3814. This issue is worked once that is answered.

  3. ptr727 commented on Nov 3, 2026

    @ptr727
    OwnerAuthor

    Maintainer answer on #3814 (decision triage via the windows handoff #3853, 2026-11-03): Option 1: a grace period after the later of the head's push and its last check settling, then release if no hosted check has registered. The length is not set yet: the change closing this issue measures registration delay on recent pull requests and proposes a value from that, for the maintainer to approve in its pull request.

  4. ptr727 commented on Nov 20, 2026

    @ptr727
    OwnerAuthor

    Backlog burndown claim (2026-11-19 attended run, round 1, group 3): branch burndown/merge-hold-hosted-grace.

    Issues: #3806.

    Predicted file set:

    • scripts/pr_review.py
    • scripts/pr_review_checks.py
    • tests/test_pr_review.py
    • scripts/README.md

    Generated from those: none.

    Claim extended (2026-11-19): scripts/pr_review_side.py scripts/pr_review_answers.py.

    Claim extended (2026-11-19): scripts/pr_review_hold.py (new), tests/test_pr_review_size.py.

  5. ptr727 commented on Nov 20, 2026

    @ptr727
    OwnerAuthor

    Backlog burndown question, 2026-11-19 (group burndown/merge-hold-hosted-grace, stopped before its first commit). Which anchor should the hosted-review grace use?

    Measurement (read-only, the 150 most recently updated merged PRs, #4038 to #4300). CodeRabbit registers its review check 10 to 33 seconds after wait sends the review ask. wait sends that ask only after the checks settle, sometimes many minutes later. Seven merges landed 1 to 6 seconds before CodeRabbit's run registered (#4280, #4281, #4244, #4130, #4129, #4105, #4109), and each run was then cancelled. An anchor of push and check settling alone, as decided on #3814, does not close this: wait sends its ask after the held poll ends, so the grace has already expired when the ask goes out.

    Options

    1. Anchor on the later of the head's push, its last non-hosted check settling, and the newest trusted review ask on the head, with G = 90s (recommended). It covers all 89 measured registrations, including the 3 heads whose ask went out late. Its fixed cost on an unasked head is 90s after the checks settle. This needs scripts/pr_review_side.py and scripts/pr_review_answers.py added to the group's claim.
    2. As decided on Decide: Which Signal Should Hold pr_review.py merge for a Hosted Review Whose Status Has Not Registered Yet #3814: push and check settling only, wait sending its ask before polling through the grace, G = 180s. It covers 86 of 89, and all 7 measured early merges. A wait run that asks more than 180s after the checks settled releases unheld. It fits the current claim.
  6. ptr727 commented on Nov 20, 2026

    @ptr727
    OwnerAuthor

    Maintainer's answer, 2026-11-19 (backlog burndown): option 1. The hosted-review grace anchors on the later of the head's push, its last non-hosted check settling, and the newest trusted review ask on the head, with G = 90s. scripts/pr_review_side.py and scripts/pr_review_answers.py join the group's claim.

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

    agentsgate

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions