Repository navigation
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 26, 2026, 2:35 PM ET / 18:35 UTC. Summary PR surface: Source +65, Tests +274, Docs +2. Total +341 across 13 files. Reproducibility: yes. Current main is source-reproducible: non-shared sandbox scope keys and container names are derived without workspace identity, matching the co-hosted instance collision report. Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the workspace-qualified non-shared scope-key fix once maintainers accept the documented one-time runtime reset and keep shared behavior stable. Do we have a high-confidence way to reproduce the issue? Yes. Current main is source-reproducible: non-shared sandbox scope keys and container names are derived without workspace identity, matching the co-hosted instance collision report. Is this the best way to solve the issue? Yes, with maintainer acceptance of the upgrade reset. Centralizing workspace identity in the non-shared scope key is the maintainable layer because Docker, browser, SSH, skills workspace, and recreate paths already consume that scope contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e5123e44b0f5. Label changesLabel justifications:
Evidence reviewedPR surface: Source +65, Tests +274, Docs +2. Total +341 across 13 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Updated the session matcher follow-up at Changes:
Verification:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review I addressed the two sandbox identity findings:
Added focused regressions for default-prefix container collisions and shared SSH id stability. Verification passed locally:
|
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing due to inactivity. |
|
Superseded by #115766, landed as 30346f9. A replacement PR was necessary because this branch was already closed and |
What Problem This Solves
Agent-scoped sandboxes currently key reuse only by agent/session identity. In multi-tenant deployments, the same agent id can be used across separate customer workspaces, so a non-shared sandbox may be reused with the wrong workspace/container identity. This scopes non-shared sandbox lifetime keys by resolved workspace path while preserving shared sandbox behavior.
Summary
openclaw sandbox recreate --session <key>to match the new internal:workspace:<hash>session suffix only when it belongs to the requested raw session keyEvidence
node scripts/run-vitest.mjs src/commands/sandbox.test.ts src/agents/sandbox.resolveSandboxContext.test.ts src/agents/sandbox/docker-backend.test.ts src/agents/sandbox/ssh-backend.test.tspassed locallypnpm exec oxfmt --check --threads=1 src/commands/sandbox.ts src/commands/sandbox.test.tspassed locallynode scripts/run-oxlint.mjs src/commands/sandbox.ts src/commands/sandbox.test.tspassed locallypnpm tsgo:corepassed locallypnpm tsgo:core:testpassed locallygit diff --checkpassed locallyReal Behavior Proof
Fresh proof collected 2026-06-26 by exercising the exported production Docker backend path:
ensureSandboxContainer(...)plusresolveSandboxScopeKey(...), using the same raw session key and two distinct workspace roots. The temporary proof script used the already-local Docker imagepgvector/pgvector:pg16only to avoid a registry pull; the OpenClaw container naming, label, config-hash, registry, and cleanup code paths were unchanged.Command used:
node_modules/.bin/tsx tmp/proof-96866.mtsRedacted captured output:
{ "rawSession": "agent:proof:session", "workspaceA": "<workspace-a>", "workspaceB": "<workspace-b>", "scopeA": "agent:proof:session:workspace:a9d219c1", "scopeB": "agent:proof:session:workspace:ebaf544b", "slugA": "agent-proof-session-workspace-a9d219c1-6c6522e6", "slugB": "agent-proof-session-workspace-ebaf544b-bae62cf4", "containerA": "/oc-proof-96866-agent-proof-session-workspace-a9d219c1-6c6522e6", "containerB": "/oc-proof-96866-agent-proof-session-workspace-ebaf544b-bae62cf4", "labelA": "agent:proof:session:workspace:a9d219c1", "labelB": "agent:proof:session:workspace:ebaf544b", "sameRawSession": true, "distinctScopeKeys": true, "distinctContainers": true, "labelsMatchScopeKeys": true }Observed result: the same raw agent/session in two workspace roots produced two distinct non-shared scope keys, two distinct Docker container names retaining the workspace hash, and Docker
openclaw.sessionKeylabels matching the workspace-scoped keys. The temporary containers were removed at the end of the proof run.Notes
openclaw sandbox recreateor aged out through the existing sandbox prune path.