Skip to content

Repair mixed folded backfill state - #5030

Merged
Widthdom merged 3 commits into
mainfrom
fix-issue4946
Aug 1, 2026
Merged

Repair mixed folded backfill state#5030
Widthdom merged 3 commits into
mainfrom
fix-issue4946

Conversation

@Widthdom

@Widthdom Widthdom commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Detect non-NULL folded-key drift when NULL folded values are pending.
  • Promote mixed missing/stale state to one full rewrite in CLI and MCP.
  • Preserve full-rewrite mode across interrupted promoted rewrites until checkpoints clear.
  • Consume and exactly verify completed persisted rewrite checkpoints before later scoped repairs.
  • Add CLI/MCP regressions, bilingual testing guidance, and a changelog fragment.

Root cause

The preflight selected a targeted NULL-only backfill whenever missing values were present, so non-NULL stale rows survived and final verification failed. Interrupted promoted rewrites could also leave a full-rewrite checkpoint that a targeted retry ignored, including an end-of-table checkpoint that the CLI previously treated as a no-op.

Validation

  • dotnet build CodeIndex.sln -c Release -p:UseSharedCompilation=false --no-restore (0 warnings, 0 errors)
  • BackfillFold Release tests on .NET 8 and .NET 9 (41 passed, 1 existing trimmed-publish skip each)
  • Issue backfill-fold can leave NULL folded values after a scoped update #4946 regression tests on .NET 8 and .NET 9 (5 passed each)
  • dotnet format CodeIndex.sln --verify-no-changes --no-restore
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • Real checkpoint reproduction: completed checkpoint cleared, later scoped NULL repaired in targeted mode, 0 NULL rows/checkpoints remained
  • Real repository no-op backfill verified fold readiness
  • Codex adversarial review: two rounds, three actionable P2 findings reproduced and fixed

A broader solution test run encountered one unrelated timing-sensitive MCP concurrency failure under shared-host load; the exact test passed independently on both .NET 8 and .NET 9.

Documentation and changelog

  • Updated TESTING_GUIDE.md in English and Japanese.
  • Added changelog.d/unreleased/4946.fixed.md.

Follow-up candidates

  • None.

Fixes #4946

@Widthdom
Widthdom marked this pull request as ready for review August 1, 2026 21:12
@Widthdom
Widthdom merged commit ce370c7 into main Aug 1, 2026
11 checks passed
@Widthdom
Widthdom deleted the fix-issue4946 branch August 1, 2026 21:12
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.

backfill-fold can leave NULL folded values after a scoped update

1 participant