mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-03 08:03:38 +08:00
Port the current upstream Cypher fixes before adding any active query_graph overlay behavior. Preserve explicit LIMIT 0 as an empty result for RETURN and WITH clauses by using a distinct no-limit sentinel. Filter relationship expansion against already-bound terminal variables and drive one-hop optional matches from the bound terminal to avoid broad cross joins and wrong c IS NULL results. Add focused regression coverage for LIMIT 0 and bound-terminal OPTIONAL MATCH. Validation: CBM_ONLY_SUITE=cypher ./build/c/test-runner (144 passed); CBM_ONLY_SUITE=mcp ./build/c/test-runner (152 passed); make -j8 -f Makefile.cbm cbm; bash scripts/check-source-safety.sh. Signed-off-by: Andrew Hundt <ATHundt@gmail.com>