Skip to content

Consolidate type schema validation and conformance gates#271

Merged
leehack merged 42 commits into
dev/2026-07-28-rcfrom
spec/2026-type-schema-validation
Jun 3, 2026
Merged

Consolidate type schema validation and conformance gates#271
leehack merged 42 commits into
dev/2026-07-28-rcfrom
spec/2026-type-schema-validation

Conversation

@leehack
Copy link
Copy Markdown
Owner

@leehack leehack commented Jun 1, 2026

Summary

  • consolidate remaining MCP 2026 RC type/schema validation hardening for discovery results, elicitation primitives, icons, implementation fields, integer fields, URI/base64 fields, annotations, roles, enum values, request wrappers, and content/result unions
  • add dedicated official conformance fixtures and runners for stable MCP 2025-11-25 and MCP 2026 RC client/server coverage
  • wire official 2025 and 2026 conformance gates into core CI, with expected-failure files for intentional RC conformance churn
  • preserve object-level JSON Schema 2020-12 keywords on JsonObject parse/serialize round-trips so official json-schema-2020-12 coverage stays wire-compatible
  • replaces the final validation portion of the prior micro-PR stack (Require nested metadata for stateless HTTP #247-Validate enum wire fields #266)

Reviewer Map

  • Type and schema validation: lib/src/types/*, lib/src/shared/json_schema/*, lib/src/types/elicitation.dart, lib/src/types/json_rpc.dart
  • Runtime behavior touched by validation: lib/src/client/*, lib/src/server/*, lib/src/shared/protocol.dart
  • Official conformance fixtures/runners: test/conformance/*
  • CI/docs/changelog: .github/workflows/test_core.yml, test/conformance/README.md, CHANGELOG.md
  • Regression coverage: test/mcp_2025_11_25_test.dart, test/mcp_2026_07_28_test.dart, streamable HTTP/client/server tests, JSON Schema tests

Validation

  • dart format --output=none --set-exit-if-changed .
  • git diff --check
  • dart analyze
  • dart test
  • dart run test/conformance/run_2025_server_conformance.dart --timeout-seconds 90 --output-dir .dart_tool/conformance/ci_2025_server (49 passed, 0 failed)
  • npx -y @modelcontextprotocol/conformance@0.2.0-alpha.1 client --command "dart run test/conformance/mcp_2026_rc_client.dart" --suite all --spec-version 2025-11-25 --verbose -o .dart_tool/conformance/ci_2025_client (242 passed, 0 failed)
  • dart run test/conformance/run_2026_rc_server_conformance.dart --timeout-seconds 90 --output-dir .dart_tool/conformance/ci_2026_server (19 passed, 0 failed/timeout)
  • dart run test/conformance/run_2026_rc_client_conformance.dart --timeout-seconds 90 --output-dir .dart_tool/conformance/ci_2026_client (35 passed, 0 failed/timeout)

Stacked on #270. This is a draft RC PR and should stay off main until the official spec release.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

❌ Patch coverage is 88.53503% with 234 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.75%. Comparing base (c994327) to head (0c5ca39).
⚠️ Report is 47 commits behind head on dev/2026-07-28-rc.

Files with missing lines Patch % Lines
lib/src/client/streamable_https.dart 51.55% 78 Missing ⚠️
lib/src/client/client.dart 78.37% 48 Missing ⚠️
lib/src/shared/protocol.dart 81.81% 24 Missing ⚠️
lib/src/types/json_value.dart 36.36% 21 Missing ⚠️
lib/src/server/server.dart 88.77% 11 Missing ⚠️
lib/src/types/sampling.dart 91.45% 10 Missing ⚠️
lib/src/server/mcp_server.dart 81.39% 8 Missing ⚠️
lib/src/shared/json_schema/json_schema.dart 92.13% 7 Missing ⚠️
lib/src/types/tools.dart 89.85% 7 Missing ⚠️
lib/src/server/streamable_mcp_server.dart 76.19% 5 Missing ⚠️
... and 7 more
Additional details and impacted files
@@                  Coverage Diff                  @@
##           dev/2026-07-28-rc     #271      +/-   ##
=====================================================
+ Coverage              84.47%   84.75%   +0.27%     
=====================================================
  Files                     69       70       +1     
  Lines                  12098    15364    +3266     
=====================================================
+ Hits                   10220    13022    +2802     
- Misses                  1878     2342     +464     
Flag Coverage Δ
cli 76.73% <100.00%> (+5.68%) ⬆️
unittests 88.24% <88.52%> (-0.21%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant