Repository navigation
fix: clear onboard session when stale sandbox is removed (#1316) - #1555
Merged
Merged
Conversation
Signed-off-by: zyang-dev <[email protected]>
cv
approved these changes
Apr 7, 2026
ColinM-sys
added a commit
to ColinM-sys/NemoClaw
that referenced
this pull request
Apr 9, 2026
…not resurrect destroyed sandboxes NVIDIA#1641 reported that after `nemoclaw <name> destroy`, `nemoclaw list` would print "Recovered sandbox inventory from the last onboard session" and re-show the destroyed sandbox, then `nemoclaw <name> connect` would mark it stale and remove it again — looping forever between the two commands. The reporter was on v0.0.6-19-gea9a6f2, which is 13 commits behind ecc1277 (PR NVIDIA#1555), the commit that added `s.sandboxName = null` to `sandboxDestroy()`. So the bug is already fixed on main, but there is no regression test pinning the behavior, which means a future refactor of the destroy or list path could silently re-introduce the loop. Add a regression test in src/lib/inventory-commands.test.ts under "NVIDIA#1641" that exercises the post-destroy state explicitly: registry empty, session present but with sandboxName cleared. Assert that list prints the onboard hint and does NOT print either of the recovery / "last onboarded sandbox was" messages that signal the loop has come back. Refs: NVIDIA#1641, NVIDIA#1555
ColinM-sys
added a commit
to ColinM-sys/NemoClaw
that referenced
this pull request
Apr 10, 2026
…not resurrect destroyed sandboxes NVIDIA#1641 reported that after `nemoclaw <name> destroy`, `nemoclaw list` would print "Recovered sandbox inventory from the last onboard session" and re-show the destroyed sandbox, then `nemoclaw <name> connect` would mark it stale and remove it again — looping forever between the two commands. The reporter was on v0.0.6-19-gea9a6f2, which is 13 commits behind ecc1277 (PR NVIDIA#1555), the commit that added `s.sandboxName = null` to `sandboxDestroy()`. So the bug is already fixed on main, but there is no regression test pinning the behavior, which means a future refactor of the destroy or list path could silently re-introduce the loop. Add a regression test in src/lib/inventory-commands.test.ts under "NVIDIA#1641" that exercises the post-destroy state explicitly: registry empty, session present but with sandboxName cleared. Assert that list prints the onboard hint and does NOT print either of the recovery / "last onboarded sandbox was" messages that signal the loop has come back. Refs: NVIDIA#1641, NVIDIA#1555 Signed-off-by: ColinM-sys <[email protected]>
ColinM-sys
added a commit
to ColinM-sys/NemoClaw
that referenced
this pull request
Apr 14, 2026
…not resurrect destroyed sandboxes NVIDIA#1641 reported that after `nemoclaw <name> destroy`, `nemoclaw list` would print "Recovered sandbox inventory from the last onboard session" and re-show the destroyed sandbox, then `nemoclaw <name> connect` would mark it stale and remove it again — looping forever between the two commands. The reporter was on v0.0.6-19-gea9a6f2, which is 13 commits behind ecc1277 (PR NVIDIA#1555), the commit that added `s.sandboxName = null` to `sandboxDestroy()`. So the bug is already fixed on main, but there is no regression test pinning the behavior, which means a future refactor of the destroy or list path could silently re-introduce the loop. Add a regression test in src/lib/inventory-commands.test.ts under "NVIDIA#1641" that exercises the post-destroy state explicitly: registry empty, session present but with sandboxName cleared. Assert that list prints the onboard hint and does NOT print either of the recovery / "last onboarded sandbox was" messages that signal the loop has come back. Refs: NVIDIA#1641, NVIDIA#1555 Signed-off-by: ColinM-sys <[email protected]>
gemini2026
pushed a commit
to gemini2026/NemoClaw
that referenced
this pull request
Apr 14, 2026
NVIDIA#1555) <!-- markdownlint-disable MD041 --> ## Summary After a sandbox deletion , `nemoclaw list` shows ghost sandboxes recovered from `onboard-session.json`. The `status` command detect the sandbox is missing and remove it from the registry, but `onboard-session.json` is never cleaned, causing `nemoclaw list` to re-add it every time. ## Related Issue Fixes NVIDIA#1316 ## Changes `bin/nemoclaw.js`: Clear `sandboxName` from `onboard-session.json` when a sandbox is removed from the registry, at all three `registry.removeSandbox()` call sites (connect, status, destroy paths). ## Type of Change <!-- Check the one that applies. --> - [x] Code change for a new feature, bug fix, or refactor. - [ ] Code change with doc updates. - [ ] Doc only. Prose changes without code sample modifications. - [ ] Doc only. Includes code sample changes. ## Testing `openshell sandbox delete` -> `nemoclaw list` (deleted sandbox still shown) -> `nemoclaw status` (removes stale entry) → `nemoclaw list` (deleted sandbox reappears). After the fix, the deleted sandbox does not reappear. - [x] `npx prek run --all-files` passes (or equivalently `make check`). - [x] `npm test` passes. - [ ] `make docs` builds without warnings. (for doc-only changes) ## Checklist ### General - [x] I have read and followed the [contributing guide](https://github.com/NVIDIA/NemoClaw/blob/main/CONTRIBUTING.md). - [ ] I have read and followed the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md). (for doc-only changes) ### Code Changes <!-- Skip if this is a doc-only PR. --> - [x] Formatters applied — `npx prek run --all-files` auto-fixes formatting (or `make format` for targeted runs). - [ ] Tests added or updated for new or changed behavior. - [x] No secrets, API keys, or credentials committed. - [ ] Doc pages updated for any user-facing behavior changes (new commands, changed defaults, new features, bug fixes that contradict existing docs). ### Doc Changes <!-- Skip if this PR has no doc changes. --> - [ ] Follows the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md). Try running the `update-docs` agent skill to draft changes while complying with the style guide. For example, prompt your agent with "`/update-docs` catch up the docs for the new changes I made in this PR." - [ ] New pages include SPDX license header and frontmatter, if creating a new page. - [ ] Cross-references and links verified. --- <!-- DCO sign-off (required by CI). Replace with your real name and email. --> Signed-off-by: zyang-dev <[email protected]> Signed-off-by: zyang-dev <[email protected]>
ColinM-sys
added a commit
to ColinM-sys/NemoClaw
that referenced
this pull request
Apr 15, 2026
…not resurrect destroyed sandboxes NVIDIA#1641 reported that after `nemoclaw <name> destroy`, `nemoclaw list` would print "Recovered sandbox inventory from the last onboard session" and re-show the destroyed sandbox, then `nemoclaw <name> connect` would mark it stale and remove it again — looping forever between the two commands. The reporter was on v0.0.6-19-gea9a6f2, which is 13 commits behind ecc1277 (PR NVIDIA#1555), the commit that added `s.sandboxName = null` to `sandboxDestroy()`. So the bug is already fixed on main, but there is no regression test pinning the behavior, which means a future refactor of the destroy or list path could silently re-introduce the loop. Add a regression test in src/lib/inventory-commands.test.ts under "NVIDIA#1641" that exercises the post-destroy state explicitly: registry empty, session present but with sandboxName cleared. Assert that list prints the onboard hint and does NOT print either of the recovery / "last onboarded sandbox was" messages that signal the loop has come back. Refs: NVIDIA#1641, NVIDIA#1555 Signed-off-by: ColinM-sys <[email protected]>
ColinM-sys
added a commit
to ColinM-sys/NemoClaw
that referenced
this pull request
Apr 16, 2026
…not resurrect destroyed sandboxes NVIDIA#1641 reported that after `nemoclaw <name> destroy`, `nemoclaw list` would print "Recovered sandbox inventory from the last onboard session" and re-show the destroyed sandbox, then `nemoclaw <name> connect` would mark it stale and remove it again — looping forever between the two commands. The reporter was on v0.0.6-19-gea9a6f2, which is 13 commits behind ecc1277 (PR NVIDIA#1555), the commit that added `s.sandboxName = null` to `sandboxDestroy()`. So the bug is already fixed on main, but there is no regression test pinning the behavior, which means a future refactor of the destroy or list path could silently re-introduce the loop. Add a regression test in src/lib/inventory-commands.test.ts under "NVIDIA#1641" that exercises the post-destroy state explicitly: registry empty, session present but with sandboxName cleared. Assert that list prints the onboard hint and does NOT print either of the recovery / "last onboarded sandbox was" messages that signal the loop has come back. Refs: NVIDIA#1641, NVIDIA#1555 Signed-off-by: ColinM-sys <[email protected]>
ColinM-sys
added a commit
to ColinM-sys/NemoClaw
that referenced
this pull request
Apr 27, 2026
…not resurrect destroyed sandboxes NVIDIA#1641 reported that after `nemoclaw <name> destroy`, `nemoclaw list` would print "Recovered sandbox inventory from the last onboard session" and re-show the destroyed sandbox, then `nemoclaw <name> connect` would mark it stale and remove it again — looping forever between the two commands. The reporter was on v0.0.6-19-gea9a6f2, which is 13 commits behind ecc1277 (PR NVIDIA#1555), the commit that added `s.sandboxName = null` to `sandboxDestroy()`. So the bug is already fixed on main, but there is no regression test pinning the behavior, which means a future refactor of the destroy or list path could silently re-introduce the loop. Add a regression test in src/lib/inventory-commands.test.ts under "NVIDIA#1641" that exercises the post-destroy state explicitly: registry empty, session present but with sandboxName cleared. Assert that list prints the onboard hint and does NOT print either of the recovery / "last onboarded sandbox was" messages that signal the loop has come back. Refs: NVIDIA#1641, NVIDIA#1555 Signed-off-by: ColinM-sys <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
After a sandbox deletion ,
nemoclaw listshows ghost sandboxes recovered fromonboard-session.json. Thestatuscommand detect the sandbox is missing and remove it from the registry, but
onboard-session.jsonis never cleaned, causingnemoclaw listto re-add it every time.Related Issue
Fixes #1316
Changes
bin/nemoclaw.js: ClearsandboxNamefromonboard-session.jsonwhen a sandbox is removed from the registry, at all threeregistry.removeSandbox()call sites (connect, status, destroy paths).Type of Change
Testing
openshell sandbox delete->nemoclaw list(deleted sandbox still shown) ->nemoclaw status(removesstale entry) →
nemoclaw list(deleted sandbox reappears). After the fix, the deleted sandbox does not reappear.npx prek run --all-filespasses (or equivalentlymake check).npm testpasses.make docsbuilds without warnings. (for doc-only changes)Checklist
General
Code Changes
npx prek run --all-filesauto-fixes formatting (ormake formatfor targeted runs).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."Signed-off-by: zyang-dev [email protected]