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 #11535
/system now has a "Page budgets" section: one line per PAGEBUDGETS page, with its measured median beside its budget in ms and SQL statements. A page over budget is one plain line (data-over="1"), not a banner.
stopped parked by the crew deploy 37af3d9
3 earlier comments
/system now has a "Page budgets" section: one line per PAGE_BUDGETS page, with its measured median beside its budget in ms and SQL statements. A page over budget is one plain line (data-over="1"), not a banner.
- Where the numbers come from:
src/perf/budget_read.tstakes the median of the last 15 minutes from the perf record insrc/perf/record.ts. It keeps the result for 5 seconds, so a busy /system doesn't re-sort the samples. A page not opened in that window says "not opened in the last 15 minutes". - Same rows elsewhere:
systemWithReadersadds abudgetsarray, each row with itslineof words. SoGET /api/v1/telemetry/systemand the MCPsystemtool's default answer carry the same rows. I added no new tool orkind. The tool's doc string anddocs/MCP.mdsay so. - Files: the section is
src/web/pages/system-budget.ts, mounted once insystem.ts.src/perf/page_budget.tsis removed fromscripts/unreached-allow.json, and the notes are indocs/features/page-budget.md. - Tests:
test/system-budget.test.tsfails if the section stops drawing every table row, if the rows stop following the table, or if the line wording diverges. - Checks: gate, tsc, design-lint,
test/mcp-size.test.tsandtest/system-telemetry.test.tspass.scripts/fast.tssaid the diff is too broad to name, so I ran only the tests near the change. - Left out: the measured SQL statement count. The perf record holds timings only, so statements show as the budget alone. The earlier parked branch wasn't reachable, so I started over.
- Heads-up:
test/mcp-system-routes.test.tsfails when run in one process withmcp-sizeandsystem-telemetry. It does so without my change too, because the in-process perf record is shared, and it passes alone. - Try it: open /system as the owner and look for "Page budgets";
GET /api/v1/telemetry/systemreturnsbudgets.
I made no new push. The preview deploy didn't fail on anything in the code.
- What the log says: the app started,
/readyzcame up, and the log ends withdoneandserving. The only complaint is "no tests declared, none run", which is a note about the preview, not an error. - Why that note appears:
forge.jsondeclares tests undercheck(fast,run,verify). Nothing there makes the preview deploy run tests, and this pull didn't changeforge.json. - Preview check:
/and/healthzon https://lab--11535--forge-trevato-apps.open-platform.sh both answer 200,/in about 0.9 s. I couldn't open/systemthere because it needs a signed-in owner. - Tests before the first push: gate, tsc, design-lint,
test/system-budget.test.ts,test/mcp-size.test.tsandtest/system-telemetry.test.tspass. Thetest/mcp-system-routes.test.tsfailure only shows up when it runs in one process with others. It fails the same way without my change, and it passes alone.
If the forge's check result shows red on the pull, send me that log. It is a different failure from this deploy note.
The "both doors" gate failed on this pull. I fixed it with a "No door:" commit line, not a new terminal screen, and the gate now passes locally. I did not rerun tsc or the tests, since the new commit is empty and changes no files.
What changed: /system now shows each first-opened page's measured median beside its PAGE_BUDGETS budget. The same rows are in the telemetry API and the MCP system tool. The new src/web/pages/system-budget.ts is a section of the existing /system page, not a new page. A "No door:" commit line is the route AGENTS.md allows for that.
What I left out: I did not add a terminal screen or change src/tui/screens/system.ts. The /system terminal screen already imports from src/system/telemetry.ts. I did not check that it renders the new budget rows. If you want them in the terminal as well, that is a separate change.
How to try it: open /system as the owner and read the Page budgets section. The preview is at https://lab--11535--forge-trevato-apps.open-platform.sh.
Parked by the crew: the check stayed red through 2 automatic tries
/system now has a "Page budgets" section: one line per
PAGE_BUDGETSpage, with its measured median beside its budget in ms and SQL statements. A page over budget is one plain line (data-over="1"), not a banner.src/perf/budget_read.tstakes the median of the last 15 minutes from the perf record insrc/perf/record.ts. It keeps the result for 5 seconds, so a busy /system doesn't re-sort the samples. A page not opened in that window says "not opened in the last 15 minutes".systemWithReadersadds abudgetsarray, each row with itslineof words. SoGET /api/v1/telemetry/systemand the MCPsystemtool's default answer carry the same rows. I added no new tool orkind. The tool's doc string anddocs/MCP.mdsay so.src/web/pages/system-budget.ts, mounted once insystem.ts.src/perf/page_budget.tsis removed fromscripts/unreached-allow.json, and the notes are indocs/features/page-budget.md.test/system-budget.test.tsfails if the section stops drawing every table row, if the rows stop following the table, or if the line wording diverges.test/mcp-size.test.tsandtest/system-telemetry.test.tspass.scripts/fast.tssaid the diff is too broad to name, so I ran only the tests near the change.test/mcp-system-routes.test.tsfails when run in one process withmcp-sizeandsystem-telemetry. It does so without my change too, because the in-process perf record is shared, and it passes alone.GET /api/v1/telemetry/systemreturnsbudgets.Closes #11457