Repository navigation
Mixed Passes: an Architect run and a Security run beside Pickup runs, never two of a kind - #1599
Merged
Merged
Conversation
… never two of a kind (#1572) An Architect run and a Security run each take a slot up to the Command limit and hold a lock of their kind, so a second of the same kind is skipped, saying why. Each reviews in a worktree of its own, <repo>-architect or <repo>-security, so neither's stale disposal removes the other's live worktree. Each reserves the plan or fix it dispatches on origin before marking it ready, as a Pickup run reserves its Ready issue, and releases it the same way. An issue-less Custom process takes no lock of a kind and counts only toward the Command limit. An Architect run or a Security run is skipped beside an older thirdshift's Pass, whose kind it can't tell.
Correct the site's Custom process line and the code navigation index, the stale Pickup and Architect comments, rename PassKind::word to slug, build the reservation ref in one place, and record in ADR 0014 why a review worktree of each kind is never live when found. Test an Architect run beside an issue-less Custom process, and keep the launch-check failure test on a dispatch the reservation commit no longer pre-empts.
… own worktree now
Brings in the Failure limit (#1569): Pickup counts agent-failed issues, not Claims. Conflicts resolved, keeping both intents: - docs/guide.md: Pickup step 2 keeps this branch's wording (no Pass keeps the repository to itself any more); steps 3 and 4 take the Failure limit and the agent-failed Sweep. - docs/code-navigation.md: the Claim and Failure limit rows from #1569, with the reservation at src/reservation.rs and the PassKind lock from this branch. - src/pickup.rs: the module comment names the Failure limit and the agent-failed clearing, and a reservation held by any run, Pickup, Architect or Security. - site/docs/index.html regenerated from docs/guide.md.
This was referenced Oct 29, 2026
Closed
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
Up to the Command limit, an Architect run and a Security run can each run beside Pickup runs and beside each other, but never two of a kind on one repository.
Architect run Security run review in <repo>-architect audit / fix publishing / close in - <repo>-architect + <repo>-security check plan check fix issue + Reservation::of_published(plan) + Reservation::of_published(fix) # refs/heads/thirdshift/pickup/<n> needs-triage → ready-for-agent needs-triage → ready-for-agent dispatch … dispatch …, record ending + release reservation + release reservationsrc/pickup/reservation.rsmoved tosrc/reservation.rs, since all three Pass kinds now share it. ADR 0017 and ADR 0014 are amended.src/github/advisories/description.rsnow says why.GLOSSARY.md,docs/code-navigation.mdand the hand-written site pages say the same.site/docs/index.htmlwas regenerated from the guide.Evidence
command_limit = 2,thirdshift architectbeside a live Pickup run said1 Command is running on acme/widgets, and this Pass runs only alone there. Architect and Security runs shared<repo>-architect, and the plan or fix was dispatched with no origin reservation.thirdshiftprocesses at once:architect_run::at_a_command_limit_of_3_an_architect_run_reserves_its_plan_beside_a_live_pickup_run_and_another_passes_it_overrefs/heads/thirdshift/pickup/8is on origin.ghhook starts a third Pickup run after the plan is marked ready but before its Claim. That run says#8 is reserved by another run or is no longer Readyand takes CI watching, CI-fix Repair and the Repair cap #9.architect_run::a_second_architect_run_is_skipped_while_one_runs_saying_why_and_a_pickup_run_runs_beside_it: exit 0,an Architect run is already running on acme/widgets.security_run::at_a_command_limit_of_3_a_security_run_audits_beside_a_pickup_run_and_an_architect_run_in_a_worktree_of_its_ownwork/widgets-security, while the live review is inwork/widgets-architect.security_run::a_second_security_run_is_skipped_while_one_dispatches_a_fix_it_reserved_and_never_reads_it_as_failedFix Run: pending, and the fix is reserved on origin.a Security run is already running on acme/widgets, not as a failed fix, and changes nothing.pickup_run::at_a_command_limit_of_2_an_architect_run_or_a_security_run_is_skipped_beside_a_pass_from_before_the_command_limitprocess::at_a_command_limit_of_2_a_process_with_no_issue_runs_beside_any_other_command_up_to_the_limitandprocess::at_a_command_limit_of_2_an_architect_run_reviews_beside_a_process_with_no_issueworktree::acquisition_tests::an_architect_run_and_a_security_run_review_in_worktrees_of_their_own_neither_disposing_of_the_otherarchitect::tests::a_plan_another_run_holds_reserved_is_refused_with_no_editsecurity::fixing::publication::tests::a_fix_another_run_holds_reserved_on_origin_is_never_marked_readyreserve 8beforeedit 8.scripts/affected-tests origin/issue-1564selected the site tests (51/51 pass, withPLAYWRIGHT_BROWSERS_PATHpointed at this machine's browser) and the full Rust suite.cargo test --no-fail-fast -- --skip sandbox::tests) found two failures this change caused, both now fixed:architect_run::a_dispatch_that_fails_its_launch_checks_still_has_a_record: its brokenuser.namenow stops the plan's reservation commit first. It now breaksuser.email, which still trips the dispatch's launch checks, and asserts the reservation is released.security_run::review_acquisition_failure_is_pre_audit: its planted work now goes at<repo>-security.cargo test --bin thirdshift -- --skip sandbox::tests: 1547 passedarchitect_run: 93pickup_run: 118process: 152review_acquisition_failure_is_pre_auditsandbox::testsand 21 tests intrial,scoring,bug_originsandexperimentsfail on this machine. Their logs showsocat is not on PATHor Python's missingtomllib. The same 21 fail on the baseorigin/issue-1564, and none of their files is in this diff.Merge Danger
Door: two-way
The reservation refs and lock files are the existing kinds. Reverting restores one Architect or Security run alone per repository.
Blast Radius: scheduling
This only changes anything above the default
command_limit = 1. At 1, every skip still saysanother Pass is already running on <owner>/<repo>. A reservation already held fails the Architect run or Security run before any label is changed.Unaddressed findings
Standards
PassKindbesidelogs::Pass(judgement call): declined. They are different concepts.PassKindis only the kinds that hold a lock of their kind, and a Pickup run is deliberately not one (src/command_limit.rs,Sharing::UpToTheLimit). Deriving one from the other would give the lock a variant it must never take.PassKind::word()naming / worktree naming incommand_limit: partly addressed. It is renamedslug(). Worktree names stay keyed byPassKindon purpose: the safety of stale disposal comes from the lock of that kind (now recorded in ADR 0014). The mixed import paths are left as is, sincelaunchre-exports what its callers pass tolaunch::start.ReviewWorktree::createtakes a barePassKind, not a lock token: partly addressed. ADR 0014 now records the assumption. A token type is declined for this Ticket: every caller reachescreateonly afterlaunch::starthas taken the lock. Making that a type would thread a token throughpass::Outsideand the Security seams for a single invariant.Reserved<T>wrapper would add a type for three call sites.publication::Shellbuilt twice;reserveon two traits (judgement call): declined. The twoShells are in exclusive branches offixing::publish. The two traits are the two seams (pass::Outside,publication::Outside), each with its own in-memory adapter, and both call one function,Reservation::of_published.agent_opens_pr, which is defined inarchitect_run.rs,pickup_run.rsandprocess.rsalready.PassKind::Architectedits in the worktree tests (judgement call): declined. The edits make each test name the kind of review worktree it exercises. A defaulting helper would hide the parameter the new disposal rule depends on.Spec
cargo test --test security_run -- a_second_security_runexercises the window: theghhook starts a Pickup run between marking the fix ready and its Claim. Pickup's Ready search already passes asecurity-fixissue over (#8 a Security fix: its Security run owns it), so it never reaches the reservation. The same test assertsrefs/heads/thirdshift/pickup/8is held through the dispatch and released after. The refused-reservation path for a fix is covered bya_fix_another_run_holds_reserved_on_origin_is_never_marked_ready.process::at_a_command_limit_of_2_an_architect_run_reviews_beside_a_process_with_no_issueis added, and the misleading comment in the otherprocess.rstest is fixed. The reverse disposal direction stays a unit test:worktree::acquisition_tests::an_architect_run_and_a_security_run_review_in_worktrees_of_their_own_neither_disposing_of_the_othercreates and disposes of both kinds against one Launch directory, without a session.Why::Older, the reworded Pickup line, the module move): kept. Each follows from the change, as the review notes, and each is documented and tested.Security review outcome
No unaddressed introduced findings.
Review coverage
Both reviewers read every changed file in commit 5c84223, except
site/docs/index.html. Both confirmed that exclusion as generated output:npm run docs:check --prefix siteexits 0, andsite/generate-docs.mjsis unchanged. Changed after the review, in addressing its findings, and not read by it:docs/adr/0014-successful-review-acquisition-authorizes-stale-disposal.md(an amendment bullet).Closes #1572
Built with claude 2.1.312 · claude-opus-5-5 · high