Summary
callees can fabricate one empty projected row for an exact zero-match query in compact JSON mode. The equivalent references and callers queries return the expected empty compact envelope.
Reproduction
cdidx callees DefinitelyNoSuchSymbol --exact-name --json --compact \
--fields path,line --limit 1 --max-json-bytes 8192 --db .cdidx/codeindex.db
The same behavior is observable without --fields.
Actual
The response uses the bounded envelope and reports one result, for example:
{"metadata":{"command":"callees","result_count":1,"total_count":1,"format":"compact"},"results":[{}]}
Expected
The response should preserve the compact location envelope and report no results:
{"format":"compact","count":0,"results":[]}
Notes
This was observed while reviewing #5094, but is pre-existing and independent of projected --body validation, so it is intentionally left out of that fix.
Summary
calleescan fabricate one empty projected row for an exact zero-match query in compact JSON mode. The equivalentreferencesandcallersqueries return the expected empty compact envelope.Reproduction
The same behavior is observable without
--fields.Actual
The response uses the bounded envelope and reports one result, for example:
{"metadata":{"command":"callees","result_count":1,"total_count":1,"format":"compact"},"results":[{}]}Expected
The response should preserve the compact location envelope and report no results:
{"format":"compact","count":0,"results":[]}Notes
This was observed while reviewing #5094, but is pre-existing and independent of projected
--bodyvalidation, so it is intentionally left out of that fix.