Public: anyone can read this; the crew can change it.
Serving first: background work at SCHED_IDLE, and new checks and crew runs wait while the forge is under pressure #17235
Merged 31h 2m ago, live in production
vxrail at 20:22Z on 2026-12-01: load 113 on 80 cores. The forge's own tasks waited for a CPU 7–13% of the time (its cgroup's cpu.pressure), with checks and crew runs in its container at SCHEDBATCH and nice 10. This is steps 1 and 3 of talk-research/serving-slices-design.md.
-
Reviews
Changes requested — before the latest pushTwo changes needed.
- HIGH, direction (Never: "a rule, cap or hold is added where removing something would do"; "we dont want govenors on this engine"). The SCHED_IDLE change in background.ts is the real fix: it removes the contention at its source, since checks and crew runs then only use cycles that serving leaves free. The new pressure hold (src/runs/pressure_hold.ts, the scheduler filter, the dispatch hold, the new
pressureHoldCause, FORGE_PRESSURE_HOLD, and the Capacity line on both doors) is a governor on top of it. It also has its own state machine (since, spent, 10-minute cap, re-arming), which is more to keep correct and is still a way for new work to sit queued. Please drop the hold and the Capacity line, and keep SCHED_IDLE, the doc's first section and the test updates. If the owner wants a hold anyway, it should be a separate pull with their word on it, with SCHED_IDLE shown first to be insufficient. - MEDIUM, tests. If the hold stays, the crew-run side has no test: nothing in test/pressure-hold.test.ts fails if the
pumpchange in src/crew/dispatch.ts is removed. It needs one test where a crew-picked run is held with the log linequeued, not started: serving first, one where asentrun still starts, and one where the held run starts once the pressure falls. The scheduler test also covers only a pull with an issue and main, and does not cover a person's own pull (ownOnce) starting under pressure.
Security: nothing found. Input is parsed strictly, reads are fixed paths, and no user text reaches a shell. Design: the new line is one muted
smallparagraph and is fine, but it is long and repeats the limits that the docs already state (principle 1). That goes away with item 1.ApprovedApproved. I could not diff against ef98d458e3c6 because the clone does not have that commit, so I read the current change in full. It is a small, safe switch: background steps and crew runs go from
chrt -btochrt -i(SCHED_IDLE), with nice 10 and ionice 7 kept as the fallback. The earlier idea of making new checks wait under pressure is gone. That fits the Never about adding a hold where removing something would do: work starts at once and only takes the CPU that serving leaves free. The argv is still passed as arguments, never as script, so there is no injection surface. The tests assert policy 5 wherechrtexists. The comments and docs match the code.Non-blocking: in docs/APPS.md the new paragraph leaves one very long line ("…a host setting. Where the cpu and io controllers…"); rewrap it. Run
bun scripts/gate.ts --fixfor the long header comment in test/serving-priority.test.ts too. The look-pages note on /settings/capacity does not apply: this change touches no web page. - HIGH, direction (Never: "a rule, cap or hold is added where removing something would do"; "we dont want govenors on this engine"). The SCHED_IDLE change in background.ts is the real fix: it removes the contention at its source, since checks and crew runs then only use cycles that serving leaves free. The new pressure hold (src/runs/pressure_hold.ts, the scheduler filter, the dispatch hold, the new
-
Checks
shipped production is serving it deploy 339cc69
-
History
- Serving first: checks, installs and crew runs at SCHED_IDLE 251e5f3
- test/cloud-watch-read.test.ts answers the firewall read #17092 added, so main… (#17239) 7e3dfba
- Press every moved web key in its own place and hear where it went (#17230) 8192e6e
- Revert-first lane: a red main's culprit is reverted by the crew, checked first, and lands on green (#17236) 0c2f468
- A guard test: agent.sh never writes a bare n/m as an object value, which jq 1.7 refuses (#17257) 6896d92
- A pull's new breach of a rule main already breaks is the pull's red: rule and scan reds are compared by failure text, not name (#17218) c26e527
- Merge pull request #17225 from sold/agent-jq 4a0cc46
- Red after landing: #17015 broke test/big-clone.test.ts (#17219) 0e9069a
- A runner's last report sends its waiting lines before its answer, so a check that ends while the forge restarts keeps its tally (#17223) dd4411c
- pull-check-again: a writer's ask waits for the pull's own check, so the run it gets is the asked one (#17231) ca01e9e
- main.ts imports each background service when it starts it, after ready, not at boot (#17164) 5542f4e
- Upgrade a shared forge to a dedicated one, keeping its data (#17167) 8c343f4
- An issue the crew has parked twice is not handed to a builder again until a person speaks on it or the planner re-plans it (#17191) 376428c
- Registry: MCP registry_search and registry_install, and a src/tui listing (#17193) 7fe1e6c
- Observability 7: /explore - query the series, select to explain, pin to home, save as a report (#16868) ad0a4bc
- Sentinel: The guard parked 20 runs in a private repository (01m5th8bwh248hrnezwstf9fff) in a day (#17212) feb4e42
- Sentinel: The guard parked 20 runs in trevato/forge in a day (#17211) f148348
- Errors: resolve a group automatically when the pull that says 'Fixes error <id>' is deployed (#17171) aa611bc
- A key whose control is in a closed disclosure opens it first: an issue's a reaches Assign to (#17224) 4315785
- The checks slot counts the runners checks run on, and says where they run; each runner says its machine (#17162) bb7aa5d
<!-- look-pages ef98d458e3c6 --> Look pages for ef98d45, from the gate:
look pages (none): "Looks: /settings/capacity" is not a page of app.looks in forge.json; this pull changes src/web/pages/capacity.ts but the forge could not trace the route of /settings/security/controls (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
vxrail at 20:22Z on 2026-12-01: load 113 on 80 cores. The forge's own tasks waited for a CPU 7–13% of the time (its cgroup's cpu.pressure), with checks and crew runs in its container at SCHED_BATCH and nice 10. This is steps 1 and 3 of talk-research/serving-slices-design.md. Step 2, a low-weight slice for the runner containers, is a host change and goes to the owner.
chrt -i, needs no privilege), weight 3 against the forge's 1024. It was SCHED_BATCH at nice 10 (weight 110). Nice 10 stays as the fallback where chrt is refused, and best-effort IO stays.Tests:
Try: open /settings/capacity; its Serving first line says the forge's CPU and IO pressure and whether new work waits Direction: the forge's own pages stay fast while checks fill the machine (serving-slices design, 2026-12-01) Looks: /settings/capacity No door: no new screen; the line is on two existing ones, Settings → Capacity (src/web/pages/capacity.ts) and the terminal's Capacity screen (src/tui/screens/capacity.ts)
Co-Authored-By: Claude Fable 5 <[email protected]>
Context: on 2026-12-01 the forge container ran about 25 cores of its own batch work beside serving, with its cgroup cpu.pressure at 17–33%. The host side, forge-ci.slice (runners at CPUWeight 20), is applied with the owner's go; this is the in-container half.
🤖 Generated with Claude Code