fix(discord): exclude '*' wildcard from unresolvedChannels count#32816
fix(discord): exclude '*' wildcard from unresolvedChannels count#32816Sid-Qin wants to merge 1 commit intoopenclaw:mainfrom
Conversation
The channel audit counted the '*' wildcard key as an unresolved channel, producing a false positive warning in doctor/channels-status even though '*' is a valid config meaning "allow all channels in this guild". Closes openclaw#32517 Made-with: Cursor
|
🤖 We're reviewing this PR with Aisle We're running a security check on the changes in this PR now. This usually takes a few minutes. ⌛ Progress:
Latest run failed. Keeping previous successful results. Trace ID: Last updated on: 2026-03-03T09:02:15Z |
Greptile SummaryThis PR fixes a false-positive diagnostic warning in The fix: Two lines added to Test coverage: New test scenarios validate both the wildcard-only case and a mixed wildcard + numeric ID case. All tests pass. The fix is minimal, well-scoped to the diagnostic path, and has no impact on runtime channel permission auditing. Confidence Score: 5/5
Last reviewed commit: e39291d |
|
Superseded by #33125 (includes the Discord wildcard audit fix). Please use that PR instead. |
Summary
collectDiscordAuditChannelIdscounts the*wildcard key as an unresolved channel, causingdoctorandchannels status --probeto emit a false positive warning: "Some configured guild channels are not numeric IDs (unresolvedChannels=1)"."*": { "allow": true }to allow all channels in a guild see a spurious warning that implies their config is broken.*is now excluded from the unresolved count incollectDiscordAuditChannelIds. AwildcardCountis subtracted from the non-numeric keys total.provider.allowlist.tsalready handles*correctly. Only the audit/diagnostic path is fixed.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
openclaw doctorandchannels status --probeno longer reportunresolvedChannels=1when the only non-numeric channel key is the*wildcard.Security Impact (required)
Repro + Verification
Environment
Steps
channels.discord.guilds.<id>.channelswith"*": { "allow": true }openclaw doctororchannels status --probeExpected
*wildcard is usedActual
unresolvedChannelsis0Evidence
2 tests pass:
general) still count as unresolved*wildcard-only config yieldsunresolvedChannels: 0Human Verification (required)
openclaw doctoroutput against a real Discord serverCompatibility / Migration
Failure Recovery (if this breaks)
src/discord/audit.tssrc/discord/audit.tsRisks and Mitigations