AT-3: Container reconcile reads from agent_type_container #745

Closed
opened 2026-05-02 17:25:15 +00:00 by claude-desktop · 0 comments
Collaborator

As a platform engineer, I want container-reconcile.ts and host-container-lifecycle.ts to read the joined agent_type_container row instead of cfg.types[t].container, so that operator edits to container image / env / lifecycle / idle_stop_seconds land at the next reconcile pass without a restart.

Acceptance criteria

Reconcile path

  • Grep shows zero .container. reads from cfg.types[t] across the reconcile path.
  • infrastructure/container/container-reconcile.ts resolves container settings via getAgentType(t).container.
  • infrastructure/agents/host-container-lifecycle.ts reads through the same resolver.

Migration

  • Existing container.* blocks loaded from agents.json are imported into agent_type_container as scope='builtin' rows on first boot post-deploy (handled by the AT-1 sync, but explicitly verified here).
  • Operator edits at scope='global' / scope='agent_type' are honoured at the next reconcile pass within idle_stop_seconds of the change worst case.

Tests

  • Unit: scope ladder merge for container fields.
  • Integration: editing image at scope='agent_type' for dev triggers a recreate of the dev-default container with the new image on the next reconcile.

Out of scope

  • Lifecycle gauge / hot-vs-lazy semantic changes — out of scope; behaviour preserved.
  • Dashboard CRUD — covered by AT-6.

References

  • Spec: specs/config-to-db.md § Story AT-3.
  • Blocked by: AT-1, AT-2.
As a platform engineer, I want `container-reconcile.ts` and `host-container-lifecycle.ts` to read the joined `agent_type_container` row instead of `cfg.types[t].container`, so that operator edits to container `image` / `env` / `lifecycle` / `idle_stop_seconds` land at the next reconcile pass without a restart. ## Acceptance criteria ### Reconcile path - [ ] Grep shows zero `.container.` reads from `cfg.types[t]` across the reconcile path. - [ ] `infrastructure/container/container-reconcile.ts` resolves container settings via `getAgentType(t).container`. - [ ] `infrastructure/agents/host-container-lifecycle.ts` reads through the same resolver. ### Migration - [ ] Existing `container.*` blocks loaded from agents.json are imported into `agent_type_container` as `scope='builtin'` rows on first boot post-deploy (handled by the AT-1 sync, but explicitly verified here). - [ ] Operator edits at `scope='global'` / `scope='agent_type'` are honoured at the next reconcile pass within `idle_stop_seconds` of the change worst case. ### Tests - [ ] Unit: scope ladder merge for container fields. - [ ] Integration: editing `image` at `scope='agent_type'` for `dev` triggers a recreate of the `dev-default` container with the new image on the next reconcile. ## Out of scope - Lifecycle gauge / hot-vs-lazy semantic changes — out of scope; behaviour preserved. - Dashboard CRUD — covered by AT-6. ## References - Spec: `specs/config-to-db.md` § Story AT-3. - Blocked by: AT-1, AT-2.
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.

Dependencies

No dependencies set.

Reference
charles/claude-hooks#745
No description provided.