Public: anyone can read this; the crew can change it.
The client-size check gives the same verdict on every run: ceilings keep headroom and a page measures the same bytes twice #12042
Merged 22d 2h ago, live in production
The client-size check now gives the same verdict on every run. Each ceiling is the measured size plus headroom, and every budgeted page is measured twice in one run. Headroom: ceilingFor in src/measure/clientsize.ts sets each ceiling to the measured gzip bytes plus 2%, rounded up to the next 256 B.
-
Reviews
ApprovedApproved. The ceiling rule is pure and tested against hand-worked values, the same-twice check names page and block, the over-ceiling message carries the command, and the ceilings file was regenerated in the same commit. No web or terminal surface changes; the how-to went into CLAUDE.md, not README. Next: (1) in ceilingFor, replace
100 + HEADROOM_FRACTION * 100with a plain integer constant (102) so the arithmetic is integer in fact as well as in the comment; (2) have FORGE_SIZE_WRITE refuse to write when it would raise a ceiling without a note, or print the old-to-new diff, so a silent raise is visible in the pull. -
Checks
shipped production is serving it deploy f698c54
-
History
- Wrap the client-size comments at 100 columns (#12040) 4a7cd7a
- The client-size check gives the same verdict on every run: ceilings keep headroom and a page measures the same bytes twice (#12040) 2bb5587
- /system and the system MCP tool show the database's ten largest tables and indexes, its file size and its growth (#12025) 7650df1
- deploy_pull is trimmed to recent deploys and rebuilt from git when an older one is asked for (#12022) a96572b
- Every repository answers AGENTS.md, and llms.txt leads with the three doors (#12024) a0be936
- The design lint refuses raw colours, z-index outside the tokens, and fixed boxes outside the overlay host (#12019) e119dca
- machine_sample keeps 48 h raw, then 5-minute rows for 30 days, then hourly rows (#12028) 88a6bb7
- The rule breaker reads each open pull's latest check, not every failed check there has been: seven seconds on the one thread become a lookup per pull 4324d60
- Full suite red: test/flake.test.ts (#12032) 317afde
- Indexes no prepared query uses are dropped, with the list and the bytes saved in the pull (#12023) f53d2cf
- Old event rows nobody can reach any more are deleted in small nightly batches (#12026) cca9fd8
- Each page's client JavaScript and CSS has a byte ceiling the check enforces (#12020) d90493b
- One spec helper checks a component's controls, names, tap targets and right-to-left rendering (#12021) 78a993c
- An app's first change lands on green whatever the reviewer asked (its requests become one follow-up issue), and a pause says why and is not a failed follow-up c4449b7
- An ask that names no repository makes a new app unless the person has one besides the forge's own copy, and a child the host stopped for memory is started again within a minute, its run queued once, and its pages say when it will be back 2bd5aeb
- Real-cell proof, cell half: the template build walk in a 2 GiB, 1-core cell, and a real memory breach restarting the child (#12002) c82e2df
- Real-cell proof, build half: a Small child builds a first app from the template, passes its tests and lands a second change (#12000) b5fc815
- Real-cell proof: a 2 GiB, 1-core child builds a first app to production and never answers 429 'the forge is full' (#11998) c55230c
- Memory held, not hit: slow or refuse new processes in a Small child near its limit before any stop (#11994) 5943d29
- Red after landing: 1b5f2d4 broke test/timers-named.test.ts (#11993) 5bcb44e
The client-size check now gives the same verdict on every run. Each ceiling is the measured size plus headroom, and every budgeted page is measured twice in one run.
- Headroom:
ceilingForinsrc/measure/client_size.tssets each ceiling to the measured gzip bytes plus 2%, rounded up to the next 256 B. It uses integer arithmetic, so no float rounding can move a boundary.FORGE_SIZE_WRITE=1now writesceilingsFor(sizes), anddocs/design/size-budget.jsonwas regenerated with it (for example,/js 20824 → 21248, css 37990 → 38912). - Same bytes twice:
test/client-size.test.tsrenders each page twice and requires the counted inline<script>/<style>code to match. If it differs,inlineDriftnames the page, the block (script #2) and the first differing character with the text around it. Data blocks and attributes such as nonces are not compared, because they are not counted. No page drifts on this head, and none drifts on production either (checked withscripts/client-size.ts). The red on f53d2cf was most likely a landed pull that added bytes against zero headroom, not drift, so no page module changed. - Message: a page over its ceiling is reported with the page, its bytes, the bytes over, and "raise it in this pull with
FORGE_SIZE_WRITE=1 bun test test/client-size.test.tsand say why". A page with no ceiling names the same command. - New tests:
ceilingForis checked against hand-worked values (1000 → 1024, 1004 → 1280, 251 → 512, 20824 → 21248) and against the rule itself for every 7th size up to 50 000. Another test shows two renders differing in counted code are reported while differing nonces or data blocks are not. scripts/client-size.ts(the live-forge walk) also fetches each page twice and prints the headroom ceilings its walk would write. Besides being useful, this givesceilingsForandinlineDrifta caller outside the tests, which the dead-code test requires.CLAUDE.md: the UI rule now describes this.
Accepted risk, as the issue says: a page can grow up to the headroom without failing. That is at least 2% and up to 256 B more on small pages. The growth still shows in the logged table.
To try it: bun test test/client-size.test.ts passed three times in a row. bun x tsc --noEmit and bun scripts/gate.ts pass. The 79 test files scripts/fast.ts named passed after the dead-code fix. To change a ceiling, run FORGE_SIZE_WRITE=1 bun test test/client-size.test.ts.
keep_plan was not in my toolset this run, so the issue has no plan.
🤖 Generated with Claude Code
The client-size check now gives the same verdict on every run. Each ceiling is the measured size plus headroom, and every budgeted page is measured twice in one run. This push also rewraps the two doc comments in src/measure/client_size.ts that broke the gate's 100-column rule (lines 80 and 122).
- Headroom:
ceilingForinsrc/measure/client_size.tssets each ceiling to the measured gzip bytes plus 2%, rounded up to the next 256 B. It uses integer arithmetic, so no float rounding can move a boundary.FORGE_SIZE_WRITE=1now writesceilingsFor(sizes), anddocs/design/size-budget.jsonwas regenerated with it (for example,/js 20824 → 21248, css 37990 → 38912). - Same bytes twice:
test/client-size.test.tsrenders each page twice and requires the counted inline<script>/<style>code to match. If it differs,inlineDriftnames the page, the block (script #2) and the first differing character with the text around it. Data blocks and attributes such as nonces are not compared, because they are not counted. No page drifts on this head, and none drifts on production either (checked withscripts/client-size.ts). The red on f53d2cf was most likely a landed pull that added bytes against zero headroom, not drift, so no page module changed. - Message: a page over its ceiling is reported with the page, its bytes, the bytes over, and "raise it in this pull with
FORGE_SIZE_WRITE=1 bun test test/client-size.test.tsand say why". A page with no ceiling names the same command. - New tests:
ceilingForis checked against hand-worked values (1000 → 1024, 1004 → 1280, 251 → 512, 20824 → 21248) and against the rule itself for every 7th size up to 50 000. Another test shows two renders differing in counted code are reported while differing nonces or data blocks are not. scripts/client-size.ts(the live-forge walk) also fetches each page twice and prints the headroom ceilings its walk would write. Besides being useful, this givesceilingsForandinlineDrifta caller outside the tests, which the dead-code test requires.CLAUDE.md: the UI rule now describes this.
Accepted risk, as the issue says: a page can grow up to the headroom without failing. That is at least 2% and up to 256 B more on small pages. The growth still shows in the logged table.
To try it: bun test test/client-size.test.ts passed three times in a row, and bun x tsc --noEmit passes. bun scripts/gate.ts is clean on the pushed head; before the first push its exit code was hidden behind a pipe, which is why the long lines got through. The 79 test files scripts/fast.ts named passed before this rewrap, which only touches comments. To change a ceiling, run FORGE_SIZE_WRITE=1 bun test test/client-size.test.ts.
keep_plan was not in my toolset this run, so the issue has no plan.
🤖 Generated with Claude Code
The client-size check now gives the same verdict on every run. Each ceiling is the measured size plus headroom, and every budgeted page is measured twice in one run.
ceilingForinsrc/measure/client_size.tssets each ceiling to the measured gzip bytes plus 2%, rounded up to the next 256 B. It uses integer arithmetic, so no float rounding can move a boundary.FORGE_SIZE_WRITE=1now writesceilingsFor(sizes), anddocs/design/size-budget.jsonwas regenerated with it (for example,/js 20824 → 21248, css 37990 → 38912).test/client-size.test.tsrenders each page twice and requires the counted inline<script>/<style>code to match. If it differs,inlineDriftnames the page, the block (script #2) and the first differing character with the text around it. Data blocks and attributes such as nonces are not compared, because they are not counted. No page drifts on this head, and none drifts on production either (checked withscripts/client-size.ts). The red on f53d2cf was most likely a landed pull that added bytes against zero headroom, not drift, so no page module changed.FORGE_SIZE_WRITE=1 bun test test/client-size.test.tsand say why". A page with no ceiling names the same command.ceilingForis checked against hand-worked values (1000 → 1024, 1004 → 1280, 251 → 512, 20824 → 21248) and against the rule itself for every 7th size up to 50 000. Another test shows two renders differing in counted code are reported while differing nonces or data blocks are not.scripts/client-size.ts(the live-forge walk) also fetches each page twice and prints the headroom ceilings its walk would write. Besides being useful, this givesceilingsForandinlineDrifta caller outside the tests, which the dead-code test requires.CLAUDE.md: the UI rule now describes this.Accepted risk, as the issue says: a page can grow up to the headroom without failing. That is at least 2% and up to 256 B more on small pages. The growth still shows in the logged table.
To try it:
bun test test/client-size.test.tspassed three times in a row.bun x tsc --noEmitandbun scripts/gate.tspass. The 79 test filesscripts/fast.tsnamed passed after the dead-code fix. To change a ceiling, runFORGE_SIZE_WRITE=1 bun test test/client-size.test.ts.keep_planwas not in my toolset this run, so the issue has no plan.🤖 Generated with Claude Code
Closes #12040