Skip to content

queen: a claim follows the work as it stands now -- a send-back under the ceiling and an accept whose PR closed unmerged free their issue #9111

Closed as not planned

Description

@gHashTag

Part of #9021 (jam removal, lane B: the claimed and completed skips). The diagnosis is below; the rules extend specs/queen/holds.t27, the card that already decides what a dispatch row holds against its issue as it stands now (holds_files_now, see #9033).

Diagnosis

claimed, live Queen 2026-10-11 12:55Z

Sources: the public /queen/public-tasks and /queen/public-task?issue=N drawers, compared with the open-issue list. 89 open issues were claimed; the tick reported 87 at 12:53Z.

state count age (min, median / max) what holds it
running (runner, live lease) 16 18 / 102 a bee at work; none dead or vanished
wait 47 105 / 315 a runner row with no bundle; out of scope here, see #9069
empty 10 20 / 24 30-min retry floor (review_valve RETRY_FLOOR_MINUTES)
sendBack 9 14 / 55 1-hour idle floor, then failed
escalate 5 50 / 58 review valve
app registry task, no dispatch row (#1286) 1 not visible (/queen/registry is guarded) the app's mirror
  • Dead or vanished workers: 0. All running rows were on runners whose task lease was live. The existing reapers already release a silent runner (10 min), an expired lease, and a stalled row (120 min).
  • The send-back claim says "the same bee is expected back on it". No bee comes back.
    • A runner deletes the bee's session when its turn ends; the runner logs show "Agent disposed" and "Session deleted" right after "turn finished".
    • Nothing in the runtime resumes a send-back.
    • So the issue sits idle for an hour, and its own files (HS_SEND_BACK, 120 min) then shut its next attempt out from minute 60 to 120.
    • 8 of the 9 were under the retry ceiling.

completed, the 374 issues of 12:47Z

The PR state is that of branch queen-<issue>, read once per 100 issues with a batched GraphQL query.

count
issue closed since 36
a merged PR 2 (#5074, #6382)
an open PR 121
PRs from the branch, all closed unmerged 2 (#4374: #4565; #6414: #6752)
no PR at all 213

Why an accepted dispatch has no PR (all 213):

  • every one has a remote queen-<issue> branch;
  • for 206, the remote head is not the head the Queen accepted (judgedHead on /queen/public-board);
  • in 10 of 10 sampled, that accepted commit does not exist on GitHub, and gh pr list --state all --head queen-N is empty.

The accepted heads are still in the Queen's export, and queen-export-push.yml has failed on every scheduled run since 2026-10-08 06:15Z ("could not reach the export: The read operation timed out", 14 runs). tools/queen/publish.py then refuses each branch ("accepted at X, but the branch is at Y"). The other 7 are its named refusals: a workflow file, writes outside the Boundary, or conflicts.

Rules (holds.t27)

  • send_back_claim(send_backs, ceiling): under the ceiling a send-back claims nothing (CL_FREE); at the ceiling it stays live for the review valve.
  • accept_claim(read, open, merged, closed_unmerged): an accept whose branch has only PRs closed unmerged is freed (CL_FREE).
    • Merged or open keeps it done.
    • No PR keeps it done: the work waits in the export, and freeing it would discard accepted work.
    • A list that could not be read frees nothing.
  • held_stage(claim, stage): a freed claim holds no files (HS_DONE), so the next attempt is not shut out by its own row.

The runtime wiring (trios, base queen) goes behind TRIOS_QUEEN_RELEASE_DEAD_CLAIMS and TRIOS_QUEEN_FREE_CLOSED_PR, both off by default.

Success Criteria

  • t27c test-report specs/queen/holds.t27: 0 FAIL, 0 vacuous. The new tests name send_back_claim, accept_claim and held_stage and carry runtime asserts.
  • Each new rule, broken once, makes test-report FAIL.
  • Replayed on the 12:55Z claims and the 12:47Z completed set:
    • send_back_claim frees 8 and leaves the other 81 alone;
    • accept_claim frees 2 and leaves 121 open-PR, 2 merged-PR and 213 no-PR issues alone.

Filed with no Boundary section on purpose: the change is in hand (lane B), so no bee should be dispatched on it.

🤖 Generated with Claude Code

User Scenarios

  • Given a dispatch row in sendBack state whose issue is under the retry ceiling, when the Queen evaluates send_back_claim, then the claim is freed (CL_FREE) so the issue can be re-dispatched without waiting for the idle floor.
  • Given a dispatch row in completed state whose branch has only PRs closed unmerged, when the Queen evaluates accept_claim, then the claim is freed (CL_FREE) because the accepted work was never merged and the branch holds no open or merged PR.
  • Given a freed claim from either rule above, when held_stage is evaluated, then it returns HS_DONE so the next attempt is not shut out by the previous row's hold files.

Requirements

  • FR-001: send_back_claim(send_backs, ceiling) MUST return CL_FREE for send-back rows under the ceiling and CL_LIVE for rows at or above the ceiling.
  • FR-002: accept_claim(read, open, merged, closed_unmerged) MUST return CL_FREE when read is true, merged is false, open is false, and closed_unmerged is non-empty; MUST return CL_LIVE when merged is true or open is true; MUST return CL_LIVE when read is true and no PRs exist; MUST return CL_LIVE (free nothing) when read is false.
  • FR-003: held_stage(claim, stage) MUST return HS_DONE when claim is CL_FREE, regardless of stage.
  • FR-004: The new rules MUST be added to specs/queen/holds.t27 and covered by tests that exercise each branch with runtime asserts.
  • FR-005: The runtime wiring MUST be gated behind TRIOS_QUEEN_RELEASE_DEAD_CLAIMS (for send-back) and TRIOS_QUEEN_FREE_CLOSED_PR (for accept), both off by default.

Success Criteria

  • t27c test-report specs/queen/holds.t27 exits with exit 0, 0 FAIL, 0 vacuous; new tests name send_back_claim, accept_claim, and held_stage and include runtime asserts.
  • Breaking any one new rule (e.g., flipping a CL_FREE to CL_LIVE in the spec) makes t27c test-report specs/queen/holds.t27 FAIL.
  • Replay on the 12:55Z claimed set: send_back_claim frees exactly 8 of 9 send-back rows (the 8 under the ceiling) and leaves the other 81 claimed rows unchanged.
  • Replay on the 12:47Z completed set: accept_claim frees exactly 2 issues (the two with only closed-unmerged PRs) and leaves 121 open-PR, 2 merged-PR, and 213 no-PR issues as CL_LIVE.

Boundary

  • specs/queen/holds.t27

Activity

  1. added
    shape-refusedClosed by the issue-shape gate (specs/policy/issue_shape.t27); a passing edit reopens it
    on Oct 11, 2026
  2. github-actions commented on Oct 11, 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: ## Boundary -- list every file this task may touch, one per line (- specs/x.t27); without it the Queen reserves nothing and no bee can take the issue
    • missing: ## User Scenarios -- at least one Given/When/Then scenario
    • 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
  3. added a commit that references this issue on Oct 11, 2026
    66d4f8b
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

    queen-shapedshape-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