Public: anyone can read this; the crew can change it.
Pages that answer under a measured budget: /system, /feed, /board, /fleet, /talk and a pull page join the page-budget roster #15269
Check · Review · Land · Live done — Landed and live in production.
Six more pages now have a budget: /system, /feed, /board, /fleet, /talk and a pull page (/:owner/:name/pulls/:number). Each has its own file in src/perf/pagebudgets/ and a row in src/perf/pagebudget.ts.
shipped production is serving it deploy 0adf720
2 earlier comments · 1 event
Six more pages now have a budget: /system, /feed, /board, /fleet, /talk and a pull page (/:owner/:name/pulls/:number). Each has its own file in src/perf/page_budgets/ and a row in src/perf/page_budget.ts. test/page-budget.test.ts walks them signed in, and each file's comment records what was measured and how the limit was set from it.
Measured on the page-budget fixture, three runs:
| page | SQL warm (same all three runs) | CPU median | statement limit | median budget |
|---|---|---|---|---|
/system | 26 | 10.2–10.9 ms | 29 | 25 ms |
/feed | 45 | 5.7–6.0 ms | 50 | 15 ms |
/board | 70 | 6.3–7.2 ms | 77 | 15 ms |
/fleet | 12 | 2.5–2.9 ms | 14 | 10 ms |
/talk | 31 | 3.7–3.9 ms | 35 | 10 ms |
| pull #1 | 109 | 10.3–11.6 ms | 120 | 25 ms |
- How the limits were set: each median budget is twice the slowest run, rounded up to the next 5 ms. I did not give statements the 2x headroom the issue suggests. The count did not move between runs, and a doubled count is an N+1 the limit is there to catch, so each limit is the count plus a tenth, in line with the existing "measured plus a little" rows.
- Pull page: the row uses the router pattern, so the production reader (
page_budget_read.ts) matches it against route stats.pagePathnow fills:number(default 1). The fixtures intest/page-budget.test.tsandtest/client-size.test.tsopen pull #1 before anything else onalice/notes. - Roster:
test/page-budget-roster.test.tslists the six pages and fails when one loses its file, its pattern or its roster row. - Client-size suite:
test/client-size.test.tswalks the same roster, so it needed a size ceiling for each new page. I added only those six todocs/design/size-budget.json. Rewriting the file would have raised every existing ceiling a little, so those are unchanged. - Docs:
docs/web.md"Not done" now names only pages that are still unmeasured (issue and pull lists, a single issue, code and file views, settings,/runsand a run's log, search, profiles, the API). A new short section there says how page budgets work.
Checks: bun x tsc --noEmit and bun scripts/gate.ts --fix are clean. I ran the covering tests myself because scripts/fast.ts named 3232 files (page_budget.ts is imported widely). The page-budget, roster, path, read, client-size, space-budget and check-tiers suites pass, 90 tests. With talk.ts removed, the roster test fails as it should.
I left out the other unmeasured pages listed in "Not done", the review steps and the before/after looks. No page markup or src/web/ code changed, only budgets, fixtures and docs, so there is nothing new on a page to look at.
To try it: bun test test/page-budget.test.ts prints the count and median table for all nineteen pages.
🤖 Generated with Claude Code
Six more pages now have a budget: /system, /feed, /board, /fleet, /talk and a pull page (/:owner/:name/pulls/:number). Each has its own file in src/perf/page_budgets/ and a row in src/perf/page_budget.ts. test/page-budget.test.ts walks them signed in, and each file's comment records what was measured and how the limit was set from it.
Measured on the page-budget fixture, three runs:
| page | SQL warm (same all three runs) | CPU median | statement limit | median budget |
|---|---|---|---|---|
/system | 26 | 10.2–10.9 ms | 29 | 25 ms |
/feed | 45 | 5.7–6.0 ms | 50 | 15 ms |
/board | 70 | 6.3–7.2 ms | 77 | 15 ms |
/fleet | 12 | 2.5–2.9 ms | 14 | 10 ms |
/talk | 31 | 3.7–3.9 ms | 35 | 10 ms |
| pull #1 | 109 | 10.3–11.6 ms | 120 | 25 ms |
- How the limits were set: each median budget is twice the slowest run, rounded up to the next 5 ms. I did not give statements the 2x headroom the issue suggests. The count did not move between runs, and a doubled count is an N+1 the limit is there to catch, so each limit is the count plus a tenth, in line with the existing "measured plus a little" rows.
- Pull page: the row uses the router pattern, so the production reader (
src/perf/page_budget_read.ts) matches it against route stats.pagePathnow fills:number(default 1). The fixtures intest/page-budget.test.tsandtest/client-size.test.tsopen pull #1 before anything else onalice/notes. - Roster:
test/page-budget-roster.test.tslists the six pages and fails when one loses its file, its pattern or its roster row. - Client-size suite:
test/client-size.test.tswalks the same roster, so it needed a size ceiling for each new page. I added only those six todocs/design/size-budget.json. Rewriting the file would have raised every existing ceiling a little, so those are unchanged. - Pipeline (
src/checks/tiers.ts):movesPageBudgetssaid a changed limit inpage_budgets/is judged, but the tests it names (pages-budget, client-size, docs-link) are not the ones that hold a page to its limit. A new budget file is in no coverage map yet, so nothing tied it to the test that judges it. The fast tier now runstest/page-budget.test.tsandtest/page-budget-roster.test.tswheneverpage_budget.tsor a file underpage_budgets/changes.test/check-tiers.test.tscovers this and fails against the oldtiers.ts. This is also the pipeline change the "pipeline first" rule asks for: with six new files, aDirection:line would not have cleared it, because that waiver allows at most two. - Docs:
docs/web.md"Not done" now names only pages that are still unmeasured (issue and pull lists, a single issue, code and file views, settings,/runsand a run's log, search, profiles, the API). A new short section there says how page budgets work.
Checks: bun scripts/gate.ts passes on the committed head and bun x tsc --noEmit is clean. I ran the covering tests myself because scripts/fast.ts named 3232 files (page_budget.ts is imported widely). Across the two rounds, the page-budget, roster, path, read, client-size, space-budget and check-tiers suites all pass. With talk.ts removed, the roster test fails as it should.
I left out the other unmeasured pages listed in "Not done", the review steps and the before/after looks. No page markup or src/web/ code changed, only budgets, fixtures, the tier rule and docs, so there is nothing new on a page to look at.
To try it: bun test test/page-budget.test.ts prints the count and median table for all nineteen pages.
🤖 Generated with Claude Code
The six budgets are measured, recorded beside each file and walked by the test, and the roster test is real. One thing to fix first: isPageTable in src/checks/tiers.ts duplicates movesPageBudgets exactly, so delete it and reuse the existing predicate. Second, the 10 ms median budgets on /fleet and /talk (measured 2.5 to 3.9 ms) sit close to CI noise. The direction asks for fast tests that never flake, so give them a floor, say 15 ms, or take the median over more samples. This pull changes no page markup, so it has no review steps and no before/after looks, and none are owed.
Six more pages now have a measured page budget: /system, /feed, /board, /fleet, /talk and a pull page. Each page has its own file under src/perf/page_budgets/, with the measurement and how the limit was derived written beside it. test/page-budget.test.ts walks every page in the table signed in and holds it to its limit. test/page-budget-roster.test.ts checks that the files and the list match.
src/checks/tiers.ts now picks the tests a change has to run with one predicate, movesPageBudgets. The second predicate, isPageTable, is removed. When a change touches shared page code or the budget table, both groups run: PAGE_BUDGET_TESTS and PAGE_TABLE_TESTS.
- The two predicates were not identical.
isPageTablematched only the table files.movesPageBudgetsalso matchessrc/web/layout.ts,src/http/server.ts,src/web/style/andsrc/web/pages/. So a layout change now also runs the walk and the roster test. That is what we want: shared page code changes every page's time and statement count, and the walk is the test that measures them. The roster test is cheap. - Test change: in
test/check-tiers.test.ts, the case for a layout change used to expect the roster test not to run. It now expects both table tests to run. A new case checks that a file with nothing to do with pages (src/snapshot/store.ts) runs neither. - /fleet and /talk: their median budgets go from 10 ms to 15 ms, the same as /feed and /board. Measured medians are 2.5–2.9 ms and 3.7–3.9 ms, so a loaded runner has room before the test fails. Their statement budgets stay at 14 and 35.
Before pushing I ran bun scripts/gate.ts --fix and bun x tsc --noEmit, and bun test on test/check-tiers.test.ts, test/page-budget.test.ts and test/page-budget-roster.test.ts. All passed (73 tests). No page markup changes, so there are no review steps.
To try it: bun test test/page-budget.test.ts walks the pages against their budgets, and bun test test/check-tiers.test.ts covers which tests a changed file pulls in.
🤖 Generated with Claude Code
Approved. Six budget files, roster rows, a roster test that names them, fixtures that open pull #1, and size ceilings for the new pages. Limits are set from measurements written beside each. The tiers.ts change ties the budget table to the tests that judge it, and has a test. No page markup changed, so there are no review steps to ask for. Next, non-blocking: (1) measure the remaining pages listed under Not done, starting with issue and pull lists. (2) Derive the statement limits and median budgets from the measurement by a small helper, so the arithmetic in each comment is not hand-copied.
Six more pages now have a budget:
/system,/feed,/board,/fleet,/talkand a pull page (/:owner/:name/pulls/:number). Each has its own file insrc/perf/page_budgets/and a row insrc/perf/page_budget.ts.test/page-budget.test.tswalks them signed in, and each file's comment records what was measured and how the limit was set from it.Measured on the page-budget fixture, three runs:
/system/feed/board/fleet/talkpage_budget_read.ts) matches it against route stats.pagePathnow fills:number(default 1). The fixtures intest/page-budget.test.tsandtest/client-size.test.tsopen pull #1 before anything else onalice/notes.test/page-budget-roster.test.tslists the six pages and fails when one loses its file, its pattern or its roster row.test/client-size.test.tswalks the same roster, so it needed a size ceiling for each new page. I added only those six todocs/design/size-budget.json. Rewriting the file would have raised every existing ceiling a little, so those are unchanged.docs/web.md"Not done" now names only pages that are still unmeasured (issue and pull lists, a single issue, code and file views, settings,/runsand a run's log, search, profiles, the API). A new short section there says how page budgets work.Checks:
bun x tsc --noEmitandbun scripts/gate.ts --fixare clean. I ran the covering tests myself becausescripts/fast.tsnamed 3232 files (page_budget.tsis imported widely). The page-budget, roster, path, read, client-size, space-budget and check-tiers suites pass, 90 tests. Withtalk.tsremoved, the roster test fails as it should.I left out the other unmeasured pages listed in "Not done", the review steps and the before/after looks. No page markup or
src/web/code changed, only budgets, fixtures and docs, so there is nothing new on a page to look at.To try it:
bun test test/page-budget.test.tsprints the count and median table for all nineteen pages.🤖 Generated with Claude Code
Closes #15251