AR-5 — Delete legacy host-mode infrastructure #1200

Closed
opened 2026-05-15 12:40:12 +00:00 by architect · 1 comment
Collaborator

Why

After #1199 retires role: "host" and is_host_mode, the supporting infrastructure (HOST_MODE_TYPES allowlist, HostContainerLifecycle adapter, getArchitectWorker host filter, dockerRun host_mode branch) is unused scaffolding. Delete it; the architect agent is just another container.

Goal

  • Every line of code that exists because architect used to be host-mode is gone.
  • Mount-profile uniformity: every container gets the same bind set. Architect doesn't use the extra binds but they're harmless. Simpler code wins.

Acceptance criteria

  • HOST_MODE_TYPES allowlist (config loader gate) — deleted.
  • HostContainerLifecycle adapter — deleted.
  • getArchitectWorker's host_mode filter — deleted. The function just looks up the architect agent by name like any worker lookup.
  • dockerRun's if (host_mode) { collapse_to_credentials_bind_only } branch — deleted. Every type gets the standard bind set.
  • architect-dockerize.md note about "the bind-mount set collapses to the single credentials bind" is updated to reflect the uniform-mount reality, or the relevant section is dropped.
  • No grep hit for HOST_MODE_TYPES, HostContainerLifecycle, host_mode, getArchitectWorker.*host in the codebase.

Tests

  • dockerRun unit test: emitting docker run argv for architect produces the same bind set as for dev (no host_mode collapse).
  • reconcileOne("architect-default") test: still works exactly like every other agent; output is uniform with reconcileOne("dev-1").
  • No regression in the architect container's actual behaviour — the extra binds are harmless because the architect process never writes to them.

Out of scope

  • The dashboard UI changes (#1201 / #1202).
  • Reworking the per-type container config schema (a mounts: "credentials-only" | "full" knob was considered and rejected in favour of uniform mounts).

References

  • apps/server/src/infrastructure/container/docker-run.ts (or wherever dockerRun lives)
  • apps/server/src/shared/config/webhook-config.ts::HOST_MODE_TYPES
  • apps/server/src/infrastructure/container/host-container-lifecycle.ts
  • apps/server/src/domain/architect/get-architect-worker.ts
  • specs/architect-dockerize.md

Depends on

#1199 — this story removes the consumers; #1199 removes the producer.

Tracker

#1203

## Why After #1199 retires `role: "host"` and `is_host_mode`, the supporting infrastructure (`HOST_MODE_TYPES` allowlist, `HostContainerLifecycle` adapter, `getArchitectWorker` host filter, `dockerRun` host_mode branch) is unused scaffolding. Delete it; the architect agent is just another container. ## Goal - Every line of code that exists because architect used to be host-mode is gone. - Mount-profile uniformity: every container gets the same bind set. Architect doesn't use the extra binds but they're harmless. Simpler code wins. ## Acceptance criteria - [ ] `HOST_MODE_TYPES` allowlist (config loader gate) — deleted. - [ ] `HostContainerLifecycle` adapter — deleted. - [ ] `getArchitectWorker`'s host_mode filter — deleted. The function just looks up the architect agent by name like any worker lookup. - [ ] `dockerRun`'s `if (host_mode) { collapse_to_credentials_bind_only }` branch — deleted. Every type gets the standard bind set. - [ ] `architect-dockerize.md` note about "the bind-mount set collapses to the single credentials bind" is updated to reflect the uniform-mount reality, or the relevant section is dropped. - [ ] No grep hit for `HOST_MODE_TYPES`, `HostContainerLifecycle`, `host_mode`, `getArchitectWorker.*host` in the codebase. ## Tests - [ ] `dockerRun` unit test: emitting `docker run` argv for architect produces the same bind set as for `dev` (no host_mode collapse). - [ ] `reconcileOne("architect-default")` test: still works exactly like every other agent; output is uniform with `reconcileOne("dev-1")`. - [ ] No regression in the architect container's actual behaviour — the extra binds are harmless because the architect process never writes to them. ## Out of scope - The dashboard UI changes (#1201 / #1202). - Reworking the per-type `container` config schema (a `mounts: "credentials-only" | "full"` knob was considered and rejected in favour of uniform mounts). ## References - `apps/server/src/infrastructure/container/docker-run.ts` (or wherever `dockerRun` lives) - `apps/server/src/shared/config/webhook-config.ts::HOST_MODE_TYPES` - `apps/server/src/infrastructure/container/host-container-lifecycle.ts` - `apps/server/src/domain/architect/get-architect-worker.ts` - `specs/architect-dockerize.md` ## Depends on #1199 — this story removes the consumers; #1199 removes the producer. ## Tracker #1203
Author
Collaborator

🤖 Auto-assigned to code-lead (heuristic: area:infra + body mentions systemd/docker/reconcile — code-lead (architecture)). Reply /unassign to reroute.

🤖 Auto-assigned to **code-lead** (heuristic: area:infra + body mentions systemd/docker/reconcile — code-lead (architecture)). Reply `/unassign` to reroute.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
charles/agent-hooks#1200
No description provided.