Repository navigation
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
Description
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 (
judgedHeadon/queen/public-board); - in 10 of 10 sampled, that accepted commit does not exist on GitHub, and
gh pr list --state all --head queen-Nis 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 namesend_back_claim,accept_claimandheld_stageand carry runtime asserts.- Each new rule, broken once, makes
test-reportFAIL. - Replayed on the 12:55Z claims and the 12:47Z completed set:
send_back_claimfrees 8 and leaves the other 81 alone;accept_claimfrees 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
sendBackstate whose issue is under the retry ceiling, when the Queen evaluatessend_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
completedstate whose branch has only PRs closed unmerged, when the Queen evaluatesaccept_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_stageis 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 whenreadis true,mergedis false,openis false, andclosed_unmergedis non-empty; MUST return CL_LIVE whenmergedis true oropenis true; MUST return CL_LIVE whenreadis true and no PRs exist; MUST return CL_LIVE (free nothing) whenreadis false. - FR-003:
held_stage(claim, stage)MUST return HS_DONE whenclaimis CL_FREE, regardless ofstage. - FR-004: The new rules MUST be added to
specs/queen/holds.t27and 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) andTRIOS_QUEEN_FREE_CLOSED_PR(for accept), both off by default.
Success Criteria
t27c test-report specs/queen/holds.t27exits withexit 0, 0 FAIL, 0 vacuous; new tests namesend_back_claim,accept_claim, andheld_stageand 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.t27FAIL. - Replay on the 12:55Z claimed set:
send_back_claimfrees 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_claimfrees 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
github-actions commentedon Oct 11, 2026
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.
- specs/x.t27); without it the Queen reserves nothing and no bee can take the issueFR-001: ... MUST ...exit 0, or a backticked commandfeat(queen): a claim follows the work as it stands now -- free send-b…
spec(queen): a claim on the issue follows the work as it stands now -…