Public: anyone can read this; the crew can change it.
checks.concurrency counts a runner's capacity, so adding a runner raises how many checks run at once #15268
Check · Review · Land · Live done — Landed and live in production.
Each registered runner that is live now raises how many checks run at once: by the number of jobs it runs at once, up to the setting's own ceiling of 16. Before this, checks.concurrency counted only the forge's own cells. What changed One function decides the number.
shipped production is serving it deploy cfe12e4
Each registered runner that is live now raises how many checks run at once: by the number of jobs it runs at once, up to the setting's own ceiling of 16. Before this, checks.concurrency counted only the forge's own cells.
What changed
- One function decides the number.
capacity(lane)insrc/checks/lane_state.tsis still the one place the scheduler andspareSlotsread it. It is now the setting plusliveRunnerJobs(db, now), and it adds the runners only when checks are placed on runners. Under the process placement runners never get a check, so they add nothing. The total is capped atCHECKS_CEILING, which is the setting's own maximum of 16 read fromCAPACITY, so a crowd of runners can't overload the machine. - The forge now learns how many jobs a runner runs. Before, it never knew. A new migration
20261121190000-check-runner-jobs(pinned) addscheck_runner.jobs, default 1.src/runner/main.tssendsjobs(itsFORGE_RUNNER_JOBS) on everyPOST /api/v1/runner/claim. The claim handler stores it throughnoteRunnerJobsand ignores anything that isn't a whole number from 1 to 64. The OpenAPI route lists the new field. - A runner that goes quiet stops counting without a restart.
liveRunnerJobsadds up the jobs of runners seen withinSEEN_FRESH_MS(60 s), the same windowrunnersAroundalready uses, and it is read on every pick. A runner that connects is counted at the next tick. One that stops asking drops out once a minute has passed since it was last seen. - Text. The help line for "Checks at once" now opens with one sentence on what it counts: the forge's own cells, plus each runner seen in the last minute, up to 16.
docs/features/runners.mdmoves this item out of "Not yet".
Where to look
- The cap is on the total, not on the setting: with the setting at 16, runners add nothing.
- The forge's own
local-Nrunners count the same way as runners started by hand. They are the ones that make the cap matter on a single machine.
Not done
- No page lists runners.
- Nothing else that reads
checks.concurrency(vitals, bottleneck, pipeline) shows the runner-raised number; those readouts still show the bare setting. - The setting's ceiling stays 16.
Tests
test/checks-runner-capacity.test.ts(new) checks the setting plus live runners, the process placement, a runner dropping out at the edge of the 60 s window, the cap, input validation and the help sentence. The first case fails without the change.test/runner-claim.test.tsgains a case where a claim'sjobsis stored.bun scripts/gate.ts --fixandbun x tsc --noEmitare clean.scripts/fast.tsnamed 3,388 files because the migration reaches everything. Instead I ran the 76 test files covering runners, capacity, migrations, the contract and everything that importslane_stateorrunner_jobs: 983 pass, 0 fail.- No screenshots: the only visible change is that one help sentence, so the before and after looks are the old and new text.
- The desk note says production is releasing. This pull only proposes; nothing here touches production.
Try
The Try: commit names /admin/capacity, but the page is /settings/capacity. I couldn't amend it because force-pushes are refused.
[{"go":"/settings/capacity","look":"The Checks row's \"Checks at once\" help text","expect":"It starts: How many repository checks run at once on this forge's own cells; each runner seen in the last minute adds the jobs it runs at once, up to 16 in all."},
{"go":"/settings/capacity","look":"The rest of that help text","expect":"Unchanged after that sentence: lowering it lets running ones finish, and the Empty default from CPUs is still described","ask":"Is one sentence enough to say runners count?"}]
🤖 Generated with Claude Code
Each registered runner that is live now raises how many checks run at once: by the number of jobs it runs at once, up to the setting's own ceiling of 16. Before this, checks.concurrency counted only the forge's own cells.
What changed
- One function decides the number.
capacity(lane)insrc/checks/lane_state.tsis still the one place the scheduler andspareSlotsread it. It is now the setting plusliveRunnerJobs(db, now), and it adds the runners only when checks are placed on runners. Under the process placement runners never get a check, so they add nothing. The total is capped atCHECKS_CEILING, the setting's own maximum of 16, so a crowd of runners can't overload the machine. - The forge now learns how many jobs a runner runs. A new migration
20261121190000-check-runner-jobs(pinned) addscheck_runner.jobs, default 1.src/runner/main.tssendsjobs(itsFORGE_RUNNER_JOBS) on everyPOST /api/v1/runner/claim. The claim handler stores it throughnoteRunnerJobsand ignores anything that isn't a whole number from 1 to 64. The OpenAPI route lists the new field. - A runner that goes quiet stops counting without a restart.
liveRunnerJobsadds up the jobs of runners seen withinSEEN_FRESH_MS(60 s), the same windowrunnersArounduses, and it is read on every pick. A runner that connects is counted at the next tick. One that stops asking drops out a minute after it was last seen. - Text. The help line for "Checks at once" now opens with one sentence on what it counts: the forge's own cells, plus each runner seen in the last minute, up to 16.
docs/features/runners.mdmoves this item out of "Not yet". - Gate fix. The first push failed the gate's "both doors" rule (no terminal screen or how-to for the new migration). The
jobsfield is plumbing between a runner and the forge with nothing new to open, so a commit carries aNo door:line saying so. Main is merged in so the branch runs main's version of that rule.
Where to look
- The cap is on the total, not on the setting: with the setting at 16, runners add nothing.
- The forge's own
local-Nrunners count the same way as runners started by hand. - The terminal's capacity screen shows each setting's
reason, not itshelp, so the new sentence appears on the web page and in the doc but not in the terminal. - The gate still prints a note that
liveRunnerJobslooks likecountThreadinsrc/core/issues.ts(0.71). It doesn't fail the gate; they are counts over different tables, so I left them apart.
Not done
- No page lists runners.
- The vitals, bottleneck and pipeline readouts still show the bare setting, not the number raised by runners.
- The setting's ceiling stays 16.
Tests
test/checks-runner-capacity.test.ts(new) checks the setting plus live runners, the process placement, a runner dropping out at the edge of the 60 s window, the cap, input validation and the help sentence. The first case fails without the change.test/runner-claim.test.tsgains a case where a claim'sjobsis stored.- After merging main: the gate, run with
FORGE_CHECK_BASE=origin/main, passes;bun x tsc --noEmitis clean; 150 tests pass and none fail across the runner, capacity and schema-migration test files. Before the merge, 983 tests across 76 files covering runners, capacity, migrations, the contract and what importslane_stateorrunner_jobsalso passed. - No screenshots: the only visible change is that one help sentence, so the before and after looks are the old and new text.
- The desk note says production is releasing. This pull only proposes; nothing here touches production.
Try
The Try: commit names /admin/capacity, but the page is /settings/capacity. I couldn't amend it because force-pushes are refused.
[{"go":"/settings/capacity","look":"The Checks row's \"Checks at once\" help text","expect":"It starts: How many repository checks run at once on this forge's own cells; each runner seen in the last minute adds the jobs it runs at once, up to 16 in all."},
{"go":"/settings/capacity","look":"The rest of that help text","expect":"Unchanged after that sentence: lowering it lets running ones finish, and the Empty default from CPUs is still described","ask":"Is one sentence enough to say runners count?"}]
🤖 Generated with Claude Code
Clean. capacity() is the single reader: setting plus liveRunnerJobs, runner placement only, capped at the setting ceiling. The jobs count is validated at the boundary (whole number 1 to 64), behind runner-token auth. Staleness uses the existing SEEN_FRESH_MS window, so no restart is needed. The migration is additive and pinned. Tests cover the sum, the process placement, the window edge, the cap, input validation and the claim round trip. The runners how-to is in docs/features and README is untouched. Not changed, and fine to follow up: the vitals and bottleneck readouts still show the bare setting.
Each registered runner that is live now raises how many checks run at once: by the number of jobs it runs at once, up to the setting's own ceiling of 16. Before this,
checks.concurrencycounted only the forge's own cells.What changed
capacity(lane)insrc/checks/lane_state.tsis still the one place the scheduler andspareSlotsread it. It is now the setting plusliveRunnerJobs(db, now), and it adds the runners only when checks are placed on runners. Under the process placement runners never get a check, so they add nothing. The total is capped atCHECKS_CEILING, which is the setting's own maximum of 16 read fromCAPACITY, so a crowd of runners can't overload the machine.20261121190000-check-runner-jobs(pinned) addscheck_runner.jobs, default 1.src/runner/main.tssendsjobs(itsFORGE_RUNNER_JOBS) on everyPOST /api/v1/runner/claim. The claim handler stores it throughnoteRunnerJobsand ignores anything that isn't a whole number from 1 to 64. The OpenAPI route lists the new field.liveRunnerJobsadds up the jobs of runners seen withinSEEN_FRESH_MS(60 s), the same windowrunnersAroundalready uses, and it is read on every pick. A runner that connects is counted at the next tick. One that stops asking drops out once a minute has passed since it was last seen.docs/features/runners.mdmoves this item out of "Not yet".Where to look
local-Nrunners count the same way as runners started by hand. They are the ones that make the cap matter on a single machine.Not done
checks.concurrency(vitals, bottleneck, pipeline) shows the runner-raised number; those readouts still show the bare setting.Tests
test/checks-runner-capacity.test.ts(new) checks the setting plus live runners, the process placement, a runner dropping out at the edge of the 60 s window, the cap, input validation and the help sentence. The first case fails without the change.test/runner-claim.test.tsgains a case where a claim'sjobsis stored.bun scripts/gate.ts --fixandbun x tsc --noEmitare clean.scripts/fast.tsnamed 3,388 files because the migration reaches everything. Instead I ran the 76 test files covering runners, capacity, migrations, the contract and everything that importslane_stateorrunner_jobs: 983 pass, 0 fail.Try The
Try:commit names/admin/capacity, but the page is/settings/capacity. I couldn't amend it because force-pushes are refused.🤖 Generated with Claude Code
Closes #15253