Repository navigation
fix: keep pnpm fallback caches out of guest workspace sync - #188089
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. What this changesExclude the checkout-root pnpm fallback store from workspace synchronization while preserving recovery of historical cache-bearing baselines. Example: A guest shell installs semver beneath .openclaw while HOME remains /workspace.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a current workspace synchronization defect without an identified correctness blocker; the updated compatibility evidence resolves the previous review’s upgrade concern. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherManaged workspace scanners capture canonical and guest files into manifests; shared path rules select synchronized content, and the existing recovery owner reconstructs missing baseline metadata against its saved digest. flowchart LR
A[Guest package installation] --> B[Workspace scanner]
C[Shared path classifier] --> B
B --> D[Workspace manifests]
D --> E[Canonical reconciliation]
F[Saved baseline and checkpoint] --> G[Baseline recovery]
B --> G
G --> D
Technical reviewBest possible solution: Use the existing shared classifier to exclude new fallback-cache content and preserve exact historical baseline identities through the existing recovery owner. Do we have a high-confidence way to reproduce the issue? The linked report supplies a precise native pnpm trigger and observed synchronization result, and current-main source confirms the missing exclusion; this read-only review ran no target code. Is this the best way to solve the issue? The patch is the smallest complete repair using existing owners: one exact-root exclusion, regenerated consumers, and narrowly justified historical reconstruction support. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 445b21a0ebb2. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +26, Tests +31, Docs +5, Generated +18, Other +1. Total +81 across 10 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:
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 HistoryReviewed October 30, 2026, 9:19 AM ET / 13:19 UTC (Revision 3). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Fixed: pnpm fallback caches stay out of guest workspace synchronization, with saved baseline recovery preserved. |
…188089) Exclude the checkout-root pnpm fallback store from guest workspace synchronization and retain authenticated reconstruction of older saved baselines. Refs openclaw#188068.
…188089) Adapt bounded source behavior to frozen LOCAL11.8; preserve unrelated baseline behavior. (cherry picked from commit fdba74e) Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 1b431065dfe6552ff27caa297430e7098bcfd550)
Closes #188068.
What Problem This Solves
Installing a nested project from a managed guest shell can make pnpm select
.openclaw/.pnpm-storewhen its home store cannot hard-link across the protected.openclawmount. That fallback enters ordinary workspace synchronization as authored content. A real one-package installation copied 54 generated store files into the canonical project; larger stores can also consume the existing result limits.User Impact
The exact checkout-root fallback store stays with its producing runtime. Authored siblings, nested project fixtures and genuine staged inputs retain their existing preservation rules and file limits. Cache files already present on either side remain preserved.
Older accepted baselines remain recoverable when their inventory is missing and an intact workspace or checkpoint can reconstruct the saved root. Recovery preserves other live edits and refuses to replace that baseline with divergent content.
Why This Change Was Made
The shared generated-path classifier already owns capture, transfer, reconciliation and recovery. Adding the demonstrated fallback root there keeps those consumers consistent while preserving pnpm configuration, HOME, sandbox mounts and permissions. Both embedded manifest consumers are regenerated from that owner.
Historical reconstruction needs the old inventory before normal reconciliation applies today's exclusions. Repair therefore tries current candidates first, then allows only the former pnpm fallback root while matching the immutable saved root. Checkpoints retain their previous entries and recorded result directories so an interrupted policy transition can reconstruct that same baseline. Other cache exclusions, filesystem checks and inventory bounds remain in force.
Evidence
The live before-case used pnpm 12.15.0 and an authenticated local semver archive with guest networking disabled. A root-launched shell changed into the nested project while retaining HOME at
/workspace; native pnpm selected.openclaw/.pnpm-store/v11. After one installation and normal synchronization, both workspaces contained 54 generated files, including a content-addressed object hard-linked to the installed package. A separate turn preserved authored edits, original staged inputs and package use.The regressions reproduced fallback-cache admission, historical baseline reconstruction failure, and checkpoint reconstruction failure before their corrections. The final fourteen affected test files passed 220 cases with one existing opt-in skip. Changed-file formatting/lint, generated-script consistency, selected production/test type checks and the test-line ratchet passed. The fixtures retain physical
node_modules, authored siblings, staged inputs, divergent edits and exact-root authentication.On the corrected runtime, one installation of already-locked semver 6.3.1 naturally created a new 981-byte cache object that was absent from both workspaces beforehand. It matched the authentic archive and installed hard link, stayed in the private workspace, and remained absent from canonical storage through synchronization and a separate read-only turn. All 54 original canonical files and 53 prior private cache payloads remained unchanged; pnpm updated its private index normally. Authored V2 controls and original staged inputs survived, and the installed package remained usable without reinstalling. Guest isolation, mounts and configuration were unchanged.
The live case uses a small authentic object; the historical 64 MiB rejection and Team Podman scenario remain outside this proof. Existing boundary tests cover generated-root exclusion and preserved authored limits.
Latest-stable compatibility passed through production storage owners in three separate processes, starting from v2026.10.9. Stable itself created a cache-bearing legacy baseline and a conflicted pending Git result. The candidate's normal startup migration preserved their original identities and kept the authored conflict pending until it was resolved. Recovery then accepted the guest edit and cleared pending state. A fresh process reopened the same state, synchronized a subsequent authored edit, and kept a new cache file private. Existing independent cache contents, authored siblings, genuine staged inputs and host-only exclusions survived throughout.
This upgrade run covers storage owners and their normal backed-up startup migration. Full Gateway, service and model upgrades remain outside its scope. Latest stable predates the newer tree/checkpoint fields; their missing-inventory and checkpoint reconstruction paths are covered by the separate regressions above.