From 09eb31237f786e1a6fb02a15e497f57c44f797b9 Mon Sep 17 00:00:00 2001 From: ciregenz Date: Fri, 28 Aug 2026 01:25:54 -0700 Subject: [PATCH] [eric] tests: the invoke tool list is exact, and it now names the read tool (ENG-389) Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01U6zrBsUCNzpMBnov3rTVYV --- backend/tests/test_register_builtin_mcp_servers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/tests/test_register_builtin_mcp_servers.py b/backend/tests/test_register_builtin_mcp_servers.py index 321211e1..17d5318a 100644 --- a/backend/tests/test_register_builtin_mcp_servers.py +++ b/backend/tests/test_register_builtin_mcp_servers.py @@ -25,7 +25,10 @@ def test_registers_always_on_and_delegation_servers(): mods = mcp_servers["openswarm-core"]["env"]["OSW_MCP_MODULES"].split(",") assert "browser" in mods and "invoke" in mods assert browser_tools == ["CreateBrowserAgent", "BrowserAgent", "BrowserAgents", "AppAgent"] - assert invoke_tools == ["InvokeAgent"] + # Exact equality on purpose: this is where a silently widened tool surface gets caught. + # ReadAgentWork joined so a parent can read a child's work off our record instead of + # asking the child model to say it again (ENG-389); it inherits InvokeAgent's policy. + assert invoke_tools == ["InvokeAgent", "ReadAgentWork"] # Every registered server's script path must resolve to a file that ACTUALLY EXISTS. This is the assertion that catches a moved-caller resolving the wrong agents dir. script = mcp_servers["openswarm-core"]["args"][0] assert os.path.isfile(script), f"combined server script does not exist on disk: {script}"