test: add test-sandbox.sh, the Docker Sandboxes field test #125

Merged
pti merged 1 commit from feat/test-sandbox-sh into main 2026-11-05 15:12:21 +01:00
Owner

Adds test-sandbox.sh, the Docker Sandboxes counterpart of test-container.sh, closing the last Phase 2 item of design/harness/docker-sandbox-runtime.md. Run on the host from the root of a scratch repository that wraptool up --runtime=sbx brought up. It derives the sandbox name as up does, reads the server URL and bearer token from the harness config up wrote, and runs one POSIX sh probe through sbx exec from an agent-less client with stdin closed. The probe checks: workspace mounted at its host path, host .ssh .gnupg and .config/wraptool not visible, no SSH agent answers, bearer token absent from the sandbox environment, pool runtime mount read-only and holding the harness dispatcher, pool home writable, review UI port and localhost:22 refused through the proxy, one policed MCP tool call succeeds over SSE. The host side checks that the file left in pool home is owned by the host user. RESULT lines carry the verdicts so sbx chatter is shown but never parsed. Dry-run locally against a fake sbx. Not yet run against a real sandbox, which needs the host. Also updates CLAUDE.md, CHANGELOG.md and the design doc status. 🤖 Generated with Claude Code

Adds test-sandbox.sh, the Docker Sandboxes counterpart of test-container.sh, closing the last Phase 2 item of design/harness/docker-sandbox-runtime.md. Run on the host from the root of a scratch repository that wraptool up --runtime=sbx brought up. It derives the sandbox name as up does, reads the server URL and bearer token from the harness config up wrote, and runs one POSIX sh probe through sbx exec from an agent-less client with stdin closed. The probe checks: workspace mounted at its host path, host .ssh .gnupg and .config/wraptool not visible, no SSH agent answers, bearer token absent from the sandbox environment, pool runtime mount read-only and holding the harness dispatcher, pool home writable, review UI port and localhost:22 refused through the proxy, one policed MCP tool call succeeds over SSE. The host side checks that the file left in pool home is owned by the host user. RESULT lines carry the verdicts so sbx chatter is shown but never parsed. Dry-run locally against a fake sbx. Not yet run against a real sandbox, which needs the host. Also updates CLAUDE.md, CHANGELOG.md and the design doc status. 🤖 Generated with Claude Code
test: add test-sandbox.sh, the Docker Sandboxes field test
All checks were successful
Lint / lint (pull_request) Successful in 1m22s
Lint / sonarqube (pull_request) Has been skipped
472fe7516a
The counterpart of test-container.sh for `wraptool up --runtime=sbx`
(design/harness/docker-sandbox-runtime.md §9 Phase 2, §17 item 11). It
runs on the host from the root of the repository that owns the sandbox,
derives the sandbox name the way `up` does, reads the server URL and
bearer token from the harness config `up` wrote, and runs one POSIX sh
probe through `sbx exec` from an agent-less client with stdin closed.

The probe asserts: the workspace is mounted at its host path; the host
~/.ssh, ~/.gnupg and ~/.config/wraptool are not visible; no SSH agent
answers (the same probe `up` uses); the bearer token is absent from the
sandbox environment; the pool runtime/ mount is read-only and holds the
harness dispatcher; pool home/ is writable; the review UI port and
localhost:22 are refused through the proxy; and one policed MCP tool
call succeeds over the legacy SSE stream. The host side then checks
that the file the probe left in pool home/ is owned by the host user.

Results come back as RESULT lines, so sbx's own chatter on stdout is
shown as context and never parsed. Exit 0 when nothing failed, 2 on a
prerequisite error. Not run in CI: the guix runner has no microVM.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
pti merged commit 3a115ae599 into main 2026-11-05 15:12:21 +01:00
pti deleted branch feat/test-sandbox-sh 2026-11-05 15:12:22 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pti/wraptool!125
No description provided.