Skip to content

Name the post-push review race in the merge gate - #444

Merged
ptr727 merged 1 commit into
developfrom
merge-gate-race-note
Jul 25, 2026
Merged

Name the post-push review race in the merge gate#444
ptr727 merged 1 commit into
developfrom
merge-gate-race-note

Conversation

@ptr727

Copy link
Copy Markdown
Owner

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 mergeStateStatus first sees CLEAN in that window and exits ready before Copilot has reviewed the head.

Changes

  • AGENTS.md Merge Gate (verbatim, provider-independent): precondition 2 names the race and requires matching the review's commit SHA to the head, stating a green merge-state can precede the current-head review and never signals readiness on its own.
  • copilot-instructions.md runbook: a note in "Verify Review Covered Current Head" - gate on a formal review whose commit.oid equals the head first, then zero unresolved threads, and only then read merge-state.

Re-vendors fleet-wide. spec/validate.py OK.

🤖 Generated with Claude Code

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>
CopilotAI review requested due to automatic review settings July 25, 2026 17:54

CopilotAI 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

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.md to 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.

FileDescription
AGENTS.mdTightens the merge gate criteria to explicitly prevent merging in the post-push review race window.
.github/copilot-instructions.mdDocuments the correct poll/order-of-operations to avoid treating mergeStateStatus: CLEAN as proof of head-SHA review coverage.

@ptr727
ptr727 merged commit 4cd89ce into developJul 25, 2026
7 checks passed
@ptr727
ptr727 deleted the merge-gate-race-note branch July 25, 2026 17:56
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>
Sign up for freeto 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

@ptr727