Repository navigation
fix(sandbox): materialize protected skill mount roots - #96028
momothemage wants to merge 1 commit into
Conversation
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper automerge |
|
🦞🧹
Draft PRs stay fix-only until GitHub marks them ready for review. Pause with Automerge progress:
|
|
@clawsweeper stop |
|
🦞✅ I added |
50ff8d3 to
d4d68ef
Compare
d4d68ef to
7d9a593
Compare
fc0bbd9 to
5b6e0e4
Compare
|
Codex review: needs real behavior proof before merge. Reviewed August 1, 2026, 6:59 PM ET / 22:59 UTC. ClawSweeper reviewWhat this changesThe PR creates absent sandbox skill mount source directories before first writable sandbox startup so their container overlays can be read-only. Merge readiness⛔ Blocked until real behavior proof is added - 5 items remain This PR remains necessary: current main still excludes missing protected skill roots from first-launch rw mount overlays. Keep it in human review because its June head is conflict-dirty, the linked security report is protected, and supplied evidence lacks an inspectable fresh-container write-failure proof. Priority: P1 Review scores
Verification
How this fits togetherSandbox setup prepares an agent workspace and a separate materialized-skills workspace before selecting Docker, browser, or remote filesystem execution. Mount resolution turns existing canonical skill directories into narrow read-only overlays inside an otherwise writable workspace. flowchart LR
A[Agent workspace] --> B[Sandbox workspace setup]
C[Materialized skills workspace] --> B
B --> D[Protected skill mount roots]
D --> E[Canonical mount validation]
E --> F[Docker, browser, or bridge runtime]
F --> G[Writable workspace with read-only skill overlays]
Decision needed
Why: The linked report is security-sensitive, the patch changes filesystem creation semantics at a protected mount boundary, and the PR carries protected human-review signals. Before merge
Agent review detailsSecurityNone. PR surfaceSource +70, Tests +82. Total +152 across 3 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Rebase the setup-time root-materialization design onto current main, preserve canonical containment at the creation boundary, add current-head shared-runtime coverage, and attach a redacted fresh-container write-failure proof before merge. Do we have a high-confidence way to reproduce the issue? Yes from source: current main filters a missing protected root out of the rw mount list, while context setup does not create it before backend mount resolution. This read-only review did not run a live container reproduction. Is this the best way to solve the issue? Yes in direction: materializing roots during setup before the pure mount resolver is narrower and more maintainable than making the resolver create directories, but the stale patch needs current-main integration and security review. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against eb8c22ed13f9. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Thanks for the PR. We're closing older pull requests that have gone stale against current This branch has been conflicting and unchanged since June, with no behavior proof. The underlying issue stays tracked in #94425, and a fresh PR against current main would be welcome. If this change is still needed, please open a fresh PR against current |
|
Continued in #182412 (credited replacement built on this PR's commits) as part of an old-bug repair sweep. Thank you for the original work. |
…182412) Materialize the existing managed skill roots at workspace preparation before mount selection, retaining canonical containment, filesystem mutation guards, and current workspace custody. Continue the original first-launch repair from PR #96028 on the current sandbox lifecycle. Co-authored-by: momothemage <[email protected]>
…penclaw#182412) Materialize the existing managed skill roots at workspace preparation before mount selection, retaining canonical containment, filesystem mutation guards, and current workspace custody. Continue the original first-launch repair from PR openclaw#96028 on the current sandbox lifecycle. Co-authored-by: momothemage <[email protected]>
What Problem This Solves
Fixes #94425.
A first-launch rw sandbox can currently skip the read-only overlays for
/workspace/skillsand/workspace/.agents/skillswhen the corresponding host directories do not exist yet. Because/workspaceitself is writable, the sandbox can create those paths before the next container recreation applies the intended read-only mount.Why This Change Was Made
This materializes the protected skill mount roots during rw sandbox workspace setup, before Docker/browser/fs-bridge mount resolution runs. The mount-source predicate remains validation-only: it still requires an existing directory and the same canonical-root containment check, so missing paths under symlinked parents are not accepted as protected mounts.
This differs from the earlier candidate in #94820 by creating missing roots before mount resolution while preserving the existing canonical containment validation after creation.
User Impact
New rw sandbox launches get read-only skill overlays on the first container creation, even for fresh workspaces that did not already have
skillsor.agents/skillsdirectories. Existing symlink and non-directory rejection behavior stays intact.Evidence
node scripts/run-vitest.mjs src/agents/sandbox/workspace-mounts.test.tspnpm tsgo:test:srcv22.18.0while the repo requests>=22.19.0.node scripts/run-oxlint.mjs src/agents/sandbox/context.ts src/agents/sandbox/workspace-mounts.ts src/agents/sandbox/workspace-mounts.test.tspnpm exec tsx -e '<helper proof script>'resolveReadOnlyWorkspaceSkillMountsreturns mounts for/workspace/skills,/workspace/.agents/skills, and/workspace/.openclaw/sandbox-skills/skills.Proof gap: I attempted local Docker proof, but Docker could not connect because Colima was stopped, and
colima startfailed while starting the VM. I could not produce first-launch container write-failure proof from this machine.