Repository navigation
Pickup moves on to the next Ready issue when it loses a reservation - #1577
Merged
Merged
Conversation
…1570) A Pickup run that loses the origin reservation, or whose selection went stale once reserved, releases any reservation of its own and searches again past that issue in pickup.order. It is skipped only once no Ready issue it can reserve is left, with exit 0 and no Run notification.
…ation in race Standards S1, S3, S4, S7, S8 and Spec P1, P2.
This was referenced Oct 28, 2026
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 Pickup run that loses the origin reservation (ADR 0017), or whose selection went stale once it held the reservation, now moves on to the next Ready issue in its
pickup.order. It is skipped only when no Ready issue it can reserve is left.ready::first(.., past)/Search::paststarts the search after the issue already tried, so lines for issues passed over are not printed twice. A Spec that was tried still keeps its Tickets silent.PickupOrder::comes_afterholds the order rule in one place, and theInMemorytest double uses it too.no Ready issue on <owner>/<repo> it can reserve, past #7 and #9; check refs/heads/thirdshift/pickup/7, refs/heads/thirdshift/pickup/9 on origin if one stays reserved. It still exits 0, sends no Run notification and makes no Claim.docs/guide.md(step 6 and the skip paragraph, withsite/docs/index.htmlregenerated), the Pickup run entry inGLOSSARY.md, ADR 0017 (amended in place) andsite/how-it-works/.Closes #1570
Evidence
issue-1564,run_throughskips withSkipped::IssueUnavailableas soon asreservereturnsNone. A second Ready issue is never tried. That is the behaviourdocs/grill-with-docs/1532-keep-working-the-backlog.mdcites.After: new and extended tests, all passing:
cargo test --test pickup_run: 112 passed.cargo test --bin thirdshift: everything passes except 22sandbox::tests, which fail on this host withsandbox failed to start: socat is not on PATH. This change does not touchsrc/sandbox.rs.npm test --prefix site: 51 passed.npm run docs:check --prefix site: exit 0.cargo clippy --all-targets -- -D warnings: clean.architect_run91,pickup_model4,security_run123 andstatus74, all passing. A fullcargo test --test '*'sweep was not completed here.bug_originsfailed on this host for reasons outside this change (tomllibis missing from Python, and sandbox tests needsocat), and the sweep hung inexperiments, so I stopped it. CI covers the rest.Merge Danger
Door: two-way
No data or ref format changes. Reservations are taken and released exactly as before, once per issue tried.
Blast Radius: Pickup
A Pickup run may now make more reservation pushes and more Ready issue listings per pass, at most one of each per Ready issue it fails to reserve. The skip reason in the Activity log changed wording, from
#n is reserved…tono Ready issue on … it can reserve, past #n; check ….Review
Reviewed with
thirdshift-code-reviewagainstissue-1564. Standards raised 8 findings, all judgement calls; Spec raised 2, neither claiming wrong behaviour. Fixed: S1 (one order rule), S3 and S4 (one name:unreservable), S7 (ADR wording and amendment marker), S8 ("another Pickup run"), P1 (the race now checks the Run notification) and P2 (the skip reason keeps the reservation refs for the Activity log).Coverage: both reviewers read every changed file.
site/docs/index.htmlis generated fromdocs/guide.md;docs:checkpassed, and both reviewers also read its diff. No changed file was left unread.Unaddressed findings
Standards
pastthreaded throughOutside::ready_issue, with Security passingNone). Declined.src/ready.rs:1-6says any run asks whether a repository has a Ready issue "against the very same definition". A separate Pickup-only search method would add a second seam to that one definition. The only cost is that Security and Architect passNone.pickup_race's bool tuple grows to five,tests/pickup_run.rs:322-325). Declined. The tuple shape predates this change, and A Pickup run that loses a reservation takes the next Ready issue #1570 asks for the existingpickup_raceto be extended, not reshaped. A restructure belongs in its own test refactor.search_orderedtest helper only callssearch_past). Declined. The reviewer called it acceptable, since it saves editing the existing call sites.Spec
None.
Security
None. Reviewed the diff against the merge base, plus the reservation (
src/pickup/reservation.rs) and Ready search (src/ready.rs) code it relies on. Every issue tried still goes through the Trusted account check, both when it is selected and when it is refreshed after being reserved. If an issue's selection went stale, its reservation is released before the next issue is tried. Another host's reservation is never touched. The loop is bounded because each search only looks past the issue just tried. Ref names are built only from issue numbers (u64).Built with claude 2.1.312 · claude-opus-5-5 · high
Security review outcome
No unaddressed introduced findings.