Name the post-push review race in the merge gate - #444
Merged
Conversation
The merge gate required a review on the current head SHA but did not warn that a push makes the required checks go green before the re-review lands, so a poll that reads merge-state first sees CLEAN in that gap and exits ready before Copilot has reviewed the head. Name that race and fix the poll ordering in both the provider-independent gate (AGENTS.md) and the runbook mechanics (copilot-instructions): confirm a formal review whose commit SHA equals the head first, then zero unresolved threads, and only then read merge-state. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the governance and Copilot runbook documentation to explicitly name and guard against the post-push race where required checks can become mergeStateStatus: CLEAN before Copilot has re-reviewed the latest head SHA.
Changes:
- Strengthens the AGENTS.md Merge Gate to require confirming review coverage by matching the review commit SHA to the current head SHA, explicitly calling out the post-push race window.
- Adds a runbook note in
.github/copilot-instructions.mdto check head-SHA review coverage (then unresolved threads) before consulting merge-state.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| AGENTS.md | Tightens the merge gate criteria to explicitly prevent merging in the post-push review race window. |
| .github/copilot-instructions.md | Documents the correct poll/order-of-operations to avoid treating mergeStateStatus: CLEAN as proof of head-SHA review coverage. |
Uh oh!
There was an error while loading. Please reload this page.
ptr727 added a commit
that referenced
this pull request
Jul 25, 2026
#446) ## Promote develop to main Three doc/spec-only changes (no code path, no release): - **#443** - backlog: standardize `OPERATIONS.md` as the extraction target for operational content, and add a canonical clang-format config for the `cpp` type. - **#444** - name the post-push review race in the merge gate (AGENTS.md + copilot-instructions): a push turns checks green before the re-review lands, so confirm a review on the current head SHA before reading merge-state. - **#445** - bridge the CODESTYLE Python profiles (Project/Scripts) to the declared `build`/`lint-only` names. ## Verification `spec/validate.py` OK; `spec/audit.py --selftest` PASS. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ptr727 added a commit
that referenced
this pull request
Jul 26, 2026
…450) Adds one paragraph to the GitHub Copilot Review Runbook's Bounded Retry Workflow. ## Why While driving #449 through 13 review rounds in an hour, Copilot throttled and posted its final re-review ~36 minutes after the request - beyond a 15-minute poll window. The poll timed out, and the Bounded Retry Workflow treated that as a *genuinely missing* review and escalated. It was not missing, only pending. ## Change Clarify that a slow review is **pending, not missing**: a poll timeout is evidence only that the review has not landed yet, so report `review still pending`, poll on a widening interval, and enter escalation only when the `requestReviews` mutation no-ops/errors or after a genuinely long confirmed-accepted wait - never on one fixed poll window elapsing. This complements the #444 head-coverage gate (which prevents concluding *clean* too early) by preventing the opposite error - concluding *unresponsive/blocked* too early. Docs only - no release. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Codifies the fix for a race an agent (me) hit: the merge gate required a review on the current head SHA, but nothing warned that a push makes required checks go green before the re-review lands - so a poll that reads
mergeStateStatusfirst seesCLEANin that window and exits ready before Copilot has reviewed the head.Changes
commit.oidequals the head first, then zero unresolved threads, and only then read merge-state.Re-vendors fleet-wide.
spec/validate.pyOK.🤖 Generated with Claude Code