Repository navigation
A waiting Spec run puts ready-for-agent back on its Spec, not agent-failed - #1936
Merged
Merged
Conversation
…ailed A Spec run that failed no Ticket and whose undone Tickets all wait on a person or on other work takes in-progress off its Spec and puts ready-for-agent back, or needs-triage after an untrusted edit of the Spec since its last Trusted ready-for-agent labelling. A blocking cycle, or any failed or interrupted Ticket, still ends agent-failed. Closes #1903
A waiting Spec run on a Spec with no ready-for-agent only takes in-progress off, so thirdshift never makes a Spec Ready that the Day shift did not. Keep one Tickets not done error with an only_waiting flag, check cycles where the walk through blockers starts, and correct the guide and site index wording. The Pickup test now reads the timeline thirdshift's edits recorded.
Handing a waiting Spec back labels it ready-for-agent again, by thirdshift's own Trusted account. The Trusted-account check for Tickets counts edits only since the later of the Ticket's and its Spec's last Trusted labelling, so that hand-back excused an untrusted edit of a waiting Ticket made before it, and the next Spec run started that Ticket. A waiting Spec run now checks each open Ticket in the Spec's repository first, and fails as before when one fails the check or cannot be checked. Co-Authored-By: Claude <noreply@anthropic.com>
This was referenced Nov 10, 2026
Merged
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A Spec run that is only waiting no longer ends
agent-failed. Its Claim hands the Spec back.A Spec run is only waiting (
TicketBoard::only_waiting) when two things hold:A Ticket in a blocking cycle never waits. The run still exits
1and still reportsTickets not done: …, because #585 owns the outcome name, exit code and notification wording.Other changes:
trust::untrusted_edit_since_readyreuses the Trusted-account check from the last Trustedready-for-agentlabelling.ready-for-agentlabelling, which the Ticket trust check counts edits from, so an untrusted edit to a waiting Ticket made earlier in the run was excused and the next Spec run started that Ticket. A waiting Spec run now runs the Ticket trust check on each open Ticket in the Spec's repository first, and endsagent-failedif one fails it or cannot be checked. Regression testa_waiting_spec_runs_handback_does_not_let_an_earlier_untrusted_ticket_edit_startfailed on c5499fd (Ticket Numbered Issue branches after a merged or closed PR #21 started), passed at the merge base, and passes after the fix;GLOSSARY.mdanddocs/guide.mdsay so.docs/guide.md(regenerated intosite/docs/index.html),site/index.html,site/how-it-works/andsite/architecture/.Evidence
Execution evidence
CARGO_INCREMENTAL=0 cargo test -j2 --test spec_run a_spec_run_waiting_only_on_unready_tickets_hands_its_spec_back, run againstorigin/issue-1901'ssrc/with this PR's test:test a_spec_run_waiting_only_on_unready_tickets_hands_its_spec_back ... ok.a_waiting_spec_run_on_a_spec_never_labelled_ready_for_agent_does_not_label_it, on a9a70d1:... ok.cargo test --test spec_run: 98 passed, 1 ignored.cargo test --test pickup_run: 147 passed, 1 ignored.a_waiting_spec_is_passed_over_until_its_ticket_can_start_then_continued, which replays the timeline thirdshift's own label edits recorded.cargo clippy --all-targetsis clean.npm run docs:check --prefix siteexits 0.cargo test --bin thirdshift). The machine had about 2 GB free and no swap, and rustc was killed (SIGKILL) linking it, three times. These unit tests rely on CI:claim::tests(hand-back, needs-triage, never-ready, trust-read failure, Stop)spec_run::tests(waiting/failed classification throughScripted)trust::testsVisual evidence
There are three prose-only changes to hand-written site pages. Each was captured at 1440×900 with Playwright Chromium, Before from
origin/issue-1901'ssite/and After from this head:/how-it-works/Spec runs paragraph/Pickup run paragraph/architecture/Claim bulletPublishing them to a secret Gist was refused by this session's permission settings, so they are not embedded. They remain on the host:
/tmp/before-desktop-how.STGO2B.png//tmp/after-desktop-how.0KLxMX.png/tmp/before-desktop-index.DYb8OE.png//tmp/after-desktop-index.43LHms.png/tmp/before-desktop-arch.Tl5i6p.png//tmp/after-desktop-arch.GnwA9l.pngLayout is unchanged; each page only gains a sentence.
Review coverage
The Standards and Spec reviewers reviewed a9a70d1, and between them read every changed file. One generated file was excluded:
site/docs/index.html, generated fromdocs/guide.mdbysite/generate-docs.mjs.npm run docs:check --prefix siteexited 0, and both reviewers confirmed the exclusion.The review-fix commit c5499fd was not reviewed again. It changed:
src/claim.rs,src/spec_run.rs,src/spec_run/ticket_board.rs,src/failed_run.rstests/spec_run.rs,tests/pickup_run.rsdocs/guide.md,site/index.html,site/docs/index.htmlUnaddressed findings
Standards
TicketsNotDone { not_done: Vec<String> }. Declined, as the reviewer suggested. It carries the stringsTicketBoard::not_done(src/spec_run/ticket_board.rs) already returns for every Tickets-not-done cause. A type for them is a wider change than this issue.Spec
TicketBoard::waitsreturnsfalsefor any Ticket that ended in this run other than a not-reproduced bug.Security review outcome
No unaddressed introduced findings.
Merge Danger
Door: two-way
Reverting restores the old behaviour, where a waiting Spec run is labelled
agent-failed. Specs already handed back keepready-for-agent. That is the normal hand-back state, and they need no cleanup.Blast Radius: labels
The change affects Spec Claim endings, and through them Pickup:
Ticket runs and Custom processes without
land-ticketsare unaffected.Closes #1903
🤖 Generated with Claude Code
Built with claude 2.1.314 · claude-opus-5-5 · medium