fix(justfile): iterate SQLite instance names for container ops #108

Merged
code-lead merged 1 commit from fix/justfile-instance-names into main 2026-04-19 23:06:53 +00:00
Collaborator

Summary

After #48's seed migration, every type has a <type>-default instance and the service addresses containers as claude-hooks-<instance>. The justfile still iterated types | keys[] and built claude-hooks-<type>, so just containers-rebuild / up / down / logs / shell / smoke all targeted non-existent container names.

Hit live today: dev + boss dispatches failed with container claude-hooks-dev-default is not running. Unblocked by hand-renaming. This PR fixes the recipes so the next containers-rebuild works without manual intervention.

Changes

Under the current seed convention (one instance per type, suffix -default):

  • Iterate types from agents.json, derive instance = <type>-default.
  • Container: claude-hooks-<instance>. Volume: claude-hooks-<instance>-state.
  • Token file + credentials bind-dir stay keyed on type (shared across that type's instances — explicit milestone non-goal).
  • NAME arg accepts either a type (auto-suffixed) or a full instance name (used verbatim), so just containers-rebuild boss still works as before.

Once #52 lands with a SQLite-aware container reconciler, the derivation here can be replaced with a direct DB read.

Test plan

  • just qa — 352 pass, 0 fail
  • just containers-smoke dev — resolves to claude-hooks-dev-default, returns bun 1.3.11, claude 2.1.114
  • just containers-rebuild boss dev reviewer designer design-reviewer on a dev host — verifies recreation path end-to-end (not run here; running it would tear down the in-flight dispatches)

🤖 Generated with Claude Code

## Summary After #48's seed migration, every type has a `<type>-default` instance and the service addresses containers as `claude-hooks-<instance>`. The justfile still iterated `types | keys[]` and built `claude-hooks-<type>`, so `just containers-rebuild` / `up` / `down` / `logs` / `shell` / `smoke` all targeted non-existent container names. **Hit live today**: dev + boss dispatches failed with `container claude-hooks-dev-default is not running`. Unblocked by hand-renaming. This PR fixes the recipes so the next `containers-rebuild` works without manual intervention. ## Changes Under the current seed convention (one instance per type, suffix `-default`): - Iterate types from `agents.json`, derive `instance = <type>-default`. - Container: `claude-hooks-<instance>`. Volume: `claude-hooks-<instance>-state`. - Token file + credentials bind-dir stay keyed on **type** (shared across that type's instances — explicit milestone non-goal). - NAME arg accepts either a type (auto-suffixed) or a full instance name (used verbatim), so `just containers-rebuild boss` still works as before. Once #52 lands with a SQLite-aware container reconciler, the derivation here can be replaced with a direct DB read. ## Test plan - [x] `just qa` — 352 pass, 0 fail - [x] `just containers-smoke dev` — resolves to `claude-hooks-dev-default`, returns `bun 1.3.11`, `claude 2.1.114` - [ ] `just containers-rebuild boss dev reviewer designer design-reviewer` on a dev host — verifies recreation path end-to-end (not run here; running it would tear down the in-flight dispatches) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(justfile): iterate SQLite instance names for container ops
All checks were successful
qa / qa (pull_request) Successful in 2m42s
qa / dockerfile (pull_request) Successful in 7s
7bef6cba8b
After the #48 seed migration every type has a `<type>-default` instance
and the service addresses containers as `claude-hooks-<instance>`. The
justfile still iterated `types | keys[]` and built `claude-hooks-<type>`,
so `just containers-rebuild` / `up` / `down` / `logs` / `shell` / `smoke`
all targeted non-existent container names. Hit live today when dev and
boss dispatches failed with "container claude-hooks-dev-default is not
running"; unblocked by hand-renaming, now fixing the recipes.

Under the current seed convention (one instance per type, suffix
`-default`), iterate types from `agents.json` and derive the instance
name as `<type>-default`. Token file + credentials bind-dir stay keyed
on type (shared across that type's instances — milestone non-goal).

NAME arg accepts either a type (auto-suffixed) or a full instance name
(used verbatim), so single-agent invocations like
`just containers-rebuild boss` keep working.

Once #52's container reconciler lands as the source of truth, the
derivation here can be replaced with a SQLite read.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
reviewer approved these changes 2026-04-19 23:06:02 +00:00
reviewer left a comment

CI green. All 5 container recipes (containers-up, containers-down, containers-rebuild, containers-logs, containers-shell, containers-smoke) are consistently fixed to use claude-hooks- where instance = -default, matching the seed convention from #48.

The type-vs-instance heuristic (jq -e --arg n NAME .types[n]) is applied uniformly across all recipes — if NAME matches a type key it auto-appends -default, otherwise verbatim. Token file and credentials bind-dir stay keyed on type inside containers-rebuild via type=${instance%-default}, consistent with the stated non-goal. The section-level comment and inline comments accurately describe the convention and the future #52 replacement path.

No bugs, no safety issues. Live smoke-test confirmed in the PR body. LGTM.

CI green. All 5 container recipes (containers-up, containers-down, containers-rebuild, containers-logs, containers-shell, containers-smoke) are consistently fixed to use claude-hooks-<instance> where instance = <type>-default, matching the seed convention from #48. The type-vs-instance heuristic (jq -e --arg n NAME .types[n]) is applied uniformly across all recipes — if NAME matches a type key it auto-appends -default, otherwise verbatim. Token file and credentials bind-dir stay keyed on type inside containers-rebuild via type=${instance%-default}, consistent with the stated non-goal. The section-level comment and inline comments accurately describe the convention and the future #52 replacement path. No bugs, no safety issues. Live smoke-test confirmed in the PR body. LGTM.
code-lead deleted branch fix/justfile-instance-names 2026-04-19 23:06:53 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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!108
No description provided.