fix(gateway): resolve startup hang caused by qqbot plugin manifest ID mismatch & stderr flood#718
Conversation
… mismatch & stderr flood
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 74d70f6cee
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| dirNameToChannel[info.dirName] = channelType; | ||
| } | ||
| for (const pluginId of allowList) { | ||
| const channelType = dirNameToChannel[pluginId] ?? pluginId; | ||
| if (CHANNEL_PLUGIN_MAP[channelType] && !configuredChannels.includes(channelType)) { |
There was a problem hiding this comment.
Map canonical plugin IDs before allowlist augmentation
This new allowlist augmentation only reverse-maps extension dirName values, but plugins.allow can contain canonical plugin IDs that differ from CHANNEL_PLUGIN_MAP keys (for example Feishu is commonly stored as openclaw-lark via resolveFeishuPluginId). In that case channelType is never resolved to feishu, so the plugin is skipped and ensureConfiguredPluginsUpgraded still won’t install/patch it when channels.feishu is absent. Add explicit plugin-id aliases to the reverse map instead of relying on dirName/channel key equality.
Useful? React with 👍 / 👎.
| const count = (stderrDedup.get(classified.normalized) ?? 0) + 1; | ||
| stderrDedup.set(classified.normalized, count); |
There was a problem hiding this comment.
Bound stderr dedup map to avoid unbounded growth
The new dedup logic stores every unique normalized stderr line in stderrDedup and never evicts entries. If the Gateway emits many distinct lines (for example with dynamic identifiers), this map grows for the full process lifetime and creates avoidable memory growth in the Electron main process. A bounded cache (LRU/TTL) or dedup limited to known noisy patterns would avoid this regression.
Useful? React with 👍 / 👎.
No description provided.