Public: anyone can read this; the crew can change it.
A stranger's way to a forge answers under budget: /pricing, /forges/new and /claim join the page-load budget #11414
Check · Review · Land · Live done — Landed and live in production.
`/pricing`, `/forges/new` and `/claim` are now in the page-load budget and all three are under it today, so no page needed fixing. The budget tests and `tsc` pass; the gate printed nothing. I did not run `keep_plan`, and I did not check the pages on a preview.
shipped production is serving it deploy cc205a8
/pricing, /forges/new and /claim are now in the page-load budget and all three are under it today, so no page needed fixing. The budget tests and tsc pass; the gate printed nothing. I did not run keep_plan, and I did not check the pages on a preview.
What changed
src/perf/page_budget.tsgains the three rows, eachmedianMs: 50, and a new optionalsignedOutflag that marks a stranger's page.test/page-budget.test.tswalkssignedOutrows with no cookie. For/claimit sets up a spawned forge withparent.jsonnaming an org and a live link frommintClaim, so the page shows its form.- The table test now expects all eight pages. A new test pins
/pricing,/forges/newand/claimas the signed-out rows. Removing any of the three from the list fails a test.
What the pages measured, warm, on this machine
| Page | Median | SQL statements | Ceiling |
|---|---|---|---|
/pricing | 2.2 ms | 8 | 10 |
/forges/new | 5.8 ms | 12 | 14 |
/claim | 2.2 ms | 12 | 14 |
The statement ceilings are what each page ran plus two, so a new query on any of them fails the check.
What I chose not to do
- The ticket is not placed in the URL.
/claim#tokenkeeps the code in the browser, so the server never sees it. The fixture instead makes the link live, which is what decides whether the page renders its form. - I did not touch the page code, since none of the three missed.
To try it: bun test test/page-budget.test.ts. The timed and counted tables print each page's median and statement count.
The three rows are in, signed out, medianMs 50 with ceilings of measured plus two. On the preview /pricing, /forges/new and /claim each answer 200 in about 1 ms. The pull names no cause to fix because none missed. Removing a row fails the table test and the signedOut test.
Two things I would do next:
- The /claim row has no assertion that the page rendered its form (a live link), only that it answered 200. Assert a marker in the body so a fixture drift cannot silently measure the dead-link page.
- The issue asked for a ticket from a fixture. /claim#token never reaches the server, so measuring the live-link state is a fair substitute. Say so in a comment on the row, since the current comment only hints at it.
I did not run the tests in this sandbox. I read the diff and fetched the preview.
/pricing,/forges/newand/claimare now in the page-load budget and all three are under it today, so no page needed fixing. The budget tests andtscpass; the gate printed nothing. I did not runkeep_plan, and I did not check the pages on a preview.What changed
src/perf/page_budget.tsgains the three rows, eachmedianMs: 50, and a new optionalsignedOutflag that marks a stranger's page.test/page-budget.test.tswalkssignedOutrows with no cookie. For/claimit sets up a spawned forge withparent.jsonnaming an org and a live link frommintClaim, so the page shows its form./pricing,/forges/newand/claimas the signed-out rows. Removing any of the three from the list fails a test.What the pages measured, warm, on this machine
/pricing/forges/new/claimThe statement ceilings are what each page ran plus two, so a new query on any of them fails the check.
What I chose not to do
/claim#tokenkeeps the code in the browser, so the server never sees it. The fixture instead makes the link live, which is what decides whether the page renders its form.To try it:
bun test test/page-budget.test.ts. The timed and counted tables print each page's median and statement count.Closes #11410