fix(cli): use NEMOCLAW_SANDBOX_NAME as interactive prompt default#3082
Conversation
When running `nemoclaw onboard` interactively, NEMOCLAW_SANDBOX_NAME was silently ignored — the prompt always showed [my-assistant] even when the env var was exported. NEMOCLAW_ENDPOINT_URL pre-populates its prompt in the same situation. This change makes sandbox name consistent: getSandboxPromptDefault now checks the env var first, so the prompt shows [mythos] (or whatever name is set) and pressing Enter accepts it. Fixes #3060 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: jason-ma-nv <jama@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe change updates getSandboxPromptDefault to prefer the NEMOCLAW_SANDBOX_NAME environment variable (lowercased and validated) as the interactive/default sandbox name; if invalid or unset it falls back to the existing agent-based default. Tests covering valid override, null-agent usage, invalid values, spaces, and whitespace fallback were added. ChangesEnvironment Variable Priority in Sandbox Naming
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 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 docstrings
🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Comment |
If NEMOCLAW_SANDBOX_NAME held an invalid value (e.g. leading digit, spaces), getSandboxPromptDefault returned it verbatim. The prompt then showed the invalid value as the default; pressing Enter triggered a validateName error that surprised the user. Now falls back to the agent default for invalid values, matching PR #3078's approach. Also adds explicit tests for the invalid-value and space-in-name fallback paths. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: jason-ma-nv <jama@nvidia.com>
ericksoa
left a comment
There was a problem hiding this comment.
Approved based on a fresh review of the updated head. The change is scoped to the sandbox prompt default, handles invalid env values by falling back to the agent default, and the current-main merge passed local build, lint, and focused onboard tests.
## Summary - Bump docs metadata to 0.0.36 and refresh generated NemoClaw user skills. - Document Model Router onboarding, validation retries, Ollama tool checks, Hermes policy behavior, and deployment verification updates. - Remove suppressed experimental command references from public docs per `docs/.docs-skip`. ## Source summary - #2202 -> `docs/get-started/quickstart.md`, `docs/inference/inference-options.md`, `docs/reference/architecture.md`: Document Model Router setup and routed inference architecture. - #3128 -> `docs/get-started/quickstart.md`, `docs/reference/commands.md`: Document deployment verification and HTTP 401 health handling. - #3104 -> `docs/inference/inference-options.md`: Document retry behavior for transient provider validation failures. - #3121 -> `docs/reference/architecture.md`: Document agent-scoped model/provider compatibility manifests. - #3046 -> `docs/reference/architecture.md`: Tie model-specific compatibility setup to known model/provider behavior. - #3097 -> `docs/inference/use-local-inference.md`: Document Ollama tool-calling capability validation. - #3082 -> `docs/reference/commands.md`: Document `NEMOCLAW_SANDBOX_NAME` as the interactive sandbox-name default. - f586cc5, 3442adf -> `docs/get-started/quickstart-hermes.md`, `docs/reference/network-policies.md`: Document Hermes agent-specific baseline policy endpoints. ## Test plan - `python3 scripts/docs-to-skills.py docs/ .agents/skills/ --prefix nemoclaw-user` - `make docs` - `npm run build:cli` - `rg` skip-term scan for `docs/` and generated user skills Made with [Cursor](https://cursor.com) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Model Router provider for complexity-based routed inference. * Ollama/local inference onboarding now validates tool-calling capability. * Added `local-inference` network policy preset. * **Documentation** * New integration policy examples (Outlook, Telegram, Slack, Discord, GitHub, Jira, etc.). * Clarified config immutability workflow and sandbox writable paths. * Hermes baseline network policy documented. * **Improvements** * Health checks treat device-auth responses as live; transient validation retries. * Installer performs pre-install reachability checks; CLI onboarding gained a --fresh option. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary
When running
nemoclaw onboardinteractively,NEMOCLAW_SANDBOX_NAMEwas silently ignored — the sandbox name prompt always showed[my-assistant]even when the env var was exported.NEMOCLAW_ENDPOINT_URLpre-populates its prompt in the same situation. This change makes sandbox name consistent:getSandboxPromptDefaultnow checks the env var first, so the prompt shows the exported value as the default and pressing Enter accepts it.Related Issue
Fixes #3060
Changes
src/lib/onboard.ts:getSandboxPromptDefaultnow readsNEMOCLAW_SANDBOX_NAMEand uses it as the prompt default when set, falling back to the agent-specific hardcoded default (my-assistant/hermes)src/lib/onboard.ts: updated comment near thecannotPromptblock to accurately describe when the env var is consultedtest/onboard.test.ts: added test confirminggetSandboxPromptDefault(null)returns the env var value whenNEMOCLAW_SANDBOX_NAMEis settest/onboard.test.ts: updated the existing hermes-defaults test assertion to reflect thatNEMOCLAW_SANDBOX_NAMEnow takes precedence over the agent-specific defaultType of Change
Verification
npx prek run --all-filespassesnpm testpassesmake docsbuilds without warnings (doc changes only)Signed-off-by: jason-ma-nv jama@nvidia.com
Summary by CodeRabbit
New Features
Tests