Expand MCP tool catalog cache regression coverage (#33308)

## Why

Cached MCP tool catalogs must not substitute stale session state for the live
server connection.

## What changed

- Verify `mcpServerStatus/list` waits for replacement stdio server metadata
  before combining it with cached tools.
- Verify configurations with remotely sourced environment variables bypass the
  tool catalog cache.
- Assert that calls made from cached definitions return output from the live
  replacement process.
- Make the stdio test server available to Windows Bazel integration tests.

GitOrigin-RevId: 0e518cd46f0d89af28e3a4e256023b5872e6e2fb
This commit is contained in:
jif authored and copyberry committed 2026-07-15 10:18:51 +00:00
1 parent 3307ea8b63
commit 1bbdb32789
4 files changed
+172 -1

No files matched your search

@@ -267,6 +267,14 @@ async fn regular_mcp_definition_cache_preserves_live_session_state() -> anyhow::
output.contains(&expected_error),
"model-visible tool output should contain the live visibility error: {output}"
);
let output = cached_done_response
.single_request()
.function_call_output_text("cached-call")
.expect("successful tool output should be returned to the model");
assert!(
output.contains(&second_process),
"model-visible tool output should come from the live server: {output}"
);
second_thread.shutdown_and_wait().await?;
responses_server.verify().await;