fix(onboard): attach selected inference provider on sandbox create - #7186
Conversation
Carry the selected inference provider through the serializable create intent so sandbox creation emits it as a create-time provider attachment. This keeps the gateway route backed by an attached provider on fresh, resume, retry, and rebuild, instead of leaving a Ready sandbox whose inference endpoint returns 503 until a manual attach. Fixes #7171 Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughThe selected inference provider now flows through sandbox create intent resolution, is normalized into durable intent state, and is emitted once in sandbox creation arguments alongside other providers. Tests cover trimming, omission, ordering, and deduplication. ChangesInference provider attachment
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 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 remains at 96%, unchanged from the TypeScript / code-coverage/cliThe overall coverage in the Show a code coverage summary of the most impacted files.
Updated |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/lib/onboard/machine/handlers/sandbox-test-fixtures.ts (1)
126-133: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winPreserve
inferenceProviderin the test fixture.This mock always returns
null, so handler tests usingcreateDepscannot prove that the selected provider reaches sandbox creation; a regression in provider wiring could still pass. AddinferenceProvider?: string | nullto the mocked input and returninput.inferenceProvider ?? null.Proposed fix
async (input: { sandboxName: string; + inferenceProvider?: string | null; extraProviders: readonly string[]; staleExtraProviders: readonly string[]; }) => ({ sandboxName: input.sandboxName, - inferenceProvider: null, + inferenceProvider: input.inferenceProvider ?? null,As per path instructions, tests must prove public entrypoints reach the new path and must not use broad mocks that bypass the behavior under test.
🤖 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/machine/handlers/sandbox-test-fixtures.ts` around lines 126 - 133, Update the resolveCreateIntent mock input type in createDeps to include optional inferenceProvider, and return input.inferenceProvider when provided, falling back to null. Preserve the existing sandboxName and provider fields so handler tests can verify the selected provider reaches sandbox creation.Source: Path instructions
🤖 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.
Inline comments:
In `@src/lib/onboard/machine/core-flow-phases.test.ts`:
- Around line 217-220: Update the resolveSandboxCreateIntent mock to destructure
and return the received inferenceProvider instead of always setting it to null.
Extend the relevant core-flow test assertions to verify that createSandbox
observes the selected provider in the resolved intent.
---
Outside diff comments:
In `@src/lib/onboard/machine/handlers/sandbox-test-fixtures.ts`:
- Around line 126-133: Update the resolveCreateIntent mock input type in
createDeps to include optional inferenceProvider, and return
input.inferenceProvider when provided, falling back to null. Preserve the
existing sandboxName and provider fields so handler tests can verify the
selected provider reaches sandbox creation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 895b83d7-24c2-43d9-ad13-19fb70ce1820
📒 Files selected for processing (10)
src/lib/onboard.tssrc/lib/onboard/machine/core-flow-phases.test.tssrc/lib/onboard/machine/handlers/sandbox-test-fixtures.tssrc/lib/onboard/machine/handlers/sandbox.tssrc/lib/onboard/sandbox-create-intent-resolution.tssrc/lib/onboard/sandbox-create-intent-types.tssrc/lib/onboard/sandbox-create-intent.tssrc/lib/onboard/sandbox-create-plan-materialization.tssrc/lib/onboard/sandbox-create-plan.test.tssrc/lib/onboard/sandbox-create-plan.ts
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
1 warning · 0 suggestionsWarningsWarnings do not block.
|
…nference-provider
…ocks Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
apurvvkumaria
left a comment
There was a problem hiding this comment.
Reviewed exact head d23b750.
The selected inference provider is carried as a normalized, secret-free name through both machine and fallback intent resolution, included in the durable fingerprint, and materialized via tokenized argv with deterministic deduplication across inference, messaging, Hermes-tool, and extra providers. I found no credential exposure, command-injection path, authorization regression, or sandbox/policy weakening.
Independent validation: 68 focused tests passed across create-plan, core-flow, interrupted-intent resume, recreate, checkpoint crash recovery, and prepared build-context coverage; npm run build:cli and npm run typecheck:cli passed. All commits are DCO-signed and GitHub-verified; CodeRabbit has no unresolved thread; exact-head CI, CodeQL, security scans, self-hosted checks, macOS E2E, and all three protected E2E selections passed.
I reviewed the advisor warning about making the interrupted-resume provider assertion more explicit. The current implementation recomputes the same provider on both attempts, the focused resume coverage passes, and the protected gate is green, so I do not consider that non-blocking test-hardening suggestion a merge blocker.
<!-- markdownlint-disable MD041 --> ## Summary Add the canonical dated changelog entry for NemoClaw `v0.0.89` before the release plan captures the tag commit. The entry summarizes the user-visible Station preparation, inference, recovery, policy-disclosure, and CLI-containment changes merged since `v0.0.88`. ## Changes - Add `docs/changelog/2026-07-20.mdx` with the exact `## v0.0.89` release heading, parser-safe SPDX comment, summary, and detailed bullets. - Link each shipped theme to the most specific published OpenClaw documentation routes. - Keep internal E2E, advisory-registry, and review-workflow refactors out of the user-facing release summary. Source summary: - #7214, #7241, #7237, #7223, #7204, #7202, #7183, and #7090 -> `docs/changelog/2026-07-20.mdx`: Summarize qualified DGX Station identity, package-state, PackageKit, DKMS, and reboot-handoff fixes. - #7242, #7221, #7186, #7164, and #6874 -> `docs/changelog/2026-07-20.mdx`: Summarize inference endpoint provenance, provider attachment, managed vLLM cleanup and progress, and Ollama selection guidance. - #7225, #7216, #7192, #7136, #7096, and #6910 -> `docs/changelog/2026-07-20.mdx`: Summarize sandbox readiness, recovery guidance, rebuilt model routing, durable Hermes state, and gateway restart behavior. - #7187 -> `docs/changelog/2026-07-20.mdx`: Summarize complete effective messaging-preset egress disclosure before policy mutation. - #7218, #7165, and #7184 -> `docs/changelog/2026-07-20.mdx`: Summarize structured output containment, terminal-safe route display, and Hermes forward cleanup. ## 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 - [ ] Existing tests cover changed behavior — justification: - [x] Tests not applicable — justification: This PR adds release-history prose only; the focused changelog contract test validates its required structure and routes. - [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: ## 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 — `mise exec node@22.23.1 -- npx vitest run test/changelog-docs.test.ts` (6 passed). - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — not applicable to this doc-only release 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) — `mise exec node@22.23.1 -- npm run docs` completed with 0 errors and 2 existing site-wide 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) — the native changelog entry uses the required parser-safe MDX SPDX comment and does not use frontmatter. --- Signed-off-by: Aaron Erickson <aerickson@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Expanded DGX Station installation support for qualified GB300 and OTA-upgraded environments. * Preserved selected inference providers, endpoints, model pins, and tuning settings during sandbox creation and rebuilds. * Improved sandbox recovery by validating availability and stability before restarting services. * Added clearer policy output showing the complete effective messaging egress configuration. * **Bug Fixes** * Hardened status and inference route displays by sanitizing terminal control characters. * Improved Hermes uninstall behavior by stopping detached dashboard forwarding. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Summary
Onboarding registered the selected inference provider and configured its gateway route but never attached it during sandbox creation, so a
Readysandbox could haveprovider_count=0and return HTTP 503 oninference.localuntil a manualsandbox provider attach, with rebuild recreating the broken state. The selected provider now flows through the serializable create intent and is emitted as a create-time provider attachment, so inference works without manual repair and reproduces deterministically across resume, retry, and rebuild.Related Issue
Fixes #7171
Changes
inferenceProviderfield to the create-intent contract (SandboxCreateIntent,ResolveSandboxCreateIntentInput,CompleteSandboxCreateIntentInput) and carry it through intent resolution; the value normalizes to a trimmed provider name ornulland is never a credential.this.options.provider) and the legacy/fallback create path (provider) into intent resolution.--provider <selected>is emitted exactly once even when the name is duplicated elsewhere.Type of Change
Quality Gates
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/sandbox-create-plan.test.ts→ 19 passed;npx vitest run --project cli src/lib/onboard/→ 3179 passed, 1 skipped, 1 pre-existing unrelated failure (docker-driver-gateway-jwt-bundleconcurrency test, fails on a NodeDEP0205deprecation warning on subprocess stderr, untouched by this change).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)Signed-off-by: Tinson Lai tinsonl@nvidia.com
Summary by CodeRabbit
null).