Fix Telegram channel resolution drift across announce + message send paths#23727
Closed
SmithLabsLLC wants to merge 5 commits into
Closed
Fix Telegram channel resolution drift across announce + message send paths#23727SmithLabsLLC wants to merge 5 commits into
SmithLabsLLC wants to merge 5 commits into
Conversation
c876f67 to
a337189
Compare
fe1f384 to
54a31a6
Compare
812f17a to
31b06f5
Compare
a7230e8 to
90358c6
Compare
Contributor
|
Closing as superseded by commit 4258a33 on main. The merged change set consolidates the relevant parts into one refactor/fix pass:
Thanks for the PR and the groundwork. |
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.
Summary
src/infra/outbound/channel-resolution.ts) that:applyPluginAutoEnable+loadOpenClawPlugins)src/infra/outbound/targets.ts(cron/subagent announce target resolution + heartbeat account/allowFrom checks)src/infra/outbound/message.ts(message/send + poll explicit channel handling)src/gateway/server-methods/send.ts(gatewaysend/pollchannel plugin lookup)This keeps channel resolution behavior consistent and recovers from empty/stale plugin registries in these outbound paths, preventing Telegram from being rejected as unsupported/unknown.
Regression tests
src/infra/outbound/targets.channel-resolution.test.tsUnsupported channel: telegramin announce target resolutionsrc/infra/outbound/message.test.tsUnknown channel: telegramin message/sendVerification
Related: #21968 #21595 #13420 #14188
Greptile Summary
This PR introduces a shared channel resolution module (
channel-resolution.ts) that prevents Telegram and other plugins from being rejected as unsupported when the plugin registry is empty or stale. The fix applies consistently across announce/send paths by:resolveOutboundChannelPlugin()that normalizes channel inputs and retries plugin lookup after bootstrapping the plugin registry from configSetto track bootstrap attempts per registry key, preventing infinite retry loopsgetChannelPlugin()calls intargets.ts,message.ts, andsend.tswith the new shared resolverThe implementation includes regression tests that verify the bootstrap recovery mechanism works correctly for both announce target resolution and message send flows.
Confidence Score: 5/5
Last reviewed commit: 4381ffe