Don't invent stacks from name prefixes by default (#12)#13
Merged
Conversation
Found in persona QA on a live daemon: qa-web + qa-cache (unrelated) were grouped into a fake 'qa' stack purely from the shared prefix. Root cause: container-compose sets no labels, so name-prefix is the only signal and it inevitably over-groups. - ProjectRegistry.assemble gains inferStacks (default false): only Consai-launched (known) stacks group reliably; everything else is standalone unless the user opts in. - AppState reads @AppStorage groupByNamePrefix (default off) and passes it through. - Settings: 'Group external containers by name prefix' toggle + explanation. - Tests: opt-in inference + default-off behavior (24 tests pass). Closes #12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found in persona QA (live daemon)
Two unrelated containers,
qa-web(nginx) andqa-cache(redis), were grouped into a fake "qa" stack just because they share aqa-prefix.Root cause
container-composesets no labels (container inspect→labels: {}), so the only grouping signal is the<project>-<service>name prefix — which can't distinguish a real compose project from unrelated containers that share a prefix (risk R2).Fix
ProjectRegistry.assemble(containers:inferStacks:)— inference now opt-in, default off. Only Consai-launched (registry-known) stacks group reliably; everything else is standalone.AppStatereads@AppStorage("groupByNamePrefix")(default off) and passes it through.Verification
Re-captured the live panel: the fake "qa" stack is gone; all containers list flat with real
IP · cpu% · mem. 24 ConsaiCore tests pass (added opt-in + default-off cases).Closes #12