Skip to content

Add resumable cursors to NDJSON terminals - #5246

Merged
Widthdom merged 3 commits into
mainfrom
fix-issue5230
Sep 2, 2026
Merged

Add resumable cursors to NDJSON terminals#5246
Widthdom merged 3 commits into
mainfrom
fix-issue5230

Conversation

@Widthdom

@Widthdom Widthdom commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add reusable response:v2 cursors to truncated raw NDJSON terminal records for search, symbols, and files.
  • Bind continuation to the command, query, filters, ordering, offset, and index generation, and advance by the rows actually emitted under the byte budget.
  • Fail closed with machine-readable reasons when selectors, zero-progress byte caps, generation changes, or the 10,000-row replay window make continuation unsafe.
  • Keep byte-trimmed envelope and nested metadata.stream_terminal cursors aligned so replay has no gaps or duplicates.

Validation

  • dotnet build CodeIndex.sln -c Release --no-restore -p:UseSharedCompilation=false --disable-build-servers -m:1 /nodeReuse:false --nologo --verbosity:minimal (0 warnings, 0 errors)
  • Issue-focused Release tests on net8.0: 6 passed, 0 failed
  • Issue-focused Release tests on net9.0: 6 passed, 0 failed
  • Full Release net8.0 suite: 12,157 passed, 9 skipped, 0 failed
  • Full Release net9.0 suite: 11,670 passed, 433 skipped, 0 failed
  • dotnet format CodeIndex.sln --verify-no-changes --no-restore --verbosity minimal
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • Root and workspace index health checks against the locally built cdidx

Documentation and changelog

  • Updated the English and Japanese NDJSON cursor contract in USER_GUIDE.md, DEVELOPER_GUIDE.md, and TESTING_GUIDE.md.
  • Added bilingual changelog fragment changelog.d/unreleased/5230.fixed.md.

Adversarial review

  • Round 1: addressed unsafe cursor advertisement at the pagination boundary and concurrent index-generation drift.
  • Round 2: addressed byte-trimmed nested cursor gaps and cursors whose unchanged page size could not be replayed within the safety window.
  • Added regression coverage for every actionable finding; no findings remain unresolved.

Follow-up candidates

  • None.

Fixes #5230

@Widthdom
Widthdom merged commit 279d719 into main Sep 2, 2026
12 checks passed
@Widthdom
Widthdom deleted the fix-issue5230 branch September 2, 2026 04:52
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.

Include resumable cursors in truncated NDJSON terminal records

1 participant