A repo whose gate needs Docker cannot run its gate inside the agent container #1115

Closed
opened 2026-10-27 13:39:04 +00:00 by sam · 1 comment
Owner

The repo-policy gate is executed INSIDE the agent container: the implement workflow's baseline stage runs each gate argv with exec.CommandContext in the worktree, and the same command list is handed to the in-container agent loop as GateCommand. Any command list ending in a full 'go test ./...' needs a Docker daemon for every package whose TestMain calls pgtest.Main (~14 packages: webui, daemon, gateway, domain/workflow, app/archied, app/agentworker, app/controlplane, app/archieui, infrastructure/{staterpc,captureintake,taskactions,postgres,postgres/pgstore}). Inside the container there is no Docker socket, and pgtest treats an unstartable container as a TEST FAILURE, not a skip, so the gate is red on a clean tree. Evidence from a deployment task log: 'pgtest: start postgres:18 (is Docker running?): ... rootless Docker not found, failed to create Docker provider' followed by 'FAIL internal/webui' and the whole run parking at the baseline stage. Consequence: the repository cannot be worked by its own agent at all, at any task, because every run dies before doing real work. '-short' is not an escape: exactly one file in the tree honours testing.Short(), and pgtest does not. There is also no per-repo execution mode, so the gate cannot currently be routed to the host that does have Docker. NOTE: docs/architecture/agent-system.md lists gates as 'resolved for the WorkflowExecution and enforced outside the agent', which may be the intended design that the implementation does not deliver - verify that reading before choosing a fix.

Acceptance criteria

a repo whose gate requires resources only the host has can be gated: either gate execution is routed outside the container, or the repository policy distinguishes container-safe gate commands from host-only ones; a Docker-dependent gate no longer parks every task before its first stage

Close reason

Not relevant: the test suite that needed Docker was deleted; the gate no longer starts Postgres.


Imported from beads archie-core-71mq · GitHub #1420 · type bug · priority P1 · created 2026-10-01 · closed 2026-10-03

The repo-policy gate is executed INSIDE the agent container: the implement workflow's baseline stage runs each gate argv with exec.CommandContext in the worktree, and the same command list is handed to the in-container agent loop as GateCommand. Any command list ending in a full 'go test ./...' needs a Docker daemon for every package whose TestMain calls pgtest.Main (~14 packages: webui, daemon, gateway, domain/workflow, app/archied, app/agentworker, app/controlplane, app/archieui, infrastructure/{staterpc,captureintake,taskactions,postgres,postgres/pgstore}). Inside the container there is no Docker socket, and pgtest treats an unstartable container as a TEST FAILURE, not a skip, so the gate is red on a clean tree. Evidence from a deployment task log: 'pgtest: start postgres:18 (is Docker running?): ... rootless Docker not found, failed to create Docker provider' followed by 'FAIL internal/webui' and the whole run parking at the baseline stage. Consequence: the repository cannot be worked by its own agent at all, at any task, because every run dies before doing real work. '-short' is not an escape: exactly one file in the tree honours testing.Short(), and pgtest does not. There is also no per-repo execution mode, so the gate cannot currently be routed to the host that does have Docker. NOTE: docs/architecture/agent-system.md lists gates as 'resolved for the WorkflowExecution and enforced outside the agent', which may be the intended design that the implementation does not deliver - verify that reading before choosing a fix. ### Acceptance criteria a repo whose gate requires resources only the host has can be gated: either gate execution is routed outside the container, or the repository policy distinguishes container-safe gate commands from host-only ones; a Docker-dependent gate no longer parks every task before its first stage ### Close reason Not relevant: the test suite that needed Docker was deleted; the gate no longer starts Postgres. --- _Imported from beads `archie-core-71mq` · GitHub #1420 · type bug · priority P1 · created 2026-10-01 · closed 2026-10-03_
sam added the highbug labels 2026-10-27 13:39:04 +00:00
sam self-assigned this 2026-10-27 13:39:04 +00:00
sam closed this issue 2026-10-27 13:39:05 +00:00
Author
Owner

sam wrote (originally 2026-10-03):

gate_host host-execution approach parked on branch fix/71mq-gate-host (df61f1a1) for review; alternative under consideration: separate or drop the pgtest packages from the main gate.

_sam wrote (originally 2026-10-03):_ gate_host host-execution approach parked on branch fix/71mq-gate-host (df61f1a1) for review; alternative under consideration: separate or drop the pgtest packages from the main gate.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1115