Skip to content

fix(dockerfile): drop invalid channels.defaults.configWrites - #2361

Merged
ericksoa merged 1 commit into
mainfrom
fix/2316-configwrites-schema-drift-v2
Apr 23, 2026
Merged

ericksoa merged 1 commit into
mainfrom
fix/2316-configwrites-schema-drift-v2

Conversation

@ericksoa

@ericksoa ericksoa commented Apr 23, 2026 •

Copy link
Copy Markdown
Member

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:

-    'channels': dict({'defaults': {'configWrites': False}}, **_ch_cfg), \
+    'channels': {'defaults': {}, **_ch_cfg}, \

Credit

Original fix by @rluo8 in #2337.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed channel configuration initialization during build process to properly set default values.

<!-- markdownlint-disable MD041 -->
## Summary


The baked openclaw.json contained `channels.defaults.configWrites:
false`, but OpenClaw's `ChannelsSchema.defaults` is `.strict()` and only
accepts `groupPolicy` and `heartbeat`. 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:281` in
[email protected]). The runtime then stripped the key and saved the
pre-strip file as `openclaw.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:
- 'channels': dict({'defaults': {'configWrites': False}}, **_ch_cfg), \
+    'channels': {'defaults': {}, **_ch_cfg}, \

OpenClaw has no global fallback for configWrites, so the flag never took
effect.

## Type of Change

- [√ ] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [ ] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)

## Verification
<!-- Check each item you ran and confirmed. Leave unchecked items you
skipped. -->
- [√ ] `npx prek run --all-files` passes
- [√ ] `npm test` passes
- [ ] Tests added or updated for new or changed behavior
- [√ ] No secrets, API keys, or credentials committed
- [ ] Docs updated for user-facing behavior changes
- [ ] `make docs` builds without warnings (doc changes only)
- [ ] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)


## AI Disclosure
<!-- If an AI agent authored or co-authored this PR, check the box and
name the tool. Remove this section for fully human-authored PRs. -->
- [ ] AI-assisted — tool: Cursor 

---
<!-- DCO sign-off required by CI. Run: git config user.name && git
config user.email -->
Signed-off-by: rluo8 <[email protected]>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Updated default configuration structure for the `openclaw.json`
generation process. Channel-specific configuration settings remain
preserved and functional.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@coderabbitai

coderabbitai Bot commented Apr 23, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: ee7c935f-2c48-4b7e-b767-c5f47f2e8e57

📥 Commits

Reviewing files that changed from the base of the PR and between e0fc49a and e8f323f.

📒 Files selected for processing (1)
  • Dockerfile

📝 Walkthrough

Walkthrough

The Dockerfile's Python config generation for openclaw.json has been modified to initialize channels.defaults as an empty map ({}) instead of {'configWrites': False}, addressing a schema validation error in OpenClaw 2026.4.2 that rejects the unrecognized configWrites key.

Changes

Cohort / File(s) Summary
Dockerfile Configuration
Dockerfile
Removed configWrites: False from the channels.defaults initialization to align with OpenClaw 2026.4.2's schema, which has additionalProperties: false and rejects the unrecognized key.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Suggested labels

bug, Integration: OpenClaw, Docker

Poem

🐰 A key that shouldn't be here,
Gone in a line crystal-clear!
No more schema validation blues,
Just empty defaults—happy news!
Config peace restored, no more fuss,
Hop along now, fix for us! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly and concisely describes the main change: removing the invalid 'channels.defaults.configWrites' key from the Dockerfile, which directly addresses issue #2316.
Linked Issues check ✅ Passed The PR directly implements the one-line fix specified in issue #2316 by removing 'configWrites: False' from channels.defaults in the Dockerfile, resolving the schema validation errors reported.
Out of Scope Changes check ✅ Passed The PR only modifies the single line in the Dockerfile's Python heredoc as required by issue #2316, with no out-of-scope changes to other files or unrelated functionality.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/2316-configwrites-schema-drift-v2

Comment @coderabbitai help to get the list of available commands and usage tips.

@ericksoa
ericksoa merged commit 89a3ebe into main Apr 23, 2026
15 checks passed
@wscurran wscurran added the bug-fix PR fixes a bug or regression label Jun 8, 2026
@cv
cv deleted the fix/2316-configwrites-schema-drift-v2 branch June 28, 2026 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix PR fixes a bug or regression

Projects

None yet

3 participants