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

Merged opened this

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

Merged

`/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

opened this

/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.ts gains the three rows, each medianMs: 50, and a new optional signedOut flag that marks a stranger's page.
  • test/page-budget.test.ts walks signedOut rows with no cookie. For /claim it sets up a spawned forge with parent.json naming an org and a live link from mintClaim, so the page shows its form.
  • The table test now expects all eight pages. A new test pins /pricing, /forges/new and /claim as the signed-out rows. Removing any of the three from the list fails a test.

What the pages measured, warm, on this machine

PageMedianSQL statementsCeiling
/pricing2.2 ms810
/forges/new5.8 ms1214
/claim2.2 ms1214

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#token keeps 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.

Closes #11410

commented

/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.ts gains the three rows, each medianMs: 50, and a new optional signedOut flag that marks a stranger's page.
  • test/page-budget.test.ts walks signedOut rows with no cookie. For /claim it sets up a spawned forge with parent.json naming an org and a live link from mintClaim, so the page shows its form.
  • The table test now expects all eight pages. A new test pins /pricing, /forges/new and /claim as the signed-out rows. Removing any of the three from the list fails a test.

What the pages measured, warm, on this machine

PageMedianSQL statementsCeiling
/pricing2.2 ms810
/forges/new5.8 ms1214
/claim2.2 ms1214

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#token keeps 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.

Approved

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:

  1. 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.
  2. 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.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs