fix(cli): clear sandbox registry when gateway is destroyed during onboard (fixes: #532)#634
Conversation
…oard Implemented feature with help from Claude Code When onboard detects a stale gateway or starts a fresh one, it runs `openshell gateway destroy` which deletes all sandboxes in OpenShell. However the local NemoClaw registry (~/.nemoclaw/sandboxes.json) was not cleared, leaving stale entries that caused `nemoclaw list` to show sandboxes that no longer exist and `nemoclaw <name> connect` to fail with "sandbox not found". - Add `clearAll()` to registry module to reset all sandbox entries. - Call `registry.clearAll()` after gateway destroy in both preflight cleanup and startGateway (covers all destroy paths). - Add 3 tests for clearAll: multi-sandbox clear, disk persistence, and idempotent call on empty registry. Fixes NVIDIA#532 Signed-off-by: Craig <craig@epic28.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughAdds a Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Implemented feature with help from Claude Code
When onboard detects a stale gateway or starts a fresh one, it runs
openshell gateway destroywhich deletes all sandboxes in OpenShell. However the local NemoClaw registry (~/.nemoclaw/sandboxes.json) was not cleared, leaving stale entries that causednemoclaw listto show sandboxes that no longer exist andnemoclaw <name> connectto fail with "sandbox not found".Summary
Clear the local NemoClaw sandbox registry when a stale gateway is destroyed during onboard preflight. Previously, openshell gateway destroy deleted sandboxes in OpenShell but left stale entries in ~/.nemoclaw/sandboxes.json, causing nemoclaw list to show sandboxes that no longer exist.
Related Issue
#532
Changes
clearAll()to registry module to reset all sandbox entries.registry.clearAll()after gateway destroy in both preflight cleanup and startGateway (covers all destroy paths).Type of Change
Testing
make checkpasses.npm testpasses.make docsbuilds without warnings. (for doc-only changes)Checklist
General
Code Changes
make formatapplied (TypeScript and Python).Doc Changes
update-docsagent skill to draft changes while complying with the style guide. For example, prompt your agent with "/update-docscatch up the docs for the new changes I made in this PR."Summary by CodeRabbit
Bug Fixes
Tests