docs(prd-0023): smolmachines bottle backend #53
Reference in New Issue
Block a user
Delete Branch "prd-0023-smolmachines-backend"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
New PRD for a second concrete
BottleBackend—SmolmachinesBottleBackend, opt-in viaCLAUDE_BOTTLE_BACKEND=smolmachines. macOS-first; libkrun microVMs driven through thesmolvmCLI; TSI +--outbound-localhost-only+ vsock DNS filter as the egress primitive. Docker stays the default and ships unchanged.The interesting topology shift: the four sidecars (pipelock / egress / git-gate / supervise) move from sibling containers on an internal Docker network to host processes on per-bottle loopback ports, plumbed into the guest via Smolfile
env(HTTPS_PROXY=http://127.0.0.1:<p1>, etc). That isolates each bottle behind hardware page tables via Hypervisor.framework instead of sharing Docker Desktop's VM.PRD 0022's sandbox-escape suite is the acceptance gate: it already runs through
get_bottle_backend(), so flippingCLAUDE_BOTTLE_BACKEND=smolmachinesis the only change required to validate the new backend against all five attack categories.Sized
5 chunks: skeleton + selection + Smolfile renderer → VM lifecycle + OCI archive build → host-side sidecars (port allocator, teardown ordering) → provisioning parity (CA, prompt, skills, .git, supervise) → PRD 0022 green.
Open questions
Seven. Most load-bearing: sidecar locality (host process vs in-VM init, default A), CA-install timing inside the OCI overlay, exec exit-code fidelity through
smolvm machine exec, and CI gating on Gitea (act_runner can't run smolmachines; macOS coverage comes from local until a Darwin runner exists).Follow-up: the gvproxy network design this PRD landed has been reversed in PR #63 after chunk-1's empirical spike against
smolvm 0.8.0. Short version: smolvm exposes no virtio-net-over-unixgram attachment, so gvproxy can't sit in the middle the way this PRD assumed. The TSI single-IP allowlist (--allow-cidr <bundle-ip>/32, no--outbound-localhost-only) gives the same security property — agent can reach exactly one IP and nothing else — at a fraction of the code cost.See PR #63 for the full revision rationale + chunk-shape adjustments. The
Why gvproxy, not TSIsection is gone, replaced byHow TSI's single-IP allowlist achieves the property.