From 3d0276182aec2646daa7445e2da3dbd5edca3247 Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Sun, 5 Jul 2026 06:42:11 -0700 Subject: [PATCH] test: update MCP parallel-batch fixture names to mcp__server__tool convention TestMcpParallelToolBatch seeded provenance under old-style mcp__ names, which no longer pass the is_mcp_tool_parallel_safe() prefix gate after the naming change. --- tests/run_agent/test_run_agent.py | 34 +++++++++++++++---------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/tests/run_agent/test_run_agent.py b/tests/run_agent/test_run_agent.py index 18dced788b4..7ffdf9e327e 100644 --- a/tests/run_agent/test_run_agent.py +++ b/tests/run_agent/test_run_agent.py @@ -3586,8 +3586,8 @@ class TestMcpParallelToolBatch: def test_mcp_tools_default_sequential(self): """MCP tools without supports_parallel_tool_calls are sequential.""" from run_agent import _should_parallelize_tool_batch - tc1 = _mock_tool_call(name="mcp_github_list_repos", arguments='{"org":"openai"}', call_id="c1") - tc2 = _mock_tool_call(name="mcp_github_search_code", arguments='{"q":"test"}', call_id="c2") + tc1 = _mock_tool_call(name="mcp__github__list_repos", arguments='{"org":"openai"}', call_id="c1") + tc2 = _mock_tool_call(name="mcp__github__search_code", arguments='{"q":"test"}', call_id="c2") assert not _should_parallelize_tool_batch([tc1, tc2]) def test_mcp_tools_parallel_when_server_opted_in(self): @@ -3596,17 +3596,17 @@ class TestMcpParallelToolBatch: from tools.mcp_tool import _mcp_tool_server_names, _parallel_safe_servers, _lock with _lock: _parallel_safe_servers.add("github") - _mcp_tool_server_names["mcp_github_list_repos"] = "github" - _mcp_tool_server_names["mcp_github_search_code"] = "github" + _mcp_tool_server_names["mcp__github__list_repos"] = "github" + _mcp_tool_server_names["mcp__github__search_code"] = "github" try: - tc1 = _mock_tool_call(name="mcp_github_list_repos", arguments='{"org":"openai"}', call_id="c1") - tc2 = _mock_tool_call(name="mcp_github_search_code", arguments='{"q":"test"}', call_id="c2") + tc1 = _mock_tool_call(name="mcp__github__list_repos", arguments='{"org":"openai"}', call_id="c1") + tc2 = _mock_tool_call(name="mcp__github__search_code", arguments='{"q":"test"}', call_id="c2") assert _should_parallelize_tool_batch([tc1, tc2]) finally: with _lock: _parallel_safe_servers.discard("github") - _mcp_tool_server_names.pop("mcp_github_list_repos", None) - _mcp_tool_server_names.pop("mcp_github_search_code", None) + _mcp_tool_server_names.pop("mcp__github__list_repos", None) + _mcp_tool_server_names.pop("mcp__github__search_code", None) def test_mixed_mcp_and_builtin_parallel(self): """MCP parallel tools mixed with built-in parallel-safe tools.""" @@ -3614,15 +3614,15 @@ class TestMcpParallelToolBatch: from tools.mcp_tool import _mcp_tool_server_names, _parallel_safe_servers, _lock with _lock: _parallel_safe_servers.add("docs") - _mcp_tool_server_names["mcp_docs_search"] = "docs" + _mcp_tool_server_names["mcp__docs__search"] = "docs" try: - tc1 = _mock_tool_call(name="mcp_docs_search", arguments='{"query":"api"}', call_id="c1") + tc1 = _mock_tool_call(name="mcp__docs__search", arguments='{"query":"api"}', call_id="c1") tc2 = _mock_tool_call(name="web_search", arguments='{"query":"test"}', call_id="c2") assert _should_parallelize_tool_batch([tc1, tc2]) finally: with _lock: _parallel_safe_servers.discard("docs") - _mcp_tool_server_names.pop("mcp_docs_search", None) + _mcp_tool_server_names.pop("mcp__docs__search", None) def test_mixed_parallel_and_serial_mcp_servers(self): """One parallel MCP server + one non-parallel MCP server = sequential.""" @@ -3631,17 +3631,17 @@ class TestMcpParallelToolBatch: with _lock: _parallel_safe_servers.add("docs") # "github" is NOT in _parallel_safe_servers - _mcp_tool_server_names["mcp_docs_search"] = "docs" - _mcp_tool_server_names["mcp_github_list_repos"] = "github" + _mcp_tool_server_names["mcp__docs__search"] = "docs" + _mcp_tool_server_names["mcp__github__list_repos"] = "github" try: - tc1 = _mock_tool_call(name="mcp_docs_search", arguments='{"query":"api"}', call_id="c1") - tc2 = _mock_tool_call(name="mcp_github_list_repos", arguments='{"org":"openai"}', call_id="c2") + tc1 = _mock_tool_call(name="mcp__docs__search", arguments='{"query":"api"}', call_id="c1") + tc2 = _mock_tool_call(name="mcp__github__list_repos", arguments='{"org":"openai"}', call_id="c2") assert not _should_parallelize_tool_batch([tc1, tc2]) finally: with _lock: _parallel_safe_servers.discard("docs") - _mcp_tool_server_names.pop("mcp_docs_search", None) - _mcp_tool_server_names.pop("mcp_github_list_repos", None) + _mcp_tool_server_names.pop("mcp__docs__search", None) + _mcp_tool_server_names.pop("mcp__github__list_repos", None) class TestHandleMaxIterations: