Skip to main content

Handle a stale PR head

A MERGE_APPROVAL gate is bound to the PR head SHA at review time. If the PR head moves before the merge, the gate is stale.

Symptoms

  • The orchestrator reports gate stale: subject_sha mismatch.
  • goal-gate.ps1 -Action inspect -GateId … shows status: STALE.

Steps

  1. Confirm the head moved: git rev-parse origin/main vs the gate's subject_sha.
  2. Push the new head so the PR reflects it.
  3. Re-submit a GitHub review at the new head.
  4. Re-ingest: ingest-github-review.ps1.
  5. The new gate supersedes the stale one.
  6. The orchestrator re-runs and consumes the new gate.

What this playbook is NOT

  • It does not bypass the canonical lifecycle.
  • It does not retroactively authorize the prior head.
  • It does not silence the deviation count — a stale gate counts as a deviation if it was consumed.