Repository navigation
Description
This was generated by AI during triage.
From a 2026-11-10 investigation of why Spec #1901, labelled ready-for-agent, was not running anywhere in the fleet.
Agent Brief
Category: enhancement
Summary: A Pickup run passes over a Ready Spec with every Ticket is closed, even when its Spec branch is on origin and its Spec PR still needs work. Taking it by hand already does the right thing. Pickup should take it too.
Current behavior:
src/ready.rs passes over any Spec whose sub-issues are all closed, with Reason::TicketsClosed (the first read at about line 541, and again after reading its Tickets at about line 559). Neither check looks at whether a Spec branch or Spec PR exists, or whether the Spec was handed back with ready-for-agent.
Running the Spec by hand already covers this case (docs/guide.md, "Running the Spec again picks up where the last Spec run stopped"): with every Ticket closed, the Spec run goes straight to the Spec review and the Spec PR. It refuses only when there is no Spec branch (every Ticket is closed and there is no Spec branch; nothing to do, src/run.rs).
On 2026-11-10:
- Spec Spec:
in-progressmarks only a live Run #1901's Tickets Claim endings:in-progressoff at ready for review, swapped foragent-failedon failure #1902, A waiting Spec run putsready-for-agentback on its Spec, notagent-failed#1903 and Post a failed Run's Recovery, and a waiting Spec's reasons, as a generated issue comment #1904 were closed. Its Spec PR Spec:in-progressmarks only a live Run #1935 had a Merge conflict. - The Spec run on
testdied during Repair whentestrebooted at 11:07 EST. - Spec:
in-progressmarks only a live Run #1901 was handed back withready-for-agentat 12:19 EST. - Pickup runs on
test,orchestrateandlima-thirdshiftlogged#1901 every Ticket is closedon every pass. No Command took it.
The pass-over came from #324 (55a824db) and was reworded in ccbd3f07 ("Say every Ticket is closed when a Spec's Tickets closed since its read"). Neither commit considered a handed-back Spec with an unfinished Spec PR.
Desired behavior:
A Pickup run takes a Ready Spec whose Tickets are all closed when its Spec branch is on origin, and dispatches the Spec run as thirdshift <Spec URL> would: the Spec review, then the Spec PR's Delivery and Repair loop.
With every Ticket closed and no Spec branch on origin, it still passes over the Spec with every Ticket is closed, so the Spec run never ends with nothing to do.
The Architect run's Ready-issue gate should agree with Pickup on which Specs count as Ready.
Key interfaces:
src/ready.rs: the twoReason::TicketsClosedchecks consult whether the Spec branch exists onorigin.- Whatever already reads the Spec branch for a Spec run's Continuation (ADR-0002).
docs/guide.md, the Pickup selection rules and the passed-over reasons ("Even with a hand-back, a Spec with every Ticket closed is passed over…"): says when such a Spec is taken.
Acceptance criteria:
- A
ready-for-agentSpec whose Tickets are all closed, with its Spec branch onorigin, is selected by a Pickup run, and the dispatched Spec run reaches the Spec review without running any Ticket again. - The same Spec without a Spec branch on
originis passed over withevery Ticket is closed, as now. - A Spec whose Tickets close between the candidate read and the Ticket read follows the same rule.
- Reservation and Claim behave as for any other Ready issue.
- Tests run through the CLI against the fake
gh.
Out of scope:
- Recovering an issue left behind by a Run that was killed outright (Recover an open issue left in-progress by a Run that was killed outright #710).
- Orphaned reservations (Notice a reservation whose owning process has died #1959).
- Showing passed-over Ready issues in the Console (Show how long a scheduled Pass has been skipping, and why #1960).
Activity
JacobStephens2 commentedon Nov 11, 2026
Agent Brief
Confirmed on selected Base commit 6f4ba5d. Keep #1964 as one actionable Ticket; no split is needed.
Diagnosis and evidence
Implementation
Allow a genuine all-closed Spec through both rejection points and exempt that continuation from requiring a Startable Ticket when its resumable Spec branch exists on origin. Preserve trust, hand-back, settling, blocker, Claim, reservation and Claim-generation checks. Specs with open but unstartable Tickets must remain ineligible.
Use ADR-0002-compatible continuation facts. src/branch.rs:198 shows that Started records historical evidence; it does not establish continuation eligibility. A PR without an origin branch must not qualify, and a retained branch whose latest PR is closed or merged must retain the existing Fresh-selection behavior. Check eligibility without acquiring a worktree. Preserve rejection when the later Ticket read is empty.
Acceptance and validation
Add CLI regressions against fake gh for all-closed continuations with an origin branch and either no PR or an open PR; assert Spec review/Delivery runs without any Ticket session. Cover Tickets closing between candidate and Ticket reads, selection and post-reservation refresh, Architect priority including settling, and absent hand-back. Retain no-branch, empty-list, open-but-unstartable and finished-PR protections. Reservation and Claim behavior must remain unchanged; follow the verify-pickup skill when modifying readiness.
Update GLOSSARY.md definitions for Ready issue, Startable Ticket and Architect run; docs/guide.md Pickup rules, passed-over reasons and Architect gate descriptions; and relevant hand-written site wording, including site/how-it-works/index.html:238. Regenerate the manual from its source.
Existing validation passed: 31 readiness unit tests, two all-closed Pickup CLI tests, and the direct all-closed Spec continuation CLI test. The standalone reproduction also passed. No source or Git-history changes were made.