Skip to content

Skip checkpoints for completed no-op backfills - #4991

Merged
Widthdom merged 2 commits into
mainfrom
fix-issue4889
Jul 30, 2026
Merged

Skip checkpoints for completed no-op backfills#4991
Widthdom merged 2 commits into
mainfrom
fix-issue4889

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • Preflight pending rows, persisted folded values, readiness metadata, graph refresh state, and extractor versions under the index lock; skip the automatic checkpoint only for a verified completed no-op.
  • Add explicit --checkpoint, preserve --no-checkpoint, and report stable checkpoint_skipped / checkpoint_skipped_reason output in JSON and human-readable modes.
  • Preserve checkpoint protection for real mutations and add coverage for no-op, forced, dry-run, stale metadata, value drift, graph refresh, lock contention, WAL/SHM, validation failure, and legacy-schema cases.

Root cause

backfill-fold created its automatic checkpoint before it determined whether any row or readiness mutation was required. Moving only the pending-row count was insufficient because non-NULL folded values can still be stale, so the preflight also validates persisted values before returning already_complete.

Validation

  • dotnet restore CodeIndex.sln
  • dotnet build CodeIndex.sln -c Release -p:UseSharedCompilation=false
  • dotnet test CodeIndex.sln -c Release --no-build -p:UseSharedCompilation=false
    • net9.0: 10,413 passed, 420 skipped, 0 failed
    • net8.0: 10,886 passed, 7 skipped; one transient performance-budget failure (21.8s versus 20s), whose isolated rerun passed in about 4s
  • Final targeted backfill suite on net8.0 and net9.0: 20 passed, 1 published/trimmed skip, 0 failed per target framework
  • dotnet format CodeIndex.sln --verify-no-changes --no-restore
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • Codex adversarial review: initial persisted-value validation finding fixed; post-fix review found no blocking/actionable issue
  • Local index status --check --json: fresh and matched

Documentation and changelog

  • Updated the English and Japanese sections of DEVELOPER_GUIDE.md and TESTING_GUIDE.md.
  • Added changelog.d/unreleased/4889.fixed.md.
  • Did not modify AGENTS.md, CLAUDE.md, AGENT_GUIDE.md, or CHANGELOG.md.

Follow-up candidates

  • None.

Fixes #4889

@Widthdom
Widthdom marked this pull request as ready for review July 30, 2026 07:52
@Widthdom
Widthdom merged commit d8ca138 into main Jul 30, 2026
12 checks passed
@Widthdom
Widthdom deleted the fix-issue4889 branch July 30, 2026 07: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.

Skip automatic checkpoints for completed no-op backfills

1 participant