Repository navigation
test(mcp): check whole replies against canonical output contracts at the remaining held listed definitions - #11182
Merged
Merged
Conversation
…the remaining held listed definitions Retiring the full output profile (#10693) left listed tool definitions without output schemas, so tests that handed one to the SDK as toolDefinition stopped validating complete replies. Attach the canonical output schema with withCanonicalOutputSchema at the 41 remaining sites in 28 files that hold a definition taken directly from tools/list.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
[Low impact] The reviewed changes appear safe to merge; no blocking code issue remains. SummaryAcceptance and boundary tests now attach canonical output schemas to held MCP definitions before calling the SDK.
Reviews (3) · Last reviewed commit: "Merge branch 'main' into test/canonical-..." · Reviewed by Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #10693 (W3). Retiring the
fulloutput profile left listed tool definitions without output schemas. Tests that held a listed definition and passed it to the SDK astoolDefinitiontherefore stopped checking complete replies. This PR attaches the canonical output schema at the 41 remaining sites (28 files) withwithCanonicalOutputSchema, asdocs/development/testing.mdrequires.Refs #10389.
Problem and expected behavior
After #10693,
tools/listomits output schemas by default (off), andcompactbounds them. A test that doeslistTools()→find(name)→callTool(..., { toolDefinition })now hands the SDK a definition with nooutputSchema, so the SDK skips reply validation.parseEvidencestill checks the Evidence envelope but accepts anynormalized_result. Greptile flagged this on #10693 fornativeObservationViewsMcp.test.tsandnativeViewPredicateMcp.test.ts, and the same pattern appears across the boundary and acceptance tests.Expected: every held REA tool definition passed to the SDK carries the canonical output contract.
Change and scope
toolDefinitionsites in 28 test files now wrap the listed definition withwithCanonicalOutputSchema(tests/fixtures/canonicalOutputSchema.ts).Not changed (intentionally):
advertisedMcpToolSchemas. That fixture already attaches the canonical schema.environmentServeWritesMcp.test.ts. Its environment-served tools have no REA contract.deferredRuntime,mcpDoctorandstdioFrameDiagnostics. They exercise the listing each output profile produces.toolErrorSchemaDelivery.test.ts. It checks error delivery.packageCatalogVerification.test.ts. Its forwarded-argument expectation compares what the verifier received.Contract and boundary impact
tests/fixtures/canonicalOutputSchema.tsowns the canonical reply contract for tests. Tests only.docs/public/product-catalog.json), package, or installation impact: none.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
javascriptRecoveryMcp.test.tsskipped locally (3 tests; it needs an optional local tool). Real providers were not run.Validation performed
npm run check:fast: passed.npm run test:focusedover the 28 changed files in two batches: 15 passed and 1 skipped (124 tests passed, 3 skipped), then 12 passed (72 tests).Review fix (d8286b3):
nativeInstructionReferencesView.test.tswraps the held definition once, so continuation pages also check the canonical output contract.npm run test:focused -- tests/boundary/mcp/nativeInstructionReferencesView.test.ts: 2 tests passed.Compatibility, safety, and release
Author readiness
Human owner:
Before merge
type(scope): outcome.