Skip to content

Validate JSON-RPC error response ids#242

Closed
leehack wants to merge 1 commit into
spec/json-rpc-params-object-validationfrom
spec/json-rpc-error-id-validation
Closed

Validate JSON-RPC error response ids#242
leehack wants to merge 1 commit into
spec/json-rpc-params-object-validationfrom
spec/json-rpc-error-id-validation

Conversation

@leehack
Copy link
Copy Markdown
Owner

@leehack leehack commented Jun 1, 2026

Summary

  • Reject JSON-RPC error responses when id is explicitly null
  • Keep omitted error-response IDs valid for malformed-request cases where the request ID could not be read
  • Add edge-case, stdio raw-input, and CLI conformance coverage

Validation

  • dart format .
  • dart analyze
  • git diff --check
  • dart test test/types_edge_cases_test.dart test/server/stdio_test.dart
  • (cd packages/mcp_dart_cli && dart test test/src/conformance_command_test.dart && dart run mcp_dart_cli:mcp_dart conformance --suite all --json)
  • dart test

Draft stacked PR for RC spec work. Do not merge/release to main until the spec is finalized.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.43%. Comparing base (d166cc1) to head (9e9e0fc).

Additional details and impacted files
@@                           Coverage Diff                           @@
##           spec/json-rpc-params-object-validation     #242   +/-   ##
=======================================================================
  Coverage                                   88.43%   88.43%           
=======================================================================
  Files                                          47       47           
  Lines                                        9322     9322           
=======================================================================
  Hits                                         8244     8244           
  Misses                                       1078     1078           
Flag Coverage Δ
unittests 88.43% <100.00%> (ø)

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 #270 (JSON-RPC metadata hardening); 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