Use label as container slug prefix when provided #242

Merged
didericis merged 3 commits from use-label-as-container-slug into main 2026-06-22 15:36:55 -04:00
Collaborator

Summary

  • mint_slug in resolve_common.py now uses spec.label as the slug prefix when the user has named the bottle via the TUI label field, falling back to spec.agent_name when no label is given.
  • spec.identity (the resume path) still takes precedence over both.
  • Four new unit tests in TestMintSlug cover the no-label fallback, label-as-prefix, label-slugification, and identity-precedence cases.
## Summary - `mint_slug` in `resolve_common.py` now uses `spec.label` as the slug prefix when the user has named the bottle via the TUI label field, falling back to `spec.agent_name` when no label is given. - `spec.identity` (the resume path) still takes precedence over both. - Four new unit tests in `TestMintSlug` cover the no-label fallback, label-as-prefix, label-slugification, and identity-precedence cases.
didericis-claude added 1 commit 2026-06-22 15:17:10 -04:00
feat: use label as container slug prefix when provided
lint / lint (push) Successful in 1m45s
test / unit (pull_request) Successful in 33s
test / integration (pull_request) Successful in 19s
e463670649
When a user names a bottle via the TUI label field, that name is now
used as the slug prefix for the container identity instead of always
falling back to the agent name.
Owner

Not quite what I wanted: the slug should use the label when provided. This may introduce name conflicts/collisions, but this is ok: we don't want users to use the same name for multiple agents.

We should check that the name is valid when assigning a label, and if an agent with that name and agent is already running, the cli prompt where we ask for the label again with a disclaimer that says " already in use"

Not quite what I wanted: the *slug* should use the label when provided. This may introduce name conflicts/collisions, but this is ok: we don't want users to use the same name for multiple agents. We should check that the name is valid when assigning a label, and if an agent with that name and agent is already running, the cli prompt where we ask for the label again with a disclaimer that says "<x> already in use"
didericis added 1 commit 2026-06-22 15:26:44 -04:00
fix: label becomes the full slug; re-prompt on collision
lint / lint (push) Failing after 1m44s
test / unit (pull_request) Successful in 33s
test / integration (pull_request) Successful in 17s
54760964cf
When a label is given it is now used verbatim as the slug (no random
suffix), so two launches with the same label collide by design.  The
CLI re-prompts via the TUI name modal with a disclaimer when the
candidate slug is already in use among running bottles.
didericis added 1 commit 2026-06-22 15:30:57 -04:00
fix: add type annotations to _modal stub for pyright
test / unit (pull_request) Successful in 34s
test / integration (pull_request) Successful in 19s
lint / lint (push) Successful in 1m36s
test / unit (push) Successful in 30s
test / integration (push) Successful in 18s
Update Quality Badges / update-badges (push) Successful in 1m19s
1a5b6e25f8
didericis merged commit 1a5b6e25f8 into main 2026-06-22 15:36:55 -04:00
didericis deleted branch use-label-as-container-slug 2026-06-22 15:36:56 -04:00
Sign in to join this conversation.