Files
codebase-memory-mcp/tests
Andrew Hundt aff5df33f9 test(mcp): cover classic-mode tools list (CBM_TOOL_MODE=classic)
The merged cbm_mcp_tools_list (src/mcp/mcp.c:868) defaults to streamlined mode
when srv is NULL, so tests/test_mcp.c:mcp_tools_list only exercised the 3
consolidated tools. The classic-mode path (CBM_TOOL_MODE=classic, mcp.c:876)
that emits all 15 TOOLS[] split tools had no test — the MERGE-TODO flagged at
tests/test_mcp.c:172.

Add mcp_tools_list_classic_mode: setenv("CBM_TOOL_MODE","classic"), capture the
list, then unsetenv BEFORE any ASSERT so a failed assertion cannot leak the
classic setting into sibling tests (which expect the streamlined default). Assert
the classic split tools (index_repository, search_graph, query_graph) are present
and the streamlined-only consolidated search_code_graph + the _hidden_tools
progressive-disclosure hint are absent. Registered in suite_mcp.

Full suite: 5981 passed / 2 failed (the 2 are the deferred B1 incremental races,
unrelated to this test).

Signed-off-by: Andrew Hundt <ATHundt@gmail.com>
2026-06-24 18:01:42 -04:00
..
2026-06-03 02:13:30 +02:00