Skip to content

Group external stacks reliably via com.docker.compose.project label (#14)#15

Merged
DonsWayo merged 1 commit into
mainfrom
feat/group-by-compose-label
Jun 17, 2026
Merged

Group external stacks reliably via com.docker.compose.project label (#14)#15
DonsWayo merged 1 commit into
mainfrom
feat/group-by-compose-label

Conversation

@DonsWayo

Copy link
Copy Markdown
Owner

What

Adds label-based grouping as the first (always-on) step of stack assembly: containers
carrying com.docker.compose.project group into a .composeLabeled stack — reliably, with
no name guessing. Complements the upstream label PR (Mcrich23/Container-Compose#110) and the
default-off name-prefix inference from #13.

Why

The name-prefix heuristic can't tell a real stack from unrelated containers sharing a prefix
(#12). The compose project label is authoritative, so once a compose tool sets it, we group
by it — no false positives, works for externally-launched stacks.

Behavior

  • Labeled containers → grouped, trusted (no "wild" badge), jade leaf.
  • .composeLabeled stacks without a linked compose file offer Link compose file… to enable up/down.
  • Unlabeled containers follow the existing known → (opt-in) inferred → standalone path.

Verified live (macOS 26, container 1.0.0)

Launched a shop stack with a patched container-compose (which now writes the label),
then rendered Consai: shop groups as a labeled stack with no "wild" badge; unlabeled
conek-pg stays standalone. The same stack from the unpatched binary showed flat — confirming
grouping is driven by the label. 25 ConsaiCore tests pass.

Closes #14

Adds label-based grouping as step 0 of assembly (always on, no guessing): containers
carrying com.docker.compose.project group into a .composeLabeled stack regardless of the
name-prefix setting. This is reliable (no false 'qa' stack, #12) and groups externally-
launched stacks once the compose tool labels them (upstream Mcrich23/Container-Compose#110).

- StackOrigin.composeLabeled (trusted; no 'wild' badge; link a compose file to enable up/down)
- ProjectRegistry.composeProjectLabel constant + label grouping before known/inferred
- StackSection offers 'Link compose file' for any unlinked stack
- Test: label grouping works with inference off; unlabeled containers stay standalone
- Verified live: a patched-container-compose 'shop' stack groups with no 'wild' badge

Closes #14
@DonsWayo DonsWayo merged commit 7da77a4 into main Jun 17, 2026
1 check passed
@DonsWayo DonsWayo deleted the feat/group-by-compose-label branch June 17, 2026 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Group external stacks reliably via com.docker.compose.project label

1 participant