mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-01 07:44:01 +08:00
A RETURN could name a variable the WITH before it dropped. The query ran, exited clean, printed a column for that name, and filled it with empty strings. Nothing said anything was wrong. That silence is the harm. A reader sees a column of nothing and reads it as "the graph holds no such data". The true answer is "your query named something that is out of scope". For a code graph, a false "nothing calls X" is the worst answer it can give. The check runs on the parsed query rather than on the run-time bindings, and that split is the whole point. It asks whether the query DECLARED the name, which is a different question from whether a row happened to bind it. So the existing convention is untouched: an OPTIONAL MATCH target that matched nothing is still declared, still legal, and still projects "". Two placeholders are skipped, because neither names anything the query declared: count(*) stores "*", and a CASE expression stores "CASE". A query with more names than the guard can model skips the check rather than guessing. A wrong refusal costs the caller a working query, which is worse than the silence this removes. Same failure shape as #373, and the same answer: say so out loud. Fixes #1919 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Joshua Richter <jrichter5781@gmail.com>