Skip to content

test: the #9302 REST/MCP parity guard is anchored on two objects the MCP tools no longer register #9571

Description

@JSONbored

Found while triaging #9553's unused-symbol list.

test/unit/openapi.test.ts's #9302 REST↔MCP parity guard asserts two of its cases against gatePrecisionOutputSchema and maintainerMeasurementReportOutputSchema from src/mcp/server.ts.

Those objects are no longer what the MCP tools register. #9518 moved these tools' outputs to @loopover/contract, and the tools now register GetGatePrecisionOutput.shape / GetOutcomeCalibrationOutput.shape from packages/loopover-contract/src/tools/maintainer.ts.

The shapes are currently identical, so nothing has drifted yet. The defect is that the guard watches objects no runtime reads: a future contract change would sail straight past it, which is the one thing this test exists to prevent.

The test file's own header comment already claims these guards "now read the contract (the single source both the MCP server and these assertions derive from) instead of server-local declarations that no longer exist" — two cases were simply left behind when that migration happened.

Fix: re-anchor both onto the contract schemas, matching the sibling cases in the same array (GetAmsMinerCohortOutput.shape, GetActivationPreviewOutput.shape, ...).

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.orbGittensory Orb related - maintainer self-hosting analytics.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions