Commit d683488
committed
feat(protocol-2026): re-pin DRAFT-2026-v1 schema to 6e4cba2d, fix wire defects
Re-vendors schema.ts (1bf94a60 -> 6e4cba2d) and the upstream fixture pin
(1304c8fe -> 60dc69e9) to close the drift between the 2026-06-10 pin and
the live draft. Applies every wire-breaking and binding change carried
by the diff:
- MCP error codes renumbered into the schema's now-partitioned ranges
(-32000..-32019 implementation-defined, -32020..-32099 spec-reserved):
HeaderMismatch/MissingRequiredClientCapability/UnsupportedProtocolVersion
move to -32020/-32021/-32022; framework-internal McpError codes that
squatted those numbers renumbered into -32000..-32019. New
mcp_error_code_partition test pins both invariants; six turul-mcp-server
test files with hardcoded old codes migrated.
- CancelledNotificationParams.requestId reverted to required (was Option),
client->server only.
- ElicitationCompleteNotification/Params and ElicitRequestURLParams
.elicitationId removed entirely.
- New NotificationMetaObject / SubscriptionsListenResult(+Meta) types for
subscription-stream metadata; subscriptionId stamping was already
implemented server-side ahead of the spec formalizing it.
- ListRootsRequest.params reverted to a bespoke inline shape.
Also fixes two defects found during re-audit, not schema-diff-driven:
- ContentBlock::ResourceLink emitted duplicate annotations/_meta keys on
the wire (variant fields alongside the flattened ResourceReference,
both carrying the same fields) - removed the variant-level fields.
- PrimitiveSchemaDefinition's untagged enum didn't enforce the schema's
`type` discriminator (bare {"type":"integer"} silently parsed as
StringSchema) - added a hand-written Deserialize that dispatches on
type/enum/oneOf before trying variants.
- SubscriptionsListenResultMeta's caller-writable `extra` map could shadow
the typed subscriptionId field with a colliding key - hand-written
Serialize now drops any colliding extra entry.
All new/changed contracts covered by regression tests confirmed failing
before the fix and passing after. The ResourceLink and
SubscriptionsListenResultMeta duplicate-key tests assert against raw
serialized text rather than serde_json::Value, since Value cannot
represent duplicate keys and would silently pass either way.
376 tests pass under --features compliance (185 lib + 187 integration +
3 fixture + 1 doctest), 366 default. clippy -D warnings clean.
ADR-027 revision log records the full diff and fix rationale.
COMPLIANCE.md documents the two disclosed-not-fixed gaps: no
shutdown-signal path exists yet to emit SubscriptionsListenResult, and
RequestMetaObject.extra carries the same reserved-key-collision risk
just fixed on SubscriptionsListenResultMeta.1 parent d2c5fa3 commit d683488
34 files changed
Lines changed: 847 additions & 415 deletions
File tree
- crates
- turul-http-mcp-server/src
- turul-mcp-builders/src
- turul-mcp-protocol-2026-07-28
- schema
- src
- compliance
- tests
- turul-mcp-server
- src
- tests
- docs
- adr
- plans
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
519 | 519 | | |
520 | 520 | | |
521 | 521 | | |
522 | | - | |
| 522 | + | |
523 | 523 | | |
524 | 524 | | |
525 | 525 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1394 | 1394 | | |
1395 | 1395 | | |
1396 | 1396 | | |
1397 | | - | |
| 1397 | + | |
1398 | 1398 | | |
1399 | 1399 | | |
1400 | 1400 | | |
| |||
1408 | 1408 | | |
1409 | 1409 | | |
1410 | 1410 | | |
1411 | | - | |
| 1411 | + | |
1412 | 1412 | | |
1413 | 1413 | | |
1414 | 1414 | | |
| |||
1656 | 1656 | | |
1657 | 1657 | | |
1658 | 1658 | | |
1659 | | - | |
| 1659 | + | |
1660 | 1660 | | |
1661 | 1661 | | |
1662 | 1662 | | |
| |||
1912 | 1912 | | |
1913 | 1913 | | |
1914 | 1914 | | |
1915 | | - | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
1916 | 1920 | | |
1917 | 1921 | | |
1918 | 1922 | | |
| |||
2216 | 2220 | | |
2217 | 2221 | | |
2218 | 2222 | | |
2219 | | - | |
| 2223 | + | |
2220 | 2224 | | |
2221 | 2225 | | |
2222 | 2226 | | |
| |||
2231 | 2235 | | |
2232 | 2236 | | |
2233 | 2237 | | |
2234 | | - | |
| 2238 | + | |
2235 | 2239 | | |
2236 | 2240 | | |
2237 | | - | |
| 2241 | + | |
| 2242 | + | |
| 2243 | + | |
| 2244 | + | |
2238 | 2245 | | |
2239 | 2246 | | |
2240 | 2247 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
501 | | - | |
502 | | - | |
503 | | - | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
504 | 504 | | |
505 | | - | |
506 | | - | |
507 | 505 | | |
508 | 506 | | |
509 | 507 | | |
| |||
0 commit comments