fix(onboard): propagate context window, max tokens, and reasoning to sandbox image#1956
fix(onboard): propagate context window, max tokens, and reasoning to sandbox image#1956javlund wants to merge 2 commits intoNVIDIA:mainfrom
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)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdded three Nemoclaw build args/env vars— Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/lib/onboard.ts`:
- Around line 1027-1040: POSITIVE_INT_RE currently permits "0", so update the
validation used for contextWindow and maxTokens to only accept positive integers
> 0 (e.g., change POSITIVE_INT_RE to a regex that requires a non-zero leading
digit like /^[1-9][0-9]*$/ or replace the regex check with numeric parsing and a
> 0 check); ensure the same updated validation is applied before calling
dockerfile.replace for NEMOCLAW_CONTEXT_WINDOW and NEMOCLAW_MAX_TOKENS so zero
values are rejected.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 3b708133-f82e-494c-9ea6-bfbead0d0142
📒 Files selected for processing (3)
Dockerfilesrc/lib/onboard.tstest/onboard.test.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
|
✨ Thanks for submitting this PR that proposes a fix to propagate context window, max tokens, and reasoning to the sandbox image, which could help improve the functionality of NemoClaw. |
Summary
The
NEMOCLAW_CONTEXT_WINDOW,NEMOCLAW_MAX_TOKENSandNEMOCLAW_REASONINGvariables were not sent all the way to theopenclaw.jsonfile (and thus the agent configuration), I've tried to fix that. As theDockerfileis altered, this will likely require a sandbox re-creation to kick in.There were a few tests I couldn't get green as they were timing out, but they don't seem to be related to the files changed in this PR.
Changes
Dockerfilewith the same defaults as before, promotes them to ENV, and the Python script reads from os.environ instead of literalspatchStagedDockerfile()inonboard.tsreads the 3 env vars from the host and patches the ARG lines before image buildType of Change
Verification
npx prek run --all-filespassesnpm testpassesmake docsbuilds without warnings (doc changes only)AI Disclosure
Signed-off-by: Jacob Avlund jacob@avlund.dk
Summary by CodeRabbit
New Features
Tests