Skip to content

Commit 927ccdd

Browse files
committed
[Conformance] Cover the JSON Schema 2020-12 preservation scenario
## Motivation and Context The `json-schema-2020-12-preservation` client scenario (SEP-1613, SEP-2106; not scored for 2026-07-28, as it was added after the requirements anchor) failed only because the conformance client had no branch for it: an unknown scenario aborts after connecting, so the harness never observed a `tools/list` nor the schema echo it diffs. The client itself already preserves the vocabulary the scenario checks (`$schema`, `$defs` with `$anchor`, `$ref`, `allOf`/`anyOf`, `if`/`then`/`else`, `additionalProperties`): `Client::Tool#input_schema` is the parsed `tools/list` response untouched, with no dereferencing, validation-time rewriting, or keyword stripping, the same fixture-echo approach the TypeScript and Python conformance clients take. The new branch lists the tools and echoes the focal tool's observed `inputSchema` verbatim through `json_schema_echo`, and the expected-failures entry is removed. ## How Has This Been Tested? The scenario passes 9/9 at its default 2025-11-25 wire. On top of the modern-lifecycle client selection (the SEP-2322 driver branch) it also passes 9/9 at `--spec-version 2026-07-28`, where the SEP-2106 keyword checks are failure-gated instead of skipped. `bundle exec rake` is green, with the conformance task passing its baseline check on both legs, and RuboCop reports no offenses. ## Breaking Changes None. The change is confined to the conformance client and its baseline; the shipped gem is untouched.
1 parent f0c9665 commit 927ccdd

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

‎conformance/client.rb‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,14 @@ def build_provider_for(scenario, context)
182182
case scenario
183183
when "initialize"
184184
client.tools
185+
when "json-schema-2020-12-preservation"
186+
# SEP-1613/SEP-2106: echo the focal tool's observed inputSchema verbatim so the harness
187+
# can diff what the client preserved. Preservation holds because `Client::Tool#input_schema`
188+
# is the parsed response untouched.
189+
tools = client.tools
190+
focal = tools.find { |t| t.name == "json_schema_2020_12_tool" }
191+
abort("Tool json_schema_2020_12_tool not found") unless focal
192+
client.call_tool(name: "json_schema_echo", arguments: { "schema" => focal.input_schema })
185193
when "tools_call"
186194
tools = client.tools
187195
add_numbers = tools.find { |t| t.name == "add_numbers" }

‎conformance/expected_failures.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ client:
88
# are not implemented in `MCP::Client::HTTP` yet.
99
- http-custom-headers
1010
- http-invalid-tool-headers
11-
# Client-side JSON Schema preservation gaps: `$ref` values must reach the caller unresolved.
11+
# Client-side JSON Schema handling: `$ref` values must reach the caller unresolved,
12+
# and the conformance client does not run the scenario over the modern lifecycle yet.
1213
- json-schema-ref-no-deref
13-
- json-schema-2020-12-preservation
1414
# Unimplemented authorization extensions.
1515
- auth/dpop
1616
- auth/dpop-nonce

0 commit comments

Comments
 (0)