Repository navigation
fix(dockerfile): drop invalid channels.defaults.configWrites - #2337
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA single-line modification to the Dockerfile's Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
✨ Thanks for submitting this issue that identifies a bug with the openclaw.json file and proposes a fix. |
1 similar comment
|
✨ Thanks for submitting this issue that identifies a bug with the openclaw.json file and proposes a fix. |
ericksoa
left a comment
There was a problem hiding this comment.
Reviewed: the invalid configWrites key is correctly removed. OpenClaw's strict schema was stripping it on every boot anyway, so this just eliminates the ERROR-level log noise. The empty defaults: {} preserves the merge base for _ch_cfg. LGTM.
## Summary Re-applies #2337 (by @rluo8) which was reverted after a botched admin merge. The baked `openclaw.json` contained `channels.defaults.configWrites: false`, but OpenClaw's `ChannelsSchema.defaults` is `.strict()` and only accepts `groupPolicy` and `heartbeat`. Every sandbox first-boot produced two ERROR-level log lines from the schema validator, then stripped the key. Fixes #2316 ## Changes One line in Dockerfile: ```diff - 'channels': dict({'defaults': {'configWrites': False}}, **_ch_cfg), \ + 'channels': {'defaults': {}, **_ch_cfg}, \ ``` ## Credit Original fix by @rluo8 in #2337. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Fixed channel configuration initialization during build process to properly set default values. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Rui Luo <[email protected]>
Summary
The baked openclaw.json contained
channels.defaults.configWrites: false, but OpenClaw'sChannelsSchema.defaultsis.strict()and only acceptsgroupPolicyandheartbeat. The key was at the wrong schema path.Every sandbox first-boot produced two ERROR-level log lines from the OpenClaw schema validator (seen at
dist/subsystem-*.js:281in [email protected]). The runtime then stripped the key and saved the pre-strip file asopenclaw.json.bak.{"0":"Invalid config at /sandbox/.openclaw/openclaw.json:\n- channels.defaults: Unrecognized key: "configWrites"","_meta":{"runtime":"node","runtimeVersion":"22.22.1","......
{"0":"Invalid config at /sandbox/.openclaw/openclaw.json:\n- channels.defaults: Unrecognized key: "configWrites"","_meta":{"runtime":"node","runtimeVersion":"22.22.1".....
Related Issue
Fixes #2316
Changes
One line change in Dockerfile:
OpenClaw has no global fallback for configWrites, so the flag never took effect.
Type of Change
Verification
npx prek run --all-filespassesnpm testpassesmake docsbuilds without warnings (doc changes only)AI Disclosure
Signed-off-by: rluo8 [email protected]
Summary by CodeRabbit
openclaw.jsongeneration process. Channel-specific configuration settings remain preserved and functional.