Skip to content

Make partial find scans resumable #4863

Description

@Widthdom

Summary

A 250,000-line find --all regex scan exits partial with has_more:true but next_cursor:null, so the remaining matches cannot be enumerated.

Audit ID: R-08. Follow-up to closed #4578 and #4730's bounded scan/pagination contracts.

Expected behavior

Every partial scan returns a stable continuation bound to the query, scan mode, source identity, and generation.

PR scope

Keep this to find continuation for partial scans.

Implementation guide for Codex 5.6 sol xhigh

  • Encode path/file ordinal, line/byte position, regex/literal/options fingerprint, and source/index generation.
  • Resume at a record boundary without duplicate/missing matches, including multiline/Unicode/large-line cases.
  • Return typed errors for stale/mismatched/malformed cursors.
  • Test full page-walk, cancellation/timeout/byte limit, file changes, empty/final pages, and deterministic order.
  • Update help/schema, run full tests, and add a bilingual changelog fragment.

Acceptance criteria

  • The 250k-line corpus can be fully enumerated page by page.
  • No gaps or duplicates occur.
  • Invalidated cursors fail clearly rather than restarting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETPull requests that update .NET codeenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions