Summary
openclaw doctor and channels status --probe report a false positive when using the * wildcard in channels.discord.guilds.*.channels:
Some configured guild channels are not numeric IDs (unresolvedChannels=1).
Permission audit can only check numeric channel IDs.
The * key is a valid config meaning "allow all channels" in the guild. It is already handled correctly by the allowlist logic (e.g. provider.allowlist.ts filters key !== "*"). The audit should not count it as unresolved.
Config that triggers the warning
{
"channels": {
"discord": {
"guilds": {
"1478116902202114240": {
"channels": {
"*": { "allow": true }
}
}
}
}
}
}
Root cause
In src/discord/audit.ts, collectDiscordAuditChannelIds counts all non-numeric keys as unresolved:
const channelIds = keys.filter((key) => /^\d+$/.test(key));
const unresolvedChannels = keys.length - channelIds.length;
The * wildcard is not numeric, so it gets counted even though it is intentional and valid.
Suggested fix
Exclude known wildcard keys from the unresolved count:
const CHANNEL_WILDCARD_KEYS = new Set(["*"]);
// ...
const channelIds = keys.filter((key) => /^\d+$/.test(key));
const wildcardKeys = keys.filter((key) => CHANNEL_WILDCARD_KEYS.has(key));
const unresolvedChannels = Math.max(0, keys.length - channelIds.length - wildcardKeys.length);
Environment
Summary
openclaw doctorandchannels status --probereport a false positive when using the*wildcard inchannels.discord.guilds.*.channels:The
*key is a valid config meaning "allow all channels" in the guild. It is already handled correctly by the allowlist logic (e.g.provider.allowlist.tsfilterskey !== "*"). The audit should not count it as unresolved.Config that triggers the warning
{ "channels": { "discord": { "guilds": { "1478116902202114240": { "channels": { "*": { "allow": true } } } } } } }Root cause
In
src/discord/audit.ts,collectDiscordAuditChannelIdscounts all non-numeric keys as unresolved:The
*wildcard is not numeric, so it gets counted even though it is intentional and valid.Suggested fix
Exclude known wildcard keys from the unresolved count:
Environment