Skip to content

fix(sandbox): explain inaccessible skills mountpoints - #186247

Merged
steipete merged 3 commits into
mainfrom
fix/workspace-directory-mode-1027a
Oct 27, 2026
Merged

steipete merged 3 commits into
mainfrom
fix/workspace-directory-mode-1027a

Conversation

@steipete

@steipete steipete commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #184115.

What Problem This Solves

Fixes: sandbox startup leads with a misleading path-alias error when an existing generated-skills mountpoint cannot be traversed by the gateway user.

User Impact

Sandbox startup now names the generated-skills mountpoint and explains that its ownership or ACLs must grant the gateway user directory search (execute) and write access. Preparation still fails closed and performs no automatic ownership or permission repair.

Why This Change Was Made

The pinned fs-safe release wraps traversal EACCES as path-alias. The sandbox mount owner now recognizes the nested permission errno and adds actionable context while retaining the original failure as its cause. The upstream classification fix is tracked in openclaw/fs-safe#1044. PR #126775 changes mount layout and retained-container compatibility; this contained diagnostic does not depend on that migration.

Thanks @LiuwqGit for the report and reproduction. Release-note context is in this description; no changelog edit.

Evidence

The production mount planner regression uses a real mode-000 ancestor. It fails on the base with path alias escape blocked, then passes with the diagnostic, retaining mode 000 and creating no children. All 34 mount-plan tests pass (5.56 seconds in the Vitest run; 10.80 seconds including its wrapper). The test skips Windows and root, where the POSIX traversal denial cannot be reproduced this way.

git diff --check and independent autoreview P0–P2 are clean. pnpm check:changed passed guards, production typecheck, and all 29 core test typecheck graphs; optional whole-tree export scans were stopped on the loaded host. An initial broad-config lint command timed out during prerequisite SDK declaration generation, before lint ran. Focused curly lint and the mock-factory ratchet pass on the final correction. Exact-head CI is the remaining broad proof. The PR context check initially rejected missing template headings; this body supplies the required sections.

The final test fixtures retain all 34 mount-plan cases and assertions, with duplicate managed/ordinary symlink and read-only-parent setup consolidated. All 34 cases pass, including the real inaccessible-ancestor regression; focused curly lint and the mock-factory ratchet pass after the style correction. Independent Codex reviews of the production fix and final consolidation found no actionable P0–P2 findings.

Final CI qualification

Run 40586757847, attempt 1, tested exact head 0579089b09c09fcd2727d958ad92e7c6a0b6d42c as merge ac78886568d512f303796512ffee12cbce723769 over main baseline 2d7c3497e1fa81e09c3ebeb377b1f81f5fb99cf4. It finished with 31 passing jobs, including security, and one failed source job plus its downstream CI gate. check-lint-core-2 reports five existing eslint(curly) errors: ui/src/pages/new-session/draft-body.browser.test.tsx:31/32 and ui/src/pages/chat/chat-content-column.browser.test.tsx:288/289/362.

Both complete file blobs are identical in that baseline and tested merge, and identical to the baseline copies on which focused lint independently reproduced all five diagnostics. This PR changes neither UI file. All 34 sandbox mount-plan cases, the corrected sandbox curly guard, and its mock-factory ratchet pass. The supported inherited-failure landing path retains the failed CI result; it does not describe this run as green or bypass security/review requirements.

@clawsweeper

clawsweeper Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime docker Docker and sandbox tooling agents Agent runtime and tooling size: S labels Oct 27, 2026
@steipete
steipete marked this pull request as ready for review October 27, 2026 19:34
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T21:27:42.461931Z 0579089 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 0579089b09c09fcd2727d958ad92e7c6a0b6d42c
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/agents/sandbox/mount-plan.ts: Controls sandbox containment or tool execution authority. Check filesystem and network isolation, approval scope, and command allowlists.

Carefully review these changes before merging.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 27, 2026
@clawsweeper

clawsweeper Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR explains inaccessible generated-skills mountpoints while preserving the original error and existing filesystem protections.

Example: A non-root Gateway encounters /tmp/repro/workspace/.openclaw owned by root with mode 0770.

  • Before: Sandbox preparation leads with “path alias escape blocked” and supplies no ownership remedy.
  • After: Preparation names /tmp/repro/workspace/.openclaw/sandbox-skills/skills and explains the required directory access before retrying.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A useful, narrowly scoped patch with no identified defect; available behavioral evidence stops at the planner harness.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; its supplied validation covers the production mount planner's real permission denial, rather than a shipped Gateway entry point.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: An inaccessible generated-skills directory prevents sandbox startup while the leading error incorrectly suggests a path-alias violation.
Reason: The linked report accepts an actionable failure message, and the maintainer-authored patch supplies that message without privileged repair or a mount-layout migration.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR provides a focused, useful diagnostic for a verified sandbox failure; no introduced correctness or security defect was found.

Priority: P2
Reviewed head: 4f499cfd0954c4bdff2fc8b02bfe39b9473352e3

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No after-fix Gateway startup output is supplied; the reported red/green planner regression exercises real filesystem denial with mocked namespace discovery.
Agent review details

How this fits together

The sandbox mount planner receives workspace paths and mount policy, prepares guarded scaffold directories, and returns container bindings or a provisioning error.

flowchart TD
  A[Sandbox session setup] --> B[Container lifecycle]
  B --> C[Mount planner]
  C --> D[Guarded filesystem root]
  D --> E[Permission failure]
  E --> F[Contextual diagnostic]
  F --> G[Provisioning error]
Loading

Technical review

Best possible solution:

Keep the permission-specific diagnostic in the existing mount planner while preserving guarded operations and the original cause.

Do we have a high-confidence way to reproduce the issue?

The reporter's non-root permission-denial trace matches the current scaffold operation and pinned dependency wrapper; this review executed no target code.

Is this the best way to solve the issue?

The patch is the smallest complete diagnostic repair: it reuses error traversal and errno owners, preserves failure semantics, and adds one distinct filesystem regression without new machinery.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 451ec41c26c6.

Provenance checked

  • Guarded generated-skills scaffold preparation keeps the original intent (28d8ee4: Create scaffolding as the workspace owner before the container engine creates nested mountpoints, retaining symlink rejection and mutation authority checks.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit 2c393ec adds src/agents/sandbox/mount-plan.ts:35 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 2c393ecf5563; files: src/agents/sandbox/mount-plan.ts)

PR surface

Source +19, Tests +24, Docs +10. Total +53 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 25 6 +19
Tests 1 24 0 +24
Docs 1 10 0 +10
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 59 6 +53

Labels

Label changes:

  • add P2: This focused diagnostic improves recovery for affected sandbox operators without changing startup eligibility or filesystem permissions.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: This focused diagnostic improves recovery for affected sandbox operators without changing startup eligibility or filesystem permissions.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 27, 2026, 3:55 PM ET / 19:55 UTC.

@steipete
steipete merged commit 1f75ea7 into main Oct 27, 2026
133 of 136 checks passed
@steipete
steipete deleted the fix/workspace-directory-mode-1027a branch October 27, 2026 22:11
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 28, 2026
* fix(sandbox): explain inaccessible skills mountpoints

* test(sandbox): consolidate duplicate mount plan setup

* test(sandbox): preserve mock contract and brace fixture branches
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docker Docker and sandbox tooling docs Improvements or additions to documentation gateway Gateway runtime P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. security-sensitive-changed size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Sandboxed sessions cannot start when the generated-skills mountpoint is left root-owned ("path alias escape blocked")

1 participant