refactor(mcp): project prepare family output schema from its owning module - #3038
Conversation
Size Report
Startup median (7 runs, lower is better):
|
|
Reviewed at 02064bb. This looks good: the prepare output schema and its tests move to the owning module unchanged. The new The Coverage failure is the same eager-closure budget check as on the rest of this stack, through Not blocking: |
…odule Moves the single hand-authored MCP outputSchema entry for prepare out of command-output-schemas.ts into a frozen PREPARE_COMMAND_OUTPUT_SCHEMAS map exported from src/commands/management/prepare.ts, following the #2810 projection seam already used by the replay, system, interaction, device-management, push-management, viewport, recording, and capture-wait families on this stack. Registers the family in the PROJECTED_FAMILIES disjointness check and adds command-tools-management-prepare-schemas.test.ts with a reference-equality proof against the module object and an owner-file check, matching the pattern from the other projected families. prepare's descriptor declares no post-action observation trait (#1652), so no settle-graft copy applies here. The moved code is byte-identical to what command-output-schemas.ts held: same objectSchema/numberSchema/stringSchema/enumSchema/constSchema calls and field order. Verified the published outputSchema for prepare is byte-identical to origin/main by dumping COMMAND_OUTPUT_SCHEMAS.prepare as JSON on both refs. Part of #2819.
02064bb to
0aeb0ad
Compare
|
Rebased onto the updated capture-wait branch; the head is now 0aeb0ad.
|
|
The changes in 0aeb0ad look good. The earlier review at 02064bb was also clean, and this update only swaps two bindings in prepare.ts. The imported modules were already in that file's closure at 02064bb, so I read this as not adding a new import edge. I did not run the eager-closure budget test or the MCP schema tests, so that reading comes from the imports only. Seven CI jobs are still running: Smoke (three), Repo Guards, Typecheck & Package, Coverage and Integration. The change touches no device or runner path, so I expect those jobs to pass. Please wait for them to finish green before merging. |
Summary
Moves the single hand-authored MCP
outputSchemaentry forprepareout ofsrc/mcp/command-output-schemas.tsinto a frozenPREPARE_COMMAND_OUTPUT_SCHEMASmap exported from its owning module,src/commands/management/prepare.ts. This follows the #2810 projection seam already used on this stack by the replay, system, interaction, device-management, push-management, viewport, recording, and capture-wait families:command-output-schemas.tsnow imports and spreads the family map instead of hand-authoring the entry, andPROJECTED_FAMILIESincommand-tools-replay-schemas.test.tsgains themanagement-prepareentry so the disjointness check covers it.prepare's descriptor declares no post-action observation trait (#1652), so no settle-graft copy applies.Part of #2819. 4 files touched. Stacked on
refactor/mcp-output-schemas-2819-capture-wait-schema.Validation
Tested at
02064bb5ee.pnpm check:affected --run: all 164 affected test files / 1369 tests passed, including the newcommand-tools-management-prepare-schemas.test.ts(reference-equality + owner-file checks) and the updated disjointness test.No device-facing behavior changed (pure MCP-schema-projection move;
prepareis not even MCP-exposed). Proved it with a before/after JSON byte-diff ofCOMMAND_OUTPUT_SCHEMAS.prepareinstead of a live device run:This dump is byte-identical on the head commit and on
origin/main(the entry on this stack was still byte-identical toorigin/mainbefore this move). No unresolved risk.