Files
codebase-memory-mcp/tests
Andrew Hundt 4fb9c8c6e6 fix(mcp): normalize positive result limits
search_code and trace_path accepted nonpositive per-call limits even though their config ranges are positive. search_code(limit=0) could emit no structured results, and trace_path(max_results=0) bound LIMIT 0 into traversal.

Add a shared MCP helper for positive integer args and use it for search_graph, search_code, and trace_path so invalid config or request values consistently fall back to the documented defaults.

Add focused MCP regressions for search_code(limit=0) and trace_path(max_results=0).

Validation: make -f Makefile.cbm build/c/test-runner; CBM_ONLY_SUITE=mcp ./build/c/test-runner; CBM_ONLY_SUITE=tool_consolidation ./build/c/test-runner; bash scripts/check-source-safety.sh; git diff --check.
Signed-off-by: Andrew Hundt <ATHundt@gmail.com>
2026-06-30 07:40:19 -04:00
..
2026-06-03 02:13:30 +02:00