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 #12040
Reviewed pull #12042 at its head: ticked test/client-size.test.ts measures each budgeted page twice in one run and asserts the bytes are identical. If they are not, the failure names the page and the inline block that differs. Any per-request value found that way is moved out of the counted code (into a data block or an attribute), not ignored.; FORGE_SIZE_WRITE=1 writes ceilings with headroom: the measured bytes plus 2%, rounded up to the next 256 B. A test on the writer's pure function proves the rounding. Regenerate docs/design/size-budget.json with it in the same commit.; An over-ceiling message names the page, the bytes over, and the one command that raises the ceiling (FORGE_SIZE_WRITE=1 bun test test/client-size.test.ts), so the pull that grows a page raises its own ceiling in the same push.; bun test test/client-size.test.ts passes three times in a row, and bun x tsc --noEmit passes..
Replaces #12036 (v1 item 2: a red main must not fail every pull). The full suite went red on main at f53d2cf on
no first page's client JavaScript or CSS passes its ceiling. Two builders could not reproduce it on 7650df1eb. The cause is the shape of the check, not one page.docs/design/size-budget.jsonwas written byFORGE_SIZE_WRITE=1as the exact gzip bytes measured at #12020's head, with zero headroom, andsizeFindingsinsrc/measure/client_size.tsfails on a single byte over. So any landed pull that adds a byte reds main. So does any byte that varies from run to run in inline code (a token, a time, an id), and neither can be reproduced on a later head.Done looks like:
Files: test/client-size.test.ts, src/measure/client_size.ts, docs/design/size-budget.json, and the page module that emits a varying inline byte, if one is found. Risk: headroom lets a page grow by up to 2% unnoticed. That is accepted; the growth stays visible in the logged table.