Repository navigation
Command limit: Pickup runs share a repository up to [pass] command_limit - #1580
Merged
Merged
Conversation
Each live Command on a repository holds a slot, an advisory file lock the operating system frees when its process ends. A Pass counts the held slots and takes one under a short lock; a Ticket run, Spec run or Custom process started with an issue takes one without counting, so it is never refused. Each Pass also tries the pre-Command-limit lock, so old and new binaries keep each other out at command_limit = 1. Architect runs, Security runs and issue-less Custom processes still keep the repository to themselves. Closes #1571
… review A Pass that holds the pre-Command-limit lock also holds a marker, so a lock held without the marker is an older thirdshift's Pass and counts as one more Command at any limit. The limit-1 message is chosen in one place, hold_slot warns for itself, and a Custom process with an issue now makes a Pickup run skip at the default limit, as every live Command does.
# Conflicts: # docs/guide.md # site/docs/index.html # src/pickup.rs
This was referenced Oct 29, 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
[pass] command_limit(default 1) replaces the Pass lock. It is the number of live Commands on one repository on one machine at which a Pass there is skipped. Closes #1571.another Pass is already running on <owner>/<repo>. The existingALREADY_RUNNINGtests pass unchanged.[resources]), the README anchor, the hand-written site pages,docs/code-navigation.md, and the glossary's Sweep line.Evidence
Before: at
command_limit = 2, a second Pickup run was skipped while the first was live. A Custom process with an issue did not count. And an older thirdshift holding its lock next to one new Pickup run let a second new one start, making 3 Commands at limit 2. That last case is the review'sat_a_command_limit_of_2_a_pass_from_before_the_command_limit_and_a_pickup_run_fill_the_repository: it failed with the second Pickup run taking CI watching, CI-fix Repair and the Repair cap #9.After: these CLI tests pass, each running two or more
thirdshiftprocesses at once:Local validation:
npm test --prefix sitepassed 51/51, andnpm run docs:check --prefix sitepassed.cargo test --bin thirdshift -- --skip sandbox::testspassed 1536.cargo test --no-fail-fast --test '*'passed everything except 28 tests that can't run on this machine:sandbox failed to start: socat is not on PATH, becausesocatis not installed here.bug_origins::settlement::historical_review_and_reclosed_origin_regressions, which needs Python'stomllib; this machine has Python 3.9.None of these tests touches this change. The 22 unit tests in
sandbox::testsfail for the samesocatreason. CI should run all of them.Merge Danger
Door: two-way
The default of 1 behaves as today, and so does an older thirdshift next to a newer one at that limit. Reverting removes the
[pass]key. A User config that sets it would then be refused as an unknown key until the line is deleted.Blast Radius: scheduling
Every Pass, and every Ticket run, Spec run or Custom process started with an issue, now takes a slot under
~/.thirdshift/command-slots/. A slot that can't be taken is only a warning for a hand-started Command, but a Pass fails on it, as it did on the old lock. With the limit above 1, overlapping Pickup runs can pass the Claim limit by up to the Command limit minus one (accepted in the Spec). They can also pick the same Ready issue, and the loser is skipped until #1570 lands.Review coverage
Both reviewers read every changed file in the first commit, 1c2fbb2.
site/docs/index.htmlis generated fromdocs/guide.md; both reviewers left it unread, relying onnpm run docs:check --prefix sitepassing. Changes made after the review were not read by it:src/setup.rsandtests/setup.rs(Setup's expected defaults gain[pass]).GLOSSARY.md, line 51 (the Sweep wording). The reviewers had read that line only before the change.src/command_limit.rs,src/launch.rs,src/processes.rs,src/run.rs,tests/pickup_run.rs,tests/process.rs,docs/guide.md.Unaddressed findings
Standards
GLOSSARY.mdalready defines the Failure limit and the Command limit as this Spec builds them". The entry describes the Spec's end state, and "never two of a kind" arrives with Mixed Passes: an Architect run and a Security run beside Pickup runs, never two of a kind #1572. Scoring runs and Experiments: see Spec 4. The Sweep line was fixed.Sharing::Alone(&'static str)as a primitive. Renamed:Slots::aloneis nowtry_alone, andWhy::Aloneis nowWhy::HeldAlone. The phrase stays a string becauselogs::Pass(src/logs.rs:168-172) has no Custom process to reuse.launch::start.processes.rsnow goes straight tocommand_limit.launch::startstill passes onlimitandsharing, because it owns the Pass's order: preflight, thenpass_fired, then the slot (src/launch.rs,start).(config.command_limit, Sharing). Declined. It is two values at four call sites, so a type to bundle them would be Speculative Generality.tests/process.rs:3102andtests/process.rs:3419both read it, andtests/architect_run.rsreads it inline.Spec
cargo test --test architect_run an_architect_run_on_a_different_repository_at_the_same_time_is_not_skippedpasses. It exercises the per-repository slot directories at limit 1: the first run holds a slot andalone.lockon acme/widgets while acme/gadgets runs.Slots::countingtakes a blockingFile::lockoncount.lockaround counting and taking (src/command_limit.rs). The CLI has no seam to interleave two processes inside that window deterministically.status(src/logs/status/inbox.rsperdocs/code-navigation.md). The diff doesn't change the records, and the limit-2 test shows two rows instatus --json.StartedBy::Commandpath as a Ticket run, atsrc/run.rs:197.Security
~/.thirdshift/command-slots/are built from a repository that has already passed the Origin match, and their state stays in the user's own home directory.Closes #1571
Built with claude 2.1.312 · claude-opus-5-5 · high
Security review outcome
No unaddressed introduced findings.