From dd052550d499da4f1b06e2796161819cca8fab2d Mon Sep 17 00:00:00 2001 From: Ovtcharov Date: Sat, 12 Sep 2026 16:59:27 -0700 Subject: [PATCH] test(installer): expect the not-executed flag on a refused MCP tool call MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #3703 made a tool refusal declare that it never ran, so `_execute_tool`'s unknown-tool path returns `{**NOT_EXECUTED, "status": "error", ...}`. This harness compares the whole result dict, so the new `executed: False` broke it — and because the file lives under `tests/installer/` it runs in its own workflow rather than the unit suite, so it went red on main instead of on the PR that changed the shape. Pinning the flag here rather than loosening the comparison: that a refused call reports itself as not executed is the contract #3703 added, and this is the only harness that exercises it through a real agent. --- tests/installer/test_custom_agent_mcp_harness.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/installer/test_custom_agent_mcp_harness.py b/tests/installer/test_custom_agent_mcp_harness.py index d6389ba634..f714524d8b 100644 --- a/tests/installer/test_custom_agent_mcp_harness.py +++ b/tests/installer/test_custom_agent_mcp_harness.py @@ -211,6 +211,9 @@ def test_custom_agent_with_mcp_reports_diagnosable_connection_failure( } ] assert agent.process_query("add 7 and 35") == { + # Refused before the tool body ran, so the result says so — that flag is + # what stops the verification footer claiming the call went through. + "executed": False, "status": "error", "error": "Unknown tool name. Use only the tools you were given.", }