fix: Found one reliability bug: the new Docker-daemon-unavailable bran#74520
Conversation
|
Codex review: found issues before merge. What this changes: The PR changes Docker sandbox image preflight to throw a formatted Docker-daemon-unavailable error, updates browser image preflight similarly, and adds focused regression tests for Docker-unavailable and sandbox.mode off paths. Maintainer follow-up before merge: This is an open implementation PR on secops-owned sandbox behavior with one concrete review finding; maintainer/secops should review and decide whether to update this branch rather than queueing an automated replacement branch. Security review: Security review cleared: The diff touches security-sensitive sandbox execution code, but I found no concrete supply-chain, secret-handling, permission-broadening, or sandbox-bypass concern. Review findings:
Review detailsBest possible solution: Update the PR so Docker-daemon-unavailable handling is consistent across Docker image inspection and browser network setup, then land it with regression coverage proving disabled sandbox sessions never initialize Docker and enabled Docker/browser sandboxes fail with actionable daemon-unavailable messages. Full review comments:
Overall correctness: patch is incorrect Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 3059702687da. |
openclaw#74520) Co-authored-by: openclaw-clawsweeper[bot] <280122609+openclaw-clawsweeper[bot]@users.noreply.github.com>
openclaw#74520) Co-authored-by: openclaw-clawsweeper[bot] <280122609+openclaw-clawsweeper[bot]@users.noreply.github.com>
Summary
Found one reliability bug: the new Docker-daemon-unavailable branch is handled at the image-inspection helper, but the production callers immediately continue into Docker operations that still fail.
What ClawSweeper Is Fixing
docker create(bug)src/agents/sandbox/docker.ts:308inspectDockerImage()now returns"unavailable"for daemon/socket errors, andensureDockerImage()treats that the same as"exists"by returning. The only production caller iscreateSandboxContainer(), which immediately builds container args and runsexecDocker(args)/docker createatsrc/agents/sandbox/docker.ts:522, thendocker startatsrc/agents/sandbox/docker.ts:523. The browser helper repeats the same pattern:ensureSandboxBrowserImage()returns on daemon-unavailable errors atsrc/agents/sandbox/browser.ts:137, butensureSandboxBrowser()continues todocker createatsrc/agents/sandbox/browser.ts:336.docker image inspect, but the session still fails on the next Docker command. For sandbox-enabled users, daemon-unavailable errors are also delayed into lower-context container creation instead of being reported as Docker unavailable.ensureDockerImage()/ensureSandboxBrowserImage(). Gate the unintended sandbox-off call path before Docker is touched, and keep daemon-unavailable as an actionable error when a Docker backend is actually required. Add an end-to-end regression test forsandbox.mode: "off"cron/sub-agent startup that asserts no Docker command is invoked.Expected Repair Surface
src/agents/sandbox/docker.tssrc/agents/sandbox.tssrc/agents/sandbox/browser.tssrc/agents/sandbox/docker.test.tssrc/commands/doctor-sandbox.tsSource And Review Context
ClawSweeper report: https://github.com/openclaw/clawsweeper/blob/main/records/openclaw-openclaw/commits/2dadc82cf4537a3bfb3b8d4b9930a5eb9eef2369.md
Commit under review: 2dadc82
Latest main at intake: 2a7d83b
Original commit author: edge_kase
GitHub author: @kaseonedge
Highest severity: medium
Review confidence: high
Diff:
e46dccb353744ab5340b3b66999cc06bd4b5397a..2dadc82cf4537a3bfb3b8d4b9930a5eb9eef2369Changed files:
src/agents/sandbox.ts,src/agents/sandbox/browser.ts,src/agents/sandbox/docker.test.ts,src/agents/sandbox/docker.ts,src/commands/doctor-sandbox.tsCode read: sandbox config/runtime resolution, Docker backend creation, sandbox browser creation, doctor sandbox repair path, cron embedded runner sandbox key path
GitHub context: PR fix(sandbox): gracefully handle Docker daemon unavailability when sandbox mode is off #73671 and issue [Bug]: sandbox.mode: "off" still triggers Docker capability probe for cron/heartbeat/sub-agent sessions — causes failures when Docker daemon is unavailable #73586 via
ghExpected validation
pnpm check:changedClawSweeper already ran:
pnpm installbecausenode_moduleswas missing.pnpm test src/agents/sandbox/docker.test.ts src/commands/doctor-sandbox.warns-sandbox-enabled-without-docker.test.ts src/agents/sandbox.resolveSandboxContext.test.tspassed.pnpm test src/agents/sandbox/browser.create.test.ts src/agents/sandbox/docker.config-hash-recreate.test.ts src/agents/sandbox/docker-backend.test.tspassed.pnpm test src/commands/doctor.warns-per-agent-sandbox-docker-browser-prune.e2e.test.ts src/commands/doctor-sandbox.warns-sandbox-enabled-without-docker.test.tspassed.28.0.4; default sandbox image missing produced the expectedNo such imageresponse.Known review limits:
ClawSweeper Guardrails
mainbefore changing code.ClawSweeper 🐠 replacement reef notes:
fish notes: model gpt-5.5, reasoning medium; reviewed against 3c06a36.