fix(cli): align list default sandbox with env overrides (#1077) - #4866
Conversation
Extend resolveDefaultSandboxName to getSandboxInventory so nemoclaw list marks the env-resolved sandbox as default, matching status/start/stop. Consolidate NVIDIA#1077 test env isolation into shared beforeEach/afterEach hooks. Signed-off-by: Thabhelo <50872400+Thabhelo@users.noreply.github.com>
|
Wondering what really moved? Review this PR in Change Stack to inspect semantic changes, definitions, and references. 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 (3)
📝 WalkthroughWalkthroughThis PR implements environment-variable-driven default sandbox resolution in the inventory service by replacing direct default access with ChangesDefault Sandbox Resolution and Test Consolidation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
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 |
|
@prekshivyas — follow-up on your non-blocking review notes from #4756. |
## Summary - Adds the `v0.0.60` section to `docs/about/release-notes.mdx` using the dev announcement from discussion #4877. - Fills the source-doc gaps found during release-prep review across inference, policy tiers, command behavior, security boundaries, Hermes dashboard/tooling, runtime context, and troubleshooting. - Refreshes generated agent skills under `.agents/skills/` from the current Fern docs output and upgrades Fern from `5.44.3` to `5.45.0`. ## Source summary - #4037 -> `docs/reference/architecture.mdx`, `docs/about/how-it-works.mdx`, `docs/about/release-notes.mdx`: Documents system-only runtime context that stays out of visible chat. - #4875 -> `docs/reference/architecture.mdx`, `docs/about/how-it-works.mdx`, `docs/about/release-notes.mdx`: Documents try-first sandbox network/filesystem guidance and clearer failure classification. - #4788 -> `docs/security/best-practices.mdx`, `docs/about/release-notes.mdx`: Documents shared OpenClaw device-approval policy for startup and connect. - #4768 -> `docs/reference/network-policies.mdx`, `docs/network-policy/integration-policy-examples.mdx`, `docs/get-started/quickstart.mdx`, `docs/get-started/quickstart-hermes.mdx`, `docs/reference/commands.mdx`: Documents `weather`, `public-reference`, and Hermes managed-tool gateway preset behavior. - #3788 and #4864 -> `docs/reference/network-policies.mdx`, `docs/reference/commands.mdx`: Documents non-interactive policy-tier fail-fast behavior and interactive prompt fallback. - #4756 and #4866 -> `docs/reference/commands.mdx`: Documents env-aware default sandbox resolution for `list`, `status`, and `tunnel` commands. - #4320 -> `docs/reference/commands.mdx`: Documents `$$nemoclaw tunnel status` behavior. - #4328 -> `docs/reference/commands.mdx`: Documents line-scoped policy preset descriptions in `policy-list`. - #4580 and #4748 -> `docs/reference/architecture.mdx`: Documents package-managed OpenShell gateway service and Docker-driver gateway-marker behavior. - #4598 -> `docs/manage-sandboxes/lifecycle.mdx`: Documents concurrent gateway/dashboard cleanup isolation by sandbox name and port. - #4777 -> `docs/reference/troubleshooting.mdx`: Documents Docker GPU patch rollback behavior. - #4610 -> `docs/reference/troubleshooting.mdx`, `docs/reference/commands.mdx`: Keeps mutable OpenClaw config permission guidance aligned and removes skipped experimental wording. - #4868 -> `docs/reference/commands.mdx`: Keeps `.dockerignore` handling for custom `onboard --from <Dockerfile>` contexts in generated skills. - #4870 -> `docs/reference/commands.mdx`, `docs/manage-sandboxes/runtime-controls.mdx`: Documents `NEMOCLAW_MINIMAL_BOOTSTRAP` and generated skill coverage. - #4641 -> `docs/inference/inference-options.mdx`, `docs/reference/troubleshooting.mdx`: Documents local NVIDIA NIM platform-digest pulls and served-model id adoption. - #4810 and #4867 -> `docs/inference/inference-options.mdx`: Documents stable NGC managed-vLLM image lineage and DGX Station DeepSeek V4 Flash coverage. - #4852 -> `docs/inference/use-local-inference.mdx`, `docs/reference/troubleshooting.mdx`: Documents Ollama model fit filtering, 16K context floor, cold-load retry, and failed-model exclusion. - #4847 -> `docs/inference/switch-inference-providers.mdx`: Documents API-family sync, Hermes `api_mode`, and Bedrock Runtime exception. - #4800 -> `docs/inference/tool-calling-reliability.mdx`: Documents Nemotron managed-inference native tool-search fallback. - #4333 -> `docs/inference/switch-inference-providers.mdx`: Documents interactive multimodal input prompting. - #4086 -> `docs/reference/troubleshooting.mdx`: Keeps proxy bypass normalization in generated troubleshooting coverage. - #4811 and #4855 -> `docs/get-started/quickstart-hermes.mdx`: Documents prebuilt Hermes dashboard assets and TUI recovery without runtime rebuilds. - #4854 -> `docs/inference/switch-inference-providers.mdx`, `docs/reference/commands.mdx`: Documents Hermes proxy API-key placeholder preservation during inference switches. - #4248 -> `docs/manage-sandboxes/messaging-channels.mdx`, `.agents/skills/`: Keeps messaging enrollment behavior aligned with manifest-hook implementation. - #4771 -> `docs/security/best-practices.mdx`, `docs/security/credential-storage.mdx`: Documents Hermes placeholder-only secret boundary for sandbox-visible runtime files. - #4787 -> `docs/security/best-practices.mdx`, `docs/about/release-notes.mdx`: Documents expanded memory scanner examples for OpenAI project keys and Slack app-level tokens. - #4848 -> `docs/reference/commands.mdx`: Documents OpenClaw skill install mirroring into the agent home directory. - #4790 -> `docs/about/release-notes.mdx`: Uses the prior release-prep structure and generated `.agents/skills/` refresh as the template for this release. ## Verification - `python3 scripts/docs-to-skills.py docs/ .agents/skills/ --prefix nemoclaw-user --doc-platform fern-mdx` - `python3 scripts/docs-to-skills.py docs/ .agents/skills/ skills/ --prefix nemoclaw-user --doc-platform fern-mdx --dry-run` - `npm run docs` - `git diff --check` - skip-term scan across `docs/`, `.agents/skills/`, and `skills/` - `npm run build:cli` - `npm run typecheck:cli` - Commit and pre-push hook suites, including markdownlint, gitleaks, env-var docs gate, docs-to-skills verification, and skills YAML tests <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **New Features** * DeepSeek-V4-Flash now available as default inference model for DGX Station. * Hermes dashboard improved with dedicated port and OAuth-authenticated tool gateway selection. * Added weather and public-reference policy presets for expanded agent capabilities. * Enhanced Ollama model selection with GPU memory filtering and automatic retry for timeouts. * **Bug Fixes** * Improved policy tier validation to prevent invalid configurations. * Better sandbox cleanup scoping by port to prevent conflicts across deployments. * Added GPU patch failure recovery with automatic rollback. * **Documentation** * Expanded troubleshooting guides for inference, security, and sandbox lifecycle. * Added .dockerignore best practices for custom deployments. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Carlos Villela <cvillela@nvidia.com>
…#9534) ## Summary `nemoclaw tunnel status` called `showStatus()` with no arguments, so it resolved its PID directory from `NEMOCLAW_SANDBOX`, `SANDBOX_NAME` or the literal string `default` instead of the sandbox that `tunnel start`, `tunnel stop` and `nemoclaw status` target. On any host whose default sandbox is not named `default` it read `/tmp/nemoclaw-services-default` while the cloudflared PID file lived in `/tmp/nemoclaw-services-<default-sandbox>`, and reported a running tunnel as stopped. It also ignored the documented `NEMOCLAW_SANDBOX_NAME` override. After this change the status command performs the same `resolveDefaultSandboxName` step its siblings do. ## Related Issue Fixes #9525 ## Changes - `src/commands/tunnel/status.ts` calls the existing `resolveDefaultSandboxName()` authority directly and passes the resolved name to `showStatus()`. - `src/commands/simple-global-oclif-adapters.test.ts` extends the existing case "maps tunnel and deprecated service commands to service actions" to cover `TunnelStatusCommand`, asserting that `showStatus` receives the resolved sandbox name rather than being called bare. The first revision routed this through a new `runStatusCommand` / `StatusCommandDeps` layer in `src/lib/tunnel/service-command.ts`, mirroring `runStartCommand` and `runStopCommand`. That layer had a single consumer, so it was removed in `0020c9874` in favour of calling the resolver directly, and the two duplicate resolver cases it had added to `service-command.test.ts` were removed with it; the existing resolver tests already own environment priority and unsafe-name behaviour. `src/lib/tunnel/service-command.ts` and `service-command.test.ts` are therefore no longer part of this PR. No new abstraction, configuration, fallback, or compatibility layer. This restores the resolution step that `751459e74` (#4756) and `24fe907f8` (#4866) established for `nemoclaw status` and `nemoclaw list` on 2026-06-05, one day before `89cf90351` (#4320) added `tunnel status` without it. ## Type of Change - [x] 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) ## Quality Gates - [x] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [ ] Tests not applicable — justification: - [ ] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [ ] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: Both added tests fail on `main` and pass with this change. Without the fix, the adapter case reports `runStatusCommand` "Number of calls: 0" because the command still calls `showStatus` directly, and the two `service-command.test.ts` cases fail with `TypeError: runStatusCommand is not a function`. ## Verification - [x] PR description includes a `Signed-off-by:` line and every commit appears as `Verified` in GitHub - [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or `npm run validate:pr` passed after refreshing `origin/main` when hooks were skipped or unavailable - [x] Targeted behavior tests pass for the current change set, or tests are marked not applicable above — command/result or justification: - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — command/result: - [x] Quality Gates section completed with required justifications or waivers - [x] No secrets, API keys, or credentials committed - [ ] `npm run 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) Targeted tests: ``` npx vitest run --project cli src/lib/tunnel/service-command.test.ts \ src/commands/simple-global-oclif-adapters.test.ts \ src/lib/tunnel/services.test.ts src/lib/inventory/index.test.ts Test Files 4 passed (4) Tests 108 passed (108) ``` Repository gates: ``` npm run validate:pr -> exit 0, TypeScript (CLI) Passed npx prek run --from-ref <base> --to-ref HEAD -> Codebase growth guardrails Passed, Source-shape test budget Passed, Repository checks Passed, Oxfmt Passed, Oxlint fixes Passed, gitleaks Passed npm --prefix nemoclaw run typecheck -> clean npx commitlint --from HEAD~1 --to HEAD -> exit 0 ``` The broad `npm test` gate is not checked: this change touches two small CLI modules and their two owning test files, with no runtime or test-harness change. --- Signed-off-by: Udaya Tejas <udayatejas2004@gmail.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Tunnel status now consistently displays information for the resolved default sandbox when no sandbox is explicitly selected. * **Tests** * Updated tunnel status coverage to validate default sandbox resolution and the sandbox name passed to the status display. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Udaya Tejas <udayatejas2004@gmail.com> Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com> Signed-off-by: Julie Yaunches <jyaunches@nvidia.com> Co-authored-by: Prekshi Vyas <prekshiv@nvidia.com> Co-authored-by: Julie Yaunches <jyaunches@nvidia.com> Co-authored-by: Prekshi Vyas <34834085+prekshivyas@users.noreply.github.com>
Summary
Follow-up to #4756 / #1077:
nemoclaw listand inventory JSON now resolve the default sandbox fromSANDBOX_NAME/NEMOCLAW_SANDBOX_NAME/NEMOCLAW_SANDBOX, matchingstatus,start, andstop. Also consolidates #1077 test env isolation into sharedbeforeEach/afterEachhooks.Related Issue
Related to #1077 (follow-up to merged #4756)
Changes
resolveDefaultSandboxName()intogetSandboxInventory()fordefaultSandboxandisDefaultrows*)#1077inventory tests into a nested describe with shared env save/restorebeforeEachenv clearing inservices.test.ts#1077describe blockType of Change
Verification
npx prek run --all-filespassesnpm testpasses (targeted:src/lib/inventory/index.test.ts,src/lib/tunnel/services.test.ts, including-t '#1077')npm run docsbuilds without warnings (doc changes only)Signed-off-by: Thabhelo 50872400+Thabhelo@users.noreply.github.com
Summary by CodeRabbit
Tests
Refactor