Skip to content

queen: idle lanes run speculative attempts -- a second bee on the highest-value long-running issue instead of standing idle #9969

Closed as not planned

Description

@gHashTag

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

Measured 2026-10-17 14:37Z: 32 of 70 lanes idle with no eligible issue. Idle capacity is paid for and wasted. Bee PR lead time since 2026-10-10: p50 1.6 h, p90 49.6 h (115 merged), so a few stragglers dominate the tail.

Industry reference: MapReduce/Spark speculative execution (backup tasks for stragglers; the MapReduce paper reports 44% shorter jobs); agent products (Codex, Devin, SWE-agent best-of-N) run N attempts and keep the one whose tests pass.

User Scenarios

  • As the Queen with idle lanes and no eligible issue, I start a second attempt on a running issue that is high value and long-running, on its own branch, and keep whichever attempt passes review first; the other is closed as superseded.
  • As the owner, speculation never takes a lane from real work: the moment an eligible issue appears it outranks a speculative attempt.

Requirements

  • may_speculate(idle_lanes, eligible_issues, running_minutes, attempts_on_issue, value_rank) -> bool.
  • At most one extra attempt per issue; never on an issue with a send-back in progress.
  • winner(a_state, b_state) -> u8 and the rule that closes the loser.

Success Criteria

  • Tests: no speculation while any eligible issue exists; never a third attempt; the loser is always closed.
  • Invariant: speculative lanes <= idle lanes.
  • 0 surviving mutants.

Rules for the bee

Boundary

  • specs/queen/speculative.t27
  • .trinity/seals/queen_QueenSpeculative.json

Activity

  1. added
    shape-refusedClosed by the issue-shape gate (specs/policy/issue_shape.t27); a passing edit reopens it
    on Oct 17, 2026
  2. github-actions commented on Oct 17, 2026

    @github-actions
    Contributor

    Closed by the issue-shape gate (specs/policy/issue_shape.t27, #7498): an issue must have the template's sections. Edit the body; an edit that passes reopens it.

    • missing: ## Requirements -- numbered obligations, FR-001: ... MUST ...
    • missing: ## Success Criteria -- an outcome a machine can settle: a number with a unit, a backticked file, exit 0, or a backticked command
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

    shape-refusedClosed by the issue-shape gate (specs/policy/issue_shape.t27); a passing edit reopens it

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions