Skip to content

Request Copilot's first review when the automatic one never arrives - #253

Open
trask wants to merge 1 commit into
mainfrom
trask-recover-missing-copilot-first-review
Open

Request Copilot's first review when the automatic one never arrives#253
trask wants to merge 1 commit into
mainfrom
trask-recover-missing-copilot-first-review

Conversation

@trask

@trask trask commented Aug 14, 2026

Copy link
Copy Markdown
Member

The Copilot review gate holds a pull request on its author until Copilot has reviewed the current head, and for the first review it relied entirely on GitHub's automatic Copilot code review. When that automatic review silently never starts, nothing recovers: the pull request sits at "Waiting on the author · Wait for the Copilot review to report" indefinitely, waiting for a review nobody has asked for.

This happened on opentelemetry-java-instrumentation#19584, where the only review_requested events were the approver team at PR creation and a manual Copilot request four and a half hours later. Across the previous fifty pull requests there, Copilot's first review normally lands within twenty minutes and has been seen as late as forty; the outliers are roughly 2, 18, 20 and 22 hours, all of which only resolved once a human intervened.

The gate now requests the first review itself when the automatic one has not arrived within an hour of the pull request becoming ready. This is reachable only where a re-request already is, so the pull request must otherwise route to reviewers or maintainers, Copilot must not already be a pending requested reviewer, and the required checks must have settled. The recovery cannot spend a review on code CI is about to reject, and it never duplicates a request that is already outstanding.

Returning a pull request to draft restarts the wait, matching GitHub, which starts the automatic review when a pull request becomes ready rather than when it is opened. A push deliberately does not restart it: GitHub does not automatically review a pull request it has never reviewed, so restarting the wait on every push would leave an actively developed pull request waiting forever, which is the case this exists for.

Why one hour

An hour clears the normal spread of first-review latency without waiting through another full review cycle. Nothing signals the expiry itself, because a pull request stalled on a missing review produces no activity and so triggers no webhook; the hourly backfill is what notices. Recovery therefore lands within roughly one to two hours of the pull request becoming ready, against a failure that is otherwise unbounded.

Remaining gap

A pending Copilot review request that GitHub never fulfils is still waited on indefinitely, because the gate does not duplicate a request that is already outstanding. That is a narrower failure than the one fixed here and is left for follow-up.

Configuration

No configuration changes. require_clean_copilot_review_branches keeps its existing shape and meaning; only the behavior behind it changes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: db63c563-8eff-4a50-8ca1-b4e372eabc2c

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.

Pull request overview

Adds recovery when Copilot’s automatic first review does not arrive within one hour.

Changes:

  • Tracks how long the first review has been missing.
  • Requests overdue reviews after CI settles and revalidates before delivery.
  • Adds tests and documentation for the recovery flow.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pull-request-dashboard/README.md Documents first-review recovery.
.github/scripts/pull-request-dashboard/test_dashboard.py Updates request-state coverage.
.github/scripts/pull-request-dashboard/test_copilot_review.py Tests timing, eligibility, and delivery.
.github/scripts/pull-request-dashboard/render.py Clarifies pending-review behavior.
.github/scripts/pull-request-dashboard/RATIONALE.md Explains recovery design and timing.
.github/scripts/pull-request-dashboard/dashboard.py Persists the missing-review clock.
.github/scripts/pull-request-dashboard/copilot_review.py Implements overdue detection and request delivery.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@trask
trask marked this pull request as ready for review August 14, 2026 17:19
@trask
trask requested a review from a team as a code owner August 14, 2026 17:19
@trask
trask requested a review from adrielp August 14, 2026 17:19
@opentelemetry-pr-dashboard

Copy link
Copy Markdown

Pull request dashboard status

Waiting on reviewers · refreshed 2026-08-14 17:20 UTC

Review the latest changes.

Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

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