Skip to content

docs(ci): record why an armed auto-merge PR stalls at BEHIND - #324

Merged
scttfrdmn merged 3 commits into
mainfrom
ci/automerge-behind-note
Aug 3, 2026
Merged

scttfrdmn merged 3 commits into
mainfrom
ci/automerge-behind-note

Conversation

@scttfrdmn

Copy link
Copy Markdown
Owner

Comment-only change to .github/workflows/dependabot-automerge.yml. No behaviour change.

Branch protection on main has strict: true (require branches up to date before merging), so a PR whose base has moved since its last push goes to mergeStateStatus: BEHIND and gh pr merge --auto will not merge it. It waits indefinitely and silently — BEHIND is not a failing check, so the PR shows every check green and simply doesn't merge.

With a queue of armed PRs this serializes them: the first merges, every other one becomes BEHIND, and each needs a branch update before its turn. Observed directly while landing #318 — #315 merged, #320 merged behind it, and the next armed PR sat green-and-BEHIND until gh pr update-branch was run by hand.

Worth a comment rather than nothing because this workflow has already absorbed five separate diagnoses, all of which presented as "armed PRs aren't merging." A sixth symptom with the same surface appearance is exactly the thing to label, so the next person checks mergeStateStatus before re-litigating the five documented causes.

Also notes that allow_update_branch is false at the repository level, which is what would otherwise surface the update button in the UI, and that the queue should be expected to drain a few PRs at a time rather than all at once.

Not a bug, but it reads like one, and this repository has already spent five diagnoses on
this workflow — a sixth symptom that looks the same as the first five is worth naming before
someone chases it.

Branch protection on `main` sets `strict: true`, so a PR whose base has moved since its last
push reports mergeStateStatus BEHIND, and `gh pr merge --auto` will not merge it. It waits
indefinitely and silently, because BEHIND is not a failing check and nothing surfaces it: the
PR shows every check green and simply does not merge. With a queue of armed PRs this
serializes them — the first merges, every other becomes BEHIND, and each needs a branch
update before its turn.

Observed while landing the vite overrides: #315 merged, #320 merged behind it, and the next
armed PR sat green-and-BEHIND until `gh pr update-branch` was run by hand.
`allow_update_branch` is false at the repository level, which is what would otherwise offer
the button in the UI.

Comment only; no behaviour change.
@scttfrdmn
scttfrdmn enabled auto-merge (squash) August 3, 2026 21:17
@scttfrdmn
scttfrdmn merged commit 27cfad9 into main Aug 3, 2026
24 checks passed
@scttfrdmn
scttfrdmn deleted the ci/automerge-behind-note branch September 20, 2026 05:25
Sign up for free to 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.

1 participant