Skip to content

fix(sandbox): show POSIX path in container escape hint - #114209

Merged
vincentkoc merged 1 commit into
openclaw:mainfrom
kevin2966n:qa-laptop-qa04-c66ca2f
Aug 23, 2026
Merged

vincentkoc merged 1 commit into
openclaw:mainfrom
kevin2966n:qa-laptop-qa04-c66ca2f

Conversation

@kevin2966n

@kevin2966n kevin2966n commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Closes #114208

What Problem This Solves

Fixes an issue where Windows users triggering a sandbox root-escape diagnostic
would see a host backslash in the container-facing home-path hint.

Why This Change Was Made

The sandbox diagnostic now converts separators only after the workspace root
has been shortened to a ~ home path. Shared host-path formatting, non-home
roots, containment checks, bind behavior, configuration, SDK, and protocol
surfaces remain unchanged.

User Impact

Windows sandbox guidance now shows a usable container path such as
~/workspace-coder, while ordinary host paths retain their native format.

Evidence

  • Native Windows controlled regression on current-main base 7941c05e44e5:
    the test-only change failed twice with actual ~\workspace-coder; the final
    two-file patch passed all 13 focused tests.

  • Native Windows exact-head behavior trace:

    > node --import tsx .tmp-pr114209-proof.mts
    head=3138ccaa2ccfad8713a04d0722e0b5fd17a0ce20
    platform=win32
    Path escapes sandbox root (~/workspace-coder; container root /workspace): C:\openclaw-outside\secret.txt. Use a path under /workspace/ instead.
    

    The temporary proof harness called resolveSandboxFsPathWithMounts directly
    and was removed after the run.

  • Final Windows source hashes matched the published candidate files exactly.

  • POSIX focused and sibling coverage: 55 tests passed, with one Windows-only
    test skipped.

  • oxfmt, targeted oxlint, and git diff --check passed.

  • Max-P1 autoreview found no actionable findings; patch-correct confidence
    0.99.

  • The local changed gate reached core typecheck but the shared dependency tree
    was stale outside this diff; exact-head hosted CI is the authoritative
    typecheck result.

AI-assisted development disclosure: the maintainer rewrite and review used
Codex. The contributor is preserved as co-author.

Punchcard-Session: coral-summit-valley-9r

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: M labels Jul 27, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Jul 27, 2026
@clawsweeper

clawsweeper Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 23, 2026, 1:16 PM ET / 17:16 UTC.

ClawSweeper review

What this changes

The PR formats home-relative sandbox escape hints with POSIX separators for container guidance and adds coverage preserving native formatting for non-home host paths.

Merge readiness

⛔ Blocked until real behavior proof is added - 3 items remain

The focused sandbox display repair is source-correct and still needed because current main retains the Windows backslash in the container-facing hint; merge remains blocked on inspectable final-head Windows behavior proof.

Priority: P2
Reviewed head: 3138ccaa2ccfad8713a04d0722e0b5fd17a0ce20

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The implementation is focused and source-supported, but it is not merge-ready until inspectable after-fix Windows evidence is supplied.
Proof confidence 🧂 unranked krab (1/6) Needs real behavior proof before merge: Needs real behavior proof before merge: attach a redacted native Windows final-head terminal trace, log, or recording that visibly contains the corrected ~/workspace-coder escape hint; the PR body currently only summarizes test results. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: Needs real behavior proof before merge: attach a redacted native Windows final-head terminal trace, log, or recording that visibly contains the corrected ~/workspace-coder escape hint; the PR body currently only summarizes test results. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 5 items Current-main behavior: Current main formats the workspace root immediately after home shortening and interpolates it in the escape diagnostic, leaving a Windows home-relative suffix unchanged.
Owner boundary and caller: The mount resolver owns this diagnostic, and the sandbox filesystem bridge calls it before command execution; the change stays at the display-producing boundary.
Patch and regression coverage: The branch converts separators only for a home-shortened value, while focused tests assert the POSIX home hint and unchanged non-home host format.
Findings None None.
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs src/agents/sandbox/fs-paths.test.ts

Result: PASS (completed)

node scripts/run-vitest.mjs src/agents/sandbox/fs-paths.test.ts
runner@runnervm76f27:/tmp/clawsweeper-live-proof-114209-B2dWkO/target$ node scripts/run-vitest.mjs src/agents/sandbox/fs-paths.test.ts
node scripts/run-vitest.mjs src/agents/sandbox/fs-paths.test.ts
[test] starting test/vitest/vitest.agents-support.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-114209-B2dWkO/target

 ✓  agents-support  src/agents/sandbox/fs-paths.test.ts (13 tests | 1 skipped) 92ms

 Test Files  1 passed (1)
      Tests  12 passed | 1 skipped (13)
   Start at  17:17:49
   Duration  1.30s (transform 1.00s, setup 831ms, import 79ms, tests 92ms, environment 0ms)

[test] passed 1 Vitest shard in 6.00s
runner@runnervm76f27:/tmp/clawsweeper-live-proof-114209-B2dWkO/target$ node scripts/run-vitest.mjs src/agents/sandbox/fs-paths.test.ts



































Assertions:

  • PASS expect_output: Test Files

How this fits together

Sandbox file tools resolve requested paths against host mounts and translate them to container paths. When no mount contains a path, the resolver returns diagnostic guidance pointing the operator to the container workspace.

flowchart LR
A[Tool file request] --> B[Sandbox path resolver]
B --> C{Path inside a mount?}
C -->|Yes| D[Host and container mapping]
C -->|No| E[Escape diagnostic]
E --> F[Home-relative display formatting]
F --> G[Operator container-path guidance]
Loading

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: Needs real behavior proof before merge: attach a redacted native Windows final-head terminal trace, log, or recording that visibly contains the corrected ~/workspace-coder escape hint; the PR body currently only summarizes test results. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - The bug fix has a net three-line production increase; it is appropriately local because changing the shared home formatter would alter host-oriented displays, but the boundary should remain limited to this container-facing diagnostic.
  • Complete next step (P2) - The contributor must provide inspectable after-fix Windows behavior proof; no mechanical repair is indicated.
Agent review details

Security

None.

PR surface

Source +3, Tests +17. Total +20 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 4 1 +3
Tests 1 21 4 +17
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 25 5 +20

Review metrics

Metric Value Why it matters
Production versus test LOC production +4/-1 (net +3); tests +21/-4 (net +17) The small production increase is confined to display formatting, while tests cover both the Windows-facing hint and the unchanged non-home display.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #114208
Summary: This PR is the candidate fix for the linked Windows sandbox diagnostic bug; the neighboring path reports cover different behavior.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the home-only conversion local to the sandbox diagnostic, then attach a redacted native Windows final-head trace showing the corrected escape hint.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the home-only conversion local to the sandbox diagnostic, then attach a redacted native Windows final-head trace showing the corrected escape hint.

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

Yes, from source: on Windows, current main shortens a home path but does not convert its backslash suffix before emitting container guidance; the branch adds a focused assertion for that path.

Is this the best way to solve the issue?

Yes. The resolver owns this container-facing diagnostic, and the home-only condition avoids changing host path rendering or sandbox path policy.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against b977ccb21e2b.

Labels

Label changes:

  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🧂 unranked krab, so this older rating label is no longer current.

Label justifications:

  • P2: This repairs deterministic but limited Windows sandbox diagnostic guidance.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: Needs real behavior proof before merge: attach a redacted native Windows final-head terminal trace, log, or recording that visibly contains the corrected ~/workspace-coder escape hint; the PR body currently only summarizes test results. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Current-main behavior: Current main formats the workspace root immediately after home shortening and interpolates it in the escape diagnostic, leaving a Windows home-relative suffix unchanged. (src/agents/sandbox/fs-paths.ts:316, b977ccb21e2b)
  • Owner boundary and caller: The mount resolver owns this diagnostic, and the sandbox filesystem bridge calls it before command execution; the change stays at the display-producing boundary. (src/agents/sandbox/fs-paths.ts:246, 3138ccaa2ccf)
  • Patch and regression coverage: The branch converts separators only for a home-shortened value, while focused tests assert the POSIX home hint and unchanged non-home host format. (src/agents/sandbox/fs-paths.test.ts:172, 3138ccaa2ccf)
  • History provenance: The rewritten head introduced the formatter change; its parent and older file history are unavailable in this partial clone because required objects would need a network fetch. (src/agents/sandbox/fs-paths.ts:316, 3138ccaa2ccf)
  • Proof gap: The PR body reports Windows red/green runs but provides no inspectable final-head terminal output, log, recording, or artifact showing the corrected diagnostic; the previous completed review identified the same gap.

Likely related people:

  • vincentkoc: Authored the rewritten repair head and submitted the maintainer re-review with the claimed native Windows validation. (role: recent area contributor; confidence: medium; commits: 3138ccaa2ccf; files: src/agents/sandbox/fs-paths.ts, src/agents/sandbox/fs-paths.test.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Attach a redacted native Windows final-head trace containing the corrected escape diagnostic.
  • After updating the PR body, request a fresh ClawSweeper review if one does not start automatically.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (3 earlier review cycles)
  • reviewed 2026-07-27T00:39:16.903Z sha 3777df70561e717a8d5f0999e2925853eb308ee6 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-01T21:35:45.993Z sha 3777df70561e717a8d5f0999e2925853eb308ee6 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-23T17:00:09.552Z sha 3138cca :: needs real behavior proof before merge. :: none

Co-authored-by: kevin2966n <[email protected]>
Punchcard-Session: coral-summit-valley-9r
@vincentkoc
vincentkoc force-pushed the qa-laptop-qa04-c66ca2f branch from 3777df7 to 3138cca Compare August 23, 2026 16:53
@vincentkoc vincentkoc self-assigned this Aug 23, 2026
@vincentkoc vincentkoc changed the title fix(paths): preserve valid agent and sandbox children fix(sandbox): show POSIX path in container escape hint Aug 23, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review August 23, 2026 16:54
@vincentkoc
vincentkoc requested a review from a team as a code owner August 23, 2026 16:54
@vincentkoc

Copy link
Copy Markdown
Member

@clawsweeper re-review

The branch was rewritten from current main for #114208 only. Native Windows
red/green proof, exact final-file hashes, POSIX sibling tests, and max-P1
autoreview evidence are in the updated PR body.

@clawsweeper

clawsweeper Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@clawsweeper

clawsweeper Bot commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 23, 2026
@vincentkoc

Copy link
Copy Markdown
Member

@clawsweeper re-review

The updated PR body now includes an inspectable native Windows exact-head trace
showing platform=win32 and the corrected literal ~/workspace-coder.

@clawsweeper

clawsweeper Bot commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@vincentkoc
vincentkoc merged commit 34d7f44 into openclaw:main Aug 23, 2026
334 checks passed
@vincentkoc

Copy link
Copy Markdown
Member

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 24, 2026
Punchcard-Session: coral-summit-valley-9r

Co-authored-by: Vincent Koc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Windows sandbox diagnostics emit a malformed container path hint

2 participants