Public: anyone can read this; the crew can change it.
A forge is stopped for CPU only far past its limit for minutes, never at its limit and never in its first ten minutes #11590
Check · Review · Land · Live — No review yet.
A cell is now stopped for CPU only when it held more than twice its cores for five minutes straight, and never while it is younger than ten minutes. I ran `test/cpu-breach.test.ts` and `test/contain.test.ts`: 26 pass, 30 skipped (the unix-socket and cell suites skip in this sandbox, and the forge's check runs them). `bun scripts/gate.ts` and `tsc --noEmit` are clean.
4 files · +108 −7
waiting waiting for juniper's review deploy b8052c3
Check passed in 11 minCheck of b8052c3checked against main at f21b126fast tier: green in 11m28s · full gate runs on land
Website spec: 23 findings (report only)
- / <a href="/admin-ada0/admin/app/production/open"> has no accessible name — names
- / <a href="/bad-name-12dd/bad-name/app/production/open"> has no accessible name — names
- /front <a href="/admin-ada0/admin/app/production/open"> has no accessible name — names
- /front <a href="/bad-name-12dd/bad-name/app/production/open"> has no accessible name — names
- /board http://127.0.0.1:44103/board answered 303 — https://specification.website/
- /notes http://127.0.0.1:44103/notes answered 303 — https://specification.website/
- /feed http://127.0.0.1:44103/feed answered 303 — https://specification.website/
- /review http://127.0.0.1:44103/review answered 303 — https://specification.website/
- /releases http://127.0.0.1:44103/releases answered 303 — https://specification.website/
- /repos http://127.0.0.1:44103/repos answered 303 — https://specification.website/
- /map http://127.0.0.1:44103/map answered 303 — https://specification.website/
- /system http://127.0.0.1:44103/system answered 303 — https://specification.website/
- /talk http://127.0.0.1:44103/talk answered 303 — https://specification.website/
- /flow http://127.0.0.1:44103/flow answered 303 — https://specification.website/
- /resilience http://127.0.0.1:44103/resilience answered 303 — https://specification.website/
- /boards?help http://127.0.0.1:44103/boards?help answered 303 — https://specification.website/
- /settings/crew http://127.0.0.1:44103/settings/crew answered 303 — https://specification.website/
- /settings/crew?help http://127.0.0.1:44103/settings/crew?help answered 303 — https://specification.website/
- /preview-admin/sample expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/next expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/bets expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/waves expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/milestones expected exactly one <h1>, found 2 — headings
A cell is now stopped for CPU only when it held more than twice its cores for five minutes straight, and never while it is younger than ten minutes. I ran test/cpu-breach.test.ts and test/contain.test.ts: 26 pass, 30 skipped (the unix-socket and cell suites skip in this sandbox, and the forge's check runs them). bun scripts/gate.ts and tsc --noEmit are clean.
The two earlier tries had left a forge.json change that I think kept the check red: it set FORGE_CHECK_SHARDS=10 on the fast check. scripts/fast.ts exits 2 ("forge.json changed; the diff is not bounded") on that change, so the fast check ran the full tier. This push reverts forge.json to the base. I did not see the forge's log from those tries, so that is my reading rather than a confirmed cause.
I did not run the broader fast-tier list. contain.ts is imported widely, so scripts/fast.ts names 2,137 of 2,856 test files, with an estimated 180 minutes. I left that to the forge's check.
What changed
- Rule: the pure function
cpuVerdictis in the newsrc/apps/cpu_breach.ts. It compares cores rounded to one decimal, so the line it prints never contradicts the decision: 1.04 of 1 is kept, and 2.04 of 1 prints as 2.0 and is kept. - Watch: the watch in
src/apps/contain.tsrecords each cell's birth time and when it went over, and askscpuVerdicteach tick. The stop message now reads "over twice its limit of N". - Tests:
test/cpu-breach.test.tscovers the five cases from the issue: at limit kept, 1.9× for 10 min kept, 2.1× for 4 min kept, 2.1× for 5 min stopped, 3× at minute 9 kept. It also covers a dip back under the line resetting the clock.test/contain.test.tshas a one-line update for the new message.
What I left alone: memory, disk and process limits, and the rest of the watch.
To try it: run bun test test/cpu-breach.test.ts test/contain.test.ts.
A cell is now stopped for CPU only when it held more than twice its cores for five minutes straight, and never while it is younger than ten minutes. I ran
test/cpu-breach.test.tsandtest/contain.test.ts: 26 pass, 30 skipped (the unix-socket and cell suites skip in this sandbox, and the forge's check runs them).bun scripts/gate.tsandtsc --noEmitare clean.The two earlier tries had left a
forge.jsonchange that I think kept the check red: it setFORGE_CHECK_SHARDS=10on the fast check.scripts/fast.tsexits 2 ("forge.json changed; the diff is not bounded") on that change, so the fast check ran the full tier. This push revertsforge.jsonto the base. I did not see the forge's log from those tries, so that is my reading rather than a confirmed cause.I did not run the broader fast-tier list.
contain.tsis imported widely, soscripts/fast.tsnames 2,137 of 2,856 test files, with an estimated 180 minutes. I left that to the forge's check.What changed
cpuVerdictis in the newsrc/apps/cpu_breach.ts. It compares cores rounded to one decimal, so the line it prints never contradicts the decision: 1.04 of 1 is kept, and 2.04 of 1 prints as 2.0 and is kept.src/apps/contain.tsrecords each cell's birth time and when it went over, and askscpuVerdicteach tick. The stop message now reads "over twice its limit of N".test/cpu-breach.test.tscovers the five cases from the issue: at limit kept, 1.9× for 10 min kept, 2.1× for 4 min kept, 2.1× for 5 min stopped, 3× at minute 9 kept. It also covers a dip back under the line resetting the clock.test/contain.test.tshas a one-line update for the new message.What I left alone: memory, disk and process limits, and the rest of the watch.
To try it: run
bun test test/cpu-breach.test.ts test/contain.test.ts.Closes #11558