727. A queue eviction goes to a maintainer session
Raised 2026-10-03 (UTC) by calef's rulings on #1564, the correction of error
notes/coes/2026-10-03-the-queue-judged-one-pull-request-at-a-time.md. The number is provisional until the merge queue lands it, and so are the title, the slug and
the needs-maintainer label's name.
Why
calef, 2026-10-03: "I don't want the job of watching the queue." That day he was its only working detector. He spotted each conflicting or failing pull request, removed it, and told the maintainer session, while the merge drain armed, re-armed and re-queued on his behalf (six or seven times over his own dequeues) and commented where nobody looked. Two rulings followed, and they land together, because removing the re-arming without a detector puts the queue-watching back on calef.
- Strip the drain back: no arming, no re-arming or re-queueing, no stall comments. Keep the
architect-label bots,
architect holdandready status, with no API call in the group leg. - Build one detector that labels a pull request a maintainer session must pick up, and never re-queues or arms.
Built
helpers/merge-drain.sharms nothing. Its arming, stranded enqueue, stall comments, stale-draft and stuck-check reports and milestone 630 (a merge-queue ejection is caught before the queue, and recovered after it)'s ejection hold are gone, withhelpers/queue-stranded.jq,helpers/queue-ejected.jqand their selftests. It keepsdequeue_held, theunblockeddraft label, the cancelled-duplicate rerun and the lane-claim check, and gains--dry-run.helpers/needs-maintainer.jqdecides four causes: ejected, conflicting, a stale queue entry, and ready but unarmed for 30 minutes. The drain labels, comments once per cause per episode, and clears the label when the cause goes. The workflow creates the label idempotently and retiresqueue-ejected.helpers/needs-maintainer-selftest.shfeeds it a response recorded live (#1569, ejected and conflicting) and one case per cause and per clearing. It also fails if the drain arms or enqueues again.script/lintruns it.ready status's group leg reads the branch from the group commit's subject, not the API.- The metrics, toolchain-bump and vendor-watch workflows arm the pull requests they open.
- The session-side half, rung three:
briefs/session-start.mdreads the label first, andhelpers/nanny.pywakes a running session when it lands.
notes/queue-ejection.md has the four causes and the comment each one posts.
BUGS
- With no session running, a labeled pull request waits for the next one.
- A lane that forgets to arm is caught after 30 minutes, not 5.
- An armed pull request whose checks never report, or that auto-merge never enqueues, is not one of the four causes. The drain used to report the first and enqueue the second.
Follow-on
- Recorded. An armed pull request whose checks never report, or that auto-merge never
enqueues, is none of the four causes; beside the detector in
notes/queue-ejection.md. - Recorded.
helpers/nanny.pystill enqueues a stranded armed pull request with the session's token, the last automatic enqueuer; in its own header,helpers/nanny.py. - Recorded. A finished draft never marked ready is no longer reported, since the stale-draft
note went with the stall comments; in
notes/blocked-by-drafts.md.
Index row
BUILT on lane/eviction-detector (PR #1572). The merge drain stops arming and re-queueing, and labels an ejected, conflicting, stale or unarmed pull request needs-maintainer for a session to pick up, so calef no longer watches the queue.