Task container backend: put task containers behind one interface #1864
Notifications
Due Date
No due date set.
Blocks
Depends on
Reference: sam/archie#1864
Reference in new issue
Block a user
Problem
Daemon.ContainerPoolis a concrete*container.Pool, an infrastructure type, rather than a domain interface. The daemon callsAcquire,Release,Reown,ContainerAddrsandHostGateway. The last three expose Docker and host details:Reownchowns a host worktree path, andContainerAddrsandHostGatewayexist only to wire the in-process State Store relay to a Docker bridge. That ties the task flow to one local Docker Engine and spreads Docker concerns through the daemon.Wanted
A small
task.Backendinterface ininternal/domain: start a task container from an image, env, workspace reference and network policy; wait for it; stop it and hand the workspace back ready to commit. The Docker Engine pool implements it and owns image pulls, the concurrency cap, the reaper, the sandbox network and relay, worktree ownership and endpoint addressing. The daemon holds only the interface.Only the Docker Engine backend is in scope. Multi-host comes later by adding an existing backend (Kubernetes or Nomad, Docker Cloud Sandboxes, NVIDIA OpenShell) behind the same interface, not by building a node agent or scheduler.
Spec with diagrams: https://claude.ai/artifact/4HdjiJkxpgyEKhPRaT1FiT
Order
ContainerAddrs,HostGatewayand the in-process relay.Done when
daemonimports nointernal/containertype, and holds a domain interface.Reownis part of the backend's stop or hand-back step.Worker nodes: run task sandboxes on more than one hostto Task container backend: put task containers behind one interfaceDecided:
Reowngo, and the Docker backend uses the same path.The workspace part needs its own issue once #1867 lands, since it changes how every task gets its code.
Generated by Claude Code