fix(justfile): iterate SQLite instance names for container ops #108
No reviewers
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks!108
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/justfile-instance-names"
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?
Summary
After #48's seed migration, every type has a
<type>-defaultinstance and the service addresses containers asclaude-hooks-<instance>. The justfile still iteratedtypes | keys[]and builtclaude-hooks-<type>, sojust containers-rebuild/up/down/logs/shell/smokeall 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 nextcontainers-rebuildworks without manual intervention.Changes
Under the current seed convention (one instance per type, suffix
-default):agents.json, deriveinstance = <type>-default.claude-hooks-<instance>. Volume:claude-hooks-<instance>-state.just containers-rebuild bossstill 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 failjust containers-smoke dev— resolves toclaude-hooks-dev-default, returnsbun 1.3.11,claude 2.1.114just containers-rebuild boss dev reviewer designer design-revieweron 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
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.