refactor(sqlite): centralize verified snapshot publication#105412
Merged
Conversation
Co-authored-by: Gio Della-Libera <[email protected]>
Member
Author
|
Land-ready at What changed:
Proof:
Known gap: the cross-platform snapshot/restore/vacuum stress matrix is the next batch; this PR lands the shared primitive it will exercise. |
vincentkoc
marked this pull request as ready for review
July 12, 2026 13:46
Member
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 13, 2026
…105412) Co-authored-by: Gio Della-Libera <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
SQLite archive backup had a private
VACUUM INTOimplementation that could not be reused safely by snapshot/restore work. A second implementation would risk weaker integrity, sanitization, publication, and durability guarantees.Why This Change Was Made
This is the current-main foundation for the snapshot direction explored in #94805. The commit preserves Gio Della-Libera's co-author credit while replacing the stale prototype's direct-copy restore assumptions with a smaller verified primitive.
User Impact
openclaw backup createkeeps the same interface, but SQLite snapshots now use a reusable publication path hardened against unsafe indexes, foreign-key corruption, target races, partial fallback copies, post-sanitization remnants, and Windows fsync behavior.Evidence
node scripts/run-vitest.mjs run src/infra/sqlite-snapshot.test.ts src/infra/backup-create.test.ts src/commands/backup-verify.test.ts src/commands/doctor-state-sqlite-compact.test.tstbx_01kxb7nzpq84zv43m20x3ep69tcorepack pnpm check:changedoxfmt --checkon all touched files.agents/skills/autoreview/scripts/autoreview --mode local