Skip to content

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

Merged
ericksoa merged 2 commits into
NVIDIA:mainfrom
rluo8:fix/2316-configwrites-schema-drift
Apr 23, 2026
Merged

ericksoa merged 2 commits into
NVIDIA:mainfrom
rluo8:fix/2316-configwrites-schema-drift

Conversation

@rluo8

@rluo8 rluo8 commented Apr 23, 2026 •

Copy link
Copy Markdown
Collaborator

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

  • [√ ] 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 (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

AI Disclosure

  • AI-assisted — tool: Cursor

Signed-off-by: rluo8 [email protected]

Summary by CodeRabbit

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

@rluo8
rluo8 requested a review from ericksoa April 23, 2026 10:04
@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: 221f8181-1838-4673-ab18-0c883447045d

📥 Commits

Reviewing files that changed from the base of the PR and between d9aced4 and e14e812.

📒 Files selected for processing (1)
  • Dockerfile

📝 Walkthrough

Walkthrough

A single-line modification to the Dockerfile's openclaw.json generation removes the configWrites: False setting from channels.defaults configuration, replacing it with an empty defaults object. This eliminates schema validation errors triggered by OpenClaw 2026.4.2's strict configuration schema that rejects unrecognized keys.

Changes

Cohort / File(s) Summary
Config Schema Fix
Dockerfile
Removed configWrites: False from channels.defaults dict to comply with OpenClaw 2026.4.2 schema validation that disallows additional properties at this path.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A key that shouldn't be there,
Whispers errors in the air,
One line removed, the logs fall silent,
Schema rules? We make them client!
Clean boots at last, no more the fuss—
Harmony restored for all of 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 title accurately describes the main change: removing the invalid 'channels.defaults.configWrites' key from the Dockerfile's openclaw.json generation.
Linked Issues check ✅ Passed The PR implementation directly addresses issue #2316 by removing the invalid 'configWrites' key from channels.defaults, matching the suggested one-line fix and resolving all schema validation errors.
Out of Scope Changes check ✅ Passed The change is narrowly scoped to the single Dockerfile modification required by issue #2316; no unrelated changes are present.
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

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

@wscurran wscurran added the bug label Apr 23, 2026
@wscurran

Copy link
Copy Markdown
Contributor

✨ Thanks for submitting this issue that identifies a bug with the openclaw.json file and proposes a fix.

1 similar comment
@wscurran

Copy link
Copy Markdown
Contributor

✨ Thanks for submitting this issue that identifies a bug with the openclaw.json file and proposes a fix.

@wscurran wscurran added integration: openclaw OpenClaw integration behavior Docker labels Apr 23, 2026

@ericksoa ericksoa left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ericksoa
ericksoa merged commit 3832e11 into NVIDIA:main Apr 23, 2026
12 of 13 checks passed
ericksoa added a commit that referenced this pull request Apr 23, 2026
ericksoa added a commit that referenced this pull request Apr 23, 2026
## 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]>
@rluo8
rluo8 deleted the fix/2316-configwrites-schema-drift branch June 1, 2026 05:00
@wscurran wscurran added area: packaging Packages, images, registries, installers, or distribution bug-fix PR fixes a bug or regression platform: container Affects Docker, containerd, Podman, or images and removed Docker labels Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: packaging Packages, images, registries, installers, or distribution bug-fix PR fixes a bug or regression integration: openclaw OpenClaw integration behavior platform: container Affects Docker, containerd, Podman, or images

Projects

None yet

3 participants