#20889: fix: suppress duplicate warning for virtual auto-enabled entries
size: S
trusted-contributor
Cluster:
Plugin Management Enhancements
## Summary
- **Problem:** When `channels.feishu` is configured, gateway emits false duplicate plugin warning because bundled extension and virtual auto-enabled entry share the same ID
- **Why it matters:** Noisy warnings on every startup confuse users and mask real duplicate plugin issues
- **What changed:** Treat virtual auto-enabled entries (no resolvable real path) as same plugin as bundled counterpart to suppress warning
- **What did NOT change:** Real duplicates (different physical paths) still warn correctly
## Change Type (select all)
- [x] Bug fix
## Scope (select all touched areas)
- [x] Gateway / orchestration
## Linked Issue/PR
- Closes #20041
## User-visible / Behavior Changes
- No more false duplicate plugin warnings when using bundled channel plugins with config (e.g., `channels.feishu`)
- Warnings still appear when user explicitly points `plugins.entries.*` to a different physical directory
## Security Impact (required)
- New permissions/capabilities? **No**
- Secrets/tokens handling changed? **No**
- New/changed network calls? **No**
- Command/tool execution surface changed? **No**
- Data access scope changed? **No**
## Repro + Verification
### Environment
- OS: macOS
- Runtime: Node 25.6.1
- Integration: Feishu (or any bundled channel plugin)
- Config: `channels.feishu` enabled in `openclaw.json`
### Steps
1. Configure `channels.feishu` in `openclaw.json`
2. Run `openclaw gateway restart`
3. Check startup logs
### Expected
- No duplicate plugin warning
### Actual
- ✓ No warning in logs
- ✓ Plugin loads correctly
## Evidence
- [x] New test: virtual config entry suppresses warning
- [x] New test: different physical paths still warn
- [x] All 19 plugin registry tests pass
## Human Verification (required)
- Verified scenarios:
- Virtual auto-enabled entry (no warning)
- Different physical paths (warning still fires)
- Edge cases checked:
- Missing `plugins.entries` key
- Multiple bundled plugins
- What you did **not** verify:
- Live gateway restart with actual Feishu channel
## Compatibility / Migration
- Backward compatible? **Yes**
- Config/env changes? **No**
- Migration needed? **No**
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
This PR fixes false duplicate plugin warnings when bundled channel plugins (like `feishu`) are enabled via config. When a user sets `channels.feishu`, the auto-enable logic creates a virtual `plugins.entries.feishu` entry with no physical path, causing the manifest registry to incorrectly warn about duplicates with the bundled plugin.
The fix adds logic to detect virtual config entries (those with `origin === "config"`, source starting with `"plugins.entries."`, and no resolvable real path) and treats them as the same plugin as their bundled counterpart, suppressing the false warning.
- Real duplicate detection still works correctly for plugins at different physical paths
- Tests cover both the suppression case (virtual entry) and the warning case (different physical paths)
- Solution is minimal and targeted to the specific issue
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with no significant risks
- The change is well-scoped, addresses a specific false-positive warning issue, includes comprehensive test coverage (both positive and negative cases), and maintains the existing behavior for real duplicates. The logic is clear and doesn't introduce security concerns or breaking changes.
- No files require special attention
<sub>Last reviewed commit: 7c6ac30</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#12084: fix: prevent false duplicate plugin warning for bundled channel plu...
by shadril238 · 2026-02-08
84.1%
#21871: fix(plugins): suppress false duplicate warning when user-installed ...
by hydro13 · 2026-02-20
81.2%
#18966: fix(config): downgrade unknown bundled plugin references to warnings
by moxunjinmu · 2026-02-17
80.8%
#20499: test(plugins): add bundled+config duplicate discovery regression
by dcol91863 · 2026-02-19
79.3%
#9268: Fix: Register feishu as official channel in CHAT_CHANNEL_ORDER
by vishaltandale00 · 2026-02-05
77.0%
#20973: Fix: Feishu duplicate plugin ID, Docker pairing docs, broken formal...
by neipor · 2026-02-19
76.8%
#20541: fix(hooks): clear internal hooks before plugins register
by ramarnat · 2026-02-19
74.1%
#14795: fix: skip disabled channel plugins in cross-context messaging checks
by explainanalyze · 2026-02-12
73.5%
#21660: fix(plugins): require explicit allowlist for non-bundled plugins
by AI-Reviewer-QS · 2026-02-20
73.5%
#22577: fix(feishu): use senderKey fallback for DM session isolation
by leesonchen · 2026-02-21
73.3%