Skip to content

feat(ai-autopilot): DockerRunner — first sandboxed runner adapter#142

Merged
suleimansh merged 1 commit into
mainfrom
suleimansh/feat/109-docker-runner
Jul 2, 2026
Merged

feat(ai-autopilot): DockerRunner — first sandboxed runner adapter#142
suleimansh merged 1 commit into
mainfrom
suleimansh/feat/109-docker-runner

Conversation

@suleimansh

Copy link
Copy Markdown
Member

Part of #109. Adds DockerRunner, the first sandboxed adapter behind the runner seam.

It boots each workspace as a container via the docker CLI (no npm dependency), so untrusted, agent-authored code runs isolated from the host — its own filesystem, process space, and a published preview port. Same Runner contract as LocalRunner (fs / exec / start / preview / dispose), so it drops in unchanged: new DockerRunner({ image?, previewPort? }).

One real gotcha it handles: preview() probes readiness inside the container, because Docker Desktop's host-side port proxy pre-binds the published port — a host TCP connect returns 'ready' before the server is actually up.

dockerAvailable() reports whether a daemon is reachable, so the suite skips cleanly where there's none (CI stays green). Verified against a live daemon: 15 container tests exercising boot/exec/preview/start/dispose, no leaked containers.

WebContainer and Flue remain parked (still infra-gated) — #109 stays open to track them.

Boots each workspace as a container via the docker CLI (no npm dep),
so untrusted agent code runs isolated from the host: own filesystem,
process space, and a published preview port. Same Runner contract as
LocalRunner (fs/exec/start/preview/dispose), so it drops in behind the
seam unchanged.

preview() probes readiness inside the container, not host-side: Docker
Desktop's port proxy pre-binds the published port, so a host TCP connect
is a false ready. dockerAvailable() lets the suite skip cleanly with no
daemon. Verified against a live daemon (15 container tests).

WebContainer and Flue stay parked.
@suleimansh suleimansh added enhancement New feature or request priority: medium Worth doing, not urgent labels Jul 2, 2026
@suleimansh suleimansh self-assigned this Jul 2, 2026
@suleimansh suleimansh merged commit 0823cfa into main Jul 2, 2026
2 checks passed
@suleimansh suleimansh deleted the suleimansh/feat/109-docker-runner branch July 2, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: medium Worth doing, not urgent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant