Commit 46a0da1
authored
fix(onboard): honor explicit sandbox recreation (#9318)
<!-- markdownlint-disable MD041 -->
## Summary
Explicit `--recreate-sandbox` requests now bypass a stale saved build or
policy fingerprint during resumed onboarding. Previously, the recovery
path rejected the request while instructing the user to supply the flag
that was already present.
## Related Issue
Fixes #9297
## Changes
- Honor explicit sandbox recreation before comparing saved create-input
fingerprints.
- Add regression coverage for build, policy, and durable create-intent
drift while preserving denial without the flag.
## Type of Change
- [x] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [ ] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)
## Quality Gates
- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification: Existing command
documentation already covers resumable onboarding and explicit sandbox
recreation. This fix adds no command, flag, default, configuration, or
user-visible text.
- [x] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [x] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval:
#9318 (comment)
- [x] Non-success, skipped, or missing CI check accepted by maintainer —
the advisory Nemotron second-opinion lane failed, while the primary
Advisor completed with no blockers, warnings, or suggestions and
recommended merge as-is:
#9318 (comment)
## Documentation Writer Review
- [x] Documentation writer subagent reviewed the completed changes
- Result: `no-docs-needed`
- Evidence: Exact-revision review confirmed that existing command and
recovery documentation already covers resumable onboarding and explicit
sandbox recreation. This fix makes the documented `--recreate-sandbox`
recovery instruction work after saved build, policy, or durable create
inputs drift; it adds no command, flag, default, configuration, or
user-visible text. `git diff --check` passed; exact-revision CI and
automated review passed apart from the accepted advisory second-opinion
failure.
- Agent: Codex
<!-- docs-review-head-sha: c797ec9 -->
<!-- docs-review-agents-blob-sha: b9fb6a9 -->
## DGX Station Hardware Evidence
- [ ] Tested on DGX Station
- Tested commit:
- Station profile/scenario:
- Result:
- Supporting evidence:
## Verification
- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run validate:pr` passed after refreshing `origin/main` when hooks
were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — command/result or justification: `npx
vitest run --project cli
src/lib/onboard/machine/handlers/sandbox-checkpoint-crash-recovery.test.ts`
passed 42/42; `npx vitest run --project cli
src/lib/onboard/machine/handlers/sandbox-recreate-journal.test.ts`
passed 15/15.
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result:
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only)
- [ ] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)
---
Signed-off-by: San Dang <sdang@nvidia.com>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Improved sandbox recovery when build or policy settings change.
* Explicit sandbox recreation now proceeds without incorrectly reporting
a fingerprint mismatch error.
* Prevented unnecessary failures when checkpoint configuration changes
during intentional recreation.
* **Tests**
* Added coverage to verify successful sandbox recreation after build or
policy checkpoint changes.
* Confirmed recreation is performed once and completes without errors.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 7534ae3 commit 46a0da1
2 files changed
Lines changed: 74 additions & 3 deletions
Lines changed: 73 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
30 | 33 | | |
31 | | - | |
32 | | - | |
| 34 | + | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
| |||
925 | 928 | | |
926 | 929 | | |
927 | 930 | | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
928 | 959 | | |
929 | 960 | | |
930 | 961 | | |
| |||
1021 | 1052 | | |
1022 | 1053 | | |
1023 | 1054 | | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
1024 | 1094 | | |
1025 | 1095 | | |
1026 | 1096 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
851 | 851 | | |
852 | 852 | | |
853 | 853 | | |
| 854 | + | |
854 | 855 | | |
855 | 856 | | |
856 | 857 | | |
| |||
0 commit comments