Skip to content

Extract the shared container-matching rule onto ComposeProject - #172

Merged
Mcrich23 merged 2 commits into
Mcrich23:mainfrom
adrum:feat/next/shared-matching
Nov 14, 2026
Merged

Mcrich23 merged 2 commits into
Mcrich23:mainfrom
adrum:feat/next/shared-matching

Conversation

@adrum

@adrum adrum commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

#141 established the rule (labels authoritative; candidate names identify only unlabeled pre-label containers) as a private helper inside ComposePs. This promotes it to the shared layer — ComposeProject.ownsContainer for project ownership, ServiceTarget.matches for service-level matching built on it — so upcoming commands (exec, logs) resolve containers identically instead of growing copies. ps now delegates; no behavior change, tests move with the rule.

ps (Mcrich23#141) established the rule — labels are authoritative; candidate
names identify only unlabeled pre-label containers — as a private
helper inside ComposePs. Promote it to the shared layer so every
command resolves containers the same way: ComposeProject.ownsContainer
answers project ownership (the write-side guard stop/remove paths
need), and ServiceTarget.matches answers service-level matching built
on it (what listing and exec-style lookups need). ps now delegates to
ServiceTarget.matches; behavior is unchanged, and the rule's unit
coverage moves with it.
@adrum
adrum force-pushed the feat/next/shared-matching branch from afc0c11 to 0e54e4b Compare November 14, 2026 16:49
@adrum
adrum requested a review from Mcrich23 November 14, 2026 16:55
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.

2 participants