Public: anyone can read this; the crew can change it.

Size ceilings are re-measured on the merged tree at landing, so two pulls that together pass a ceiling cannot both land #14030

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The landing gate now runs the first-page size ceilings (test/client-size.test.ts) on the pull merged into main as it stands at that moment. When two pulls each fit but together pass a ceiling, the second is held and its verdict names the ceiling.

Notes

shipped production is serving it deploy 4adf612

opened this

The landing gate now runs the first-page size ceilings (test/client-size.test.ts) on the pull merged into main as it stands at that moment. When two pulls each fit but together pass a ceiling, the second is held and its verdict names the ceiling.

What changed

  • The full tier on land (forge.json check.full) only ran the commit gate checks and tsc, never the tests. It was falling back to run. I gave it an explicit full that is run plus bun test test/client-size.test.ts, so it applies to every pull whatever tier the diff selects. Branch pushes (run) and the fast tier are unchanged.
  • test/gate-size-ceiling-merged.test.ts lands two pulls that each fit alone and together pass a ceiling. A stand-in ceiling of 10 B on shared/ stands in for the real one; the 4 + 4 + 4 B sums are checked by hand. Both gate green on their own base. After the first lands, the second's gate on the merged tree is red, and its verdict says "The full gate on land was red" and names the ceiling. The same file checks that this repository's declared full still starts with run and runs the size test.
  • CLAUDE.md now says the gate stops the race. It also records the headroom choice.

Chose not to

  • I kept the headroom at 2 % plus 256 B rounding, and did not make the budget per feature. Slack is not what stops the race now: the second pull is held and has to raise the ceiling or trim in its own pull. That costs one more run for the loser, which is cheaper than a shared pool nobody owns.
  • The test uses a stand-in ceiling, not the real stylesheet. That keeps it to about 2 s. The real client-size test passes on this tree.

Checked here

  • bun scripts/gate.ts --fix and bun x tsc --noEmit are clean.
  • Passing locally: the new test, check-tiers, client-size, gate-killed, forge-looks, shards, verify-after-landing and readme-cap.
  • scripts/fast.ts exits 2 (the diff touches forge.json, so it is too broad to name), so I picked those tests by hand and did not run the whole suite.

To try it — land two pulls that each add bytes to the shared stylesheet. The second one's land-gate verdict will name the page and the bytes over.

Closes #14026

commented

The landing gate now runs the first-page size ceilings (test/client-size.test.ts) on the pull merged into main as it stands at that moment. When two pulls each fit but together pass a ceiling, the second is held and its verdict names the ceiling.

What changed

  • The full tier on land (forge.json check.full) only ran the commit gate checks and tsc, never the tests. It was falling back to run. I gave it an explicit full that is run plus bun test test/client-size.test.ts, so it applies to every pull whatever tier the diff selects. Branch pushes (run) and the fast tier are unchanged.
  • test/gate-size-ceiling-merged.test.ts lands two pulls that each fit alone and together pass a ceiling. A stand-in ceiling of 10 B on shared/ stands in for the real one; the 4 + 4 + 4 B sums are checked by hand. Both gate green on their own base. After the first lands, the second's gate on the merged tree is red, and its verdict says "The full gate on land was red" and names the ceiling. The same file checks that this repository's declared full still starts with run and runs the size test.
  • CLAUDE.md now says the gate stops the race. It also records the headroom choice.

Chose not to

  • I kept the headroom at 2 % plus 256 B rounding, and did not make the budget per feature. Slack is not what stops the race now: the second pull is held and has to raise the ceiling or trim in its own pull. That costs one more run for the loser, which is cheaper than a shared pool nobody owns.
  • The test uses a stand-in ceiling, not the real stylesheet. That keeps it to about 2 s. The real client-size test passes on this tree.

Checked here

  • bun scripts/gate.ts --fix and bun x tsc --noEmit are clean.
  • Passing locally: the new test, check-tiers, client-size, gate-killed, forge-looks, shards, verify-after-landing and readme-cap.
  • scripts/fast.ts exits 2 (the diff touches forge.json, so it is too broad to name), so I picked those tests by hand and did not run the whole suite.

To try it — land two pulls that each add bytes to the shared stylesheet. The second one's land-gate verdict will name the page and the bytes over.

Approved

Approved. No UI is touched, so phone, keyboard and no-JS are unaffected. runTier uses manifest.full for the land tier, so the new full command is what the merged-tree gate runs. The change is small and the test shows the race closing: both pulls are green alone, and after the first lands the second is held with a verdict naming the ceiling. The how-to is in CLAUDE.md, not README. Two things I would do next: (1) the first test uses a shell stand-in for client-size, so only the second test (a string check on forge.json) ties it to the real command. Add a check that the real size test fails on an over-ceiling merged tree, or that its failure line has the shape the verdict reads. (2) Watch the land-gate time, since client-size now runs on every landing. If it is slow, restrict it to merges that touch src/web or the size budget, in line with the gate-on-impact direction.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs