fix(onboard): skip Linux systemd override for Windows-host Ollama - #8634
Conversation
📝 WalkthroughWalkthroughThe onboarding flow passes Windows-host Ollama detection into running-daemon handling. Windows-host Ollama skips Linux systemd loopback override logic and uses the reachable host endpoint. The installer sanitizes readiness identifiers, and the base-image workflow expands its path filters. ChangesWindows-host Ollama onboarding
Installer host preflight
Managed-image workflow triggers
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
On WSL2 a running Windows-host Ollama daemon is reached at host.docker.internal. Non-interactive onboard with NEMOCLAW_PROVIDER=install-windows-ollama collapses to the running-daemon handler, which ran a Linux systemd loopback override and exited 1. That override targets a local ollama.service and cannot configure the Windows daemon. Thread the resolved isWindowsHostOllama flag into handleRunningOllamaSelection and skip the override when the daemon is on the Windows host. Restores the behavior first fixed in NVIDIA#4208. Refs: NVIDIA#8596 Signed-off-by: harjoth <harjoth.khara@gmail.com> Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
c7f1f2e to
0753216
Compare
PR Review Advisor — No blocking findings reportedAdvisor assessment: No blocking advisor findings reported Model lanes
Second-opinion terminology and E2E selections are advisory. Live E2E does not run automatically for pull requests. 2 semantic terminology decisionsTerminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.
E2E guidanceAdvisory only. A maintainer can dispatch the default E2E suite for the commit under review. Recommended E2E: None Manual-only E2E: 1 optional E2E recommendation
This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge. |
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
cv
left a comment
There was a problem hiding this comment.
The Windows-host Ollama path now skips only the inapplicable Linux systemd override while preserving existing Linux behavior. Focused handler and flow tests cover both paths, and I found no correctness, compatibility, security, test, or documentation blocker.
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary PR #8634 merged the production readiness-ID sanitization, the required gateway-management fixture, and the current base-image publisher paths. This PR is therefore narrowed to the remaining independent value: package-contract evidence that installer diagnostics reject unstable IDs and deduplicate valid IDs across both output routes. ## Changes - Exercise duplicate valid finding and capability IDs. - Exercise newline-injected, oversized, and pattern-invalid IDs. - Assert each valid ID appears once in the admission summary and once in its fallback diagnostic, while every rejected ID remains absent from installer output. ## Type of Change - [x] Code change (test hardening) - [ ] 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 - [x] Docs not applicable — justification: the final diff changes one package-contract test and does not alter commands, output labels, valid IDs, configuration, defaults, lifecycle behavior, schemas, or support claims. - [ ] Sensitive paths changed (final diff contains no production security, policy, credential, preflight, onboarding, inference, runner, sandbox, or messaging code) - [x] Sensitive-path review completed — the final test-only diff was reviewed at commit `47df4d057`; no production security surface changes, and all nine security categories have no findings. The new negative evidence specifically covers input sanitization, output-injection resistance, deduplication, and fallback-path composition. - [ ] Non-success, skipped, or missing CI check accepted by maintainer ## Documentation Writer Review - [x] Documentation writer subagent reviewed the completed changes - Result: `no-docs-needed` - Evidence: the final diff adds regression assertions for the existing stable-ID and bounded-diagnostic contract. No production or documentation file differs from `main`. - Agent: Codex Desktop <!-- docs-review-head-sha: 47df4d0 --> <!-- docs-review-agents-blob-sha: c4923a3 --> ## Verification - [x] PR description includes a `Signed-off-by:` line and every commit appears as `Verified` in GitHub - [x] `npm exec -- vitest run --project package-contract test/package-contract/installer-host-preflight.test.ts` — 3/3 passed, including malformed and duplicate-ID paths. - [x] `npm exec -- vitest run --project e2e-support test/e2e/support/base-image-publication.test.ts` — 39/39 passed after merging current `main`. - [x] `npm exec -- vitest run --project cli src/lib/onboard/setup-nim-ollama.test.ts src/lib/onboard/setup-nim-flow.test.ts` — 49/49 passed for the merged base behavior. - [x] Installer integration evidence — 97/99 passed in the parallel full run; the two unrelated 5-second timing cases then passed 2/2 when rerun alone with one worker. - [x] `npm run validate:pr` — passed all pre-commit, commit-message, and pre-push checks for the byte-identical final tree; the latest signed merge also passed commit and pre-push hooks. - [x] No secrets, API keys, or credentials committed --- Signed-off-by: Julie Yaunches <jyaunches@nvidia.com> --------- Signed-off-by: Julie Yaunches <jyaunches@nvidia.com> Co-authored-by: Carlos Villela <cvillela@nvidia.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Prekshi Vyas <prekshiv@nvidia.com>
Summary
On WSL2 with Docker Desktop, a running Windows-host Ollama daemon is reached at
host.docker.internal. Non-interactive onboard withNEMOCLAW_PROVIDER=install-windows-ollamacollapses that request to the running-daemon handler, which then applied a Linux systemd loopback override and exited with code 1 before creating the sandbox. That override targets a localollama.service; it cannot configure a daemon that runs on the Windows host.After this change, onboard reuses the reachable Windows-host daemon and never touches a Linux systemd Ollama service. This restores the behavior first fixed in #4208.
PR #8634 also carries three repairs for failures inherited from base SHA
b9a0d98d. The base SHA and PR merge commit failed the same checks. A maintainer directed these repairs through this PR.Related Issue
Refs: #8596
Changes
src/lib/onboard/setup-nim-ollama.ts:handleRunningOllamaSelectionnow takes the resolvedisWindowsHostOllamaflag and skipsensureOllamaLoopbackSystemdOverridewhen the daemon is on the Windows host. The flag defaults tofalse, so the local-Linux path is unchanged.src/lib/onboard/setup-nim-flow.ts: theollamadispatch passes the already-computedisWindowsHostOllama(ollamaHost === host.docker.internal) to the handler.scripts/install.sh: installer preflight reuses validated, deduplicated readiness IDs for headers and detail lines. Malformed IDs cannot enter diagnostic output.test/package-contract/installer-host-preflight.test.ts: the compiled-package fixture supplies the gateway declaration module that installer preflight requires..github/workflows/base-image.yaml: the base-image publisher watches both managed-image activation files and their reviewed path glob.The flag is the smallest signal that separates the two cases. It is already computed in the dispatcher, so nothing new is derived. This is not a compatibility or configuration layer.
Known limit
The flag marks the
host.docker.internalroute only. Two related boundaries are out of scope here and are safe to fix separately:repairLocalInferenceSystemdOverrideOrExit,src/lib/onboard/local-inference-topology.ts) still applies the override for a recordedollama-localprovider, with no way yet to tell a recorded Windows-host daemon from a local one.127.0.0.1, soisWindowsHostOllamareads false; the override then does nothing unless a localollama.servicealso exists.Type of Change
Quality Gates
Documentation Writer Review
no-docs-neededVerification
Signed-off-by:line and every commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run validate:prpassed after refreshingorigin/mainnpm exec -- vitest run --project cli src/lib/onboard/setup-nim-ollama.test.ts src/lib/onboard/setup-nim-flow.test.ts→ 49 passednpm exec -- vitest run --project installer-integration test/install-preflight.test.ts -t 'applies installer storage admission'→ 5 passed, 94 skippednpm exec -- vitest run --project package-contract test/package-contract/installer-host-preflight.test.ts→ 3 passednpm exec -- vitest run --project e2e-support test/e2e/support/base-image-publication.test.ts→ 39 passednpm run typecheck:cli→ passednpm run checks:repository→ passednpm run validate:pr→ passed all applicable pre-commit, commit-message, and pre-push checksvitest run --project integration test/onboard-selection.test.ts→ 64 passedskips the Linux systemd loopback override for a Windows-host Ollama daemon (#8596)fails because the override runs. The [WSL2][Install] express install fails with "Install did not produce ollama.exe on PATH" when Ollama already installed #7472 coordinator assertion fails when the flow does not pass the flag. Both tests pass with the PR changes.Signed-off-by: harjoth harjoth.khara@gmail.com
Signed-off-by: Prekshi Vyas prekshiv@nvidia.com
Summary by CodeRabbit
Bug Fixes
Tests