Stabilize plugin MCP tools test#19191
Merged
etraut-openai merged 2 commits intomainfrom Apr 23, 2026
Merged
Conversation
xl-openai
approved these changes
Apr 23, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
The plugin MCP tool-listing test could hide MCP startup failures by polling
ListMcpToolsuntil its own 30s deadline. If the plugin MCP server startup had already failed or timed out, the session-owned MCP manager would keep returning an empty tool list, so CI only reporteddiscovered tools: []instead of the startup state that mattered.This makes the test synchronize on
McpStartupCompletefor the sample plugin MCP server before asserting listed tools, and gives the Bazel-launched test server a larger startup window.Notes
Confidence is about 80%. The source path strongly supports the RCA: a failed MCP startup is represented as an empty tool list through
ListMcpTools, so the old polling contract could not distinguish "not ready yet" from "startup already failed." I could not retrieve the CI execution-log artifact to confirm the exact hidden startup error, but the observed Ubuntu Bazel failure matches this path: repeatedListMcpToolsresponses with no tools until the test-local timeout fired.I think this is the right solution because it keeps plugin behavior unchanged and fixes only the test contract. Future startup failures should now report the
McpStartupCompletefailure/cancellation instead of timing out on an empty tool snapshot.This test was introduced in #12864.