NVIDIA / NVIDIA/NemoClaw

[WSL2][Sandbox] snapshot restore does not replay a policy preset that was active when the snapshot was taken

Open
#10,950 0 comments 0 reactions 0 assignees View on GitHub
NV QA
Dominant language
TypeScript
Stars
22.5k
Forks
3.1k
Avg merge
1d 1h
Merged PRs (30d)
715

Description

## Description

After a Hermes sandbox snapshot restore, a policy preset that was applied at snapshot time is not reapplied — restore does not replay policy state, even though the restored file state is otherwise correct. Related restore-mechanism family to an existing open defect about stale files not being removed after restore (different specific symptom).

Platform scope: Reproduced on WSL2 (aarch64) only; other platforms not tested.

## Environment

```text
Device: WSL2 (aarch64)
OS: Linux 6.6.87 (build 2)-microsoft-standard-WSL2
Architecture: aarch64
Node.js: v22.23.2
npm: 10.9.8
Docker: Docker Engine 29.6.2
OpenShell CLI: openshell 0.0.106
NemoClaw: v0.0.118
OpenClaw: N/A (Hermes agent runtime, not OpenClaw)
```

## Steps to Reproduce

1. Onboard a Hermes sandbox:
```bash
nemoclaw onboard --name {sandbox} --agent hermes --provider build --policy-mode skip
```
2. Apply a policy preset:
```bash
nemoclaw {sandbox} policy add pypi --yes
```
3. Verify it is applied: `nemoclaw {sandbox} policy list`
4. Create a snapshot:
```bash
nemoclaw {sandbox} snapshot create --name before-change
```
5. Remove the preset: `nemoclaw {sandbox} policy remove pypi`
6. Verify it is no longer applied: `nemoclaw {sandbox} policy list`
7. Restore the snapshot:
```bash
nemoclaw {sandbox} snapshot restore before-change --yes
```
8. Check policy state again: `nemoclaw {sandbox} policy list`

## Expected Result

After restore, the policy list includes the `pypi` preset again, matching the state at snapshot time (per documented snapshot/restore design: presets removed after the snapshot are re-applied on restore).

## Actual Result

```text
After restore, the policy list's applied presets array does not contain 'pypi' — expected [] to include 'pypi'.
```

## Logs

```text
Not captured — only the assertion failure text was retained from the CI run.
```

Contributor guide

Open the contributing guide

Research direction

Start with the nemoclaw policy add/remove/list and snapshot create/restore command paths, reproducing the WSL2 aarch64 sequence in the issue. Trace how snapshot restore handles policy state and verify completion by confirming that restoring before-change makes the pypi preset reappear in nemoclaw {sandbox} policy list.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.