Repository navigation
chore(deps): upgrade rmcp to 3.5 - #3897
Merged
Merged
Conversation
rmcp 3.5 moves ProtocolVersion::LATEST to 2026-07-28, a revision with no initialize handshake. Initialize negotiation and the stateless request context stay on LATEST_WITH_INITIALIZE (2025-11-25): a supported handshake revision is echoed, a handshake-less or unknown one negotiates down. The wire tests now pin what the default rmcp client requests (LATEST), the downgrade, the echo of a supported revision on both the rmcp and raw paths, and that stateless results omit the 2026-07-28 result fields.
|
ScriptedAlchemy
enabled auto-merge
October 14, 2026 08:22
ScriptedAlchemy
marked this pull request as draft
October 14, 2026 10:03
auto-merge was automatically disabled
October 14, 2026 10:03
Pull request was converted to draft
# Conflicts: # crates/tracedecay-mcp/src/server/protocol.rs # crates/tracedecay-mcp/src/server/rmcp.rs # crates/tracedecay/Cargo.toml # crates/tracedecay/src/mcp/server/rmcp.rs
rmcp 3.5 sets ProtocolVersion::LATEST to 2026-07-28, which has no initialize handshake. Initialize negotiation, its default answer and the stateless request context use LATEST_WITH_INITIALIZE, so a default 3.5 client that asks for 2026-07-28 over initialize gets 2025-11-25. Before a lifecycle is chosen, the session now answers a request with missing context or an unsupported inline version and stays open, and answers a server/discover probe without choosing the inline lifecycle. A client that probes first can still fall back to initialize.
ScriptedAlchemy
marked this pull request as ready for review
October 14, 2026 19:12
ScriptedAlchemy
enabled auto-merge
October 14, 2026 19:15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
rmcpmoves from 3.4.0 to 3.5.1 in both consumers (crates/tracedecayandcrates/tracedecay-mcp, normal and dev requirements). No other manifest depends on rmcp.Since #3886, MCP sessions run on our own loop (
crates/tracedecay-mcp/src/server/session.rs), which copied rmcp 3.4's server request policy. rmcp now supplies only the wire model types and the client used in tests. This PR ports the 3.5 policy changes onto that loop.Protocol version constants
rmcp 3.5.0 (#1105) sets
ProtocolVersion::LATESTto2026-07-28. That revision replaced theinitializehandshake with per-request_meta. The newLATEST_WITH_INITIALIZEis2025-11-25. Four call sites meant "newest handshake revision" and now useLATEST_WITH_INITIALIZE:initialize_resultdefault for aninitializethat names no version.negotiate_protocol_version, both theknown_up_toceiling and the fallback. A supported handshake revision is echoed.2026-07-28or an unknown revision gets2025-11-25, the same answer rmcp 3.5'snegotiate_protocol_versiongives.attach_stateless_request_context. StampingLATESTwould addresultType,ttlMsandcacheScopeto every stateless result, and strict 2025-11-25 hosts reject those fields.Pre-initialize lifecycle
rmcp 3.5 changed what its server does before a lifecycle is chosen (
service/server.rs).Session::opennow follows it:initializerequest with missing or malformed_metagets an invalid-params error, and the session stays open. Before, the session closed._metanames an unsupported version getsUNSUPPORTED_PROTOCOL_VERSION, and the session stays open.server/discoverwith complete_metais answered, and the session stays inOpening. Before, the probe committed the session to the inline lifecycle, so a laterinitializeopened a session that refused every request without_meta. rmcp 3.5'sClientLifecycleMode::Autoprobesserver/discoverfirst and falls back toinitialize._metaselects the inline lifecycle, as before.The handler side needs no change. rmcp 3.5 fills
ttlMs/cacheScopefor 2026-07-28 results (#1308), andstamp_2026_07_28_resultalready does that here.Tests
New or changed in
crates/tracedecay-mcp/tests/server_rmcp.rs:rmcp_3_5_clients_open_a_session_on_either_lifecycle. A default rmcp 3.5 client (initializenaming2026-07-28) negotiates2025-11-25. AnAutoclient discovers2026-07-28. Both then list tools.a_discover_probe_leaves_the_session_open_for_initialize. Raw frames:server/discover, theninitializeat2025-06-18, thentools/listwithout_metagets the legacy{"tools": []}shape.refused_inline_openers_leave_the_session_open_for_initializereplacesan_inline_opener_without_full_request_context_is_refused_and_closed. A partial_metaopener and an unsupported-version opener are refused, theninitializesucceeds on the same connection.initialize_naming_a_per_request_revision_negotiates_the_newest_handshake_revisionnow expectsLATEST_WITH_INITIALIZE. Against 3.5 with the old code it passed for the wrong reason, becauseLATESTitself became2026-07-28.The branch's earlier tests remain.
rmcp_wire_matrix_matches_raw_dispatch_initialize_tools_and_resourcesandrmcp_initialize_echoes_a_supported_handshake_revisioncover the rmcp wire against raw dispatch. The stateless test asserts the 2026-07-28 fields are absent. mcp_suitetest_initialize_negotiates_legacy_and_unknown_client_versionscovers2025-11-25and2026-07-28.Fail-before evidence: the new test file was run against the merge commit
296648bf77, which has the 3.5 lock and none of the port.//crates/tracedecay-mcp:server_rmcpfailed 4 of 11. The 4 failures were the four tests above. The discover test failed withrequest _meta is missing ...on thetools/listafterinitialize.Lock command
relock.shwith default arguments mergedorigin/masterand rancargo +1.99.0 update -w,pnpm installandgen_builds.py. The lock was already consistent, so no regeneration commit was needed. The lock diff against master is the singlermcp 3.4.0 -> 3.5.1entry.Gates (head
3133aee038)bazel build --config=clippy //crates/tracedecay-mcp/...: Build completed successfullybazel build --config=clippy //crates/tracedecay/...: Build completed successfullybazel build //:rustfmt_check: Build completed successfully//crates/tracedecay-mcp:unit_test: 461 passed; 0 failed//crates/tracedecay-mcp:server_rmcp: 11 passed; 0 failed//crates/tracedecay-mcp:server_protocol: 5 passed; 0 failed//crates/tracedecay:unit_test --test_arg=mcp::server::rmcp::tests: 10 passed; 0 failed//crates/tracedecay:mcp_suite(full): 661 passed; 0 failedcargo +1.99.0 metadata --locked: okbazel run //scripts:bazel/gen_builds.py -- --check: all 60 generated BUILD.bazel files are current