Skip to content

fix(snapshot): report that restore --to is not available for a managed image - #10619

Merged
rsliter merged 2 commits into
NVIDIA:mainfrom
VishnuR23:fix/snapshot-restore-to-unavailable
Sep 8, 2026
Merged

rsliter merged 2 commits into
NVIDIA:mainfrom
VishnuR23:fix/snapshot-restore-to-unavailable

Conversation

@VishnuR23

@VishnuR23 VishnuR23 commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Outcome

snapshot restore --to <dst> advertised cross-sandbox restore for every snapshot, then
rejected snapshots from NemoClaw-managed images with an internal clone-rebind error.

The CLI help, failure message, and owning documentation now state that --to is not
available for those snapshots. NemoClaw still rejects the operation before it creates,
deletes, or changes the destination.

Reason

The existing managed-workload authority guard intentionally keeps clone and rebind support
dormant. Implementing that support would add product scope. This PR instead fixes the
advertised contract and gives the user an actionable limitation without changing the
fail-closed behavior.

Related issues

Fixes #10462
Relates to #7744

Changes

  • Clarify the --to flag description and managed-image restore error.
  • Document the managed-image limitation next to the cross-sandbox restore workflow.
  • Rename the fixed E2E result classification from the internal rebind mechanism to the
    user-visible unavailable condition.
  • Preserve the existing no-delete and no-create safety assertions.

This adds no mechanism or supported integration. The conflict resolution against current
main also updates the existing workload-source expectation helper and its test.

Verification

  • npx vitest run --project cli src/lib/actions/sandbox/snapshot/managed-profile.test.ts src/lib/actions/sandbox/snapshot-managed-clone-handoff-dormancy.test.ts
    • Passed: 9 tests.
  • npx vitest run --project e2e-support test/e2e/support/snapshot-commands-helpers.test.ts
    • Passed: 27 tests.
  • npm run docs
    • Passed with 0 errors.
  • npm run validate:pr
    • Passed on commit 323b1c301ccf8f72a5211dfc40a96bf0df4d4adf, including pre-commit,
      commit-message, pre-push, secret scanning, repository checks, and CLI TypeScript.
  • npm run review:local
    • Attempted twice. No review was produced because the first isolated dependency copy was
      unusable and the second temporary OpenShell gateway refused connections. This was
      classified as local review infrastructure, not a candidate failure.
  • The live snapshot-commands target pins the changed message and destination-absence
    behavior. It was not run locally because it requires a live sandbox boundary.
  • The diff contains no secrets, API keys, or credentials.

Review notes

The original contributor commit and DCO sign-off are preserved. The current-main conflict
resolution is a signed merge commit, so the contributor branch was updated without a
force-push. Both commits are verified by GitHub.


Signed-off-by: Vishnu Rajeev 19866703+VishnuR23@users.noreply.github.com
Signed-off-by: Rebecca Sliter 571084+rsliter@users.noreply.github.com

Summary by CodeRabbit

  • Bug Fixes

    • Snapshot restores using --to <destination> are now clearly reported as unavailable for sandboxes using NemoClaw-managed images.
    • The restore operation stops before creating, deleting, or modifying the destination sandbox.
    • Error messages and restore status reporting now accurately identify this limitation.
  • Documentation

    • Added guidance explaining that these snapshots must be restored into their source sandbox without using --to.

…d image

`snapshot restore --to <dst>` advertised cross-sandbox restore in `--help` and in the
docs, but `rejectManagedSnapshotCloneUntilRebind` rejects the restore whenever the
snapshot carries managed workload authority. The rejection named an internal
"managed-profile clone rebind" mechanism, so the failure read as a configuration problem
on the user's side.

Name the unavailable capability instead. The flag description, the error message, and both
documentation pages now state that `--to` is not available for a snapshot of a sandbox
that uses a NemoClaw-managed image, and that NemoClaw stops before it changes the
destination.

This does not implement cross-sandbox restore. `src/lib/onboard/lifecycle-contracts.md`
records that no user-visible clone support is advertised, and epic NVIDIA#7744 tracks
user-visible activation.

Refs NVIDIA#10462

Signed-off-by: Vishnu Rajeev <19866703+VishnuR23@users.noreply.github.com>
@copy-pr-bot

copy-pr-bot Bot commented Aug 30, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 537e9b47-76c3-4d4b-b215-e68f23cd612e

📥 Commits

Reviewing files that changed from the base of the PR and between b52b088 and 323b1c3.

📒 Files selected for processing (9)
  • docs/manage-sandboxes/backup-restore.mdx
  • docs/reference/commands.mdx
  • src/commands/sandbox/snapshot/restore.ts
  • src/lib/actions/sandbox/snapshot-managed-clone-handoff-dormancy.test.ts
  • src/lib/actions/sandbox/snapshot/managed-profile.test.ts
  • src/lib/actions/sandbox/snapshot/managed-profile.ts
  • test/e2e/live/snapshot-commands-helpers.ts
  • test/e2e/live/snapshot-commands.test.ts
  • test/e2e/support/snapshot-commands-helpers.test.ts
🚧 Files skipped from review as they are similar to previous changes (9)
  • test/e2e/support/snapshot-commands-helpers.test.ts
  • test/e2e/live/snapshot-commands-helpers.ts
  • src/lib/actions/sandbox/snapshot-managed-clone-handoff-dormancy.test.ts
  • src/lib/actions/sandbox/snapshot/managed-profile.ts
  • src/lib/actions/sandbox/snapshot/managed-profile.test.ts
  • docs/reference/commands.mdx
  • src/commands/sandbox/snapshot/restore.ts
  • docs/manage-sandboxes/backup-restore.mdx
  • test/e2e/live/snapshot-commands.test.ts

Included review availability: Your plan provides up to 12 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

Cross-sandbox snapshot restores from NemoClaw-managed-image sandboxes now reject --to before destination changes. Error messages, restore classifications, documentation, unit tests, and E2E tests reflect this behavior.

Changes

Snapshot restore behavior

Layer / File(s) Summary
Restore restriction and messaging
src/lib/actions/sandbox/snapshot/managed-profile.ts, src/commands/sandbox/snapshot/restore.ts, docs/manage-sandboxes/backup-restore.mdx, docs/reference/commands.mdx
The restore action and documentation state that --to is unavailable for NemoClaw-managed images and does not modify the destination.
Unavailable restore classification
test/e2e/live/snapshot-commands-helpers.ts, src/lib/actions/sandbox/snapshot-managed-clone-handoff-dormancy.test.ts, src/lib/actions/sandbox/snapshot/managed-profile.test.ts, test/e2e/support/snapshot-commands-helpers.test.ts, test/e2e/live/snapshot-commands.test.ts
Restore detection and tests replace managed-clone-rebind-required with managed-clone-not-available and validate the updated error text.

Priority: ⬇️ Low — Defer this change because it only clarifies unavailable cross-sandbox snapshot restores and updates related documentation, messages, and tests without changing restore behavior.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 323b1

Cross-sandbox restores of snapshots using NemoClaw-managed images now clearly report that the operation is unavailable before changing the destination. No current merge-blocking risk is identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 7 files. (2 skipped: 2… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the main change: reporting that snapshot restore with --to is unavailable for a managed image.
Full details: Docstring Coverage

Explanation

Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 7 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@wscurran wscurran added area: cli Command line interface, flags, terminal UX, or output area: docs Documentation, examples, guides, or docs build area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery bug-fix PR fixes a bug or regression labels Sep 4, 2026
@wscurran

wscurran commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

✨ Thanks for the fix. This aligns the CLI help, error message, and documentation with the intended managed-image snapshot restore behavior.


Related open issues:

Resolve current documentation and live E2E conflicts.

Preserve the contributor commit and its DCO sign-off.

Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor finished for commit 323b1c3. Include the Advisor findings in the complete PR feedback collection. Verify and group valid findings before repair.

All previous runs

@rsliter rsliter left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maintainer review: the change is scoped to the documented snapshot restore contract, preserves attribution, and has clean automated review and local validation evidence.

@rsliter
rsliter merged commit 09a52be into NVIDIA:main Sep 8, 2026
72 of 76 checks passed
VishnuR23 added a commit to VishnuR23/NemoClaw that referenced this pull request Sep 21, 2026
The cross-sandbox restore paragraph said the path is available for Docker- and
VM-driver sandboxes. That reads as a grant for every sandbox on those drivers,
including one that uses a NemoClaw-managed image, whose snapshot `restore --to`
NemoClaw refuses. The note above the same section already states that limit, so
the two statements disagreed for a stopped Docker-driver source built from a
managed image.

Name the managed-image limit in the sentence that grants the path, so the
paragraph agrees with the note and with what the command does.

Refs NVIDIA#10619

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VAoaWK8T98zLhCzNUk6RZF
Signed-off-by: Vishnu Rajeev <19866703+VishnuR23@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli Command line interface, flags, terminal UX, or output area: docs Documentation, examples, guides, or docs build area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery bug-fix PR fixes a bug or regression

Projects

None yet

3 participants