Repository navigation
fix(blueprint): recover empty openclaw.json on sandbox restart (#3118) #3160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
26b04de
fix(blueprint): recover empty openclaw.json on sandbox restart (#3118)
jason-ma-nv e2eda5b
fix(blueprint): address CodeRabbit review on #3118 recovery
jason-ma-nv 35cb3bd
Merge branch 'main' into fix/3118-empty-openclaw-config-recovery
cv 13f91df
Merge branch 'main' into fix/3118-empty-openclaw-config-recovery
jyaunches 50dac86
Merge branch 'main' into fix/3118-empty-openclaw-config-recovery
jason-ma-nv 32e4d85
Merge branch 'main' into fix/3118-empty-openclaw-config-recovery
jason-ma-nv e47a6fc
Merge branch 'main' into fix/3118-empty-openclaw-config-recovery
jason-ma-nv 0a24efc
Merge branch 'main' into fix/3118-empty-openclaw-config-recovery
jason-ma-nv 48f8e7e
Merge branch 'main' into fix/3118-empty-openclaw-config-recovery
jason-ma-nv d2c68f1
Merge branch 'main' into fix/3118-empty-openclaw-config-recovery
jason-ma-nv 59e79ff
Merge branch 'main' into fix/3118-empty-openclaw-config-recovery
jason-ma-nv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: NVIDIA/NemoClaw
Length of output: 1913
🏁 Script executed:
Repository: NVIDIA/NemoClaw
Length of output: 1894
🌐 Web query:
NemoClaw JSON5 config openclaw.json parser💡 Result:
NemoClaw uses openclaw.json as its main OpenClaw configuration file, located at /sandbox/.openclaw/openclaw.json inside the sandbox container. This file is baked into the container image during onboarding and is read-only by design for integrity, with a writable overlay at /sandbox/.openclaw-data/openclaw.json that merges with it (mode: "merge") [1][2][3][4][5]. NemoClaw validates openclaw.json (and other configs) against JSON Schema in CI using tools like ajv-cli or jsonschema, defining structure, types, enums, and additionalProperties: false [1][6]. OpenClaw configs, including openclaw.json, use JSON5 format, supporting comments (//, /* */), trailing commas, unquoted keys, and single quotes. OpenClaw parses them with JSON5.parse or fallbacks like parseJsonWithJson5Fallback (tries JSON.parse first, falls to JSON5.parse on error) [7][8][9][10][11]. Errors like JSON5 parse failures occur if the file is corrupted (e.g., empty) [7]. NemoClaw's safe config I/O uses atomic writes with permissions (0o600) [12]. No NemoClaw-specific parser is mentioned; it relies on OpenClaw's JSON5 handling and adds JSON Schema validation [1][8]. Example structure from sources: agents: { defaults: { model: { primary: "inference/nvidia/nemotron-3-super-120b-a12b" } } }, models: { mode: "merge", providers: { inference: { baseUrl: "https://inference.local/v1", models: [...] } } } [3][13][4]. Official docs at https://docs.nvidia.com/nemoclaw/latest cover CLI but lack full openclaw.json schema/examples; GitHub issues discuss editing workarounds (e.g., chown/chmod, rebuild sandbox) [2][3].
Citations:
Baseline capture rejects valid JSON5 configs, disarming restart-recovery for affected files.
The
openclaw.jsonfile is treated as JSON5 throughout the stack (supporting comments and trailing commas viaJSON5.parseorparseJsonWithJson5Fallback), but this baseline validation uses Python's strictjson.load(). A config with comments or trailing commas will silently skip baseline creation, leaving the restart-recovery path without a known-good restore target for files the rest of the codebase accepts.🤖 Prompt for AI Agents