holding-a-merge-queuelisted
Install: claude install-skill ubermuda/loupe
# Holding a merge queue
One session holds the queue. Other sessions own their branches and push to them.
The queue holder merges, and merges nothing it has not checked itself.
`working-with-prs` carries the gate, the body and the merge protocol. This skill
carries two things that only appear when a queue runs for hours across several
sessions: reading check state without lying to yourself, and coordinating with
peers who cannot see what you see.
## Read the checks by counting, never by absence
```bash
gh pr checks <n> --required --json bucket \
-q 'group_by(.bucket)|map("\(.[0].bucket)=\(length)")|join(" ")'
```
Green is `pass=<the number the ruleset requires>` and nothing else. Count the
buckets. Never conclude green from the absence of a failure.
Three states read identically to "nothing left to wait for", and all three have
bitten someone here:
| Reading | What it actually means |
|---|---|
| fewer entries than required | runs have not registered yet |
| zero entries | the branch is `CONFLICTING`, so `pull_request` has no merge commit to run against and **no check can ever run** |
| every entry green | possibly true of a head or a base that has moved |
A `DIRTY` pull request has no gate at all. Its rollup looks like a clean slate.
## Two ways a green reading goes stale
The head moves. Carry `headRefOid` in whatever state you diff between polls.
A rollup can still describe the previous head after a push.
The base moves. Where the ruleset sets `strict_required_s