Repository navigation
fix: SQLite snapshots fail in EFS-encrypted Windows caches - #190087
Conversation
Remove the redundant first-file promotion. Use the existing guarded copy only when final private publication rejects rename with EXDEV, preserving fsync and cleanup. Co-authored-by: JasonBuildAI <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesRemove an intermediate snapshot rename and copy private snapshot files when final publication fails with EXDEV. Example: Run openclaw doctor with an EFS-encrypted LOCALAPPDATA/openclaw cache on Windows 11.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it repairs a concrete Windows failure still present on main, and no actionable introduced defect was found. Priority: P1 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherDoctor and other inspection callers send SQLite sources to the snapshot owner, which returns a consistent private database location and its cleanup operations. flowchart TD
A[Doctor or inspection caller] --> B[Snapshot source owner]
B --> C[Isolated preparation worker]
C --> D[Verified private snapshot files]
D --> E[Rename or EXDEV copy]
E --> F[Reader and cleanup owner]
Technical reviewBest possible solution: Land the focused repair in the existing snapshot owner while preserving source bytes, private ownership, cleanup, and non-EXDEV failures. Do we have a high-confidence way to reproduce the issue? The reporter's Windows EFS traces match both unhandled current-main renames; this review inspected source and supplied evidence without executing a reproduction. Is this the best way to solve the issue? This is the smallest complete repair: remove the unnecessary intermediate promotion and handle EXDEV once in the existing private-family publication owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 03aec1b175a6. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +13, Tests +44, Other +2. Total +59 across 4 files. Added test files: 0. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 1, 2026, 12:38 AM ET / 04:38 UTC. |
|
Merged via squash auto-merge.
|
…claw#190087) Remove the redundant first-file promotion. Use the existing guarded copy only when final private publication rejects rename with EXDEV, preserving fsync and cleanup. Co-authored-by: JasonBuildAI <[email protected]>
Supersedes #169159, thanks @JasonBuildAI.
Related: #169157.
What Problem This Solves
Fixes SQLite snapshot reads and Doctor migration detection failing when Windows EFS-encrypted cache directories reject same-directory renames with
EXDEV.User Impact
Affected Windows users can inspect SQLite state without relocating their cache or disabling encryption. Other rename errors still fail visibly; no configuration or migration is required.
Why This Change Was Made
Copy directly into the existing partial snapshot instead of promoting an intermediate
firstfile. At final publication, fall back only onEXDEVto the existing guarded, exclusive file-copy primitive, flush the destination, and remove the staged file. The family stays private until preparation returns, so publication does not require an atomic rename. Existing cleanup owns failed copies.Production delta: +21/−8, net +13. Removed the intermediate file, its redundant rename, and its cleanup branch. The remaining growth is the required durable fallback; no new module, wrapper registration, or policy owner. Legacy
firstartifacts remain recognized for abandoned-snapshot cleanup after upgrades. Test delta: +44, with a dedicated allocation for the three preparation paths and the distinct non-EXDEV failure control.Evidence
9af7ded4487eb38dce6401b46d89b2e4f491d2f9.c32d920dab6bcb2eb55251bc71665816bb04f809, current main at investigation. Both unhandled runtime renames were still present. fix(tooling): handle Windows paths in repository checks #190069 (c9569e415c92416497f25d2352dac69282a852b2) only normalizes repository-check paths and does not repair runtime snapshot publication.EXDEVcases fail (synchronous copy, asynchronous copy, online backup); theEPERMcontrol passes. Tests exercise real SQLite reads, source preservation, private file permissions, and cleanup.git diff --checkpassed.scoped-cleanfor P0–P2; no findings. Reviewer did not independently execute tests. Hosted ClawSweeper review of the same head also found no actionable defects; its native Windows evidence gap matches the limitation below.pr-simplify: removed the redundant staging step and kept the fallback in the existing publication owner.gh pr view/gh pr diff, never checked out or executed.8662c66b9050fb9328ad291fa2d198cca449df99; verified the landed commit retains the human co-author trailer.