Skip to content

queen: order work by value -- cost of delay over size (WSJF) and the number of issues it unblocks #9971

Closed as not planned

Description

@gHashTag

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

specs/queen/priority.t27 orders issues by label level and aging only. It cannot tell an issue that unblocks 105 others (as bootstrap/src/compiler.rs did on 2026-10-08, see specs/queen/holds.t27) from a leaf task, and it ignores size.

Industry reference: WSJF (cost of delay / job size, Reinertsen); critical-path and HEFT list scheduling put the tasks with the longest dependent chain first.

User Scenarios

  • As the Queen choosing among eligible issues, I take first the one whose completion unblocks the most other issues (by held paths and by blocked by #N links), then the best cost of delay per size.
  • As the owner, a label still wins: value only orders issues inside one priority level.

Requirements

  • unblock_score(n_blocked_by_paths, n_blocked_by_links) -> u32, size_class(boundary_paths, est_lines) -> u8, wsjf(cost_of_delay, size) -> u32.
  • outranks_by_value(a, b) is only the tie-break after the level from priority.t27.
  • Pure integer math; every weight documented.

Success Criteria

  • Tests: an unblocker beats a leaf at the same level; a label level beats any value; equal values fall back to issue age.
  • Invariant: the order is irreflexive and transitive on the tested sample.
  • 0 surviving mutants.

Rules for the bee

Boundary

  • specs/queen/value.t27
  • .trinity/seals/queen_QueenValue.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 ...
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