Repository navigation
Conversation
`nemoclaw list` printed "No sandboxes registered" while the live gateway and container were healthy and `nemoclaw <name> status` reported Ready, because the list recovery path required a seed (existing registry entry, onboard session, or requested name) before probing the gateway. After a local registry loss with no seed, it trusted the empty registry. Widen recovery so an empty registry always attempts a bounded, read-only live-gateway inspection — no gateway select/start — whenever OpenShell is connected to a NemoClaw-managed gateway (`nemoclaw` or `nemoclaw-<port>`), never a foreign one. Recovered sandboxes are surfaced display-only and are NOT persisted: the global `openshell sandbox list` exposes only NAME/CREATED/PHASE, so a persisted entry would default agent to "openclaw" everywhere downstream and permanently misclassify a Deep Agents/Hermes sandbox. The renderer shows agent/model/provider/GPU as "unknown" for these rows rather than inventing OpenClaw/CPU defaults. Gateway probes are non-fatal (ignoreProbeErrors) so a hung gateway falls back to the empty registry, and recovery is gated on a clean (status 0) `sandbox list` so error text is never parsed as sandbox names. Signed-off-by: Yimo Jiang <[email protected]>
|
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)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughAdds read-only live-gateway registry recovery for empty local state, carries a ChangesLive gateway recovery and inventory display
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Add TSDoc summaries to the functions introduced/changed for NVIDIA#5714 (registry recovery, gateway lifecycle classification, OpenShell capture, and inventory row projection) to satisfy the CodeRabbit docstring-coverage pre-merge check. No behavior change. Signed-off-by: Yimo Jiang <[email protected]>
Add TSDoc to the OpenShell runtime adapter helpers and the gateway status-parsing helpers in the files touched by NVIDIA#5714 to clear the CodeRabbit docstring-coverage threshold (80%). No behavior change. Signed-off-by: Yimo Jiang <[email protected]>
|
Superseded by #5786, opened from NVIDIA/NemoClaw branch so trusted PR advisor workflows can run. |
|
Closing in favor of #5786. |
…#5786) ## Summary `nemoclaw list` printed "No sandboxes registered" while the live OpenShell gateway and container were healthy and `nemoclaw <name> status` reported `Phase: Ready` (reported on DGX Station with a Deep Agents sandbox). The `list` recovery path required a *seed* — an existing registry entry, an onboard session, or an explicit requested name — before it would probe the gateway. After a local registry loss with no seed, it trusted the empty registry and reported nothing, even though the named-status path could find and reconcile the same sandbox. ## Related Issue Fixes #5714 ## Changes - **Widen list recovery for an empty registry.** `recoverRegistryEntries` now attempts recovery whenever the local registry is empty, even with no session/requested-name seed. - **Bounded, read-only, non-mutating gateway inspection for the unseeded case.** Plain `nemoclaw list` never selects or starts a gateway. It inspects the live sandbox list only when OpenShell is connected to a **NemoClaw-managed** gateway (`nemoclaw` or a per-port `nemoclaw-<port>`) — never a foreign OpenShell gateway. Gateway probes are non-fatal (`ignoreProbeErrors`), so a hung/timed-out gateway falls back to the empty registry instead of exiting the process, and recovery is gated on a clean (`status === 0`) `sandbox list` so error text is never parsed as a sandbox name. - **Display-only recovery — recovered entries are NOT persisted.** The global `openshell sandbox list` exposes only NAME/CREATED/PHASE, not the agent or gateway binding. Persisting a recovered entry would default `agent` to `openclaw` everywhere downstream (state dirs, connect, rebuild, doctor) and permanently misclassify a Deep Agents/Hermes sandbox. Recovered sandboxes are surfaced for the current `list` only; follow-up named commands reconcile the real agent via the gateway. - **Honest rendering.** Recovered rows show `agent`/`model`/`provider`/`GPU` as `unknown` rather than inventing OpenClaw/CPU defaults. - `getNamedGatewayLifecycleState` gains an opt-in `ignoreProbeErrors` (default keeps existing fatal behavior); `captureOpenshell` forwards `includeStderr` so non-fatal probes still capture the gateway status text. ## Type of Change - [x] Code change (feature, bug fix, or refactor) ## Verification Verified end-to-end through the real worktree CLI (`node ./bin/nemoclaw.js …`) against a live OpenShell gateway. The local registry was emptied and the onboard session removed to simulate the reporter's registry loss; the on-disk registry is checked after each run. **1. Pre-fix (reporter mismatch) — `list` blind while a Ready sandbox is live:** ```console $ node ./bin/nemoclaw.js list No sandboxes registered. Run `nemoclaw onboard` to get started. $ node ./bin/nemoclaw.js sbox-4778 status Sandbox: sbox-4778 Model: nvidia/nemotron-3-super-120b-a12b Provider: nvidia-prod ... Phase: Ready # docker ps -a → openshell-sbox-4778-… Up (container healthy, gateway Connected) ``` **2. Post-fix — `list` rediscovers the live sandboxes (display-only, registry stays empty):** ```console $ node ./bin/nemoclaw.js list Recovered 5 sandbox entries from the live OpenShell gateway. Sandboxes: probe3014x agent: unknown model: unknown provider: unknown GPU: unknown policies: none e2e-5468-ollama agent: unknown model: unknown provider: unknown GPU: unknown policies: none issue4538-fix agent: unknown model: unknown provider: unknown GPU: unknown policies: none sbox-4778 agent: unknown model: unknown provider: unknown GPU: unknown policies: none dcode5744 agent: unknown model: unknown provider: unknown GPU: unknown policies: none $ node -e 'console.log(Object.keys(require(process.env.HOME+"/.nemoclaw/sandboxes.json").sandboxes))' [] # recovered for display only — NOT persisted (agent is unknowable from the gateway list) ``` (Recovery was also re-verified while OpenShell was connected to a NemoClaw per-port gateway `nemoclaw-8092` — `connected_other` to a NemoClaw-managed name still recovers; a foreign gateway name does not.) **3. Post-fix graceful degradation — gateway unreachable, empty registry → no crash, no bogus names:** ```console $ node ./bin/nemoclaw.js list # gateway down: Connection refused on :8080 # `openshell sandbox list` → transport error No sandboxes registered. Run `nemoclaw onboard` to get started. $ echo $? 0 ``` Targeted + adjacent unit tests pass (registry-recovery, gateway-runtime, inventory, openshell adapter, repro-2666, gateway/connect drift; ~290 tests), `npm run typecheck:cli` clean, Biome clean; `nemoclaw-start` (126) passes with the `nemoclaw/` subproject deps installed. - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Git hooks passed during commit and push, or `npx prek run --from-ref main --to-ref HEAD` passes - [x] Targeted tests pass for changed behavior - [x] Tests added or updated for new or changed behavior - [x] No secrets, API keys, or credentials committed Signed-off-by: Yimo Jiang <[email protected]> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Improved recovery for empty registries with unseeded sessions via bounded, read-only ephemeral results. * Inventory rendering now supports gateway-recovered sandboxes (uses `unknown` agent/GPU and shows `phase` when available). * Added live sandbox phase parsing with `parseLiveSandboxEntries`. * **Bug Fixes** * Added stderr retention for lifecycle/probe classification (`includeStderr`) when probe errors are ignored. * Prevented transient recovery/display markers (`recoveredFromGateway`, `livePhase`) from persisting to disk. * **Tests** * Added cases for unseeded vs seeded recovery, probe option behavior, and phase parsing variations. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- Supersedes #5771 (reopened from NVIDIA/NemoClaw branch so trusted advisor workflows can run). --------- Signed-off-by: Yimo Jiang <[email protected]> Co-authored-by: Carlos Villela <[email protected]>
…NVIDIA#5786) ## Summary `nemoclaw list` printed "No sandboxes registered" while the live OpenShell gateway and container were healthy and `nemoclaw <name> status` reported `Phase: Ready` (reported on DGX Station with a Deep Agents sandbox). The `list` recovery path required a *seed* — an existing registry entry, an onboard session, or an explicit requested name — before it would probe the gateway. After a local registry loss with no seed, it trusted the empty registry and reported nothing, even though the named-status path could find and reconcile the same sandbox. ## Related Issue Fixes NVIDIA#5714 ## Changes - **Widen list recovery for an empty registry.** `recoverRegistryEntries` now attempts recovery whenever the local registry is empty, even with no session/requested-name seed. - **Bounded, read-only, non-mutating gateway inspection for the unseeded case.** Plain `nemoclaw list` never selects or starts a gateway. It inspects the live sandbox list only when OpenShell is connected to a **NemoClaw-managed** gateway (`nemoclaw` or a per-port `nemoclaw-<port>`) — never a foreign OpenShell gateway. Gateway probes are non-fatal (`ignoreProbeErrors`), so a hung/timed-out gateway falls back to the empty registry instead of exiting the process, and recovery is gated on a clean (`status === 0`) `sandbox list` so error text is never parsed as a sandbox name. - **Display-only recovery — recovered entries are NOT persisted.** The global `openshell sandbox list` exposes only NAME/CREATED/PHASE, not the agent or gateway binding. Persisting a recovered entry would default `agent` to `openclaw` everywhere downstream (state dirs, connect, rebuild, doctor) and permanently misclassify a Deep Agents/Hermes sandbox. Recovered sandboxes are surfaced for the current `list` only; follow-up named commands reconcile the real agent via the gateway. - **Honest rendering.** Recovered rows show `agent`/`model`/`provider`/`GPU` as `unknown` rather than inventing OpenClaw/CPU defaults. - `getNamedGatewayLifecycleState` gains an opt-in `ignoreProbeErrors` (default keeps existing fatal behavior); `captureOpenshell` forwards `includeStderr` so non-fatal probes still capture the gateway status text. ## Type of Change - [x] Code change (feature, bug fix, or refactor) ## Verification Verified end-to-end through the real worktree CLI (`node ./bin/nemoclaw.js …`) against a live OpenShell gateway. The local registry was emptied and the onboard session removed to simulate the reporter's registry loss; the on-disk registry is checked after each run. **1. Pre-fix (reporter mismatch) — `list` blind while a Ready sandbox is live:** ```console $ node ./bin/nemoclaw.js list No sandboxes registered. Run `nemoclaw onboard` to get started. $ node ./bin/nemoclaw.js sbox-4778 status Sandbox: sbox-4778 Model: nvidia/nemotron-3-super-120b-a12b Provider: nvidia-prod ... Phase: Ready # docker ps -a → openshell-sbox-4778-… Up (container healthy, gateway Connected) ``` **2. Post-fix — `list` rediscovers the live sandboxes (display-only, registry stays empty):** ```console $ node ./bin/nemoclaw.js list Recovered 5 sandbox entries from the live OpenShell gateway. Sandboxes: probe3014x agent: unknown model: unknown provider: unknown GPU: unknown policies: none e2e-5468-ollama agent: unknown model: unknown provider: unknown GPU: unknown policies: none issue4538-fix agent: unknown model: unknown provider: unknown GPU: unknown policies: none sbox-4778 agent: unknown model: unknown provider: unknown GPU: unknown policies: none dcode5744 agent: unknown model: unknown provider: unknown GPU: unknown policies: none $ node -e 'console.log(Object.keys(require(process.env.HOME+"/.nemoclaw/sandboxes.json").sandboxes))' [] # recovered for display only — NOT persisted (agent is unknowable from the gateway list) ``` (Recovery was also re-verified while OpenShell was connected to a NemoClaw per-port gateway `nemoclaw-8092` — `connected_other` to a NemoClaw-managed name still recovers; a foreign gateway name does not.) **3. Post-fix graceful degradation — gateway unreachable, empty registry → no crash, no bogus names:** ```console $ node ./bin/nemoclaw.js list # gateway down: Connection refused on :8080 # `openshell sandbox list` → transport error No sandboxes registered. Run `nemoclaw onboard` to get started. $ echo $? 0 ``` Targeted + adjacent unit tests pass (registry-recovery, gateway-runtime, inventory, openshell adapter, repro-2666, gateway/connect drift; ~290 tests), `npm run typecheck:cli` clean, Biome clean; `nemoclaw-start` (126) passes with the `nemoclaw/` subproject deps installed. - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Git hooks passed during commit and push, or `npx prek run --from-ref main --to-ref HEAD` passes - [x] Targeted tests pass for changed behavior - [x] Tests added or updated for new or changed behavior - [x] No secrets, API keys, or credentials committed Signed-off-by: Yimo Jiang <[email protected]> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Improved recovery for empty registries with unseeded sessions via bounded, read-only ephemeral results. * Inventory rendering now supports gateway-recovered sandboxes (uses `unknown` agent/GPU and shows `phase` when available). * Added live sandbox phase parsing with `parseLiveSandboxEntries`. * **Bug Fixes** * Added stderr retention for lifecycle/probe classification (`includeStderr`) when probe errors are ignored. * Prevented transient recovery/display markers (`recoveredFromGateway`, `livePhase`) from persisting to disk. * **Tests** * Added cases for unseeded vs seeded recovery, probe option behavior, and phase parsing variations. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- Supersedes NVIDIA#5771 (reopened from NVIDIA/NemoClaw branch so trusted advisor workflows can run). --------- Signed-off-by: Yimo Jiang <[email protected]> Co-authored-by: Carlos Villela <[email protected]>
Summary
nemoclaw listprinted "No sandboxes registered" while the live OpenShell gateway and container were healthy andnemoclaw <name> statusreportedPhase: Ready(reported on DGX Station with a Deep Agents sandbox). Thelistrecovery path required a seed — an existing registry entry, an onboard session, or an explicit requested name — before it would probe the gateway. After a local registry loss with no seed, it trusted the empty registry and reported nothing, even though the named-status path could find and reconcile the same sandbox.Related Issue
Fixes #5714
Changes
recoverRegistryEntriesnow attempts recovery whenever the local registry is empty, even with no session/requested-name seed.nemoclaw listnever selects or starts a gateway. It inspects the live sandbox list only when OpenShell is connected to a NemoClaw-managed gateway (nemoclawor a per-portnemoclaw-<port>) — never a foreign OpenShell gateway. Gateway probes are non-fatal (ignoreProbeErrors), so a hung/timed-out gateway falls back to the empty registry instead of exiting the process, and recovery is gated on a clean (status === 0)sandbox listso error text is never parsed as a sandbox name.openshell sandbox listexposes only NAME/CREATED/PHASE, not the agent or gateway binding. Persisting a recovered entry would defaultagenttoopenclaweverywhere downstream (state dirs, connect, rebuild, doctor) and permanently misclassify a Deep Agents/Hermes sandbox. Recovered sandboxes are surfaced for the currentlistonly; follow-up named commands reconcile the real agent via the gateway.agent/model/provider/GPUasunknownrather than inventing OpenClaw/CPU defaults.getNamedGatewayLifecycleStategains an opt-inignoreProbeErrors(default keeps existing fatal behavior);captureOpenshellforwardsincludeStderrso non-fatal probes still capture the gateway status text.Type of Change
Verification
Verified end-to-end through the real worktree CLI (
node ./bin/nemoclaw.js …) against a live OpenShell gateway. The local registry was emptied and the onboard session removed to simulate the reporter's registry loss; the on-disk registry is checked after each run.1. Pre-fix (reporter mismatch) —
listblind while a Ready sandbox is live:2. Post-fix —
listrediscovers the live sandboxes (display-only, registry stays empty):(Recovery was also re-verified while OpenShell was connected to a NemoClaw per-port gateway
nemoclaw-8092—connected_otherto a NemoClaw-managed name still recovers; a foreign gateway name does not.)3. Post-fix graceful degradation — gateway unreachable, empty registry → no crash, no bogus names:
Targeted + adjacent unit tests pass (registry-recovery, gateway-runtime, inventory, openshell adapter, repro-2666, gateway/connect drift; ~290 tests),
npm run typecheck:cliclean, Biome clean;nemoclaw-start(126) passes with thenemoclaw/subproject deps installed.Verifiedin GitHubnpx prek run --from-ref main --to-ref HEADpassesSigned-off-by: Yimo Jiang [email protected]
Summary by CodeRabbit
New Features
agent: unknownandGPU: unknownwhen applicable.Bug Fixes