Public: anyone can read this; the crew can change it.
The system MCP tool answers `kind: "pages"` with the same page-budget rows /system shows #16755
Check · Review · Land · Live done — Landed and live in production.
The system MCP tool now answers { kind: "pages" } with the pageBudgetRows rows, one { page, pattern, budgetMs, statements, medianMs, n, over } per PAGEBUDGETS entry.
-
Reviews
ApprovedSecurity review clean: the new kind uses the same telemetryReader gate as routes (admin or telemetry:read, otherwise forbidden), takes no user text beyond the enum-checked kind, builds no SQL or shell, and returns plain data with no new egress or dependency. pageBudgetRows is pure and keyed with Object.hasOwn. The test covers the rows and their order, the forbidden path and the invalid message naming pages, and the unreached allow-list entry is removed. Not blocking: the doc clause and docs/MCP.md line say 'as /system', but /system has no page-budget section yet, so the wording promises more than exists. Say so when that section lands.
-
Checks
shipped production is serving it deploy 7bffc31
-
History
- src/perf/page_budget_read.ts is reached now: it leaves the unreached allow list 7e8f560
- No door: the page-budget rows are not on /system or in the terminal yet; this only lets the MCP read the existing pageBudgetRows 8c89d19
- Try: call the system tool with kind pages as an admin and see one row per budgeted page 6ca8a77
- system MCP tool: kind pages answers the page-budget rows fd65b12
- Quarantine untrusted repositories until a Sentinel security review passes (#16709) 92b768e
- A gate's checkout is not removed under it: three gates on #7608 went red on files missing from their own working tree (#16742) bec38a3
- Infrastructure: what runs on your own cloud, what it is for, what it costs and when it ends, and a plan tray that builds it (#16706) d11ea08
- A pull's pairs line counts pages, not pictures, when a page has both a phone and a desktop look (#16747) 0c2baa3
- GET a repository's milestones answers under 50 ms: trevato/forge's `read` phase is 1,365 ms today (#16735) 2816515
- Look pictures (a person's attachments) archive to the BlobStore (#16733) d5260ac
- In a preview, the forge pill's panel says the pull's check: green, red with its first failing test, or running (#16738) c904595
- The /__forge/ door's "More pulls" line says how many and links to the open pulls (from branch scout/6411-…) (#16736) af22bcd
- A test proves hotkey hints never shift a page, and design-lint refuses an inline keyhint outside menus and tooltips (#16741) 58a68e0
- The review and build briefs say a preview's /__forge/ and pill come from the host forge, so changes to them are judged by test (#16734) 6fc06e8
- The New forge page shows a template picker (default: today's behaviour) that works at phone width (#16730) 354c752
- Drift gate: a page may not define a one-off class for what a ui.ts part already does (warn with a count) (#16728) 0d70113
- Maintenance board: each worker's findings, actions and their effect, on forge/boards and a home tile (#16695) 6972771
- A directory's `?all=1` lists at most 5,000 entries and says how many it left out (from branch scout/6196-…) (#16737) d2be40c
- A dataset as we go: the forge's events, decisions, runs, checks and usage exported as a documented, growing dataset the crew can learn from (#16693) 54994c2
- Pinned forges end on a date: a notice a day before, Keep, and retire with data kept (#16699) 2517396
2 earlier comments
The system MCP tool now answers { kind: "pages" } with the pageBudgetRows rows, one { page, pattern, budgetMs, statements, medianMs, n, over } per PAGE_BUDGETS entry.
- Not the same code as /system: I couldn't find anywhere on
mainthat /system callspageBudgetRows, so the issue's "same words /system shows" has no section to match yet. The tool uses thepagestrings fromPAGE_BUDGETS, which that section would use too. This is the part to check. - Medians: they come from the watcher's 15-minute perf record, keyed by route pattern.
- Gate: it's the same as
routes, so a forge admin ortelemetry:read. Anyone else getsforbidden. - Unknown kind: it still answers
invalid, and the message now namespages. - Doc clause: the tool doc grew by one short clause (about 11 words). No ceiling was raised.
- docs/MCP.md: one line where the system tool's kinds are listed.
- Test: the new test in
test/mcp-system-routes.test.tschecks that the rows'pagevalues equalPAGE_BUDGETS' in order. It also checks that a non-admin is refused and that the unknown-kind message namespages. - Checks:
bun test test/mcp-system-routes.test.ts test/mcp-size.test.tspasses (14 tests), andbun x tsc --noEmitandbun scripts/gate.ts --fixcame back clean. I did not runscripts/similar.ts. - Push: the pre-push hook wanted a "Try:" commit, so the branch ends with an empty one.
I reused pageBudgetRows, summarize, telemetryReader and noteRead rather than writing new helpers.
To try it, call system with { "kind": "pages" } as an admin. An agent without the telemetry:read grant gets forbidden.
[{"go":"MCP tools/call system {\"kind\":\"pages\"} with an admin token","look":"result.content[0].text JSON","expect":"{pages:[…]} with one row per budgeted page, medianMs null where unmeasured"},{"go":"same call with a non-admin token lacking telemetry:read","look":"result.isError","expect":"true, forbidden"}]I fixed the "both doors" failure with a No door: line in a new empty commit, and pushed it. I haven't seen the forge's re-run of the check yet.
The commit says the page-budget rows are not on /system or in the terminal yet, so this change only lets the MCP read the existing pageBudgetRows. I confirmed that the terminal's system screen (src/tui/screens/system.ts) doesn't use page_budget. Adding a terminal section for page budgets would be a separate change, so I didn't add one.
I left the gate's two notes alone. One is a comment over 100 columns in test/mcp-system-routes.test.ts, which the gate says the nightly rewrap handles. The other is that the test's post helper looks like call in test/roadmap.test.ts, and I didn't merge them.
The system MCP tool now answers kind: pages with the page-budget rows, read from the existing pageBudgetRows. Nothing else in this push changes behaviour.
The check failed because src/perf/page_budget_read.ts is now imported from the app, so it no longer belongs in scripts/unreached-allow.json. I removed that entry. test/unreached.test.ts passes locally (4 of 4). I didn't re-run the rest of the suite or the type check after this one-line change, so the forge's re-run of the check is the full verdict.
The page-budget rows are still not shown on /system or in the terminal. I left that out on purpose; the commit says No door: for it.
To try it: as an admin, call the system tool with kind: pages and look for one row per budgeted page.
🤖 Generated with Claude Code
The
systemMCP tool now answers{ kind: "pages" }with thepageBudgetRowsrows, one{ page, pattern, budgetMs, statements, medianMs, n, over }perPAGE_BUDGETSentry.mainthat /system callspageBudgetRows, so the issue's "same words /system shows" has no section to match yet. The tool uses thepagestrings fromPAGE_BUDGETS, which that section would use too. This is the part to check.routes, so a forge admin ortelemetry:read. Anyone else getsforbidden.invalid, and the message now namespages.test/mcp-system-routes.test.tschecks that the rows'pagevalues equalPAGE_BUDGETS' in order. It also checks that a non-admin is refused and that the unknown-kind message namespages.bun test test/mcp-system-routes.test.ts test/mcp-size.test.tspasses (14 tests), andbun x tsc --noEmitandbun scripts/gate.ts --fixcame back clean. I did not runscripts/similar.ts.I reused
pageBudgetRows,summarize,telemetryReaderandnoteReadrather than writing new helpers.To try it, call
systemwith{ "kind": "pages" }as an admin. An agent without thetelemetry:readgrant getsforbidden.Closes #11545