Upgrade rmcp to 3.5.1 and harden lifecycle tests (#52972)

## What changed

- Update the pinned `rmcp` dependency and Cargo/Bazel lockfiles, and migrate MCP handlers and fixtures to `ClientConfig` and `ServerConfig`.
- Stop requiring responses for cancelled elicitation requests in cancellation tests while retaining checks for cleanup and continued connection usability.
- Handle client disconnects during WebSocket writes in the TUI test server, use an asynchronous HTTP mock for loopback proxy testing, and improve remote executor test diagnostics and the Windows subprocess fixture.
- Use `invalid_prompt` for the memory worker failure fixture.

## Testing

Add a regression test covering transport EOF during both form elicitation and user verification. Keep the client alive while checking that pending response channels close, the timeout pause clears, and the service exits with `QuitReason::Closed`.

GitOrigin-RevId: c0166b83fab3b59d84a5207c6630cb6adcf3b230
This commit is contained in:
alishobeiri-oai
2026-10-10 19:43:24 +00:00
committed by copyberry
parent 34f33e4ada
commit de8fab6d7a
26 changed files with 212 additions and 162 deletions
@@ -3,7 +3,7 @@ use std::sync::Arc;
use rmcp::ClientHandler;
use rmcp::RoleClient;
use rmcp::model::CancelledNotificationParam;
use rmcp::model::ClientInfo;
use rmcp::model::ClientConfig;
use rmcp::model::ElicitRequestParams;
use rmcp::model::ElicitResult;
#[allow(deprecated)]
@@ -24,12 +24,12 @@ use crate::rmcp_client::SendElicitation;
#[derive(Clone)]
pub(crate) struct LoggingClientHandler {
client_info: ClientInfo,
client_info: ClientConfig,
send_elicitation: Arc<SendElicitation>,
}
impl LoggingClientHandler {
pub(crate) fn new(client_info: ClientInfo, send_elicitation: SendElicitation) -> Self {
pub(crate) fn new(client_info: ClientConfig, send_elicitation: SendElicitation) -> Self {
Self {
client_info,
send_elicitation: Arc::new(send_elicitation),
@@ -91,7 +91,7 @@ impl ClientHandler for LoggingClientHandler {
info!("MCP server prompt list changed");
}
fn get_info(&self) -> ClientInfo {
fn get_info(&self) -> ClientConfig {
self.client_info.clone()
}