Repository navigation
fix(local-container): mount bootstrap script instead of passing inline - #204
Conversation
The 39K bootstrap script was passed as an inline argument to docker run, exceeding Windows CreateProcessW's 32K command-line limit. Write it to a temp file and bind-mount it read-only instead.
|
Codex review: needs maintainer review before merge. Reviewed June 4, 2026, 4:59 AM ET / 08:59 UTC. Summary Reproducibility: yes. from source for the command construction path: current main passes the full bootstrapScript as a docker run argument, and the PR body supplies Windows Docker Desktop before/after terminal output. I did not run Windows Docker Desktop in this review. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Next step before merge
Security Review detailsBest possible solution: Land a narrow local-container startup fix that avoids the Windows command-line limit while preserving the documented local Docker-compatible runtime behavior. Do we have a high-confidence way to reproduce the issue? Yes from source for the command construction path: current main passes the full bootstrapScript as a docker run argument, and the PR body supplies Windows Docker Desktop before/after terminal output. I did not run Windows Docker Desktop in this review. Is this the best way to solve the issue? Yes; moving the script body out of the process command line is the narrow maintainable fix for the Windows CreateProcessW limit. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against c6fef7c90b41. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat 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
|
Summary
The local-container provider's
createContainer()passes a 39K bootstrap shell script as an inline argument todocker run. On Windows, this exceeds the 32K-characterCreateProcessWcommand-line limit, makingcrabbox warmup --provider local-containerfail unconditionally.Write the bootstrap script to a host temp file and bind-mount it read-only into the container instead. This replaces the 39K inline argument with a ~60-character volume mount flag.
Changes: 2 files, +16/-3 lines
internal/providers/localcontainer/backend.go: write bootstrap to temp file, mount as/tmp/crabbox-bootstrap.sh:ro, execute from mountinternal/providers/localcontainer/backend_test.go: update test assertions to check for mounted bootstrap pathAfter-fix proof
Windows Docker Desktop, crabbox built from this branch:
Before this fix, the same command fails with:
Test plan
go build ./...compiles clean (Go 1.26)go test ./internal/providers/localcontainer/ -run TestCreateContainerpasses (5/5, 1 skipped for missing Docker socket)crabbox warmup --provider local-container --desktopsucceeds on Windows Docker Desktopcrabbox job run proof-89834provisions a desktop container and reaches SSH-ready state