Public: anyone can read this; the crew can change it.
/system lists each first-opened page's warm median beside its budget, one plain line per page #11567
/system now has a section, "First-opened pages against their budget", with one line per page in `PAGE_BUDGETS` order.
stopped parked by the crew deploy 781f1c2
/system now has a section, "First-opened pages against their budget", with one line per page in PAGE_BUDGETS order.
An over-budget page reads "map answers in 82 ms, budget 50 ms". A page inside its budget reads "… within its N ms budget". A page nobody opened reads "not opened in the last 15 minutes (budget N ms)". There is no banner. The lines sit behind one <details> summary ("Page budgets: all met" or "N over"), so the first view stays in budget.
The gate, design-lint and tsc --noEmit came back clean. The new and touched tests and test/mcp-size.test.ts pass (12 pass, 0 fail). The branch was already pushed and git push reported nothing new, so the forge's check on this head is the one to watch. I did not boot the app or open /system.
- Rows:
src/perf/page_budget_read.tshaspageBudgetRows(samples, now), a pure function. It takes samples keyed by router pattern from the existing perf record, drops anything older than the 15-minute window, and returns{ page, pattern, budgetMs, statements, medianMs | null, n, over }.overis true only when the median is past the budget. - No new SQL: the read is in memory only, so /system's statement count does not rise.
src/web/pages/system.tsmounts the section once. - Files outside the listed ones: I removed
src/perf/page_budget.tsfromscripts/unreached-allow.json, since the new code makes it reachable. I also added the new section's heading totest/system-parts.test.ts, which counts one h2 per part. - Tests and docs:
test/page-budget-read.test.tscovers the row order, null for unsampled pages, the over-budget boundary and the render.docs/features/page-budget.mdis one short paragraph.
I left out any red styling, alerts or history of past medians. I did not touch the MCP.
I found nothing in this change that could cause that failure, so I merged current main and pushed again. I have not seen a passing check yet.
- What the log shows: every test in the tail passed (112 pass, 0 fail). The failure came from the machine, not a test. A Chrome process, which the browser-based fit tests start, tried to reach Google hosts the repository's egress refuses. The shards then used 16.7 cores for 30s against a limit of 16, and the check was stopped.
- Why I think it isn't this change: the pull adds one pure function, one render module and one mount on /system, and none of it starts a process or a browser. The overload was a CPU limit on the shared check machine, so it may come back whatever this pull does.
- What I pushed: I merged the 17 commits
mainhad gained, which may include relevant fixes, and pushed781f1c296. Locally the gate andtsc --noEmitcame back clean, andtest/page-budget-read.test.tsandtest/system-parts.test.tspass (8 pass, 0 fail). I did not run the browser-based tests here.
If the next check stops on the same limit, a person should look at the browser tests' CPU use or the shard count, because that is outside this pull's files.
The page-budget section is done and pushed, but the check has now failed twice on the machine's CPU limit and I have not changed anything to fix it. I found no cause in this pull.
Both failures are the same: the check was stopped for using about 17 cores for 30s against a limit of 16, with sh as the busiest process. Every test that ran passed (112 pass, 0 fail). Nothing in this pull starts a process or a browser. The only browser-driven test in the stopped shard, test/people-fit.test.ts (with test/helpers/chrome.ts), dates from earlier pulls (#9399 and #9079). The log shows Chrome trying to reach Google hosts that the repository's egress refuses. A busy shared machine is my best guess. I have not confirmed it, and I don't know whether other pulls hit the same limit. A person should look at the browser-test shards' CPU use. Adding a commit to this pull would not change that.
What changed
/system has a new section, "First-opened pages against their budget", with one plain line per page in PAGE_BUDGETS order. An over-budget page reads "map answers in 82 ms, budget 50 ms", with no banner. A page nobody opened reads "not opened in the last 15 minutes". The lines sit behind one summary ("Page budgets: all met" or "N over"). The read is in memory from the perf record, with no new SQL.
What to look at
src/perf/page_budget_read.tsholds the purepageBudgetRows(samples, now).src/web/pages/system-budget.tsrenders the section, andsrc/web/pages/system.tsmounts it once.test/page-budget-read.test.tscovers row order, null for unsampled pages,overonly past the budget, and the render.scripts/unreached-allow.jsonno longer listssrc/perf/page_budget.ts, now that it is reachable.test/system-parts.test.tsgains the new heading.docs/features/page-budget.mdis one short paragraph.
Left out
Red styling, alerts, history of past medians, and the MCP.
Checked locally
The gate, bun x tsc --noEmit, design-lint and the touched tests are clean, and test/mcp-size.test.ts passes.
To try it
Open /system on the preview and find the "Page budgets" summary.
Parked by the crew: the check stayed red through 2 automatic tries: check failed: stopped: used 17.0 cores for 31s, over its limit of 16; the busiest process is sh (pid 808602, 462s of CPU)
/system now has a section, "First-opened pages against their budget", with one line per page in
PAGE_BUDGETSorder.An over-budget page reads "map answers in 82 ms, budget 50 ms". A page inside its budget reads "… within its N ms budget". A page nobody opened reads "not opened in the last 15 minutes (budget N ms)". There is no banner. The lines sit behind one
<details>summary ("Page budgets: all met" or "N over"), so the first view stays in budget.The gate, design-lint and
tsc --noEmitcame back clean. The new and touched tests andtest/mcp-size.test.tspass (12 pass, 0 fail). The branch was already pushed andgit pushreported nothing new, so the forge's check on this head is the one to watch. I did not boot the app or open /system.src/perf/page_budget_read.tshaspageBudgetRows(samples, now), a pure function. It takes samples keyed by router pattern from the existing perf record, drops anything older than the 15-minute window, and returns{ page, pattern, budgetMs, statements, medianMs | null, n, over }.overis true only when the median is past the budget.src/web/pages/system.tsmounts the section once.src/perf/page_budget.tsfromscripts/unreached-allow.json, since the new code makes it reachable. I also added the new section's heading totest/system-parts.test.ts, which counts one h2 per part.test/page-budget-read.test.tscovers the row order, null for unsampled pages, the over-budget boundary and the render.docs/features/page-budget.mdis one short paragraph.I left out any red styling, alerts or history of past medians. I did not touch the MCP.
Closes #11544