fix(discord): exclude '*' wildcard from unresolvedChannels audit count#32608
Closed
CloveSVG wants to merge 1 commit intoopenclaw:mainfrom
Closed
fix(discord): exclude '*' wildcard from unresolvedChannels audit count#32608CloveSVG wants to merge 1 commit intoopenclaw:mainfrom
CloveSVG wants to merge 1 commit intoopenclaw:mainfrom
Conversation
The permission audit in `collectDiscordAuditChannelIds` was counting the `"*"` wildcard key as an unresolved channel ID, causing a false positive warning in `openclaw doctor` and `channels status --probe`: Some configured guild channels are not numeric IDs (unresolvedChannels=1). The `"*"` key is a valid config meaning "allow all channels in the guild" and is already handled correctly by allowlist logic elsewhere. It is not an actual channel ID and should never be sent to the Discord API for permission checks. Fix: skip `"*"` in `listConfiguredGuildChannelKeys` so it is excluded from both `channelIds` and the `unresolvedChannels` count. Adds two test cases covering the wildcard-with-numeric-ids and wildcard-only configurations. Fixes #32517
Contributor
Greptile SummaryThis PR fixes a false-positive warning in
Confidence Score: 5/5
Last reviewed commit: 7c2d0bb |
Jah-yee
added a commit
to Jah-yee/openclaw
that referenced
this pull request
Mar 3, 2026
Issue openclaw#32608: Wildcard '*' in guild channels should not be counted as unresolved channel ID since it's a valid config meaning 'allow all'.
Jah-yee
added a commit
to Jah-yee/openclaw
that referenced
this pull request
Mar 3, 2026
Issue openclaw#32608: Wildcard '*' in guild channels should not be counted as unresolved channel ID since it's a valid config meaning 'allow all'.
18 tasks
Member
|
Superseded by #33125 (includes the Discord wildcard audit fix). Please use that PR instead. |
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
Fixes #32517
openclaw doctorandchannels status --probereport a false positive warning when users configure"*"as a wildcard key in guild channels:Root Cause
In
listConfiguredGuildChannelKeys, every non-numeric key was included — including"*"— so it got counted as an unresolved channel ID incollectDiscordAuditChannelIds.The
"*"key is a valid config meaning "allow all channels in the guild" and is already handled correctly by allowlist logic elsewhere. It is not an actual Discord channel ID and should never be audited.Fix
Skip
"*"inlistConfiguredGuildChannelKeysbefore it enters the key set, so it's excluded from bothchannelIdsand theunresolvedChannelscount.Tests
Added two new test cases:
"*"wildcard →unresolvedChannels: 0"*"wildcard →channelIds: [],unresolvedChannels: 0