Containerized runner: rootless podman spawn tracer bullet #205
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/coding-lab#205
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
What to build
First end-to-end containerized run. Per the 2026-07-22 container-isolation design: rootless podman + crun, tmux stays host-side, the pane command becomes
podman run -it(replacing the prlimit wrapper).repos.runnersetting,container|host, end to end: migration, agent-visible config, repo-settings UI. Host mode is break-glass and labeled "unsandboxed — full host access" in the UI. Container is the intended default once stable; ship with host default behind readiness of preflight.podman run -it --rmwith mount inventory — worktree rw and bare repo rw at their host-identical paths,agent.sock(from #201), instance HOME (from #202) at/home/agent, per-run runtime dir (materialized git creds, dialog spool, --settings file), tools image via--mount type=image(from #203) with PATH prepend.--userns=keep-idso the server can tail files. pasta netns: full egress, no host route.-evars (spawnEnv set), nothing inherited.--memory=8g --pids-limit=4096 --ulimit nofile=16384:16384as global config defaults with per-repo override; prlimit wrapper retired for container runs.Integration test must skip gracefully where rootless podman is unavailable (lab dev sandbox); unit-test the argv/mount construction and preflight thoroughly.
Acceptance criteria
Blocked by
Agent Brief
Category: enhancement
Summary: First end-to-end containerized run: rootless podman + crun, tmux stays host-side, the pane command becomes
podman run -it --rmbehind arepos.runner(container|host) setting.The issue body's "What to build" and acceptance-criteria checklist are the authoritative spec (grilled 2026-07-22). This brief adds the interface map, verification notes, and scope fences.
Current behavior:
There is no container code in the repo. Panes run the provider CLI directly on the host, wrapped by the tmux wrapper's prlimit nofile cap. The launch path assembles
spawnEnv, materializes per-run git credentials into the runtime dir, and the tailer reads transcripts from provider paths (per-run HOME once #202 lands).Desired behavior:
Per the issue body:
repos.runnerend to end with host mode labeled "unsandboxed — full host access"; the container argv with the full mount inventory (worktree + bare at host-identical paths, agent.sock from #201, instance HOME from #202 at /home/agent, per-run runtime dir, tools image from #203 via--mount type=imagewith PATH prepend);--userns=keep-id; pasta netns with egress but no host route; explicit-eenv only; memory/pids/nofile limits as global defaults with per-repo override; startup preflight refusing container spawns with actionable errors; pre-push hook finding labctl on the injected PATH; liveness/stop/kill semantics preserved (container dies with the pane, survives server restart, stop tears it down).Key interfaces:
hostyields today's prlimit-wrapped command andcontaineryields the podman argv; the prlimit wrapper is retired for container runs only.repos.runner— follow the established per-repo settings slice: paired sqlite/postgres migrations, the repo PATCH settings-update surface, and a repo-settings UI section with the unsandboxed warning.--memory/--pids-limit/--ulimit nofile.Verification notes:
The lab agent sandbox has no rootless podman: the integration test must detect that and skip gracefully, while argv/mount construction and preflight logic are unit-tested exhaustively. The full-loop acceptance criterion (spawn → chat → labctl over socket → push with hook scan → stop cleanup) and the in-container reachability assertions will be validated by the maintainer on the dev host — say so in the PR rather than claiming e2e verification.
Acceptance criteria: the checklist in the issue body.
Out of scope:
container— ship withhostdefault until preflight is proven on the dev host.Blocked by
(recorded in the issue body: #201, #202, #203)