Repository navigation
fix: Git updates fail when artifact storage is symlinked - #185680
Conversation
Resolve the physical .artifacts directory before database capture so the existing backup-parent durability sync accepts supported symlink layouts. Preserve backup integrity, custody, retention, and rollback checks. Add paired real-capture coverage and document the installed-updater requirement. Related: #160671, #153764
|
🦞👀 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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesResolve Git artifact storage to its physical directory before capturing update recovery databases. Example: /srv/openclaw/.artifacts points to /mnt/storage/openclaw-artifacts.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep this PR open: current main retains the symlinked-artifact backup failure, and this maintainer-authored patch provides a focused fix with no actionable introduced defects found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe installed Git updater captures recovery databases before migration; its backup owner creates verified snapshots and synchronizes their parent directory before returning recovery metadata. flowchart TD
A[Git update transaction] --> B[Database capture owner]
B --> C[Resolve physical artifact directory]
C --> D[Snapshot workers]
D --> E[Identity and durability checks]
E --> F[Recovery metadata]
F --> G[Rollback or retention]
Technical reviewBest possible solution: Use the physical artifact directory at the existing capture owner while retaining snapshot integrity, custody, durability and recovery behavior. Do we have a high-confidence way to reproduce the issue? Current main passes the lexical artifact directory to a final sync whose dependency rejects symlinks; the author reports the matching pre-fix failure, but this read-only review ran no target code. Is this the best way to solve the issue? This is the smallest complete repair: canonicalize the supported alias once at its producer without weakening the shared filesystem helper or adding fallback behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b8adac7f8845. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +1, Tests +60, Docs +5. Total +66 across 3 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
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 October 27, 2026, 4:39 AM ET / 08:39 UTC. |
) Resolve the physical .artifacts directory once before native Git database capture. This preserves the existing backup durability, identity, custody and rollback checks while supporting redirected artifact storage. The paired real-backup regression fails on the original caller and passes with the fix. Fresh-process replay verifies cross-volume storage, the physical returned path, SQLite integrity and the retained synthetic row. Existing redirected Git staging tests pass. Related: openclaw#160671, openclaw#153764
What Problem This Solves
Fixes
openclaw updateaborting during database backup capture when a Git installation's.artifactsdirectory is a symlink, including storage on another volume. The snapshot was already valid, but its final parent-directory sync rejected the lexical symlink and rolled back the update.Related: #160671 introduced the backup location; #153764 established support for redirected artifact storage.
User Impact
Git updates can capture their recovery databases in supported redirected artifact storage. The installed updater must contain this fix; a newer candidate cannot repair an older updater's capture step.
Why This Change Was Made
Resolve
.artifactsonce after ensuring it exists, then build the backup path from the physical directory. Directory receipts, identity verification, durability synchronization, maintenance custody, retention and rollback remain unchanged. No fallback, retry, schema change or relaxed filesystem guard is introduced.The nearby capacity assessment, preflight temporary directory, build cache and per-destination runtime staging paths do not pass
.artifactsitself to this final backup-parent sync; no sibling fix is needed. The patch adds one filesystemrealpathper native Git capture, with no SQL, worker-request or runtime MAIN changes by source attribution. Production delta: +2/-1 lines; necessary growth is the physical-path resolution.Evidence
not-fileparent-sync error (6 passed, 1 failed).state-read-admission-publication.postgres.test.ts; the same unchanged case then passed on both current main and this head with its original assertions/deadline (1 selected case each). The single failed-only retry passed on the same head (attempt 2); all required checks, including the aggregate CI gate, are green. No source change or broader rerun was needed.Open PR overlap check
Shared open-PR index: compared baseline-only and baseline plus this candidate against all 18 overlapping main-target PR heads with
git merge-tree. No new conflict paths or regions; pre-existing conflict counts remain: