fix(onboard): preserve Spark managed-vLLM Express intent on onboard --resume (#7231)#7234
Conversation
…-resume (#7231) A non-interactive DGX Spark Express onboard (NEMOCLAW_PROVIDER=install-vllm) that fails at [3/8] Configuring inference provider printed `nemoclaw onboard --resume`, but resume lost the Express intent: the saved onboard-session.json had provider=null, so resume dropped into the interactive provider menu defaulting to [1] NVIDIA Endpoints instead of continuing the managed-vLLM install, and demanded a --name the recommendation omitted. The #7048 Station Express contract already persists this kind of intent and re-injects the provider env on resume, but it was gated to the DGX Station path (the NEMOCLAW_STATION_EXPRESS marker + a platforms:["station"] model). Extend that same contract to the DGX Spark install-vllm path. - station-express-resume.ts: capture a kind:"spark" resume intent for a non-interactive install-vllm run (no marker required) and re-inject NEMOCLAW_PROVIDER=install-vllm (+ NEMOCLAW_SANDBOX_NAME and a pinned model when one was set) on resume. Spark intents never carry the Station-only receipt/served/checkpoint fields and never set the Station marker/policy env. - onboard-session.ts: clear a spark intent once provider_selection completes (it has no receipt to retire), so it exists only while selection is incomplete and the existing null-until-complete invariants are unchanged. Because the restored env includes NEMOCLAW_SANDBOX_NAME, the printed `nemoclaw onboard --resume` now also works without an explicit --name. Verified live on a DGX Spark (GB10, aarch64): the session now records the spark intent, `nemoclaw onboard --resume` continues the managed-vLLM install instead of defaulting to NVIDIA Endpoints, and a full resume completes with provider=vllm-local and the intent cleared. Signed-off-by: Yanyun Liao <yanyunl@nvidia.com>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds DGX Spark managed-vLLM Express resume intent capture, strict parsing, environment restoration, and session cleanup after provider selection. ChangesSpark Express resume
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant FailedExpress
participant ResumeSession
participant Environment
participant ProviderSelection
FailedExpress->>ResumeSession: persist Spark Express intent
ResumeSession->>Environment: restore install-vllm and non-interactive settings
ResumeSession->>ProviderSelection: resume provider selection
ProviderSelection->>ResumeSession: complete provider selection
ResumeSession->>ResumeSession: clear Spark Express intent
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in commit 0fd3064 in the TypeScript / code-coverage/cliThe overall coverage in commit 0fd3064 in the Show a code coverage summary of the most impacted files.
Updated |
PR Review Advisor — InformationalAdvisor assessment: Informational / high confidence Model lanes
Nemotron output stays in workflow artifacts and does not change the assessment above. E2E guidanceAdvisory only. E2E / PR Gate selects and runs jobs independently. Recommended E2E: 2 optional E2E recommendations
This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/lib/onboard/station-express-resume.ts (1)
19-32: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsider a discriminated union for Station vs. Spark intent shapes.
Making
modeloptional on the shared interface loosens the type for the Station branch too, even though Station intents always carrymodelat runtime (seeparseStationExpressResumeIntent's station branch andgetStationExpressResumeIntent, which both require a resolved model). A discriminated union ({ kind?: undefined; model: string; ... } | { kind: "spark"; model?: string; ... }) would let the compiler continue to enforce "Station intents always have a model" instead of relying purely on runtime checks scattered acrossexpectedEnvironment,parseStationExpressResumeIntent, and callers.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/lib/onboard/station-express-resume.ts` around lines 19 - 32, Replace the shared StationExpressResumeIntent shape with a discriminated union: keep the Station branch identified by an absent or undefined kind and require model plus its Station-only fields, while defining the Spark branch with kind "spark", optional model, and no Station-only receipt/served/checkpoint fields. Update parseStationExpressResumeIntent and getStationExpressResumeIntent as needed to construct and narrow the correct branch.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/lib/onboard/station-express-resume.ts`:
- Around line 19-32: Replace the shared StationExpressResumeIntent shape with a
discriminated union: keep the Station branch identified by an absent or
undefined kind and require model plus its Station-only fields, while defining
the Spark branch with kind "spark", optional model, and no Station-only
receipt/served/checkpoint fields. Update parseStationExpressResumeIntent and
getStationExpressResumeIntent as needed to construct and narrow the correct
branch.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: efb367cc-0f01-4c53-8f11-d79dbf45a54a
📒 Files selected for processing (4)
src/lib/onboard/station-express-resume.test.tssrc/lib/onboard/station-express-resume.tssrc/lib/state/onboard-session.test.tssrc/lib/state/onboard-session.ts
…tore (#7231) Address PR Review Advisor PRA-1: the isolated unit tests validate spark intent capture and wrapper restoration separately, but none exercised the real capture → session persistence → reload → resume-restore sequence, so a wiring change in the entry/session-persistence path could reintroduce the interactive provider-menu fallback while those tests stayed green. Add an integration-style regression that captures the intent via requireStationExpressResumeIntent, persists a failed pre-provider run through the real session store, reloads it through normalizeSession, and resumes via withStationExpressResumeEnvironment backed by the on-disk session — asserting NEMOCLAW_PROVIDER=install-vllm, non-interactive mode, and the recorded sandbox name are restored, and that the Station receipt-retirement path is never touched. Signed-off-by: Yanyun Liao <yanyunl@nvidia.com>
…reateRequire budgets (#7231) The prior follow-up pushed onboard-session.test.ts past the 1500-line test-size budget, and a dedicated new test file would have needed a createRequire seam that the CLI createRequire allowlist forbids adding. Move the spark Express coverage to where it fits the guardrails: - station-express-resume.test.ts (static imports, ample budget) gets the normalize accept/reject case and the capture -> reload-normalization -> resume-restore integration test. The integration test runs the real requireStationExpressResumeIntent capture and normalizeSession reload (the exact transform loadSession applies) rather than a hand-built session, so a wiring change in capture/normalize/restore is still caught (PRA-1). - onboard-session.test.ts (already on the createRequire allowlist, with the on-disk session harness) keeps only the clear-on-complete case, staying under the size budget. No production changes. Signed-off-by: Yanyun Liao <yanyunl@nvidia.com>
|
✨
Related open PRs: Related open issues: |
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
prekshivyas
left a comment
There was a problem hiding this comment.
All required checks are green. The unpinned Spark resume model-environment blocker is fixed with regression coverage, both selected live E2E targets passed, and no unresolved actionable automated-review or security findings remain.
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
prekshivyas
left a comment
There was a problem hiding this comment.
Re-reviewed exact head e8051ec. Spark resume now clears inherited Station/policy variables for the child run and restores the caller environment; the regression test exercises both boundaries. Focused tests (128/128), build/typecheck, security review, receipt, and check:diff pass. Independent maintainer review remains requested because I pushed the fix.
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary This PR adds the canonical dated release entry for NemoClaw v0.0.94 before the tag is cut. The entry reconciles all 26 commits since v0.0.93 and links each user-visible change to its owning documentation. ## Changes - Add `docs/changelog/2026-07-24.mdx` with the exact `## v0.0.94` heading, parser-safe SPDX comment, release summary, and detailed bullets. - Record sandbox restore and update behavior, onboarding and inference changes, network policy behavior, security evidence, Hermes build performance, DGX Station guidance, and E2E validation changes. - Preserve `docs/` as the source of truth without changing the AI-agent documentation routing skill. - Use [E2E run 30075443016](https://github.com/NVIDIA/NemoClaw/actions/runs/30075443016) for release QA evidence at exact tested SHA `04e6dfa883071dda9df429c66e73168e1a995cba`. ### Source summary - [#7461](#7461) -> `docs/changelog/2026-07-24.mdx`: Record the ownership-preserving Hermes image layer reduction and hosted timing comparison. - [#7460](#7460) -> `docs/changelog/2026-07-24.mdx`: Record removal of candidate Hermes swap setup from E2E validation. - [#7458](#7458) -> `docs/security/fern-5.80.1-dependency-review.md`, `docs/changelog/2026-07-24.mdx`: Record the reviewed Fern CLI update. - [#7457](#7457) -> `docs/changelog/2026-07-24.mdx`: Record periodic runner-pressure telemetry. - [#7455](#7455) -> `docs/changelog/2026-07-24.mdx`: Record non-blocking absent Fern previews. - [#7450](#7450) -> `docs/changelog/2026-07-24.mdx`: Record stable cancellation handling for live-test child processes. - [#7449](#7449) -> `docs/changelog/2026-07-24.mdx`: Record parallel plugin EXDEV coverage. - [#7448](#7448) -> `docs/changelog/2026-07-24.mdx`: Record isolated long-running E2E lanes. - [#7444](#7444) -> `docs/changelog/2026-07-24.mdx`: Record exact-head Hermes swap validation. - [#7437](#7437) -> `docs/manage-sandboxes/backup-restore.mdx`, `docs/changelog/2026-07-24.mdx`: Record gateway pairing and authenticated verification after cross-sandbox restore. - [#7436](#7436) -> `docs/manage-sandboxes/backup-restore.mdx`, `docs/reference/commands.mdx`, `docs/changelog/2026-07-24.mdx`: Record selected stale-state cleanup and Hermes virtual-environment access repair. - [#7385](#7385) -> `docs/network-policy/customize-network-policy.mdx`, `docs/changelog/2026-07-24.mdx`: Record the read-only agent-variant route check. - [#7371](#7371) -> `docs/changelog/2026-07-24.mdx`: Record host-artifact verification for session exports. - [#7359](#7359) -> `docs/changelog/2026-07-24.mdx`: Record platform validation for managed vLLM model overrides. - [#7356](#7356) -> `docs/changelog/2026-07-24.mdx`: Record token-shaped value redaction for `sandbox doctor --json`. - [#7354](#7354) -> `docs/security/advisory-early-warning.md`, `docs/changelog/2026-07-24.mdx`: Record advisory correlation and retained audit provenance. - [#7352](#7352) -> `docs/network-policy/customize-network-policy.mdx`, `docs/network-policy/integration-policy-examples.mdx`, `docs/reference/commands.mdx`, `docs/changelog/2026-07-24.mdx`: Record preset reapplication and bounded `tls: skip` guidance. - [#7345](#7345) -> `docs/security/openclaw-2026.6.10-dependency-review.md`, `docs/security/openclaw-2026.7.1-dependency-review.md`, `docs/changelog/2026-07-24.mdx`: Record reviewed npm audit exception enforcement. - [#7340](#7340) -> `docs/network-policy/customize-network-policy.mdx`, `docs/changelog/2026-07-24.mdx`: Record the repaired CLI-reference route. - [#7334](#7334) -> `docs/get-started/dgx-station-preparation.mdx`, `docs/changelog/2026-07-24.mdx`: Record the qualified OTA metadata fallback and narrowed override wording. - [#7322](#7322) -> `docs/changelog/2026-07-24.mdx`: Reconcile the gateway source tag added to plugin registration banners. - [#7284](#7284) -> `docs/manage-sandboxes/update-sandboxes.mdx`, `docs/changelog/2026-07-24.mdx`: Record read-only `upgrade-sandboxes --check` behavior and recorded-gateway selection. - [#7277](#7277) -> `docs/changelog/2026-07-24.mdx`: Reconcile deterministic gateway TCP refusal coverage. - [#7234](#7234) -> `docs/reference/troubleshooting.mdx`, `docs/changelog/2026-07-24.mdx`: Record preserved DGX Spark managed vLLM Express intent on resume. - [#7185](#7185) -> `docs/reference/troubleshooting.mdx`, `docs/changelog/2026-07-24.mdx`: Record IPv4 fallback DNS selection and exact resolver probing. - [#6820](#6820) -> `docs/reference/commands.mdx`, `docs/changelog/2026-07-24.mdx`: Record the versioned, redacted `--events=jsonl` onboarding stream. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [x] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates - [ ] Tests added or updated for changed behavior - [x] Existing tests cover changed behavior — justification: `npx vitest run test/changelog-docs.test.ts` passed 6/6 tests. - [ ] Tests not applicable — justification: - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [ ] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [ ] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Documentation Writer Review - [x] Documentation writer subagent reviewed the completed changes - Result: `docs-updated` - Evidence: `docs/changelog/2026-07-24.mdx`; the writing rules, documentation style, exact release range, skip terms, published routes, and product scope were reviewed; the changelog test passed 6/6; `npm run docs` passed with route checking OK, zero errors, and two existing warnings. - Agent: Codex Desktop <!-- docs-review-head-sha: 65368f9 --> <!-- docs-review-agents-blob-sha: 9c9b36d --> ## DGX Station Hardware Evidence - [ ] Tested on DGX Station - Tested commit: Not applicable - Station profile/scenario: Not applicable - Result: Not applicable - Supporting evidence: Not applicable. This PR does not change `scripts/prepare-dgx-station-host.sh`. ## 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 check:diff` passed when hooks were skipped or unavailable - [x] Targeted behavior tests pass for the current change set, or tests are marked not applicable above — `npx vitest run test/changelog-docs.test.ts` passed 6/6 tests. - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — command/result: Not applicable to the dated changelog entry. - [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). The build passed with zero errors and two 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). Native dated changelog entries use the required parser-safe MDX SPDX comment and no frontmatter. --- Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added the v0.0.94 release changelog. * Documented improvements to sandbox snapshot and restore behavior. * Added updates for gateway selection, policy comparisons, onboarding event output, and DGX recovery workflows. * Documented enhanced diagnostics redaction, npm audit provenance, image assembly performance, and validation stability improvements. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Summary
On DGX Spark, a failed non-interactive managed-vLLM onboard now resumes the same Express flow instead of losing its provider, sandbox, and model intent and dropping into the interactive provider menu. An unpinned resume also isolates inherited model overrides so the Spark default is selected consistently.
Related Issue
Closes #7231
Changes
kind: "spark"resume intent for non-interactiveNEMOCLAW_PROVIDER=install-vllmruns detected on DGX Spark.NEMOCLAW_VLLM_MODELandNEMOCLAW_MODELvalues for an unpinned Spark resume, then restore the caller environment afterward.Type of Change
Quality Gates
Documentation Writer Review
no-docs-needednpm run check:diffpassed.DGX Station Hardware Evidence
Verification
Signed-off-by:line and every commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run check:diffpassed when hooks were skipped or unavailablenpx vitest run --project cli src/lib/onboard/station-express-resume.test.ts src/lib/state/onboard-session.test.ts(2 files, 128 tests passed)npm testfor broad runtime/test-harness changes;npm run checkfor repo-wide validation/coverage changes — command/result:npm run docsbuilds without warnings (doc changes only)Additional validation:
npm run test-size:checkpassed.npm run build:clipassed.npm --prefix nemoclaw run buildpassed.nemoclaw onboard --resumewithout--name, completed withprovider=vllm-local, cleared the intent, and left the sandbox Ready.Signed-off-by: Yanyun Liao yanyunl@nvidia.com