Skip to content

A merge-queue dequeue reaches the human but produces no Co-Ordinator-selectable work

Id: TD-PPagop-26081409 · Status: resolved · Filed: 2026-08-14 · Resolved: 2026-08-14 · Ref: https://github.com/Poetic-Poems/agent-ops/pull/401

Requirement 38f (agent-ops#374, PR #388) made the pipeline merge-queue aware: scripts/sweep-human-visibility.sh skips the idle nudge on a currently-queued pull request, and posts a one-time notice comment when GitHub removes one from the queue without merging. The notice is addressed to enabler_assignee — a human — and that is the whole of it. Nothing turns a dequeue into work the Co-Ordinator can select.

Issue #374’s third acceptance point asked for both: “a checks-failure dequeue is visible to the human and the Co-Ordinator through an appropriate source so it can be acted on” (its own text leaves the source open — “review-feedback? human-visibility?”). PR #388 delivered the human half and deliberately deferred the other, on the reasoning that under D17 the product never enqueues, so there is no autonomous re-enqueue for a cycle to perform.

That reasoning covers a dequeue whose only remedy is a fresh merge click, but not the case that produced the dequeue in the first place. A merge queue dequeues a pull request when the merge group’s checks fail — the pull request’s own head can be green while the speculative merge with what sits ahead of it in the queue is not. That is a real defect in the pull request, of exactly the kind this pipeline already fixes autonomously when git surfaces it as a textual conflict (the merge-conflicts source, requirement 3g): the branch needs a rebase, a fix, and a push before it can be re-queued.

Today that pull request reads to every gatherer as approved, mergeable and green, so no source selects it. It waits on a human to read the notice comment and act. Where the maintainer does not, the pull request sits indefinitely: the idle nudge (requirement 38c) is one-shot per pull request and, on the common path, will already have fired before the enqueue that led to the dequeue.

  • scripts/sweep-human-visibility.sh — the dequeue-notice block; it emits the dequeue-notice action, which agent-cycle.sh logs as human-dequeue-notice.
  • docs/IMPLEMENTATION-PIPELINE-SPEC.md, requirement 38f — the as-built description of what the notice does and does not do.
  • lib/merge-queue.sh — merge_queue_probe already returns dequeued_at and dequeue_reason, so the signal a source would key on exists and is tested. merge_queue_dequeue_actionable (agent-ops#394) already makes the classification the suggested fix’s point 2 below calls for, and is shared for exactly this purpose: a source built here reads it rather than deciding again which reasons a cycle may act on.
  1. Decide which source owns it. A dedicated one (dequeued) keeps merge-conflicts’ candidate rule honest — a dequeued pull request is not CONFLICTING and adding it would blur that rule — at the cost of a new gatherer, a new work-order shape, and prompt coverage in prompts/coordinator.md and prompts/implementer.md.
  2. Whatever the source, gate it on dequeue_reason via merge_queue_dequeue_actionable: a dequeue the pipeline can act on (a merge-group checks failure) is not the same event as one it cannot (the maintainer removing their own entry, or the removal that is the merge itself), and selecting either of the latter would have a cycle push to a branch the human just took back, or to one already landed.
  3. Keep the human notice regardless. It is the only signal for the cases the pipeline should not touch.
  • Issue #374 and PR #388 — the requirement and the partial implementation.
  • Requirement 3g / scripts/gather-merge-conflicts.sh — the closest existing precedent for turning “this pull request cannot land as it stands” into selectable work.