Repository navigation
fix: resolve openclaw.json permissions conflict and scope Dockerfile … - #570
franknvda1 wants to merge 1 commit into
Conversation
…lockdown - Bake both 'nvidia' and 'inference' providers into openclaw.json at image build time; remove runtime Python config-patching from buildSandboxConfigSyncScript (writes to locked root:root 444 file) - Use `openclaw models set` for runtime model selection (writes to writable agent config in .openclaw-data/) - Add identity/, devices/, canvas/, cron/ to .openclaw-data symlinks so the gateway can write device-auth.json at runtime - Remove dead `openclaw doctor --fix` and `openclaw plugins install` calls from nemoclaw-start.sh (already ran at build time, fail with EPERM at runtime) Caused-by: 2d3f84e (fix: lock gateway config via Landlock filesystem policy) Fixes NVIDIA#514
📝 WalkthroughWalkthroughThe PR makes OpenClaw configuration immutable by moving runtime state to separate writable directories with symlinks, pre-baking agent configuration at Docker build time, and removing all runtime modifications to Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
| }, \ | ||
| 'inference': { \ | ||
| 'baseUrl': 'https://inference.local/v1', \ | ||
| 'apiKey': 'unused', # pragma: allowlist secret \ |
There was a problem hiding this comment.
I was testing this out because onboarding is broken for me (see #580), but the # pragma: allowlist secret comment here (and also above on line 108) seemed to break this for me. It resulted in:
SyntaxError: '{' was never closed
The # pragma: allowlist secret comments inside the multi-line python3 -c
string cause Python to treat everything after # as a comment, swallowing
the \ line continuation and closing braces. This results in:
SyntaxError: '{' was never closed
Reported by DanTup in PR #570.
|
Thanks for the work on this. The core fix direction from #570 has now landed through #588, which carried the same approach forward and closed the remaining gap. I’m going to close this one as superseded so the history stays clean, but the contribution here was useful and directly informed the merged fix. Let it rip 🤙 |
…me (#588) * fix: resolve openclaw.json permissions conflict and scope Dockerfile lockdown - Bake both 'nvidia' and 'inference' providers into openclaw.json at image build time; remove runtime Python config-patching from buildSandboxConfigSyncScript (writes to locked root:root 444 file) - Use `openclaw models set` for runtime model selection (writes to writable agent config in .openclaw-data/) - Add identity/, devices/, canvas/, cron/ to .openclaw-data symlinks so the gateway can write device-auth.json at runtime - Remove dead `openclaw doctor --fix` and `openclaw plugins install` calls from nemoclaw-start.sh (already ran at build time, fail with EPERM at runtime) Caused-by: 2d3f84e (fix: lock gateway config via Landlock filesystem policy) Fixes #514 * fix: remove pragma comments that break inline Python in Dockerfile The # pragma: allowlist secret comments inside the multi-line python3 -c string cause Python to treat everything after # as a comment, swallowing the \ line continuation and closing braces. This results in: SyntaxError: '{' was never closed Reported by DanTup in PR #570. * fix: remove openclaw models set from sync script — config stays on host openclaw models set writes to openclaw.json, which is correctly locked (root:root 444 + Landlock read-only). Model routing is handled by the host-side gateway via openshell inference set (Step 5), not from inside the sandbox. The sync script should only write NemoClaw's own selection config to ~/.nemoclaw/config.json. Remove openclaw models set call, dead pythonLiteralJson helper, and unused getOpenClawPrimaryModel/DEFAULT_OLLAMA_MODEL imports. --------- Co-authored-by: Frank Ruiz <[email protected]>
Isn't this just brake the openclaw configuration inside the sandbox? I get permission denied trying to set the configs for example: openclaw config set allowedOrigins, returns EACCES: permission denied, copyfile '/sandbox/.openclaw/openclaw.json |
…me (NVIDIA#588) * fix: resolve openclaw.json permissions conflict and scope Dockerfile lockdown - Bake both 'nvidia' and 'inference' providers into openclaw.json at image build time; remove runtime Python config-patching from buildSandboxConfigSyncScript (writes to locked root:root 444 file) - Use `openclaw models set` for runtime model selection (writes to writable agent config in .openclaw-data/) - Add identity/, devices/, canvas/, cron/ to .openclaw-data symlinks so the gateway can write device-auth.json at runtime - Remove dead `openclaw doctor --fix` and `openclaw plugins install` calls from nemoclaw-start.sh (already ran at build time, fail with EPERM at runtime) Caused-by: 2d3f84e (fix: lock gateway config via Landlock filesystem policy) Fixes NVIDIA#514 * fix: remove pragma comments that break inline Python in Dockerfile The # pragma: allowlist secret comments inside the multi-line python3 -c string cause Python to treat everything after # as a comment, swallowing the \ line continuation and closing braces. This results in: SyntaxError: '{' was never closed Reported by DanTup in PR NVIDIA#570. * fix: remove openclaw models set from sync script — config stays on host openclaw models set writes to openclaw.json, which is correctly locked (root:root 444 + Landlock read-only). Model routing is handled by the host-side gateway via openshell inference set (Step 5), not from inside the sandbox. The sync script should only write NemoClaw's own selection config to ~/.nemoclaw/config.json. Remove openclaw models set call, dead pythonLiteralJson helper, and unused getOpenClawPrimaryModel/DEFAULT_OLLAMA_MODEL imports. --------- Co-authored-by: Frank Ruiz <[email protected]>
…me (NVIDIA#588) * fix: resolve openclaw.json permissions conflict and scope Dockerfile lockdown - Bake both 'nvidia' and 'inference' providers into openclaw.json at image build time; remove runtime Python config-patching from buildSandboxConfigSyncScript (writes to locked root:root 444 file) - Use `openclaw models set` for runtime model selection (writes to writable agent config in .openclaw-data/) - Add identity/, devices/, canvas/, cron/ to .openclaw-data symlinks so the gateway can write device-auth.json at runtime - Remove dead `openclaw doctor --fix` and `openclaw plugins install` calls from nemoclaw-start.sh (already ran at build time, fail with EPERM at runtime) Caused-by: 2d3f84e (fix: lock gateway config via Landlock filesystem policy) Fixes NVIDIA#514 * fix: remove pragma comments that break inline Python in Dockerfile The # pragma: allowlist secret comments inside the multi-line python3 -c string cause Python to treat everything after # as a comment, swallowing the \ line continuation and closing braces. This results in: SyntaxError: '{' was never closed Reported by DanTup in PR NVIDIA#570. * fix: remove openclaw models set from sync script — config stays on host openclaw models set writes to openclaw.json, which is correctly locked (root:root 444 + Landlock read-only). Model routing is handled by the host-side gateway via openshell inference set (Step 5), not from inside the sandbox. The sync script should only write NemoClaw's own selection config to ~/.nemoclaw/config.json. Remove openclaw models set call, dead pythonLiteralJson helper, and unused getOpenClawPrimaryModel/DEFAULT_OLLAMA_MODEL imports. --------- Co-authored-by: Frank Ruiz <[email protected]>
NemoClaw v1 no longer offers the Deep Agents Code harness (`nvidia.fabric.langchain.deepagents-code`), and pins a Fabric revision without its adapter. The LangChain Deep Agents harness (`nvidia.fabric.langchain.deepagents`) stays as it is. ## Problem The Deep Agents Code integration is on hold: its Fabric adapter pull requests, NVIDIA/NeMo-Fabric#571 and #575, are closed. `v1` still pins Fabric `e5b5ebf2`, which merges both, and builds, catalogs, documents, and live-tests a `deepagents-code` image. ## Change What users lose: - the `deepagents-code` agent image and Bake target, and the harness's entry in the bundled catalog; - `examples/fabric-deepagents-code.yaml`; - the `terminal` interface: apply no longer prints an `Open` command, and JSON `interfaces` entries no longer carry `launcher` or `signIn: sandbox_exec`. The Fabric pin moves to `934ab7eca1ec9ac86a22fd24913f2e9d68637c4a`, branch `integration/nemoclaw-pin-no-dcode` on `cv/NeMo-Fabric`. It starts from NVIDIA/NeMo-Fabric `main` at `035bc2fe`, which has #568 and #569, and merges the head branches of #570, #573, #574, #572, and #576, in that order. - #574's branch contains #573's and then removes OpenClaw's Control UI to keep the two pull requests' diffs apart (`9855259c`). Merging both dropped the Control UI, so the branch reverts that commit; OpenClaw's files then match #573's head. - The one textual conflict, in Fabric's `docs/integrations/harness/hermes.mdx`, keeps #574's layout and adds #576's `runtime.keep_state` paragraph. - The regenerated `image/fabric/catalog.json` differs from `e5b5ebf2`'s only by the removed adapter and the revision; the other 11 descriptors are unchanged. OpenClaw's supported version is still 2026.9.34. - The fixture image the HCL cases name, and the registration names in `openshift-external-two-providers`, follow the new catalog. `SignIn::SandboxExec`, the interface `launcher` field, and their CLI output and tests are removed. Only Deep Agents Code's terminal used them. Pi's descriptor at the new pin declares no interfaces, and no open NeMo-Fabric pull request adds one: the two that touch Pi, #604 and #595, change a health test and the README. The four model-tuning tests from #14111 keep their check, and now select Codex instead of Deep Agents Code. Codex accepts only `models.base_url` among model fields and declares no model extension. Pi isn't used: its `config.accepts` lists only `models.base_url`, but its model extension declares `max_tokens`, which planning accepts as a legacy extension field, so the `maxTokens` cases fail with Pi. The Docker live suite and `cargo ci live-images` no longer build or pull a `deepagents-code` image. The verify-yaml-deployment skill drops its Deep Agents Code agent and terminal feature; verify-fabric-boundary now carries, in its native-interfaces page, the pseudo-terminal driver its `tui` check took from that feature. Fern's redirects for the old Deep Agents Code quickstart pages stay. ## Beyond CI - Fabric `934ab7ec`: its Rust workspace tests, except `fabric-python`, which needs `libpython3.12` to link; its Python suite (3,282 passed); and its TypeScript tests passed. The OpenCode tests failed because the host has Bun 1.3.14 and the adapter needs 1.4.2 or later. `just check-adapter-catalog` passed. - GitHub's `codeload` archives of `934ab7ec` under `NVIDIA/NeMo-Fabric` and `cv/NeMo-Fabric` have the pinned SHA-256. - On `linux_arm64`, `cargo images build` built all 11 production agent images and the reference image, `cargo images qualify` passed for all 12, and `catalog.py` run with the built Claude Code image's interpreter reproduced the committed catalog. `cargo ci live-docker` passed. - With the tuning check disabled, the three rejection tests failed; counting a null extension as set failed the fourth. Not run: `cargo ci live-kind`, and the images on `linux/amd64`; the Kubernetes images change only by the Fabric pin.
…lockdown
openclaw models setfor runtime model selection (writes to writable agent config in .openclaw-data/)openclaw doctor --fixandopenclaw plugins installcalls from nemoclaw-start.sh (already ran at build time, fail with EPERM at runtime)Caused-by: 2d3f84e (fix: lock gateway config via Landlock filesystem policy) Fixes #514
Summary
Related Issue
Changes
Type of Change
Testing
make checkpasses.npm testpasses.make docsbuilds without warnings. (for doc-only changes)Checklist
General
Code Changes
make formatapplied (TypeScript and Python).Doc Changes
update-docsagent skill to draft changes while complying with the style guide. For example, prompt your agent with "/update-docscatch up the docs for the new changes I made in this PR."Summary by CodeRabbit
New Features
Improvements
Tests