#12084: fix: prevent false duplicate plugin warning for bundled channel plugins
Cluster:
Plugin Management Enhancements
### Problem
Built-in channel plugins (like mattermost) trigger "duplicate plugin id" warnings on every restart when configured via `channels.<name>`, even with no explicit plugin entry in config.
### Solution
Changed `seenIds` from `Set<string>` to `Map<string, string>` in the manifest registry to track plugin root directories. Now only emits the warning when the same plugin ID is found from **genuinely different** source locations.
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR adjusts plugin manifest registry duplicate-id detection to avoid warnings when a bundled channel plugin is discovered multiple times from the same location. It changes `seenIds` from a `Set<string>` to a `Map<string, string>` keyed by plugin id, storing the first-seen plugin root directory and only warning when a later candidate with the same id comes from a different root directory.
This fits into the plugin discovery/load flow in `src/plugins/*` by refining the diagnostic emitted during `loadPluginManifestRegistry` candidate iteration, without changing manifest parsing or record construction.
<h3>Confidence Score: 4/5</h3>
- This PR is likely safe to merge, but may still emit false duplicate warnings in common symlinked/volume-mounted setups.
- Change is localized to diagnostics and does not affect plugin loading behavior beyond when a warning is emitted. The main remaining concern is that `path.resolve` doesn’t canonicalize symlinks, so the original warning spam can still occur when the same plugin is reachable via both a symlink and its real path, which is plausible in dev/container environments.
- src/plugins/manifest-registry.ts
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#20889: fix: suppress duplicate warning for virtual auto-enabled entries
by akramcodez · 2026-02-19
84.1%
#21871: fix(plugins): suppress false duplicate warning when user-installed ...
by hydro13 · 2026-02-20
80.8%
#18966: fix(config): downgrade unknown bundled plugin references to warnings
by moxunjinmu · 2026-02-17
78.7%
#20499: test(plugins): add bundled+config duplicate discovery regression
by dcol91863 · 2026-02-19
77.9%
#19717: fix: load plugin registry before channel commands run
by MisterGuy420 · 2026-02-18
74.9%
#2556: fix(plugin-install): handle existing plugins and filter workspace deps
by longmaba · 2026-01-27
74.1%
#7090: fix: plugin install uses manifest ID for folder name (#2796)
by dial481 · 2026-02-02
73.6%
#15618: fix(plugins): reject async plugin registration instead of silently ...
by AI-Reviewer-QS · 2026-02-13
73.0%
#23727: Fix Telegram channel resolution drift across announce + message sen...
by SmithLabsLLC · 2026-02-22
72.8%
#18418: fix(plugins): improve duplicate plugin ID warning with actionable g...
by BinHPdev · 2026-02-16
72.4%