Skip to content

queen: event-driven requeue -- a skipped issue wakes when its blocker releases, not by rescanning 826 issues every tick #9967

Open

Description

@gHashTag

Part of the dispatch roadmap epic #9976. Industry reference and the measured gap are below.

Measured 2026-10-17 14:37Z on the live Queen: the tick read 826 open issues, skipped all of them (fileConflict 166, completed 508, missingBoundary 79, claimed 70) and refused with "nothing to choose" while 32 of 70 lanes were idle. Every tick re-derives the same skips from scratch, and nobody can see which release would unblock which issue.

Industry reference: the Kubernetes scheduler keeps an unschedulablePods queue and moves a pod back to activeQ only when a cluster event it cares about happens (QueueingHint, KEP-4247), with a backoff queue in between.

User Scenarios

  • As the Queen, when a hold on bootstrap/src/compiler.rs is released, I re-try exactly the issues that were blocked by that path, in the same tick, instead of waiting for the next full scan.
  • As the board, for every blocked issue I can show the one event that will unblock it (hold released on P, issue N closed, Boundary added).

Requirements

  • A skip reason maps to the event kinds that can change it (fileConflict -> hold released or boundary narrowed; missingBoundary -> issue edited; claimed -> dispatch ended; completed -> never).
  • wakes(skip_reason, event_kind) -> bool and a capped backoff rule backoff_seconds(attempts), so a hot issue cannot spin.
  • A full rescan still runs on a slow clock as the safety net; the card says how slow and why.

Success Criteria

  • Tests cover every (skip reason x event kind) pair, including the pairs that must NOT wake.
  • Invariant: an issue skipped as completed is never woken by any event.
  • 0 surviving mutants.

Rules for the bee

Boundary

  • specs/queen/requeue.t27
  • .trinity/seals/queen_QueenRequeue.json

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions