Skip to content

Preserve partial results and definition NDJSON in batch summaries - #5354

Merged
Widthdom merged 4 commits into
mainfrom
fix-issue5344
Sep 12, 2026
Merged

Preserve partial results and definition NDJSON in batch summaries#5354
Widthdom merged 4 commits into
mainfrom
fix-issue5344

Conversation

@Widthdom

@Widthdom Widthdom commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Summary

Batch JSON summaries discarded usable exit-11 query output and serialized multi-row definition NDJSON as escaped stdout. Preserve validated partial rows, terminal metadata and continuation cursors alongside the existing error status, exit code and failure accounting. Normalize definition NDJSON to a stable results array and retain document output for find/definition envelopes.

Partial-output parsing uses the existing capture and JSON-depth limits, reconciles terminal/envelope counts with retained rows, and rejects malformed or conflicting output. Scoped regex find with origin filters also retains partial rows and counts. Verbose/profile diagnostic records are retained without contributing to result counts. Explicit capture/cancellation/timeout errors and unrelated failures keep their typed-error paths. Parent output budgets and input ordering remain enforced.

Validation

  • dotnet build -p:UseSharedCompilation=false — zero warnings/errors.
  • make lint — full-solution whitespace validation passed.
  • Focused batch, child-parser, JSON-envelope, find, definition and CLI-schema regressions on both frameworks: net8.0 269 passed; net9.0 268 passed, one existing skip. This includes the Preserve structured child errors and retry guidance in batch JSON summaries #5259 E028/retry regressions and batch cancellation/timeout coverage.
  • New fixtures compare direct and serial/parallel batch output, resume a retained find cursor without gaps or duplicates, and cover count/envelope/zero-row partial output, verbose/profile diagnostic records, definition cardinality/body/output variants, malformed captures and tight parent budgets.
  • dotnet run --project tools/CodeIndex.Changelog -- check and git diff --check passed.
  • Repository dogfood reproduction preserved five partial find rows with exit 11 and ten structured definition rows. Replaying the batch cursor returned the remaining 21 matches; all 26 match locations equal a complete scan, with no gaps or duplicates. Root and workspace-manifest freshness/completeness checks passed after the post-commit rebuild and index refresh.
  • Completed two Codex adversarial-review rounds and addressed all three findings: scoped-find output classification, missing-row/count validation, and diagnostic control records. Direct and serial/parallel regression tests verify the final diagnostic-control fix.

Documentation and changelog

Updated CLI help and the English/Japanese sections of USER_GUIDE.md, DEVELOPER_GUIDE.md, and TESTING_GUIDE.md. Added changelog.d/unreleased/5344.fixed.md; CHANGELOG.md and agent instruction files are unchanged.

Fixes #5344

@Widthdom
Widthdom merged commit c84959b into main Sep 12, 2026
12 checks passed
@Widthdom
Widthdom deleted the fix-issue5344 branch September 12, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Preserve structured partial results and definition NDJSON in batch summaries

1 participant