Commit 41bb231
authored
fix(cli): repair post-merge validation and recovery (NVIDIA#10235)
<!-- markdownlint-disable MD041 -->
## Summary
Repairs stale references left by NVIDIA#10219 so current validation selects
the migrated tests instead of missing paths. It also prevents Vitest
4.1.9 from treating text inside `tsx` as a malformed inline source map
after otherwise completed shards, and completes NVIDIA#10128's timeout
recovery contract by preserving sandbox ownership state and documenting
retry steps.
## Changes
- Point the Ubuntu contract, DGX Station ownership test, validation
selectors, lint scope, maintainer instructions, and internal security
records at their migrated test paths. The affected selector tests and
repository checks protect these mappings.
- Install a test-runner-only compatibility hook for `convert-source-map`
2.0.0 because no stable Vitest 4 release contains the upstream fix. It
returns no source map only when inline source-map parsing throws a
`SyntaxError`; other failures still propagate.
`test/repository/vitest-malformed-source-map-compat.test.ts` protects
the `tsx` marker collision.
- Propagate OpenShell workspace and sandbox deletion timeouts to
`destroy`, refuse local-only `--force` cleanup when the remote result is
unknown, and preserve registry, MCP, and shields recovery authority.
Combined-state tests require gateway status, shields status, then a
destroy retry only after recovery permits it when a timeout overlaps an
active timer or failed pre-delete re-lock.
- Keep the expanded destroy behavior coverage within the existing
test-size budget by placing shared recovery assertions in
`test/helpers/destroy-flow-test-assertions.ts`.
## Type of Change
- [ ] Code change (feature, bug fix, or refactor)
- [x] 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:
- [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 link/justification: Codex Desktop reviewed
commit `63c508ba8`. PASS. Timeout results preserve local ownership and
shields recovery state, the test-only source-map compatibility changes
only malformed source-map handling and propagates other failure classes,
and path-only security-record changes retain the reviewed boundaries.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer,
check name, approval link, and follow-up issue:
## 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:
migrated-reference selection 361/361, E2E support 11/11, package
contract 4/4, Vitest compatibility and create-require ratchets 38/38,
focused destroy source tests 90/90, related destroy integration tests
27/27, and growth guardrails 32/32. CLI and plugin builds, CLI
type-checking, repository checks, `npm run validate:pr`, Oxfmt, Oxlint,
and `git diff --check` passed at `63c508ba8`.
- [ ] Applicable broad gate passed, `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes, command/result: The exact shard 10 command
completed blob-report finalization twice without the source-map parser
crash. Remaining local failures require CI runner tools or host
capabilities. Required GitHub checks remain mandatory.
- [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). It
passed with 0 errors and 2 existing Fern warnings.
- [x] 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)
## Documentation Writer Review
- [x] Documentation writer subagent reviewed the completed changes
- Result: `docs-updated`
- Evidence: Against current base `41a24b994`, the 26-path three-dot diff
updates destroy timeout documentation and recovery behavior, migrated
validation references, and test-only Vitest compatibility. The
conflict-free merge-tree result equals candidate tree
`e83a66e2d1b14f55ed12d05f871aadf82d643b50`. Focused source tests passed
90/90, integration tests passed 27/27, growth guardrails passed 32/32,
the docs build passed with 0 errors and 2 existing warnings, CLI and
plugin builds passed, CLI typecheck passed, repository checks passed,
`npm run validate:pr` passed, and `git diff --check` passed.
- Agent: Codex Desktop
<!-- docs-review-head-sha: 63c508b -->
<!-- docs-review-agents-blob-sha: becb5c5 -->
---
Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Bug Fixes**
- Improved sandbox destruction handling for workspace-cleanup and
sandbox-deletion timeouts.
- Preserved sandbox records when cleanup cannot complete and provided
clearer Shields recovery guidance.
- Prioritized actionable recovery instructions for unreachable gateways
and active cleanup timers.
- **Documentation**
- Updated `destroy` command documentation to explain timeout behavior,
retained volumes, registry preservation, and recovery steps.
- **Tests**
- Added regression coverage for timeout recovery and malformed
source-map handling.
- Updated validation references and expectations for relocated test
suites.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Signed-off-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com>
Co-authored-by: Rebecca Sliter <571084+rsliter@users.noreply.github.com>1 parent d4522de commit 41bb231
21 files changed
Lines changed: 276 additions & 86 deletions
File tree
- .agents/skills
- nemoclaw-maintainer-fix-e2e-failures/references
- nemoclaw-maintainer-runtime-provider/references
- .dsh/tools/infer_validation_for_changed_files
- .github/workflows
- docs/reference
- internal/security-reviews
- src
- commands/sandbox/inference
- lib/actions/sandbox
- test
- helpers
- repository
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
| 61 | + | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2578 | 2578 | | |
2579 | 2579 | | |
2580 | 2580 | | |
2581 | | - | |
| 2581 | + | |
| 2582 | + | |
| 2583 | + | |
| 2584 | + | |
| 2585 | + | |
| 2586 | + | |
| 2587 | + | |
2582 | 2588 | | |
2583 | 2589 | | |
2584 | 2590 | | |
| |||
2593 | 2599 | | |
2594 | 2600 | | |
2595 | 2601 | | |
2596 | | - | |
| 2602 | + | |
2597 | 2603 | | |
2598 | 2604 | | |
| 2605 | + | |
| 2606 | + | |
| 2607 | + | |
| 2608 | + | |
| 2609 | + | |
2599 | 2610 | | |
2600 | 2611 | | |
2601 | 2612 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | | - | |
| 193 | + | |
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | | - | |
| 298 | + | |
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
144 | 145 | | |
145 | 146 | | |
146 | 147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
0 commit comments