Skip to content

[BUG] Keep completed indexing progress when a scan is cancelled #35

Open

Description

@simurg79

Type

Bug

Problem / Value

Cancelling a scan before its final completion phase loses the record of files already indexed during that scan. Retrying can repeat embedding work, consuming provider quota and time, especially in large workspaces.

Context

Deferred finding 🟡3 from PR #34: #34, which addresses #23. Source reviewed: 8c38f1c.

The scan records completed file hashes only after all queued batches finish. Design Decision 11 called for tracking each file's outstanding batches so completed files can be saved sooner. Existing progress from earlier scans is not claimed to be lost.

Reproduction

  1. Start a scan large enough to require several embedding batches.
  2. Allow some files to finish, then stop before the whole scan finishes.
  3. Retry indexing and check whether those completed files are embedded again.

These are proposed regression steps, not a live-provider reproduction performed during filing.

Acceptance criteria

  • Save a file's completion record once all of its batches have succeeded.
  • Cancellation preserves completed files without marking partially processed or failed files complete.
  • Retry skips unchanged, completed files.
  • Cover cancellation, files spanning several batches, and failed batches with tests.

Constraints/Preferences

Preserve protection against writes from abandoned indexing attempts. Do not change parser failure handling as part of this follow-up.

Activity

  1. added
    bug
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions