Repository navigation
fix(backup): exclude private update captures from ordinary exports - #143799
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 10, 2026, 4:01 AM ET / 08:01 UTC (Revision 4). ClawSweeper reviewWhat this changesExclude managed private update captures from backup archives, SQLite snapshots, Git backups, and diagnostic support exports, including cross-state paths and canonical aliases. Merge readiness✅ Ready for maintainer review This privacy prerequisite remains necessary on current main. The updated guard addresses cross-state captures and canonical aliases; no actionable introduced defect was found. The accepted design and maintainer-authored status support retaining this PR. Priority: P2 Review scores
Verification
How this fits togetherBackup and diagnostic exporters turn selected state, configuration, workspace, database, and log inputs into portable artifacts. The shared path guard excludes private update captures before those inputs enter ordinary exports. flowchart TD
A[Selected files and databases] --> B[Resolve lexical and canonical paths]
B --> C{Managed capture location?}
C -->|Yes| D[Skip workspace content or refuse explicit input]
C -->|No| E[Existing backup and sanitization flows]
E --> F[Archive, snapshot, Git backup, or support ZIP]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +113, Tests +221, Docs +15. Total +349 across 10 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep one shared capture-location exclusion across exporters while preserving ordinary sanitization and keeping capture creation, recovery, and retirement in their separately owned work. Do we have a high-confidence way to reproduce the issue? Yes, from source: a workspace containing a managed capture root reaches ordinary archive traversal on main without a capture-specific exclusion. The branch supplies focused artifact-content controls; this review did not execute them. Is this the best way to solve the issue? Yes. A shared path predicate applied through existing inventory, export readers, and snapshot production is a narrow implementation of the accepted privacy contract; it adds no capture store or competing recovery mechanism. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 704a40190788. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles) |
|
@clawsweeper re-review Review only the updated privacy PR at |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
…penclaw#143799) * fix(backup): exclude private update captures from ordinary exports * fix: exclude cross-state private update captures
…penclaw#143799) * fix(backup): exclude private update captures from ordinary exports * fix: exclude cross-state private update captures (cherry picked from commit 088b347)
Related: #142770. Follow-up to #140339.
What Problem This Solves
Resolves a problem where selecting a workspace containing the managed private capture root includes raw capture files in an ordinary backup. Explicit capture-file inputs can also enter support exports, SQLite snapshots and Git backups. The accepted capture design requires this boundary before enabling capture creation.
Why This Change Was Made
Exclude the selected state's exact managed
<stateDir>.update-captures/root and another state's exact paired root through the existing backup inventory, archive traversal, named support inputs, and shared snapshot producer. Explicit nested workspace selection cannot override this exclusion. Config or database backup sources inside those roots are refused. Cross-state recognition checks only the selected path's lexical and canonical ancestors for an exact<owner>.update-capturesdirectory paired with an existing<owner>directory. Similarly named and unpaired unrelated workspace directories stay included. This directory-layout rule is not writer authority and cannot identify moved, renamed or orphaned captures belonging to another state.Accepted storage/privacy decision: #140339 (comment)
Accepted prospective transaction-scoped lifetime revision: #140339 (comment)
This is the independent privacy prerequisite. It does not create retained captures, change ordinary snapshot sanitization, add cleanup/pruning, implement replay, or touch #143750/#143752 package mutation ownership. Capture/reopen will follow separately on this boundary.
User Impact
Managed raw update artifacts cannot be included accidentally in ordinary backup and support exports through these paths. Existing ordinary config/workspace files and backup sanitization remain supported. This is not a guarantee for raw data manually copied outside the managed root.
Evidence
3d665e6apasses eleven archive/SQLite/Git controls and all thirteen support-export tests, including ordinary sanitization and healthy-error cases. Six cross-state regressions failed on the previous guard for the intended reasons and pass with this correction. The archive case reads real tar output, verifies the archive, preserves both healthy neighbors, and checks source bytes.node scripts/check-changed.mjspassed, including core/test typechecks, changed-file lint, formatting, dead-export scans, import-cycle and database/storage guards. Exact-head CI remains a landing gate; its current failures and pending jobs are tracked in the PR checks.Installed proof
754c650c, using one unchanged installed package. Source-family receipts and output archive hashes were checked.OPENCLAW_INCLUDE_ROOTS, so config confinement rejected it before the export guard.Private update captures are excluded from backups and support exports.Both publish nothing and preserve source bytes and identities. No product change was needed. Corrected installed confirmation remains with the same proof owner.No live Gateway or production user data was modified. The installed tests used only synthetic task-owned files in the existing proof runtime. Historical evidence and the failed include assertion remain preserved. Earlier capture proofs and successful installed cases were not rerun.