Skip to content

fix(config): strip legacy installs/plugins from channel configs before validation#2189

Open
BingqingLyu wants to merge 1 commit into
mainfrom
fork-pr-63474-fix-feishu-legacy-config-strict-63101
Open

fix(config): strip legacy installs/plugins from channel configs before validation#2189
BingqingLyu wants to merge 1 commit into
mainfrom
fork-pr-63474-fix-feishu-legacy-config-strict-63101

Conversation

@BingqingLyu

@BingqingLyu BingqingLyu commented Apr 28, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes openclaw#63101

After upgrading from v4.5 to v4.8, openclaw gateway restart fails with:

channels.feishu: invalid config: must NOT have additional properties

when legacy installs and plugins fields are present under channels.feishu.

Root Cause

The Feishu channel config schema (FeishuConfigSchema) uses Zod .strict() mode, which rejects any properties not explicitly declared in the schema. The installs and plugins fields were never valid channel-level properties but could appear in v4.5-era configs due to top-level key nesting.

Fix

Add a legacy config migration (channels.*.stale-top-level-keys) that auto-strips installs and plugins from every channels.* entry (including nested accounts.*) before schema validation runs. The migration:

  • Logs a clear change message so operators know the fields were removed
  • Applies generically to all channels (not just Feishu) since these fields are never valid at the channel level
  • Includes a legacy rule that triggers a warning for channels.feishu specifically

Tests

  • 6 regression tests for the migration in src/config/legacy-migrate.test.ts
  • 3 schema-level rejection tests in extensions/feishu/src/config-schema.test.ts

All 51 tests pass.

…e validation (openclaw#63101)

After upgrading from v4.5 to v4.8, gateway restart fails with
"channels.feishu: invalid config: must NOT have additional properties"
when legacy `installs` and `plugins` fields are present under a
channel config block.  These fields were never valid channel-level
properties but could appear in v4.5-era configs due to top-level key
nesting.

Add a legacy config migration that auto-strips `installs` and
`plugins` from every `channels.*` entry (including nested `accounts.*`)
before schema validation runs.  The migration logs a clear change
message so the operator knows the fields were removed.

- Add migration `channels.*.stale-top-level-keys` with legacy rule
  for `channels.feishu`
- Add 6 regression tests for the migration in legacy-migrate.test.ts
- Add 3 schema-level rejection tests in config-schema.test.ts

Closes openclaw#63101

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Feishu channel config validation fails after upgrading from v4.5 to v4.8

2 participants