Public: anyone can read this; the crew can change it.
Check slots per repository: each app gets a guaranteed share, the forge borrows what's idle #16946
Check · Review · Land · Live done — Landed and live in production.
The owner, after a conversation with a teammate: "getting away from a global runner pool and instead granting each app a number of concurrent runners it could have. the problem we have right now is that all the work is on one repo, the forge." Measured over 24 h: trevato/forge ran 610 of 613 checks (99.5%).
-
Reviews
Changes requested — before the latest pushChanges requested. The slot rule itself (
grantHold) is small and reads well, and both doors and the docs page are there. I found one scheduling fault and some gaps in the tests and the design. I opened the preview:/answered 200 (first request 5.5 s, cold). The forge pictures sit outside my sandbox, so I could not read them, and the pages this pull adds (Boards fold, settings section) need a signed-in admin, so I judged them from the code. Everything is listed so one round fixes it.- High: a repository that cannot start still reserves slots.
slotViewbuildswaitingfrom every queued pull check (queued). The scheduler then skips some of those for reasons unrelated to grants: an account at its concurrent-checks limit (atLimit),pullHold,crewHolds, disk or memory holds, and archived repositories. A repository whose only check is held for one of those reasons still counts as owed a slot. Everything above its grant is then refused while slots sit idle. That is the lock-up the Nevers rule out, and it adds a hold where none was needed. Buildwaitingfrom the runs that could start now, which means the same filtered liststartablesees. - Tests do not reach the scheduler.
slotView,heldByGrant, the once-only 'queued, held: ...' log line, thelane.grantWaitingcleanup instart.tsand the rebase and main exemption have no test that would fail without them. The 'no starvation' test re-implements the scheduler loop in the test body, so it proves the simulation, not the code. Add a test that runsschedulewith a full forge queue and one app check, and one for item 1. The last comment in that test ('And the forge kept the slots busy...') has no assertion behind it; add the assertion or remove the comment. - Tests missing for the new write paths. There is no test for
checkSlotsUpdate(same-origin, non-admin gets not-found, flash on error). There is none for the settings section's visibility rule, and none for the TUIgkey or the Checks line. Both doors are added, so both need proof. - Principle 1 (nothing explains itself twice). The Boards fold paragraph, the settings hint and the docs page all repeat the same borrowing sentence. Keep one confident line on each page.
- Clean.
autonomy.tsimportsslotRowsfromsrc/web/pages/boards-slots.ts, so the terminal depends on a web page module. Move the running and waiting count to a neutral module, for examplesrc/checks/check_slots.ts. The web page and the terminal then share it, andchecksNowin settings andslotRowsstop being two copies of the same count. The inline IIFEs inautonomy.tsandscheduler.tsare hard to read; use named helpers.row.check_slots ?? 1is dead defence, because the column isNOT NULL DEFAULT 1. - Design. Check the Boards fold row against the named row component's pattern (principle 7), and confirm that
bun scripts/design-lint.tspasses.
ApprovedThe earlier head e833d348fc4e is not in my clone, so I read the current change in full. I could not check each earlier ask against a diff. I found nothing blocking.
Security: the POST goes through
adminForm, which checks origin and who is asking.setCheckSlotsre-checks repo admin. Raising a repository's slots is limited to a site admin. The input is validated as an integer of 1 or more, and the grants above 1 must leave a slot free for every app at 1. A user who does not administer the repository gets a 404. The migration is additive and its pin is present.Both doors: the terminal Autonomy screen shows the Checks line and
gsets it.docs/features/check-slots.mdis the how-to, and README is untouched.Tests cover admission, no starvation, the bounds, who may set slots, the Boards rows, the real scheduler, and the terminal.
Non-blocking:
src/tui/screens/autonomy.tshas stray blank lines beforechecksLineand none after it. ThesetCapacityimport intest/tui-autonomy.test.tssits above the main import block. - High: a repository that cannot start still reserves slots.
-
Checks
shipped production is serving it deploy bb265f4
-
History
- Each repository is guaranteed check slots; above them it borrows only what nobody waiting is owed cd191b4
- Observability 3b: the /boards index is live by streaming, like a board (#16848) ba6c159
- One keymap (b): pulls, the review page and a repository's tabs take their keys from the map; a moved key says where it went for two weeks (#16992) 3518284
- Surface the flow report in the terminal Flow dialog and the MCP flow tool (#16999) ade4088
- A check step behind Landlock stacked under its cell says so too, on the forge and on a runner (#16996) 0bd9528
- Sentinel: memory-growth was degraded 25 minutes today: The forge's own memory is 5382 MiB, over twice its first-hour 2272 MiB and past the 2176 MiB more its database caches m… (#16985) 9e6d1ed
- The forge measures each new forge's seconds from first ask to first built change, and /admin/limits shows the median per plan (#16829) 695dd1c
- The People-screen verify test passes in any order: carol is made up front, and listPeople is checked against the real state (#16998) dc1306c
- Errors, Sentry-grade and first-party: stock Sentry SDKs → the forge (envelope protocol + OTel), grouping, suspect pull, and the healing loop (error → issue → fix → resolved → regression reopens) (#16935) 18b216a
- Forges sharing a machine each get a cgroup and a sandbox, so no neighbour starves or reads another (#16938) 1857b5e
- One test walks a bare URL to a landed pull on the owner's repo through the API alone, with the owner's one grant as the only person's step (#16986) d25e6e6
- A runner's work outlives a forge restart: the stopping forge hands the job over and the next one takes it back (#16991) 4d835f0
- A self-swap release waits for the pull checks running, at most 20 minutes (#16988) 429ec86
- The forge's SSH terminal is off after every boot: the host key comes up mode 660; the forge should tighten its own key to 0600 at start (#16984) c86b931
- Main's full check is never cancelled by a landing, so main gets a verdict (#16993) f8ee1c5
- Sentinel: queue:deploy was degraded 60 minutes today: The deploy queue has waited over 30 minutes: 2 queued, 0 running. (#16987) fc639f6
- A failure deferred while a builder run is at work is forgotten by a restart; re-derive it (#16961) 2162e6b
- A person can ask the crew to review their pull (route, button and @mention); today person-authored pulls are never reviewed (#16905) b9a7f54
- Re-cut a conflict in a split file mechanically instead of a full agent run (#6140, part 3) (#16962) 469aaae
- The impact map counts a module a test used, not one it only loaded; a new file the diff leads to does not blind the plan (#16975) d0bf798
3 earlier comments
<!-- look-pages 407ab6f026bc --> Look pages for 407ab6f, from the gate:
look pages (inferred): this pull changes src/web/pages/boards-slots.ts, src/web/pages/boards-view.ts, src/web/pages/settings.ts; the forge pictures / (src/web/pages/boards-slots.ts), /docs (src/web/pages/boards-slots.ts), /explore (src/web/pages/boards-slots.ts) and 28 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
<!-- look-pages 2ae64a842880 --> Look pages for 2ae64a8, from the gate:
look pages (inferred): "Looks: /boards" is not a page of app.looks in forge.json; this pull changes src/web/pages/boards-slots.ts, src/web/pages/boards-view.ts, src/web/pages/settings.ts; the forge pictures / (src/web/pages/boards-slots.ts), /docs (src/web/pages/boards-slots.ts), /explore (src/web/pages/boards-slots.ts) and 28 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
<!-- look-pages e833d348fc4e --> Look pages for e833d34, from the gate:
look pages (inferred): "Looks: /boards" is not a page of app.looks in forge.json; this pull changes src/web/pages/boards-slots.ts, src/web/pages/boards-view.ts, src/web/pages/settings.ts; the forge pictures / (src/web/pages/boards-slots.ts), /docs (src/web/pages/boards-slots.ts), /explore (src/web/pages/boards-slots.ts) and 28 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
<!-- look-pages 812ab3a34505 --> Look pages for 812ab3a, from the gate:
look pages (inferred): "Looks: /boards" is not a page of app.looks in forge.json; this pull changes src/web/pages/boards-slots.ts, src/web/pages/boards-view.ts, src/web/pages/settings.ts; the forge pictures / (src/web/pages/boards-slots.ts), /docs (src/web/pages/boards-slots.ts), /explore (src/web/pages/boards-slots.ts) and 28 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
The owner, after a conversation with a teammate: "getting away from a global runner pool and instead granting each app a number of concurrent runners it could have. the problem we have right now is that all the work is on one repo, the forge." Measured over 24 h: trevato/forge ran 610 of 613 checks (99.5%). Design: talk-research/app-runner-grants.md.
repo.check_slots(default 1; migration with its pin), written only through setCheckSlots (src/actions/check_slots.ts). A repo admin may lower it; raising is a site admin's. Grants above 1 must leave one of checks.concurrency for every app at 1 (on 8: forge 5 ok, 4+4 refused).grantHold, src/checks/check_slots.ts, in scheduler.ts over queued pull checks): within its grant a check starts as before; above it, a repo starts one only if free slots exceed what other waiting repos are still owed. No preemption; pick.ts order kept; main, rebase and verify checks are never held. Held log line once: "queued, held: trevato/forge at its grant of 5; tess/app's 1 is reserved".g); a /boards "Check slots by repository" fold (used of grant, borrowed, waiting); docs/features/check-slots.md.After it ships, setting trevato/forge to 5 is a site-admin action.
Burst note (not measured): scheduler.ts holds every pull check while main is red and releases them together when main goes green — one visible source of tonight's queue bursts.
tsc 0, gate clean; checks, tui-autonomy, pages-budget, api-fields, doorless, docs pass.
🤖 Generated with Claude Code