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 …showsstatus: STALE.
Steps
- Confirm the head moved:
git rev-parse origin/mainvs the gate'ssubject_sha. - Push the new head so the PR reflects it.
- Re-submit a GitHub review at the new head.
- Re-ingest:
ingest-github-review.ps1. - The new gate supersedes the stale one.
- 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.