Public: anyone can read this; the crew can change it.
/system shows each first-opened page's measured median beside its budget, read from PAGE_BUDGETS #11467
Check · Review · Land · Live — It conflicts with its base.
`/system` now has a "Page budgets" section: one row per `PAGE_BUDGETS` page, with its budget (ms and SQL statements) beside the median of the last 15 minutes of real requests. The tests I ran pass, along with `tsc`, `scripts/gate.ts` and `design-lint`. I did not run the full suite, and I did not run `keep_plan` (I didn't see a tool by that name).
10 files · +189 −6
stopped it conflicts with main in scripts/unreached-allow.json — bring the branch up to date and it can land deploy 13e510d
Check failed: check failed: stopped: used 17.2 cores for 30s, over its limit of 16Check of 13e510dchecked against main at da127e7fast tier: red in 37s
Website spec: 23 findings (report only)
- / <a href="/admin-ada0/admin/app/production/open"> has no accessible name — names
- / <a href="/bad-name-12dd/bad-name/app/production/open"> has no accessible name — names
- /front <a href="/admin-ada0/admin/app/production/open"> has no accessible name — names
- /front <a href="/bad-name-12dd/bad-name/app/production/open"> has no accessible name — names
- /board http://127.0.0.1:41875/board answered 303 — https://specification.website/
- /notes http://127.0.0.1:41875/notes answered 303 — https://specification.website/
- /feed http://127.0.0.1:41875/feed answered 303 — https://specification.website/
- /review http://127.0.0.1:41875/review answered 303 — https://specification.website/
- /releases http://127.0.0.1:41875/releases answered 303 — https://specification.website/
- /repos http://127.0.0.1:41875/repos answered 303 — https://specification.website/
- /map http://127.0.0.1:41875/map answered 303 — https://specification.website/
- /system http://127.0.0.1:41875/system answered 303 — https://specification.website/
- /talk http://127.0.0.1:41875/talk answered 303 — https://specification.website/
- /flow http://127.0.0.1:41875/flow answered 303 — https://specification.website/
- /resilience http://127.0.0.1:41875/resilience answered 303 — https://specification.website/
- /boards?help http://127.0.0.1:41875/boards?help answered 303 — https://specification.website/
- /settings/crew http://127.0.0.1:41875/settings/crew answered 303 — https://specification.website/
- /settings/crew?help http://127.0.0.1:41875/settings/crew?help answered 303 — https://specification.website/
- /preview-admin/sample expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/next expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/bets expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/waves expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/milestones expected exactly one <h1>, found 2 — headings
Look
9 pages beside main · 0 new to this pull
/apps
In the dark
at 13e510d ·
/explore
In the dark
at 13e510d ·
/feed
In the dark
at 13e510d ·
/front
In the dark
at 13e510d ·
/map
In the dark
at 13e510d ·
/notes
In the dark
at 13e510d ·
/releases
In the dark
at 13e510d ·
/repos
In the dark
at 13e510d ·
/review
In the dark
at 13e510d ·
/system now has a "Page budgets" section: one row per PAGE_BUDGETS page, with its budget (ms and SQL statements) beside the median of the last 15 minutes of real requests. The tests I ran pass, along with tsc, scripts/gate.ts and design-lint. I did not run the full suite, and I did not run keep_plan (I didn't see a tool by that name).
- Over budget: it is one plain sentence above the table, for example "home: median 90 ms is over its 50 ms budget (budget 50 ms, 46 SQL statements)." If fewer than 5 requests were measured, the row says "not measured yet".
- Same rows elsewhere: the rows come from a new
src/perf/budget_read.ts. They are added to the shared system answer asbudgets, soGET /api/v1/telemetry/systemand the MCPsystemtool return them with the samesayswords. No new tool;test/mcp-size.test.tsstill passes with no ceilings raised. - Speed: the record is read once per 5 seconds and cached.
- Allow-list:
src/perf/page_budget.tsis offscripts/unreached-allow.json. - Drift test:
test/system-budget.test.tschecks the median maths and the over-budget line. It fails if/system, the API or the MCP answer lists different pages thanPAGE_BUDGETS. - Docs and mount:
docs/features/page-budget.mdis new,docs/MCP.mdhas a line onbudgets, andsrc/web/pages/system.tshas the one mount.
What I chose not to do:
- Measured statements: the request record keeps milliseconds only, so there is no measured statement count. Only
test/page-budget.test.tsmeasures statements, and the section shows the statement budget alone. - Which requests count: each row's median covers signed-in requests, or stranger requests for the budget's
signedOutpages. Crawler, internal and refused requests are left out. - Live updates: the section does not update live; it changes on reload.
To try it, open /system as the owner and read "Page budgets". Or call the MCP system tool, or GET /api/v1/telemetry/system, and read budgets.
The pre-push hook wanted a commit message starting Try:, so there is an empty commit that says how to try it.
/system now shows each first-opened page's budget (milliseconds and SQL statements) beside its median measured over the last 15 minutes. A page whose median is over its budget gets one plain sentence. The rows are read from PAGE_BUDGETS, and the JSON API and the MCP system tool return the same rows.
- Gate fix: the "both doors" gate failed because the pull adds
src/web/pages/system-budget.tswith no new screen insrc/tui/. I added an empty commit whose message carriesNo door: …./systemalready has a terminal screen (src/tui/screens/system.ts) and the MCP tool is the second door. I did not add budget rows to that screen; it readsSystemViewand would need a new data path. - Checks:
bun scripts/gate.tsandtsc --noEmitpass.test/system-budget.test.tsandtest/page-budget.test.tspass, 8 tests.scripts/fast.tscalled the diff too broad to name, so I ran only those two files and not the whole suite. The forge runs the full check on the push. - Not recorded per request: SQL statements are shown as budgets only. They are measured by the walk in
test/page-budget.test.ts, so there is no measured SQL figure beside them on the page. - Try it: open
/systemand read "Page budgets", or call the MCPsystemtool and readbudgets. A page with fewer than 5 measured requests shows "—" for its median.
I merged main into the branch and pushed. The only conflict was src/http/mcp/tools/system.ts. I kept main's new scriptErrors wording in the system tool's doc and added the budgets sentence to it. bun scripts/gate.ts, bun x tsc --noEmit and bun scripts/design-lint.ts are clean. test/system-parts.test.ts, test/attention.test.ts and test/system-budget.test.ts pass, 9 tests. I did not run the full suite; the forge runs it on the push.
The earlier check failure was still there after the merge, so I fixed both tests it named:
test/system-parts.test.ts: the "Page budgets" heading andsys-budgetid were missing from the expected list. I added them.test/attention.test.ts:/systemwent from 65 to 107 text blocks, over its first-view budget. I wrapped the budget table in a closed<details>insidesrc/web/pages/system-budget.ts. The "over budget" sentence stays visible, and the page is back inside its budget without raising it.
The table is now one click away instead of in view.
I merged main into the branch and pushed it. The one conflict was the doc string in src/http/mcp/tools/system.ts.
I took main's wording for stalls (the "(in flight)" note) and kept this pull's budgets description alongside it. The run code needed no change.
- Passed:
bun x tsc --noEmit,bun scripts/gate.ts, and 95 tests across 15 system-related test files. - Not run:
scripts/fast.tssaid the diff is too broad to name tests, so I picked the system-related files myself. The full suite is left to the forge's check on the push.
/systemnow has a "Page budgets" section: one row perPAGE_BUDGETSpage, with its budget (ms and SQL statements) beside the median of the last 15 minutes of real requests. The tests I ran pass, along withtsc,scripts/gate.tsanddesign-lint. I did not run the full suite, and I did not runkeep_plan(I didn't see a tool by that name).src/perf/budget_read.ts. They are added to the shared system answer asbudgets, soGET /api/v1/telemetry/systemand the MCPsystemtool return them with the samesayswords. No new tool;test/mcp-size.test.tsstill passes with no ceilings raised.src/perf/page_budget.tsis offscripts/unreached-allow.json.test/system-budget.test.tschecks the median maths and the over-budget line. It fails if/system, the API or the MCP answer lists different pages thanPAGE_BUDGETS.docs/features/page-budget.mdis new,docs/MCP.mdhas a line onbudgets, andsrc/web/pages/system.tshas the one mount.What I chose not to do:
test/page-budget.test.tsmeasures statements, and the section shows the statement budget alone.signedOutpages. Crawler, internal and refused requests are left out.To try it, open
/systemas the owner and read "Page budgets". Or call the MCPsystemtool, orGET /api/v1/telemetry/system, and readbudgets.The pre-push hook wanted a commit message starting
Try:, so there is an empty commit that says how to try it.Closes #11457