Skip to content

Validate capability object entries#218

Closed
leehack wants to merge 1 commit into
spec/input-required-capability-validationfrom
spec/experimental-capability-object-validation
Closed

Validate capability object entries#218
leehack wants to merge 1 commit into
spec/input-required-capability-validationfrom
spec/experimental-capability-object-validation

Conversation

@leehack
Copy link
Copy Markdown
Owner

@leehack leehack commented Jun 1, 2026

Summary

  • reject non-object experimental capability values for client and server capabilities
  • reject non-object extension capability values during wire parsing
  • update existing capability tests to use empty objects for feature markers and cover malformed stateless metadata

Spec evidence

  • MCP 2025-11-25 and MCP 2026-07-28 RC schemas define capabilities.experimental entries as JSON objects
  • MCP 2026-07-28 RC schemas define capabilities.extensions entries as JSON objects

Validation

  • dart format .
  • dart analyze
  • dart test test/types_test.dart test/types_edge_cases_test.dart test/client/client_test.dart test/integration/completions_capability_test.dart test/mcp_2026_07_28_test.dart test/mcp_2025_11_25_test.dart test/server/server_validation_test.dart test/server/server_test.dart
  • dart test
  • dart run mcp_dart_cli:mcp_dart conformance --suite all --json (from packages/mcp_dart_cli)

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

❌ Patch coverage is 93.47826% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.09%. Comparing base (184c37e) to head (caa5a9a).

Files with missing lines Patch % Lines
lib/src/types/initialization.dart 93.47% 3 Missing ⚠️
Additional details and impacted files
@@                              Coverage Diff                              @@
##           spec/input-required-capability-validation     #218      +/-   ##
=============================================================================
+ Coverage                                      88.08%   88.09%   +0.01%     
=============================================================================
  Files                                             47       47              
  Lines                                           9121     9155      +34     
=============================================================================
+ Hits                                            8034     8065      +31     
- Misses                                          1087     1090       +3     
Flag Coverage Δ
unittests 88.09% <93.47%> (+0.01%) ⬆️

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.

@leehack
Copy link
Copy Markdown
Owner Author

leehack commented Jun 1, 2026

Closing this draft micro PR because the RC spec work has been consolidated into a smaller reviewable stack. This change is preserved in #269 (MCP 2026 result semantics); the consolidated tip is tree-identical to the previous micro-stack tip.

@leehack leehack closed this Jun 1, 2026
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