You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 287c4f9
Browse filesBrowse the repository at this point in the historyBrowse files
Replace Incus sandbox with Docker OverlayFS (#503)
* feat: evidence-gated plans and Docker OverlayFS sandbox backend
Plan execution no longer treats checkboxes as proof: announce_plan requires
outcome/verify/verify_kind, update_plan(complete) runs the phase verify
command, and announce_completion writes PLAN.md Results before leaving
execution mode.
Add a Docker sandbox backend that composes overlay inside session
containers using the sandbox-base entrypoint contract (not Incus-in-Docker).
BackendKindDocker is registered but not yet the default.
* feat(sandbox): default to Docker OverlayFS for CLI, setup, and Studio
astonish sandbox status/init and the setup wizard use Docker instead of
Incus. Empty sandbox.backend now selects docker and Studio wires it
through the backend-agnostic pool. Explicit sandbox.backend: incus still
works until that backend is removed.
* feat(sandbox): Docker browser wiring and session CLI
Studio browser tools use WireBackendBrowserManager for Docker as well as
K8s. astonish sandbox list/create/shell/destroy/prune talk to Docker
session containers instead of Incus.
* feat(sandbox): Docker reset and save-session-as-layer
astonish sandbox reset re-seeds @base from the sandbox-base image.
astonish sandbox save captures the session upper as a content-addressed
overlay layer.
* feat(sandbox): convert remaining CLI and drill off Incus
Template/refresh/cp now talk to the Docker OverlayFS backend: named
layers are aliases of captured uppers, refresh re-seeds @base, and
cp pulls through astonish-shell so files come from the composed
rootfs. Drill CLI provisions via BackendPool and wires in-container
Chromium through WireBackendBrowserManager.
* feat(sandbox): route Studio, chat, and daemon off Incus
Legacy sandbox.backend: incus now aliases to docker. Chat factory,
Studio sandbox/status/init/proxy/VNC, template tools, and daemon
prune/file-read use the OverlayFS backend. save/use_sandbox_template
and run_drill take the backend pool path instead of LazyNodeClient.
* fix(sandbox): ignore leftover Incus base config on Docker
Studio treated Incus base_config JSON as a live layer (Configured,
layer none, 0 B) and BuildTemplate failed because @base/rootfs was
never seeded. Docker now seeds @base from the sandbox-base image
before a first build, GET reports overlay_ready/legacy_config, and
the admin UI shows Needs rebuild instead of Configured.
* fix(sandbox): apply HWCAP mask during CloakBrowser base builds
Apple Silicon Docker VMs advertise ARMv9 features CloakBrowser cannot
execute. The template already compiled hwcap_mask.so but only used it
at Incus browser launch, so cloakbrowser.ensure_binary() died with
SIGILL (exit 132) at build step 26. Install the shim in ld.so.preload
and LD_PRELOAD the download step; Docker OverlayFS launches do the same.
* fix(sandbox): make apt/dpkg work in Docker OverlayFS base builds
Core apt-get install failed with dpkg error 2 because fuse-overlayfs
rejects apt's _apt sandbox user and docker.io's postinst tries to
start systemd. Write overlay apt policy (root sandbox, unsafe-io,
policy-rc.d 101) before package steps and include stdout in step
errors so the real dpkg line is not dropped.
* fix(sandbox): show apt E: lines instead of truncated package lists
Step-2 failures dumped the last 2.5KB of apt's package list and hid
the real error on stderr. Prefer E:/dpkg error lines in the Studio
message, and fail fast with a clear hint if the overlay has under 2GB
free. Package set is unchanged (docker.io stays in core tools).
* fix(sandbox): stream base-layer build steps to Studio as they run
The configure UI listed every step up front, then went silent while
apt ran inside docker exec. PID 1 only sleeps, so docker logs looked
stuck. Report each BuildTemplate step through Progress as it starts.
* fix(sandbox): survive CloakBrowser SIGSEGV after a successful download
Step 26 downloaded chrome then exited 139. The chrome path in the
Studio error was ensure_binary stdout concatenated with a later
segfault, not a launched browser.
Stop resolving getauxval via dlsym(RTLD_NEXT) from the HWCAP preload
shim (NULL/self-recursion under ld.so.preload). Cache /proc/self/auxv
instead. Treat the install step as success when chrome exists on disk
even if Python dies at shutdown.
* fix(sandbox): stream overlay capture instead of a /tmp tar copy
Base rebuilds finished all 30 steps then died capturing the layer:
tar could not write /tmp/astn-layer.tar (ENOSPC). That second copy
of the overlay is 1–2GB on the Docker VM disk, which was already
full of leaked anonymous overlay volumes from docker rm without -v.
Stream tar through a POSIX fifo onto the layers volume, name and
delete overlay volumes with the session, and prune dangling ones
before the next build.
* fix(sandbox): create capture fifo on /dev/shm, not the layers bind mount
mkfifo on /mnt/astonish-layers failed with EPERM because that path is a
Docker Desktop virtiofs mount of the Mac host. Keep the fifo on tmpfs
(/dev/shm, falling back to /tmp) and still extract the layer onto the
layers volume so capture does not need a full tar copy.
* fix(sandbox): retry CloakBrowser download and cache it on the layers volume
GitHub 504s on the linux-arm64 tarball aborted the last install step after
a full apt run. Retry ensure_binary, fall back to curl --retry with resume,
and keep a successful extract on /mnt/astonish-layers/.cache (host bind
mount, not the overlay upper) so the next rebuild can skip the network.
* fix(sandbox): make overlay capture finish on Colima instead of vanishing
The 30 install steps were fine. Capture then ran a fifo+tee+xattrs
extract of a 1–2GB overlay onto a Mac virtiofs bind mount with no SSE
writes. That copy can deadlock or OOM an 8GiB VM; when the Studio
request dies the build container is deleted and the UI keeps the last
"Capturing overlay layer..." line because a dropped stream was not an
error.
Hash and extract as two tar pipelines (no fifo, no /tmp tar). Skip
xattrs on Docker virtiofs. Heartbeat SSE every 15s. Treat a stream
that ends without done/error as a build failure.
* fix(sandbox): do not abort overlay capture when the Studio SSE drops
Capture was copying ~3GB and still running when the live log died at
~2 minutes. Vite's /api proxy defaults to a 120s timeout; that closed
the POST, cancelled r.Context(), SIGTERM'd docker exec, and the bash
EXIT trap deleted the staging dir. Studio then reported a dropped
stream as a hard failure.
Run the rebuild on a context that outlives the HTTP request, persist
with that context, raise the Vite proxy timeout, and if the log drops
poll /status until the server finishes or a layer is saved.
* fix(sandbox): capture overlay on the host instead of virtiofs-in-VM
In-container tar extract onto the Mac layers bind mount was dying
after the live log dropped, so polling only saw "no new base layer"
and the real tar error was discarded. Stream `tar -cf -` out of the
build container and extract on the host filesystem in one pass, skip
device nodes virtiofs cannot store, record the capture error on
GET /status, and report copied megabytes in the progress heartbeat.
* fix(sandbox): stop APFS HEAD/head clobber from breaking in-container Chrome
Host-side layer extract onto macOS APFS folded libwww-perl HEAD onto
coreutils /usr/bin/head. The browser launch script then piped find to
head, failed to resolve CloakBrowser, and left CDP unbound even though
the session and chrome binary were present.
Skip GET/HEAD/POST (and other case collisions) when extracting layers,
and resolve chrome via glob instead of find|head. Fall back to Xvfb if
KasmVNC fails to start.
* fix(sandbox): resolve Docker overlay sessions for in-container browser
WireBackendBrowserManager treated an empty PodName as "no sandbox",
but Docker records ContainerName. Accept either field, persist both
on Docker session rows, and re-record already-running containers
after Studio restart.
* chore(sandbox): stop building the astonish-incus image
Incus is no longer a sandbox backend. Remove the Docker image, Makefile and
CI targets, and current-state docs that still described Docker+Incus.
sandbox.backend: incus remains a legacy alias for docker.
* refactor(sandbox): delete the Incus backend
Move CloakBrowser install commands, distro types, and launch-script
builders into pkg/sandbox. Local sessions stay on Docker OverlayFS;
Kubernetes and OpenShell are unchanged. sandbox.backend: incus still
aliases to docker.
Copy file name to clipboardExpand all lines: AGENTS.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
## Project overview
4
4
5
-
Astonish is an AI-agent platform distributed as one Go binary. It supports a local coding TUI, a remote multi-tenant chat/platform, HTTP/SSE APIs, reusable flows, tools/MCP, memory, browser automation, fleet orchestration, and isolated execution through Incus, Kubernetes, or OpenShell backends. The Studio UI is a React SPA embedded into the Go binary.
5
+
Astonish is an AI-agent platform distributed as one Go binary. It supports a local coding TUI, a remote multi-tenant chat/platform, HTTP/SSE APIs, reusable flows, tools/MCP, memory, browser automation, fleet orchestration, and isolated execution through Docker OverlayFS, Kubernetes, or OpenShell backends. The Studio UI is a React SPA embedded into the Go binary.
6
6
7
7
The repository is primarily:
8
8
@@ -26,7 +26,7 @@ Before changing a subsystem, read the nearest nested `AGENTS.md`; those files co
26
26
-[`pkg/memory/`](pkg/memory/AGENTS.md), `pkg/session/`, `pkg/fleet/`, `pkg/drill/`, `pkg/channels/` — major domain subsystems.
27
27
-[`pkg/scheduler/`](pkg/scheduler/AGENTS.md) — scheduled-job registration and execution.
28
28
-[`web/src/api/`](web/src/api/AGENTS.md), [`web/src/components/chat/`](web/src/components/chat/AGENTS.md) — Studio transport contracts and chat rendering/interaction guidance.
29
-
-`pkg/sandbox/` — backend-neutral sandbox contracts plus Incus/Kubernetes/OpenShell implementations. `Backend` implementations must be concurrency-safe and lifecycle methods are intentionally idempotent.
29
+
-`pkg/sandbox/` — backend-neutral sandbox contracts plus Docker OverlayFS / Kubernetes / OpenShell implementations. `Backend` implementations must be concurrency-safe and lifecycle methods are intentionally idempotent.
30
30
-`ent/{platform,org,team,personal}/` — four persistence scopes. Only `schema/*.go` and `generate.go` are normally hand-edited; the remaining Ent files are generated.
31
31
-`web/src/` — Studio SPA. Entry points are `main.tsx` and `App.tsx`; `api/` contains REST/SSE clients and `components/` contains UI.
0 commit comments