Repository navigation
fix(mcp): trim the press plan text back under the always-loaded byte budget - #4572
Conversation
…budget callstack#4296 grew the press tool description and the intervalMs field copy by ~400 bytes, which pushed the always-loaded tool set over the 22 KiB first-prompt budget the loading-meta test guards (22862 bytes > 22528 on CI). The long plan contract already lives in docs/commands.md and the ADR; the MCP description keeps the semantic minimum (comma-separated ref list, 2-16 keys, one command, admitted before the first press) and intervalMs returns to its pre-plan wording.
There was a problem hiding this comment.
No issues found across 2 files
You’re at about 95% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.
|
This is ready from a code review at 0bb051e: the diff only trims two description strings in |
|
Both smoke jobs (ios/macos) and the full check suite are green at 0bb051e now — 12 success, the 2 skips are conditional jobs (matrix / Bundle Size). Ready for merge from our side. On the two copy notes: left as-is since they're non-blocking; happy to restore the "repeats allowed" phrasing with a matching cut if you want that rule visible at the MCP surface. |
* origin/main: fix(alert): derive the request envelope from an alert wait window (#4581) fix(android): require a nonzero chunk before a recorder counts as ready (#4559) chore(deps): clear astro and node-forge security alerts (#4577) fix(ios): establish the screen origin of a full-screen private AX root (#4573) docs(agents): trace behavior claims during review (#4576) fix(mcp): trim the press plan text back under the always-loaded byte budget (#4572) refactor(alert): one helper owns the alert runner budget (#4563) feat(interaction): multi-ref press plan lowered through the ordinary press lane (#4296) fix(ios): use the caller's budget for alert get and type the watchdog outcome (#4540) feat(recovery): bound remote health and runner-busy recovery by the command's deadline (#4541) fix(ios): find the navigation bar back button outside the bar's subtree (#4542) feat(open): report device kind, model and osVersion on open and session identity (#4543) fix(apple): use typed screenshot timeouts and observed shutdown recovery (#4544) feat(device-status): report per device whether a new session can take it (#4547) fix(runner): type the refusals for a control the target cannot supply (#4548) refactor(transport): share outgoing transfer phase ownership (#4551) fix(remote): bound artifact preparation and upload phases (#4552)
Fixes the
command-tools-loading-metabyte-budget failure introduced onmainby #4296.What broke
feat(mcp)!: preload loop tools, trim schemas, and shorten errors(d78be6c) set anALWAYS_LOADED_BUDGET_BYTES = 22 KiBguard on the tool JSON that lands in every run's first prompt. The multi-ref plan merge (#4296) grew the press tool description (+407 B of plan-contract text) and theintervalMsfield copy (+73 B), which — combined with the same-daybackdescription growth from the maintainer's 19:41Z push — pushed the set from 22060 B (budget headroom 468 B) to 22862 B on CI: the test has been red onmainsince the #4296 merge push (20:28Z) through 21:11Z, the latest head.Measured attribution (local, per-sha, clean install)
back+336 ate most of it)The fix
The long plan contract already lives in
docs/commands.md(the ADR 0014 section) — the MCP description keeps the semantic minimum: comma-separated ref list, 2-16 keys in order as one command, admitted before the first press.intervalMsreturns to its pre-plan wording (the generic repeated-action delay text already covers ref sequences). No behavior change, no budget bump — the maintainer's trim-first approach (d78be6c) is the precedent this follows.Verification
src/mcp/__tests__/command-tools-loading-meta.test.ts: 5/5 passsrc/mcp/: 28 files / 232 tests passpackages/command-surface/src/interaction/: 4 files / 26 tests passpackages/command-runtime/src/commands/interaction/+packages/command-registry/src/: 85 files / 561 tests passOpen in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.