fix(install): read sandbox name from onboard session instead of stale registry#1846
Conversation
… registry resolve_default_sandbox_name() reads from sandboxes.json which may contain a stale defaultSandbox entry from a previous gateway. After re-onboarding (e.g. colima delete + reinstall), the completion message shows the old sandbox name instead of the one just created. Check the onboard session first — it always has the sandbox name from the current run. Fall back to the registry only when no session exists. Closes NVIDIA#1839 Signed-off-by: latenighthackathon <latenighthackathon@users.noreply.github.com>
|
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)
📝 WalkthroughWalkthroughUpdated the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 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 unit tests (beta)
Comment |
|
✨ Thanks for submitting this PR, which proposes a way to fix an issue with the completion message showing a stale default sandbox name. Possibly related open issues: |
ericksoa
left a comment
There was a problem hiding this comment.
LGTM — clean fix for stale sandbox name in installer completion message. Session-first priority is correct since install.sh triggers the onboard that writes it. Follows existing patterns, graceful fallback.
Summary
resolve_default_sandbox_name()reads from~/.nemoclaw/sandboxes.json,which may hold a stale
defaultSandboxentry from a previous gateway.After re-onboarding (e.g.
colima delete+ reinstall), the installercompletion message shows the old sandbox name instead of the one just created.
Problem
The "Next:" completion message after
curl|bashinstall always reads thedefault sandbox name from the local registry. When the gateway has been
rebuilt, the old entry becomes stale but is still referenced:
Running
nemoclaw old-sandbox connectthen fails with"Sandbox 'old-sandbox' is not present in the live OpenShell gateway."
Fix
Check
~/.nemoclaw/onboard-session.jsonfirst — it always contains thesandbox name from the current onboard run. Fall back to the registry
only when no session file exists. Priority order:
NEMOCLAW_SANDBOX_NAMEenv var (existing behavior, unchanged)onboard-session.json→sandboxName(new: session-first)sandboxes.json→defaultSandbox(existing fallback)"my-assistant"(existing default)Test plan
NEMOCLAW_SANDBOX_NAMEenv var → overrides everythingsandboxNameis empty → falls through to registry"my-assistant"defaultnpm run build:clicleannpm run typecheck:clicleantest/install-preflight.test.ts— 56/56 passCloses #1839
Signed-off-by: latenighthackathon latenighthackathon@users.noreply.github.com
Summary by CodeRabbit