What a forge costs (#12092)
A forge is one process and one thread. Pages and git need nothing else: Chromium (looks) and the crew's AI tool are optional, and /system ("What the forge costs") says which are off and why.
The stated budget (BUDGET in src/system/footprint.ts) for a 1-CPU, 512 MiB machine: 256 MiB resident at rest, the first page within 5 s of start, and an empty forge's data under 64 MiB. A reading over it says "Over budget", never hidden.
Where it shows:
/system, section "What the forge costs" (admins and granted telemetry readers, as the page's other sections). First view is one sentence: "Within budget: the forge is using 170 MiB; it should stay under 256 MiB.", or what is over. Open its disclosure for the measured facts (memory, first page, data on disk, machine and architecture) and one row per optional part, on or off and why.- The terminal: palette → System opens the System dialog; after the database lines it says the same sentence, then
off:and the optional parts that are off. The dialog does not scroll, so the facts and the reasons are on/systemonly.
What is off on a small machine (#12522)
Three parts are optional, and each is listed on or off with one line of why:
- Chromium (looks): off when no Chromium is found (or
FORGE_CHROMIUMnames one that is not there). Pages are served without pictures. - Crew AI tool: off when Claude Code is not on PATH or at
FORGE_CLAUDE. Assigned work waits. - Large page cache: off under 1 GiB of memory (the pod's limit, else the machine's). The caches behind code pages (kept pages, encoded bodies, page columns, folders and refs: 160 MiB at full size) each keep a quarter, so a page is rendered again more often but the forge fits.
Where to read it:
/system, "What the forge costs": open the disclosure, one row per part.GET /api/v1/healthsigned in (any account, admin or not):optional, a list of{ name, on, why }. A stranger and an unauthenticated probe are not told it.
The release proof reads the footprint once the new version answers /healthz, before the smoke checks load it, and keeps it in release/proof.json (footprint). /system shows this process's last reading, else the proof's.
The small forge in the release proof (#12532)
Once the smoke checks and the stranger's journey pass, the proof boots a second forge from the same checkout, held by the kernel to 1 CPU and 512 MiB (a cell cgroup of its own: memory.max 512 MiB, cpu.max one core, swap off), on an empty scratch directory under <data>/release/small, and walks its first hour (src/release/small_forge.ts): /readyz, the home page, a first admin (a code minted into its database, redeemed at POST /api/v1/first-admin), a repository, a push of a commit whose forge.json declares check.run: "true", and that commit's check reaching ok. Its VmRSS is read at rest (3 s after ready, before any request) and after the walk, with the cgroup's memory.peak and OOM kills.
- A reading at rest over
BUDGET.restBytesfails the proof, naming the number: "the 1 CPU / 512 MiB forge held 300.0 MiB at rest; the budget is 256.0 MiB". An OOM kill or a step that does not finish fails it too, retried sooner like a slow answer. - It runs only where it cannot hurt the forge beside it: the pod must have room for 512 MiB beyond the forge's own use and the reserve (
cellMemoryCeilingMiB, #12519), and the kernel must hold the cap. Anywhere else it is skipped and the reading says why; a skip does not fail the proof. - The scratch forge's environment is named in
smallEnv: no token or secret of this forge's, no terminal, no apps or crew, loopback only. The token git pushes with travels in git's environment, never its arguments. Its directory and cgroup are removed after. /systemshows it in "What the forge costs": a row "On 1 CPU, 512 MiB" with memory at rest, after, and peak, or why it was not measured; over budget at rest becomes the section's verdict. The terminal's System dialog says the same words on a line of its own,On 1 CPU, 512 MiB: …, after the verdict and beforeoff:. It is kept inrelease/proof.jsonassmall.
Reading the disk figure walks the whole data directory (treeBytes), once per release proof and never on a page view; on a big data directory that walk can take seconds. It is asynchronous, so it does not hold the event loop.
This is the measurement step. The work that cuts the footprint is tracked in its own issues, each blocking #12092: the cell ceiling on a small pod (#12346), reading the pod's limit in /system and health (#12347), a launcher-free start (#12348), lazy-loading what a small forge never uses (#12349), an ARM image (#12350), and the serve/work split only on machines with cores (#12351).
What loads on first use (#12349, #12521)
The boot's static imports reach neither the terminal UI nor the MCP server and its tool index (test/boot-lazy.test.ts walks them). The terminal loads when FORGE_SSH_PORT is set; the MCP modules load on the first request that needs the tools (/mcp, /llms.txt, /agents, /.well-known/mcp.json, /.well-known/agent-card.json, a held confirm said yes to) through src/http/mcp/load.ts. The route table names /mcp from boot (lazyRoutes in src/http/lazy_routes.ts), so matching, gates and 405s are unchanged; the first such request waits for one import (0.1 s on a dev machine; every later one does not). A load that fails answers that request with an error naming the MCP tools, and the next request tries again.
The boot graph went from 2,653 modules to 2,433; RSS at rest on a fresh forge (FORGE_SSH_PORT=0 FORGE_APPS=0, 20 s after /healthz answers, source run on a dev machine) went from 313–333 MiB (three runs) to 265–271 MiB. The next largest family, the OpenAPI contract's route descriptions (443 modules), is still loaded at boot: the admin gate and the cursor guard read it on every request.
Measured sizes (2026-11-13, release image, same first-hour journey)
| limit | boot to first page | RSS at rest / after | result |
|---|---|---|---|
| 2 CPU / 2 GiB | 3.5 s | 172 / 396 MiB | passes |
| 1 CPU / 1 GiB | 5.3 s | 175 / 356 MiB | passes |
| 1 CPU / 512 MiB | 5.8 s | 170 / 382 MiB | passes, barely |
| 0.5 CPU / 384 MiB | 10–13 s | 167 / killed | the forge was OOM-killed by its own cell (#12346) |
| 0.25 CPU / 256 MiB | 25 s | 168 / 202 MiB | passes |