Repository navigation
fix: preserve caller-replaced SQLite targets on Windows - #116284
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 30, 2026, 3:28 AM ET / 07:28 UTC. ClawSweeper reviewWhat this changesThis PR removes inode-only ownership bookkeeping from SQLite snapshot cleanup and requires a full file fingerprint before deleting a failed published target on Windows. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 3 items remain Keep this maintainer-labeled PR open for normal maintainer review. The focused patch addresses a credible Windows data-preservation failure path and no concrete defect is visible in the supplied diff, but the PR body currently provides regression-test/CI evidence rather than after-fix Windows runtime proof. Priority: P1 Review scores
Verification
How this fits togetherSQLite snapshot publication replaces a target database with verified staged content and returns a guard for later failure cleanup. That cleanup must remove only the file published by this operation, not a replacement database the caller created afterward. flowchart LR
A[Staged SQLite snapshot] --> B[Publish verified target]
B --> C[Record published file fingerprint]
C --> D[Return publication guard]
D --> E[Caller may replace target]
E --> F[Failure cleanup]
F --> G[Unlink only matching published target]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -8. Total -8 across 1 file. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain one canonical fingerprint-based cleanup rule, validate it on Windows for both unchanged and caller-replaced targets, then merge the narrow forward-port if both outcomes are demonstrated. Do we have a high-confidence way to reproduce the issue? Unclear: the supplied regression name and patch describe a concrete Windows replacement scenario, but this review could not independently execute or inspect a current-head Windows reproduction. Is this the best way to solve the issue? Yes, provisionally: replacing inode-only ownership with a complete published-file fingerprint directly addresses NTFS identity reuse without adding a new compatibility surface; the unchanged-target cleanup path still needs Windows evidence. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ad1dc602594b. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
…n-dedupe * origin/main: (25 commits) fix(qqbot): use Gateway timezone for reminders (#116294) test(openai): cover out-of-order named mark acks docs(openai): clarify cumulative playback marks test(openai): cover sustained unnamed mark acknowledgements fix(openai): preserve playback acknowledgement order test(openai): verify bounded playback acknowledgements fix(openai): bound realtime playback marks test(agents): mock incremental registry persistence (#116307) fix(memory-core): MEMORY.md compaction deletes user notes written under a promotion-style heading (#116180) feat(reply): annotate recent history images (#100866) chore(ios): refresh native i18n inventory fix(ios): isolate capability router handlers docs(ios): cut 2026.7.22 release notes docs(hooks): document validation responses test(qa): assert hook account rejection reasons fix(gateway): validate hook delivery accounts perf(gateway): bound prepared runtime startup work (#116261) fix(agents): prevent registry stalls during large fan-outs (#116286) fix(sqlite): preserve replaced snapshot targets on Windows (#116284) fix(ci): load frozen shard runner without repository fetch (#116273) ...
…n-dedupe * origin/main: (25 commits) fix(qqbot): use Gateway timezone for reminders (openclaw#116294) test(openai): cover out-of-order named mark acks docs(openai): clarify cumulative playback marks test(openai): cover sustained unnamed mark acknowledgements fix(openai): preserve playback acknowledgement order test(openai): verify bounded playback acknowledgements fix(openai): bound realtime playback marks test(agents): mock incremental registry persistence (openclaw#116307) fix(memory-core): MEMORY.md compaction deletes user notes written under a promotion-style heading (openclaw#116180) feat(reply): annotate recent history images (openclaw#100866) chore(ios): refresh native i18n inventory fix(ios): isolate capability router handlers docs(ios): cut 2026.7.22 release notes docs(hooks): document validation responses test(qa): assert hook account rejection reasons fix(gateway): validate hook delivery accounts perf(gateway): bound prepared runtime startup work (openclaw#116261) fix(agents): prevent registry stalls during large fan-outs (openclaw#116286) fix(sqlite): preserve replaced snapshot targets on Windows (openclaw#116284) fix(ci): load frozen shard runner without repository fetch (openclaw#116273) ...
What Problem This Solves
Fixes an issue where Windows snapshot publication cleanup could delete a replacement target created by the caller after publication. NTFS can reuse the deleted file identity while the original target handle remains pinned, so inode/file-index ownership alone is not sufficient for cleanup.
Why This Change Was Made
Failure cleanup now always requires the complete size, mtime, ctime, and birthtime fingerprint before unlinking the published pathname. The now-redundant pinned-ownership bookkeeping is removed. This is the exact forward-port of the beta.6 release fix.
User Impact
Windows snapshot and restore failures preserve a caller-owned replacement database instead of deleting it during cleanup.
Evidence
src/infra/sqlite-snapshot.test.tspassed all 32 tests (6 platform skips). The two cleanup outcomes requested by review both passed:removes its published target when the caller rejects itpreserves a target replaced by the caller after publicationgit diff --check