fix(plugins): publish git installs across devices#99929
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: the same linked git plugin Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Live PR data shows #99896 is open, not draft, mergeable, labeled So I’m closing this here and keeping the remaining discussion on #99896. Review detailsBest possible solution: Use the proven same-filesystem staging PR as the landing path, then let the linked canonical issue close when that fix merges. Do we have a high-confidence way to reproduce the issue? Yes. Current main stages git plugin clones under Is this the best way to solve the issue? No. This PR is a plausible implementation, but the better current path is the open sibling PR that stages on the managed git filesystem, preserves the existing replacement primitive, and has accepted real split-filesystem proof. Security review: Security review cleared: The diff changes local plugin install filesystem moves and tests without dependency, lockfile, workflow, permission, secret-handling, or new code-execution surface changes. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 46ad3f9ae94c. |
|
ClawSweeper applied the proposed close for this PR.
|
Closes #99885
What Problem This Solves
Fixes an issue where users installing git-backed plugins in Docker or other split-filesystem setups would hit
EXDEV: cross-device link not permittedwhen OpenClaw tried to publish the cloned repository from the process temp directory into the managed git plugin directory.Why This Change Was Made
The managed git repo publish step now keeps the existing backup/restore behavior but uses the existing cross-device-safe move helper for both backup and final publish moves. That preserves the previous rollback semantics while allowing the final staged clone to be copied through the helper when a direct rename cannot cross filesystems.
User Impact
Users can install
git:plugins when/tmpand the OpenClaw state directory live on different mounts, such as Docker containers with bind-mounted home or state directories. Existing install failure behavior and security success events remain unchanged when publishing fails.Evidence
EXDEV, while still emitting the install success event only after the repo is published.node scripts/run-vitest.mjs src/plugins/git-install.test.ts-> 21 tests passed.node scripts/run-vitest.mjs src/plugins/git-install.test.ts src/infra/install-package-dir.test.ts src/infra/replace-file.test.ts-> 2 Vitest shards passed;src/infra/install-package-dir.test.tsandsrc/infra/replace-file.test.tscovered the shared copy-fallback helper behavior, with platform-specific hardlink cases skipped on Windows as expected..\node_modules\.bin\oxfmt.CMD --check --threads=1 src/plugins/git-install.ts src/plugins/git-install.test.ts-> all matched files use the correct format..\node_modules\.bin\oxlint.CMD --tsconfig config/tsconfig/oxlint.core.json src/plugins/git-install.ts src/plugins/git-install.test.ts-> no issues reported.git diff --check-> passed.repo -> managed git reporename to throwEXDEV, then verifies the install succeeds and the managed repo contains the staged marker file.