← Back to PRs

#20889: fix: suppress duplicate warning for virtual auto-enabled entries

by akramcodez open 2026-02-19 11:29 View on GitHub →
size: S trusted-contributor
## 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