Skip to content

feat: update LATEST - #1105

Open
alexhancock wants to merge 1 commit into
mainfrom
alexhancock/update-latest-version
Open

feat: update LATEST#1105
alexhancock wants to merge 1 commit into
mainfrom
alexhancock/update-latest-version

Conversation

@alexhancock

Copy link
Copy Markdown
Contributor

Simple update of the LATEST alias to V_2026_07_28

Comment thread crates/rmcp/src/model.rs
pub const V_2025_03_26: Self = Self(Cow::Borrowed("2025-03-26"));
pub const V_2024_11_05: Self = Self(Cow::Borrowed("2024-11-05"));
pub const LATEST: Self = Self::V_2025_11_25;
pub const LATEST: Self = Self::V_2026_07_28;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hardcoded version causes the following tests to fail:

#[tokio::test]
async fn server_echoes_client_protocol_version_when_latest() {
let negotiated = negotiate_version(TestServer::new(), "2025-11-25").await;
assert_eq!(negotiated, ProtocolVersion::LATEST);
}

#[tokio::test]
async fn server_pinned_version_does_not_override_known_client_request() {
let negotiated = negotiate_version(PinnedServer, "2025-11-25").await;
assert_eq!(negotiated, ProtocolVersion::LATEST);
}

@github-actions github-actions Bot added the T-test Testing related changes label Aug 10, 2026
@alexhancock
alexhancock force-pushed the alexhancock/update-latest-version branch from d0b9afc to f57db37 Compare August 26, 2026 19:57
@github-actions github-actions Bot added the T-service Service layer changes label Aug 26, 2026

@DaleSeo DaleSeo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexhancock Once the default becomes 2026-07-28, even the initialize handshake will be handled statelessly, so no session will be created. That follows the SEP-2567 direction, but it also means that deployments relying on Mcp-Session-Id could be affected by the upgrade alone, with nothing in the API to signal the change. I'm a bit concerned about the impact, even though this is technically a non-breaking change.

Comment on lines +112 to +115
let client = ClientInfo::default()
.with_protocol_version(ProtocolVersion::V_2025_11_25)
.serve(transport)
.await?;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once we pin this, these tests will only cover 2025-11-25 behavior, and nothing will verify what happens with the new default. What do you feel about adding a companion test that explicitly checks that no session is created at LATEST?

Comment on lines 463 to 464
/// Echoes the client-requested version if the server supports it; otherwise
/// returns `server_fallback`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function no longer returns server_fallback as-is when it isn't in server_supported.

tracing::warn!(
client_requested = %client_requested,
server_fallback = %fallback,
"client requested unsupported protocol version; falling back to server default"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the handler's declared fallback isn't in supported_protocol_versions, this field carries the computed replacement.

Suggested change
"client requested unsupported protocol version; falling back to server default"
"client requested unsupported protocol version; falling back to a supported version"

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

Labels

T-core Core library changes T-service Service layer changes T-test Testing related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants