Skip to content

work-loop: admission gate ratify-queues items that already have an open closing PR #4610

Description

@kyle-sexton

This was generated by AI during work-loop.

Problem

The work-loop admission gate queues a C3 item for ratification (a kind=ratify-c3 comment, needs-human added, agent-ready removed) without checking whether a pull request that closes the item is already open. The operator is then asked to ratify work that is already done or in review, and the item's labels move away from the state its PR expects.

Observed

Lane melo-lap-001-wsl-2, cycle 1 (2026-09-27 at 18:32Z), queued two items this way:

Both kind=ratify-c3 comments now sit on closed items.

Expected

Before step 3 queues, escalates, or dispatches a candidate, the admission gate skips any candidate that already has an open closing PR (GitHub: closedByPullRequestsReferences with an open state) and reports it as in flight. /work-items:work has its own staleness pre-check at dispatch time, but that check never runs for items that are queued and not dispatched.

Done when

The work-loop admission step (and its C3 ratification-queue reference) names the in-flight-PR check. An item with an open closing PR is neither ratify-queued nor escalated. The cycle report lists it as in flight.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageNot yet classified. Floor until a type and one priority tier are set.

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions