Repository navigation
ci: the merge job retries a base-branch-policy refusal - #53
Merged
Merged
Conversation
Spec agents-autonomy, A8. Only that refusal is retried, 20 seconds apart; any other fails at once, and --match-head-commit is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
The retry path is expected to handle the reported merge-policy refusal, but the case-sensitive match looks for lowercase text while gh pr merge returns “Base branch policy prohibits the merge” with an initial capital. That refusal therefore falls through to exit 1 instead of retrying.
1 open issue
What changed in this PR
Adds targeted retries to the CI merge job to handle temporary base-branch-policy refusals while preserving the checked-head safeguard.
Changes:
- Allows four merge attempts, with 20-second waits between policy refusals.
- Keeps other failures immediate and retains
--match-head-commit.
| File | Description |
|---|---|
.github/workflows/ci.yml |
Adds bounded retries and refusal-output matching to the merge step. |
Review effort: Lite
GitHub can send it as "Base branch policy prohibits the merge" with a capital B (Copilot, betta-design#56 and hackcoc#53). Co-Authored-By: Claude Opus 5.5 <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 free
to 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.

Part of the agreed spec Agents that need you less, acceptance test A8.
The standard
mergejob now retriesgh pr mergeup to 3 more times, 20 seconds apart, but only when GitHub answers "base branch policy prohibits the merge". That happens when the job runs while another merge is still landing; deps-factory#83 failed this way on 2026-12-04. Any other refusal still fails at once: the head moved, a check failed, or anything else.--match-head-commit "$HEAD"is unchanged, so it never merges a head other than the one CI passed (spec I1).actionlint(with shellcheck) passes.gh. Success, then a policy refusal followed by success: merges. Policy refusals 4 times: fails after 3 waits. A moved head: fails at once with no wait.APPS.md.🤖 Generated with Claude Code