Skip to content

Reclaim rebuild-created SQLite free pages - #5070

Merged
Widthdom merged 3 commits into
mainfrom
fix-issue5057
Aug 10, 2026
Merged

Reclaim rebuild-created SQLite free pages#5070
Widthdom merged 3 commits into
mainfrom
fix-issue5057

Conversation

@Widthdom

@Widthdom Widthdom commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • reclaim rebuild-created SQLite free pages after successful CLI and MCP rebuild commits when the shared maintenance threshold recommends it
  • use bounded incremental vacuum only for compatible databases, preserving the committed index on skip, failure, cancellation, and concurrent-reader scenarios
  • expose immediate and persisted before/after reclaim telemetry, including truthful unavailable values when post-reclaim measurement fails
  • document the policy and cover integrity, interruption, explicit vacuum, logical size attribution, and memory-timeline ordering

Validation

  • dotnet restore CodeIndex.sln
  • dotnet build CodeIndex.sln -c Release -p:UseSharedCompilation=false --no-restore — 0 warnings, 0 errors
  • Issue Avoid leaving hundreds of megabytes of free pages after a rebuild #5057 and memory-timeline focused tests — 8 passed on net8.0 and 8 passed on net9.0
  • dotnet test CodeIndex.sln -c Release -p:UseSharedCompilation=false --no-restore --no-build — 21,997 passed, 420 skipped, 0 failed
  • dotnet run --project tools/CodeIndex.Changelog -- check — validated 6 fragments
  • local cdidx status --json --check=workspace — workspace matched, no failed checks
  • Codex adversarial review — 2 rounds completed; all three P2 findings were addressed, with behavioral fixes covered by regression tests

Documentation and changelog

  • Updated README.md, USER_GUIDE.md, DEVELOPER_GUIDE.md, TESTING_GUIDE.md, and AGENT_GUIDE.md
  • Added bilingual changelog.d/unreleased/5057.fixed.md

Related to #1631.

Fixes #5057

@Widthdom
Widthdom marked this pull request as ready for review August 10, 2026 13:25
@Widthdom
Widthdom merged commit 98d8896 into main Aug 10, 2026
12 checks passed
@Widthdom
Widthdom deleted the fix-issue5057 branch August 10, 2026 13:25
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.

Avoid leaving hundreds of megabytes of free pages after a rebuild

1 participant