openclaw - ✅(Solved) Fix [Bug]: 4.23 -> 5.12 err: channels.discord.guilds.<guildid>.channels.<channelid> invalid config [1 pull requests, 3 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#81400Fetched 2026-05-14 03:32:40
View on GitHub
Comments
3
Participants
2
Timeline
6
Reactions
1
Author
Timeline (top)
commented ×3labeled ×2cross-referenced ×1

2026.4.23 -> 2026.5.12-beta3 breaks channels.discord.guilds.<guildid>.channels.<channelid> config

Error Message

An error is generated and OC won't start the gateway. Sorry, but I can't copy the actual error message, but it's approximately:

Root Cause

2026.4.23 -> 2026.5.12-beta3 breaks channels.discord.guilds.<guildid>.channels.<channelid> config

Fix Action

Fixed

PR fix notes

PR #81408: fix(discord): migrate legacy channel allow before validation

Description (problem / solution / changelog)

Fixes #81400.

Summary

  • Migrate legacy channels.discord.guilds.*.channels.*.allow aliases into canonical enabled before config validation.
  • Covers both top-level Discord config and channels.discord.accounts.* configs.
  • Adds a regression test for bundled-channel validation, where the startup-blocking rejection happened.

Root Cause

OpenClawSchema is permissive for extension channel configs, but bundled-channel JSON-schema validation still checked raw Discord config before the legacy allow -> enabled alias was canonicalized. That made documented/legacy per-channel Discord configs fail with:

channels.discord.guilds.<guild>.channels.<channel>: invalid config: must NOT have additional properties: "allow"

Audits

  • Existing helper: Discord doctor already migrates this alias; this patch mirrors that compatibility at validation time so startup validation sees canonical config.
  • Shared caller: validateConfigObjectRaw is the raw validation boundary used before materialization; canonicalizing here keeps allow: false safe by preserving it as enabled: false instead of dropping it.
  • Rival scan: no open PR linked to #81400 or matching this exact validation failure.

Real behavior proof

  • Behavior or issue addressed: Discord startup/config validation rejected legacy per-channel guild config containing channels.discord.guilds.*.channels.*.allow, blocking configs that should migrate to canonical enabled.
  • Real environment tested: Local OpenClaw checkout on Linux, Node/tsx through repo pnpm exec, using the real validateConfigObject config validation path with bundled-channel validation enabled by sourceRaw.
  • Exact steps or command run after this patch:
pnpm exec tsx -e 'import { validateConfigObject } from "./src/config/validation.ts"; const cfg={channels:{discord:{token:"x",groupPolicy:"allowlist",guilds:{"111111111111111111":{channels:{"222222222222222222":{allow:false,requireMention:false}}}}}}}; const result=validateConfigObject(cfg,{sourceRaw:cfg}); console.log(JSON.stringify({ok: result.ok, issues: result.ok ? [] : result.issues.map((issue)=>({path: issue.path, message: issue.message})), channel: result.ok ? result.config.channels?.discord?.guilds?.["111111111111111111"]?.channels?.["222222222222222222"] : undefined}, null, 2));'
  • Evidence after fix: Terminal output from the real validation command:
{
  "ok": true,
  "issues": [],
  "channel": {
    "requireMention": false,
    "enabled": false
  }
}
  • Observed result after fix: The legacy allow:false channel entry is accepted by config validation and materialized as enabled:false; no bundled-channel additional properties: "allow" error remains.
  • What was not tested: Live Discord gateway login was not exercised because this is a startup config-validation migration and the reproduced failure is before gateway connection.

Tests

  • pnpm test src/config/config.schema-regressions.test.ts
  • pnpm check:test-types
  • pnpm exec oxfmt --check --threads=1 src/config/validation.ts src/config/config.schema-regressions.test.ts
  • git diff --check

Changed files

  • src/config/config.schema-regressions.test.ts (modified, +51/-0)
  • src/config/validation.ts (modified, +95/-6)
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

2026.4.23 -> 2026.5.12-beta3 breaks channels.discord.guilds.<guildid>.channels.<channelid> config

Steps to reproduce

Start with 4.23, get OC going with discord.

Add a discord channel specific configuration (which would use the schema channels.discord.guilds.<guildid>.channels.<channelid> { xxx: yyy }.

Update to 5.12.betaX

Expected behavior

Expected that the config would work as it does in 4.23.

Actual behavior

An error is generated and OC won't start the gateway. Sorry, but I can't copy the actual error message, but it's approximately:

channels.discord.guilds.(guildid).channels.(channelid): invalid config

(replace (guildid) and (channelid) with your discord server ID and channel id respectively.)

OpenClaw version

2026.5.12-beta1 thru 3 tested

Operating system

linux/debian trixie headless.

Install method

install.sh npm

Model

n/a

Provider / routing chain

n/a

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

Affected: discord people using channel specific configs

Severity: Blocks OC startup if feature is used.

Frequency: 100%

Additional information

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Expected that the config would work as it does in 4.23.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING