Repository navigation
fix(cli): connect to the default sandbox when no name is given - #6629
Conversation
…A#6627) `nemoclaw connect` parsed "connect" as a sandbox name and exited 1 with "Sandbox 'connect' does not exist". Route the bare invocation to the default sandbox instead, keep the name-first grammar for a sandbox literally named "connect", print guidance when no default resolves, and hint the correct order for `nemoclaw connect <name>`. Fixes NVIDIA#6627 Signed-off-by: Tony Luo <[email protected]>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
📝 WalkthroughWalkthrough
ChangesBare connect routing
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant CLI
participant dispatchSandboxArgv
participant Registry
participant sandboxConnect
CLI->>dispatchSandboxArgv: nemoclaw connect
dispatchSandboxArgv->>Registry: resolve default sandbox
Registry-->>dispatchSandboxArgv: sandbox name or missing-default state
dispatchSandboxArgv->>sandboxConnect: connect with sandbox and flags
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
cv
left a comment
There was a problem hiding this comment.
Reviewed exact head 06692a093. The core #6627 dispatch fix looks correct and the focused security review is clean, but both trusted advisors from run 29106680679 return merge_after_fixes:
-
Align the no-default path and tests with the real registry contract.
registry.getDefault()already returns the first non-pending registered sandbox when the stored pointer is absent or invalid. The new “registered sandboxes but no default” branch therefore cannot occur through the production API, while the harness can manufacture it by stubbinggetDefault()independently oflistSandboxes(). Either change the registry contract intentionally (with callers/docs/tests updated) or remove the unreachable branch and make the harness derive the fallback exactly as production does. -
Offset the central dispatcher growth. This adds 76 lines to
src/lib/cli/public-dispatch.ts. Both advisors recommend extracting the three bare-connect helpers into a focused module while preserving the existing grammar and trust-boundary tests. -
Refresh behavior evidence after the change. The trusted E2E advisor run 29106680637 requires
docs-validationand identifies a high-value live gap for bare default-sandbox connect (including the no-default path). Please add/run the focused live acceptance or dispatch the recommendedfull-e2e,sandbox-rlimits-connectcoverage with an explicit rationale if an existing target proves it.
The unrelated CLI-shard timeout is already rerunning separately; it is not a source blocker.
Signed-off-by: Carlos Villela <[email protected]>
E2E Target Results —
|
| Job | Result |
|---|---|
| agent-turn-latency | |
| bedrock-runtime-compatible-anthropic | |
| brave-search | |
| channels-add-remove | |
| channels-stop-start | |
| cloud-inference | |
| cloud-onboard | |
| common-egress-agent | |
| concurrent-gateway-ports | |
| credential-migration | |
| credential-sanitization | |
| cron-preflight-inference-local | |
| device-auth-health | |
| diagnostics | |
| docs-validation | |
| double-onboard | |
| full-e2e | |
| gateway-drift-preflight | |
| gateway-guard-recovery | |
| gateway-health-honest | |
| gpu-double-onboard | |
| gpu-e2e | |
| hermes-dashboard | |
| hermes-discord | |
| hermes-e2e | |
| hermes-gpu-startup | |
| hermes-inference-switch | |
| hermes-shields-config | |
| hermes-slack | |
| inference-routing | |
| issue-2478-crash-loop-recovery | |
| issue-4434-tui-unreachable-inference | |
| issue-4462-scope-upgrade-approval | |
| jetson-nvmap-gpu | |
| kimi-inference-compat | |
| launchable-smoke | |
| live | |
| mcp-bridge | |
| mcp-bridge-dev | |
| messaging-compatible-endpoint | |
| messaging-providers | |
| model-router-provider-routed-inference | |
| network-policy | |
| ollama-auth-proxy | |
| onboard-negative-paths | |
| onboard-repair | |
| onboard-resume | |
| openclaw-discord-pairing | |
| openclaw-inference-switch | |
| openclaw-plugin-runtime-exdev | |
| openclaw-skill-cli | |
| openclaw-slack-pairing | |
| openclaw-tui-chat-correlation | |
| openshell-gateway-auth-contract | |
| openshell-gateway-upgrade | |
| openshell-version-pin | |
| overlayfs-autofix | |
| rebuild-hermes | |
| rebuild-hermes-stale-base | |
| rebuild-openclaw | |
| sandbox-operations | |
| sandbox-rebuild | |
| sandbox-rlimits-connect | |
| sandbox-survival | |
| security-posture | |
| sessions-agents-cli | |
| shields-config | |
| skill-agent | |
| snapshot-commands | |
| spark-install | |
| state-backup-restore | |
| telegram-injection | |
| token-rotation | |
| tunnel-lifecycle | |
| upgrade-stale-sandbox |
E2E Advisor RecommendationRequired E2E: Dispatch hint: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
E2E Target RecommendationRequired E2E targets: Dispatch required E2E targets:
Full E2E target advisor summaryE2E Target AdvisorBase: Required E2E targets
Optional E2E targets
Relevant changed files
|
Signed-off-by: Carlos Villela <[email protected]>
E2E Target Results — ❌ Some jobs failedRun: 29126289296
|
E2E Target Results — ✅ All requested jobs passedRun: 29126596452
|
|
@cv, please re-review current
All ordinary CI is green, CodeRabbit is green, and trusted manual GPT/Nemotron artifacts both bind |
cv
left a comment
There was a problem hiding this comment.
Approved exact head 3fbad606cda0f7015659d9d43441c12153f5a3ec after resolving the requested registry-contract and dispatcher-extraction changes. Focused live sandbox-rlimits-connect, docs validation, and the exact-head full-e2e rerun pass; all ordinary PR checks pass; CodeRabbit has no inline findings; and both trusted advisors return high-confidence merge_as_is.
## Summary Release-prep documentation for **v0.0.80**. Adds the `## v0.0.80` section to `docs/about/release-notes.mdx` summarizing user-facing changes since v0.0.79, each bullet linking to the relevant deeper page. Produced via `nemoclaw-contributor-update-docs` (pre-tag path): scanned `v0.0.79..HEAD`, applied the docs skip list (no violations), and confirmed the 8 commits that already shipped in-PR docs are complete. No new pages needed. ## Source summary - #6507 -> `docs/about/release-notes.mdx`: Hermes v0.18 + Slack Block Kit (rich rendering, digest-pinned base image). - #6584 / #6616 -> `docs/about/release-notes.mdx`: host-local OpenRouter runtime attribution adapter (port `11437`, `NEMOCLAW_OPENROUTER_RUNTIME_ADAPTER_PORT`) and native Deep Agents `openrouter` provider. - #6210 / #6292 -> `docs/about/release-notes.mdx`: host corporate proxy CA import into sandbox trust (`NEMOCLAW_CORPORATE_CA_BUNDLE`, `NEMOCLAW_CORPORATE_CA_IMPORT`). - #6624 / #6623 / #6656 -> `docs/about/release-notes.mdx`: release-matched base-image selection, surfaced cluster-image build diagnostics, preserved Nemotron profile registration. - #6629 / #6637 -> `docs/about/release-notes.mdx`: bare `connect` default-sandbox behavior and route-probe hardening. - #6634 / #6626 / #6596 / #5569 / #6610 / #6655 -> `docs/about/release-notes.mdx`: onboarding/recovery preservation, stale-gateway-PID fix, installer backup message, vLLM label on managed platforms. - #6578 / #5670 -> `docs/about/release-notes.mdx`: automatic Hermes light terminal skin and non-interactive `npx` MCP server startup. ## Verification `npm run docs`: 0 errors, all internal links resolve (2 pre-existing hidden-page warnings). `_build/` variants for OpenClaw, Hermes, and Deep Agents all regenerate with the v0.0.80 section. Signed-off-by: Prekshi Vyas <[email protected]> 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added release notes for v0.0.80. * Documented Hermes upgrades, including Slack Block Kit rendering. * Added details on OpenRouter traffic routing and attribution headers. * Documented improved proxy certificate handling and sandbox reliability. * Highlighted enhanced connection defaults, route-probing safeguards, onboarding recovery, and terminal/MCP startup behavior. * Added references to relevant user-guide documentation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Prekshi Vyas <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
…A#6629) ## Summary `nemoclaw connect` without a sandbox name previously parsed `connect` as a sandbox name and exited with `Sandbox 'connect' does not exist.` This PR routes the bare invocation to the registry's ready default sandbox while preserving the name-first grammar for a sandbox literally named `connect`. ## Related Issue Fixes NVIDIA#6627 ## Changes - Extract bare-connect routing into `src/lib/cli/bare-connect-routing.ts`, keeping the central public dispatcher focused on route translation. - Resolve the target through the production registry contract: - use a valid, non-pending stored default; - otherwise fall back to the first non-pending registered sandbox; - if no ready sandbox resolves, attempt registry recovery once. - Give truthful terminal guidance after recovery: - pending-only registrations tell the user to wait for onboarding or remove the incomplete sandbox; - an empty registry points the user to `nemoclaw onboard`. - Preserve connect flags, bare connect help, the literal `connect` sandbox name, and the reversed-order command hint. - Align the direct-dispatch harness with the production default-selection contract, add pending-state coverage, and exercise bare connect through the real CLI entrypoint. - Change the existing `sandbox-rlimits-connect` live acceptance path to attach with bare `nemoclaw connect` after onboarding establishes the default. - Document the exact default/fallback and failure behavior in the command reference. Note on the regression claim: the dispatcher sources are byte-identical between `v0.0.77` and `v0.0.79`, so no intervening dispatcher change appears to have altered this path. This PR fixes the behavior going forward. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [x] 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: - [x] Docs updated for user-facing behavior changes - [ ] Docs 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: ## Verification - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or `npm run check:diff` passed when hooks were skipped or unavailable - [x] Targeted behavior tests pass for the current change set, or tests are marked not applicable above — `npx vitest run --project integration test/cli/dispatch-basics.test.ts` (28 passed); `npm run typecheck:cli` passed - [x] Applicable broad gate passed — `npx vitest run --project e2e-support` (871 passed); diff-aware mock/live parity gate and its three mapped fast suites passed - [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) — passed with 0 errors and 2 pre-existing Fern warnings - [x] Doc pages follow the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only) Exact-head evidence: [`docs-validation` and `sandbox-rlimits-connect` passed](https://github.com/NVIDIA/NemoClaw/actions/runs/29126289296); [`full-e2e` timing rerun passed](https://github.com/NVIDIA/NemoClaw/actions/runs/29126596452); [GPT-5.5 and Nemotron both returned high-confidence `merge_as_is`](https://github.com/NVIDIA/NemoClaw/actions/runs/29126281775). --- Signed-off-by: Tony Luo <[email protected]> Signed-off-by: Carlos Villela <[email protected]> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added smarter routing for bare `nemoclaw connect`, which now targets the configured default sandbox and forwards connect flags (for example `--probe-only`). * Preserved “name-first” behavior when a sandbox is literally named `connect`. * **Bug Fixes** * Improved fallback behavior when defaults are invalid (uses the first non-pending sandbox) and when only pending sandboxes exist (clear onboarding/setup guidance). * Enhanced errors and recovery guidance when no sandboxes are registered, plus better feedback for reversed command order and `connect --help` handling. * **Documentation** * Updated command reference and examples to match the new bare-command behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Tony Luo <[email protected]> Signed-off-by: Carlos Villela <[email protected]> Co-authored-by: J. Yaunches <[email protected]> Co-authored-by: Carlos Villela <[email protected]>
## Summary Release-prep documentation for **v0.0.80**. Adds the `## v0.0.80` section to `docs/about/release-notes.mdx` summarizing user-facing changes since v0.0.79, each bullet linking to the relevant deeper page. Produced via `nemoclaw-contributor-update-docs` (pre-tag path): scanned `v0.0.79..HEAD`, applied the docs skip list (no violations), and confirmed the 8 commits that already shipped in-PR docs are complete. No new pages needed. ## Source summary - NVIDIA#6507 -> `docs/about/release-notes.mdx`: Hermes v0.18 + Slack Block Kit (rich rendering, digest-pinned base image). - NVIDIA#6584 / NVIDIA#6616 -> `docs/about/release-notes.mdx`: host-local OpenRouter runtime attribution adapter (port `11437`, `NEMOCLAW_OPENROUTER_RUNTIME_ADAPTER_PORT`) and native Deep Agents `openrouter` provider. - NVIDIA#6210 / NVIDIA#6292 -> `docs/about/release-notes.mdx`: host corporate proxy CA import into sandbox trust (`NEMOCLAW_CORPORATE_CA_BUNDLE`, `NEMOCLAW_CORPORATE_CA_IMPORT`). - NVIDIA#6624 / NVIDIA#6623 / NVIDIA#6656 -> `docs/about/release-notes.mdx`: release-matched base-image selection, surfaced cluster-image build diagnostics, preserved Nemotron profile registration. - NVIDIA#6629 / NVIDIA#6637 -> `docs/about/release-notes.mdx`: bare `connect` default-sandbox behavior and route-probe hardening. - NVIDIA#6634 / NVIDIA#6626 / NVIDIA#6596 / NVIDIA#5569 / NVIDIA#6610 / NVIDIA#6655 -> `docs/about/release-notes.mdx`: onboarding/recovery preservation, stale-gateway-PID fix, installer backup message, vLLM label on managed platforms. - NVIDIA#6578 / NVIDIA#5670 -> `docs/about/release-notes.mdx`: automatic Hermes light terminal skin and non-interactive `npx` MCP server startup. ## Verification `npm run docs`: 0 errors, all internal links resolve (2 pre-existing hidden-page warnings). `_build/` variants for OpenClaw, Hermes, and Deep Agents all regenerate with the v0.0.80 section. Signed-off-by: Prekshi Vyas <[email protected]> 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added release notes for v0.0.80. * Documented Hermes upgrades, including Slack Block Kit rendering. * Added details on OpenRouter traffic routing and attribution headers. * Documented improved proxy certificate handling and sandbox reliability. * Highlighted enhanced connection defaults, route-probing safeguards, onboarding recovery, and terminal/MCP startup behavior. * Added references to relevant user-guide documentation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Prekshi Vyas <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Summary
nemoclaw connectwithout a sandbox name previously parsedconnectas a sandbox name and exited withSandbox 'connect' does not exist.This PR routes the bare invocation to the registry's ready default sandbox while preserving the name-first grammar for a sandbox literally namedconnect.Related Issue
Fixes #6627
Changes
src/lib/cli/bare-connect-routing.ts, keeping the central public dispatcher focused on route translation.nemoclaw onboard.connectsandbox name, and the reversed-order command hint.sandbox-rlimits-connectlive acceptance path to attach with barenemoclaw connectafter onboarding establishes the default.Note on the regression claim: the dispatcher sources are byte-identical between
v0.0.77andv0.0.79, so no intervening dispatcher change appears to have altered this path. This PR fixes the behavior going forward.Type of Change
Quality Gates
Verification
Verifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run check:diffpassed when hooks were skipped or unavailablenpx vitest run --project integration test/cli/dispatch-basics.test.ts(28 passed);npm run typecheck:clipassednpx vitest run --project e2e-support(871 passed); diff-aware mock/live parity gate and its three mapped fast suites passednpm run docsbuilds without warnings (doc changes only) — passed with 0 errors and 2 pre-existing Fern warningsExact-head evidence:
docs-validationandsandbox-rlimits-connectpassed;full-e2etiming rerun passed; GPT-5.5 and Nemotron both returned high-confidencemerge_as_is.Signed-off-by: Tony Luo [email protected]
Signed-off-by: Carlos Villela [email protected]
Summary by CodeRabbit
nemoclaw connect, which now targets the configured default sandbox and forwards connect flags (for example--probe-only).connect.connect --helphandling.