Public: anyone can read this; the crew can change it.
A forge runs anywhere: a stated footprint, proven on a 1-CPU, 512 MiB machine #12093
This pull is only the measurement step of #12092. It does not cut any memory, and it does not prove the 1-CPU, 512 MiB case.
-
Reviews
No review yet.
-
Checks
stopped parked by the crew
-
History
- Merge main into the footprint branch 9684f17
- A forge runs anywhere: a stated footprint, proven on a 1-CPU, 512 MiB machine 4b08844
- The forge's own release journey is not rate-limited by the forge and does not spend the strangers' daily allowance (#12221) f8d173e
- A stranger reaches their first pull on a public app from the app's page: get in, fork, send (#12159) 674862e
- Merge the fork's branch 87f2c34
- A small pod keeps room for the forge: a cell gets the pod's memory less 192 MiB, and system and health read the pod's limit, not the host's c99b2dc
- week.ts can say how many Next up rows this week's pace reaches, as plain data with no read (#12145) 2da791d
- Merge main into the footprint branch 46f2ad4
- An approval is recorded against the head and the base it was given for, and says when either moved (#12164) fb6f20c
- Four more ways a landing goes wrong, found by the landing simulator: stale co… (#12181) 7189963
- Every number on the forge counts a list its reader can open: close the remain… (#12214) 4183511
- Each app keeps a build cache across deploys, keyed by its lockfiles and pins, and its owner can clear it from the app page (#12162) 8e3d756
- Sentinel: release was degraded 743 minutes today: Release 0.7.578 is unproven: a stranger's journey failed: the forge could not be named (TimeoutError). It is proven aga… (#12223) 325ce45
- The threat model says what today's boundary work made true, each row with the test that proves it, and names the three gaps still open 76ab860
- What a cell hides is hidden under the name it really has as well as the one it was given, and the forge's own code is shown again by either c82665e
- A cell binds each directory it may write once, and nothing inside one by name: a link a hosted forge leaves where its home goes is never mounted 9e284d9
- What a parent records when a hosted forge's start fails is the parent's own words: nothing the forge printed reaches the ledger, the rollback row or its event e11532c
- The last two reds of the full run are cleared: the run-index plan test loads the migration that makes run_queued (a22aa983 named the index, not its migration), and week_reading, whose only reader went with the pacer in #12207, is on the unread list until a migration drops it aafe9dc
- Four reds an hour of direct pushes left on main are cleared: two header comments are wrapped, the first-view budget follows 68efd9dd's seven new words, and two tests no longer read f30a0966's binding attribute and its subquery as a boxed list and a repository read bf488b2
- A red check goes back to its builder until it is green; the same red after a rework stops it with the pull open and one card in the asks, and no pull is closed for a count of tries e61e234
3 earlier comments
This pull is only the measurement step of #12092. It does not cut any memory, and it does not prove the 1-CPU, 512 MiB case.
What changed
- New
src/system/footprint.tsholds the stated budget and the reading: resident memory, heap, disk of the data directory, start-to-first-page time, architecture, CPUs and machine memory. The budget is 256 MiB at rest, first page within 5 s, and an empty forge under 64 MiB on disk. - It also lists what is optional and says plainly what is off and why: Chromium for looks, the crew's AI tool, and the serve/work threads. One process and one thread is what runs today.
release/prove.tsreads the footprint once the new version answers/healthz, before the smoke checks load it. It keeps the reading inrelease/proof.jsonasfootprint.main.tsmarks the listener ready, which gives the start-to-first-page time./systemgets a "What the forge costs" section: this process's last reading, else the proof's. It says "Over budget" when it is, and lists the optional parts.- New
test/footprint.test.tsanddocs/features/footprint.md.
What I did not do
- I did not cut the largest memory holders. The roughly 400 MiB measured at rest is over the 256 MiB budget, so the section will say "Over budget" until that work lands.
- I did not make the serve/work split switch on by core count. No such split exists in
main.ts, so the page reports one thread. - I did not add an ARM or 1-CPU run of the check. The reading names the architecture, but nothing proves it on a Pi-class machine.
- The memory-at-rest budget is my choice, not from the issue; adjust
BUDGETinsrc/system/footprint.tsif you want a different number. - I added no terminal screen or MCP
systemfield for it, only the web section.
Checks
bun test test/footprint.test.tspasses (3 tests).test/release-prove.test.tspassed except one test I broke, which I then fixed; I did not re-run that file afterwards.bun x tsc --noEmitandbun scripts/gate.tswere clean.scripts/design-lint.tsreports one off-scale font size insrc/web/studio/cards.ts:1216, a file I did not touch.
How to try it
- Open
/systemand read "What the forge costs" (the section is hidden until the release proof has read a footprint, then shows). - After the proof runs,
release/proof.jsonunder the data directory has afootprintfield.
Try: open /system and read What the forge costs.
🤖 Generated with Claude Code
This pull measures what a forge costs and shows it. It does not yet cut any memory or prove the 1-CPU, 512 MiB case that #12092 asks for. The push that follows the failed check fixes the four gate rules it named. Locally the gate now passes and the footprint tests pass; I did not re-run tsc after the rewrap, and the forge runs the full check on this push.
What changed
src/system/footprint.tsholds the stated budget (256 MiB resident at rest, first page within 5 s, an empty forge under 64 MiB on disk) and the reading.- The reading records memory, disk of the data directory, time from start to first page, architecture and CPUs. It lists the optional parts, Chromium, the crew's AI tool and the serve/work threads, and says plainly which are off and why.
src/release/prove.tsreads the footprint once the new version answers/healthz, before the smoke checks load it. It keeps the reading inrelease/proof.json.main.tsmarks the moment the listener is up, which gives the start-to-first-page time./systemhas a new "What the forge costs" section. It shows this process's last reading, else the proof's, and says "Over budget" when it is.- Added
test/footprint.test.tsanddocs/features/footprint.md.
This fix
- Four comments (in
prove.ts,footprint.tstwice andlargest_dirs.ts) were over 100 columns and are rewrapped. - The "pipeline first" rule is answered with a
Direction:line in the commit message, as the rule allows. I did not touch the pipeline.
What I chose not to do
- I did not cut the largest memory holders. The roughly 400 MiB measured at rest is over the 256 MiB budget, so the section will say "Over budget" until that work lands.
- I did not make the serve/work split switch on by core count. No such split exists today, so the page reports one thread.
- I did not add an ARM or 1-CPU run of the check. The reading names the architecture, but nothing proves it on a Pi-class machine.
- The 256 MiB budget is my own choice, not from the issue; change
BUDGETinsrc/system/footprint.tsif you want another number. - There is no terminal screen or MCP
systemfield for the footprint, only the web section.
scripts/design-lint.ts reports one off-scale font size in src/web/studio/cards.ts:1216, a file this pull does not touch.
How to try it
Open /system and read "What the forge costs"; it shows once the release proof has read a footprint, and release/proof.json then has a footprint field.
Try: open /system and read What the forge costs.
🤖 Generated with Claude Code
The forge's check on this pull should now lose one of its 16 failures; the other 15 are not caused by this change and I did not fix them. I haven't run the whole suite, only the tests below.
What I fixed: test/system-parts.test.ts lists every <h2> on /system. It didn't know about the new "What the forge costs" section, so I added the heading in its rendered position, after "Processes". test/system-parts.test.ts and test/footprint.test.ts pass, and tsc --noEmit is clean.
Failures I left alone: I ran these tests on the base commit, before the footprint work, and these four fail there too:
test/unreached.test.ts:src/crew/week_burn.tsis imported by nothing.test/header-width.test.ts: over-long header comments insrc/flow/lanes.tsandtest/surfaces-adversarial.test.ts.test/door-ssh-fingerprint.test.ts: the home page no longer shows the SSH fingerprint, after the commit that removed ssh from the public home page.test/forge-looks.test.ts,test/attention.test.ts,test/app-home-batched.test.tsalso fail there.
Failures I did not reproduce or trace:
bun scripts/design-lint.tsflagssrc/web/studio/cards.ts:1216(font-size: 17px), a file this pull doesn't touch.test/tui-system.test.tspasses when I run it alone.- I did not run the retention, builders/spend, MCP-docs or page-ceiling tests, so I can't say whether the footprint changes affect them.
The footprint change itself is unchanged.
This pull is only the measurement step of #12092. It does not cut any memory, and it does not prove the 1-CPU, 512 MiB case.
What changed
src/system/footprint.tsholds the stated budget and the reading: resident memory, heap, disk of the data directory, start-to-first-page time, architecture, CPUs and machine memory. The budget is 256 MiB at rest, first page within 5 s, and an empty forge under 64 MiB on disk.release/prove.tsreads the footprint once the new version answers/healthz, before the smoke checks load it. It keeps the reading inrelease/proof.jsonasfootprint.main.tsmarks the listener ready, which gives the start-to-first-page time./systemgets a "What the forge costs" section: this process's last reading, else the proof's. It says "Over budget" when it is, and lists the optional parts.test/footprint.test.tsanddocs/features/footprint.md.What I did not do
main.ts, so the page reports one thread.BUDGETinsrc/system/footprint.tsif you want a different number.systemfield for it, only the web section.Checks
bun test test/footprint.test.tspasses (3 tests).test/release-prove.test.tspassed except one test I broke, which I then fixed; I did not re-run that file afterwards.bun x tsc --noEmitandbun scripts/gate.tswere clean.scripts/design-lint.tsreports one off-scale font size insrc/web/studio/cards.ts:1216, a file I did not touch.How to try it
/systemand read "What the forge costs" (the section is hidden until the release proof has read a footprint, then shows).release/proof.jsonunder the data directory has afootprintfield.Try: open /system and read What the forge costs.
🤖 Generated with Claude Code
Closes #12092