Summary
Projection and JSON-shape selection change the meaning and placement of query results. Projected symbols/files calls can return results:[] while placing the first row under metadata.response_context, and symbols --json=array drops exact_index_available that is present in streaming JSON.
Audit IDs: Q-01 and Q-30. Reproduced with v1.40.3 at 404db09489c305f17d94f37026e00564d3ac527a. Closed #1527 is adjacent response/freshness contract work.
Expected behavior
Array, NDJSON, and envelope modes must serialize the same row DTO and readiness facts. Projection may remove only fields the caller did not request; it must not relocate rows or fabricate has_more:false.
PR scope
One PR should fix row projection/serialization across symbols and files. Unknown-field validation/schema discovery is tracked separately.
Implementation guide for Codex 5.6 sol xhigh
- Add a matrix covering symbols/files, projected/unprojected rows, array/NDJSON/envelope, empty/non-empty, and bounded pages.
- Build the projected row once, then pass it to format-specific writers; never reuse the first row as response-context metadata.
- Keep readiness/pagination metadata outside projected row fields and consistent across modes.
- Preserve backward-compatible field names, add contract tests, run net8/net9, and add a bilingual changelog fragment.
Acceptance criteria
- Every non-empty projected query returns all rows in the documented collection/stream.
exact_index_available, counts, truncation, and cursor facts agree across JSON modes.
- No row appears under
metadata.response_context.
- Empty results remain genuinely empty.
Summary
Projection and JSON-shape selection change the meaning and placement of query results. Projected
symbols/filescalls can returnresults:[]while placing the first row undermetadata.response_context, andsymbols --json=arraydropsexact_index_availablethat is present in streaming JSON.Audit IDs: Q-01 and Q-30. Reproduced with v1.40.3 at
404db09489c305f17d94f37026e00564d3ac527a. Closed #1527 is adjacent response/freshness contract work.Expected behavior
Array, NDJSON, and envelope modes must serialize the same row DTO and readiness facts. Projection may remove only fields the caller did not request; it must not relocate rows or fabricate
has_more:false.PR scope
One PR should fix row projection/serialization across
symbolsandfiles. Unknown-field validation/schema discovery is tracked separately.Implementation guide for Codex 5.6 sol xhigh
Acceptance criteria
exact_index_available, counts, truncation, and cursor facts agree across JSON modes.metadata.response_context.