Pin skill-miss dedup across independent diagnostics collectors - #570
Merged
TheGreatAxios merged 1 commit intoAug 23, 2026
Conversation
The startup path runs the skill-miss summary through seven independent call sites, each with its own PluginLoadDiagnostics collector. Add a test confirming formatPluginWarningsSummary still dedupes correctly when warnings originate from multiple separate collectors, guarding the invariant as more collectors are added to the chain.
TheGreatAxios
enabled auto-merge
August 23, 2026 20:18
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.
Closes CL-5739.
This is a pinned-invariant PR, not a bug fix. The originally reported line (count of 4 with 5 names, 2 repeated) does not reproduce in the current codebase: formatPluginWarningsSummary derives its count and its name list from the same deduplicated Set, so a single call cannot produce a mismatch. That guarantee was already added and is already pinned by an existing test ("names a skill once however many sources missed it").
The remaining gap called out in the ticket is structural, not observed: the startup path runs the summary through seven independent call sites (discovery, tool-plugins, trust, verify, add-path, profile resolution), each owning its own PluginLoadDiagnostics collector and formatting independently. Nothing merges warnings across collectors today. This isn't a live bug because only the discovery collector currently emits skill-miss warnings, but it's an opening: a second collector reporting the same skill would print two separate lines.
Added a test that constructs two independent collectors (simulating discovery + profile resolution) each reporting overlapping missing skills, merges their warnings, and confirms formatPluginWarningsSummary still collapses to one deduplicated line. This pins the invariant that would need to hold if the collectors are ever consolidated, and would fail if dedup logic regressed to array-based counting.
No behavior change. Consolidating the collectors into one shared instance is left as the ticket's separate "evaluate" item, not implemented here.