Repository navigation
fix: keep moved capture directories out of exports - #143899
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. |
|
Exact-head CI found an unrelated existing failure: The file is blob-identical on this PR and its base. Existing #143896 fixes that precise lint error (+1/-5 in the desktop file); no duplicate UI change is being added here. Original failure logs are preserved. Privacy local checks, 42 focused tests and native review validation passed. Required CI is not green, so preparation/merge remain unstarted. |
fa58307 to
25264b7
Compare
|
The required lint failure is addressed by already-merged #143889 ( All seven privacy source SHA256 hashes and the +364/-7 diff match the reviewed/tested candidate. The 42 focused passes and required local checks remain applicable; original failures are preserved. Successor exact-head CI is pending, and native review is being refreshed. No raw capture creation, retention change, cleanup or installed build was introduced. |
|
Codex review: needs maintainer review before merge. Reviewed September 10, 2026, 6:31 AM ET / 10:31 UTC (Revision 4). ClawSweeper reviewWhat this changesExtends backup and support-export exclusions to marked private capture directories after relocation, preserving checks through path aliases and refusing malformed markers. Merge readiness✅ Ready for maintainer review The PR remains useful: current main lacks moved-directory marker recognition. The prior lexical-selection findings are addressed, and this review found no remaining blocking defect. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s export guards screen selected config, workspace, and database paths before producing backup archives, SQLite/Git snapshots, or support bundles. This change extends their shared private-capture classification. flowchart TD
A[Selected files and directories] --> B[Lexical and canonical paths]
B --> C[Shared capture exclusion guard]
C --> D[Exclude marked captures]
C --> E[Refuse malformed markers]
C --> F[Ordinary export processing]
F --> G[Backup or support artifact]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +117, Tests +486, Docs +12. Total +615 across 10 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep one shared exclusion guard across export paths, preserve ordinary unmarked inputs, and retain capture creation and lifecycle authority with their existing owners. Do we have a high-confidence way to reproduce the issue? Yes, from source: selecting a relocated marked directory outside the managed or paired layout bypasses current main’s classification. The PR supplies caller regressions, but this review did not execute them. Is this the best way to solve the issue? Yes. Extending the existing shared guard preserves one classification owner, and the corrected callers retain lexical selections before resolving aliases. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0669f6b2c5be. LabelsLabel changes:
Label 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)
|
|
The lexical-admission finding is fixed at Four real-archive cases failed before correction. The final run passed all 22 archive/privacy cases and three healthy managed-skill controls, including malformed-marker refusal with a duplicate canonical selection and healthy independent-target inclusion. The fixed marker reader, constants and support code are unchanged. Fresh full-candidate P0/P1/P2 review found no actionable findings. Original red results and the earlier green CI are preserved; new exact-head CI is required for this correction. The PR remains exclusion-only: no producer edits, capture enablement, lifecycle authority or deletion. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Addressed the agent/database selector finding in Original agent roots and SQLite/Git database selections are admitted before Full-candidate local review through P2 raised only a config-only bypass already blocked by the existing original-path assertion before the early return. Two real |
|
Merged via squash.
|
* fix: keep moved capture directories out of exports * fix: preserve lexical privacy admission before archive deduplication * fix: guard original backup database selections before canonicalization * test: satisfy backup privacy fixture brace lint
* fix: keep moved capture directories out of exports * fix: preserve lexical privacy admission before archive deduplication * fix: guard original backup database selections before canonicalization * test: satisfy backup privacy fixture brace lint (cherry picked from commit 0670cd2)
배치 A 체리픽이 이 포크에 없는 중간 리팩터링에 걸린 지점을 포크 코드에 맞춰 정리했다. - 문자열 이스케이프 복구: attempt-prompt-build.ts, attempt-prompt-context.test.ts - openclaw#140859: session-accessor.entry-mutation.ts 의 transcript 헤더 import 복원 - openclaw#141247: runs.ts 에서 포크에 없는 projectSessionActive 조건 제거 - openclaw#141471: execute-plugin.test-support.js 가 없어 native-bash 테스트 파일 제거 - openclaw#141960: quickjs-wasi 3.6.0 의 MAX_STACK_SIZE 를 쓸 수 없어 되돌림(포크는 3.5.0 핀) - openclaw#142130: agents.ts 의 assertCurrent 호출 제거, cleanup-utils 는 선택 인자로 유지 - openclaw#142158: manifest-planner.ts 의 remoteModelIds·manifestModelsById 복원 - openclaw#143308: simple-completion-runtime.ts 에 acquireSimpleCompletionModelForAgent 래퍼 추가 - openclaw#143899: src/infra/file-descriptor.ts 의 fingerprint 비교 헬퍼 이식, backup-shared 의 configCapture 참조 제거 Co-Authored-By: Claude Fable 5.1 <[email protected]>
Related: #143799
What Problem This Solves
Fixes an issue where backups or support exports could include private update-capture files after the original state directory was removed or a retained capture directory was relocated. The paired-root exclusion introduced in #143799 cannot identify those paths on its own.
Why This Change Was Made
The existing shared export guard now recognizes a fixed, versioned, exclusion-only marker in a selected directory or its ancestors. It checks lexical and canonical paths, reads only the bounded regular marker file without following marker symlinks, and rejects malformed, unreadable or changed markers. It never parses workspace manifests or scans other state roots. Archive planning checks original lexical selections and their canonical targets before deduplication, including managed-skill target promotion. Archive traversal errors are carried through to a publication refusal after tar settles.
The producer contract is
.openclaw-private-update-capturecontaining exactlyopenclaw-private-update-capture-v1\n. Producers must durably write it before raw data in each independently movable container. Producer creation, capture/reopen, lifecycle eligibility and deletion are separate work. The marker grants exclusion only, not ownership or authority. This patch creates no captures and changes no retention policy.User Impact
Marked directories remain excluded after owner removal, relocation or copying with their markers intact. Explicit SQLite/Git inputs and support-export aliases get the same protection. Healthy siblings, similarly named directories and ordinary manifest files remain usable. Unmarked files copied out of protected directories are outside this classification rule.
Evidence
Selector review correction
Head
1d52df6ac822bf7a22e46a2cbc53e795c88b2850also checks original agent roots and global/agent SQLite/Git database paths before canonicalization. Best-effort outcome recording cannot reopen a rejected private global database. This keeps the same exclusion-only marker contract and does not modify producer or lifecycle code.Six new actual archive/SQLite/Git command cases fail before the correction and pass after it. They verify refusal without repository publication or source-byte mutation for valid and malformed marked selectors, then healthy operation for the same ordinary alias after removing only its disposable fixture marker. The existing 22 archive cases were not rerun for this addition; earlier reader/support/skill passes are preserved. A first attempt exposed a fixture runtime-cache mistake and a first repair exposed outcome-recording source mutation; both failures are preserved. Two missing test-loop braces found by lint were fixed mechanically without production or behavioral changes.
Fresh full-candidate review through P2 reported one
--only-configfinding. The original config path is already guarded before that early return. Two actual publiccreateBackupArchive({onlyConfig:true})controls, with valid and malformed markers, both refuse with the expected diagnostic, no archive and unchanged sources. The finding is rejected with this evidence; the raw findings verdict is retained, not relabeled as a clean review. No actionable finding remains from that review. Exact-head CI and native preparation/merge gates remain mandatory.Current measured scope: 10 files, +636/-21. No raw capture creation, retention change, historical deletion or installed build.