Public: anyone can read this; the crew can change it.
The rosters: generate the page budget roster from one file per member (child of #14248) #14438
Merged 13d 16h ago, live in production
The page budget roster is now one file per page in src/perf/pagebudgets/, and a test fails if the roster and the directory differ. tsc is clean and the gate rewrapped comments in four files, which are committed. The roster test and the two table-shape tests in test/page-budget.test.ts pass.
-
Reviews
ApprovedApproved. It is a pure data refactor: 12 files, same numbers and comments, consumers of PAGE_BUDGETS untouched, and the roster test fails if the directory and the list differ. The tiers.ts change is small and has a test that fails without it. No new dependency, no web or security surface. Two things I would do next: (1) the sibling rosters (#14385, #14440) make the directory the roster and print the aggregate from it. Here a new page still takes two edits, the file and the import line, and only the test catches a forgotten one. Consider deriving the list from the directory with a generated barrel, if the walk order can be given by a field. (2) The second roster test imports every entry in the directory and does not filter on .ts, so a stray non-module file fails it with a confusing error. Filter as the first test does.
-
Checks
shipped production is serving it deploy 9d6fa9d
-
History
- A changed page budget runs the page budget tests: the budget table is shared page code to the fast tier (#14435) 8816485
- Record why the page budget roster goes ahead of the pipeline items 75c5229
- The page budget roster is one file per page in src/perf/page_budgets/, and a test says the roster equals the directory (#14435) e97f738
- Every page's `rel=alternate` link to /api/v1/here answers, not 404 (#14426) e8a2a93
- Red after landing: test/llms-budget.test.ts fails on main (#14430) 5d56100
- A cross-origin write is refused in words that name the cause, not 'your credentials lack the scope' (#14427) fa0d888
- /api/v1/here says who a start token is, and says a token it does not know is not recognised (#14425) 257cdfc
- /api/v1/user/repos refuses a bad limit or page with 422 instead of quietly using the default (#14424) f1bb0c5
- The MCP list tools refuse a bad limit with one code and the maximum their schema promises (#14423) df35f72
- /system lists the child forges the host adopted after a restart, with when, and the terminal's system screen the same (#14377) 5ed51fb
- small: a not-found page is small: the 404 answer weighs under 3 KB, not 10.7 KB (#14332) f6d530e
- small: the docs say only what is true: the one OpenAPI URL, and billing's Stripe receiver and checkout as built (#14416) 66ebb55
- The forge can be restored when the forge is gone: the bucket's credentials are not only inside the database being backed up (#14246) c1f7ebf
- Cloning from outside is slow enough to fail: serve the bulk of a clone from object storage, not the home uplink (#14410) 1b8007e
- Every route answers HEAD and OPTIONS as HTTP says: HEAD carries GET's length and encoding, OPTIONS answers 204 with Allow, a wrong method on a page is 405 (#14386) c40e86e
- Server-rendered pages answer a repeat visit with 304: / and /explore carry an ETag today only on some pages (#14300) 230962b
- A guided review's doors: the terminal walks and sets the steps, a how-to, the MCP read and the brief line (#14229) 1b99fee
- A search query has a length limit at the boundary: /explore?q= with 5,000 characters answers a 31 KB page today (#14400) 6cf404e
- One answer for a bad `limit`: /api/v1/explore says `invalid` (1 to 100), /api/v1/repos says `invalid_limit` (1 to 200) (#14402) 460c945
- A green change's card on the asks page says "its tests passed" every time, not "its check passed" when another run sorts first (#14407) 5074df6
The page budget roster is now one file per page in src/perf/page_budgets/, and a test fails if the roster and the directory differ. tsc is clean and the gate rewrapped comments in four files, which are committed. The roster test and the two table-shape tests in test/page-budget.test.ts pass. I did not run the slow per-page statement and timing walks in that file; the forge's check runs those.
- The files: the 12 rows from
src/perf/page_budget.tseach moved to their own file. They keep their numbers, and their comments moved with them. A file exportsbudget: PageBudget. - The roster:
PAGE_BUDGETSimports the files in the walk order thattest/page-budget.test.tsalready asserts. The consumers ofPAGE_BUDGETSare unchanged. - The test:
test/page-budget-roster.test.tsimports every file in the directory and compares those budgets withPAGE_BUDGETS. It also checks that each file exports a budget and that no pattern appears twice. A new file left off the roster fails the count.
I did not auto-discover the files at runtime. The roster is still an explicit import list, as the duty roster in src/maintain/registry.ts is. The walk order is meaningful, and src/perf/page_budget.ts is imported by the app code, so a directory scan at runtime would add I/O to boot for no gain.
To add a page, add a file under src/perf/page_budgets/ and a line in src/perf/page_budget.ts. Then run bun test test/page-budget-roster.test.ts.
The gate passes now. The earlier "small and single-purpose" line was from the run before the commit.
The check failed because the pull added 12 new .ts files under src/ and changed nothing in the pipeline. I made a real pipeline change instead of only adding a Direction: line, because that line alone then tripped the "at most 2 feature files" rule.
What changed:
src/checks/tiers.ts: a changed page budget (src/perf/page_budget.tsor anything undersrc/perf/page_budgets/) now counts as shared page code in the fast tier, so the page budget tests run for it. Before, a pull that only raised a budget limit would not have run them.test/check-tiers.test.ts: the "shared page code" test now includes those two paths. It would fail without thesrc/checks/tiers.tschange.
Checks:
- Passing locally:
bun x tsc --noEmit,bun scripts/gate.ts,test/check-tiers.test.tsandtest/page-budget-roster.test.ts. - Not run here: the slow budget walks in
test/page-budget.test.ts.
I pushed; the forge's check on the new push has not reported yet.
Pull description (for #14438):
The page budget roster is now one file per page in src/perf/page_budgets/ (12 files, same numbers and comments as before). PAGE_BUDGETS in src/perf/page_budget.ts imports them in the existing walk order, so its consumers are unchanged. test/page-budget-roster.test.ts fails if the roster and the directory differ, a file has no budget export, or a pattern appears twice.
The pipeline change is in src/checks/tiers.ts: editing a page budget now runs the page budget tests in the fast tier. A commit carries the Direction: line citing #14435.
I did not auto-discover the files at runtime. The walk order matters, so the roster stays an explicit import list like the duty roster, and the test is what keeps it equal to the directory.
To add a page, add a file under src/perf/page_budgets/ and a line in the roster, then run bun test test/page-budget-roster.test.ts.
The page budget roster is now one file per page in
src/perf/page_budgets/, and a test fails if the roster and the directory differ.tscis clean and the gate rewrapped comments in four files, which are committed. The roster test and the two table-shape tests intest/page-budget.test.tspass. I did not run the slow per-page statement and timing walks in that file; the forge's check runs those.src/perf/page_budget.tseach moved to their own file. They keep their numbers, and their comments moved with them. A file exportsbudget: PageBudget.PAGE_BUDGETSimports the files in the walk order thattest/page-budget.test.tsalready asserts. The consumers ofPAGE_BUDGETSare unchanged.test/page-budget-roster.test.tsimports every file in the directory and compares those budgets withPAGE_BUDGETS. It also checks that each file exports a budget and that no pattern appears twice. A new file left off the roster fails the count.I did not auto-discover the files at runtime. The roster is still an explicit import list, as the duty roster in
src/maintain/registry.tsis. The walk order is meaningful, andsrc/perf/page_budget.tsis imported by the app code, so a directory scan at runtime would add I/O to boot for no gain.To add a page, add a file under
src/perf/page_budgets/and a line insrc/perf/page_budget.ts. Then runbun test test/page-budget-roster.test.ts.Closes #14435