fix(onboard): reuse a running Ollama daemon on WSL mirrored networking - #8190
Conversation
Express install exports NEMOCLAW_PROVIDER=install-windows-ollama for every Windows WSL host running Docker Desktop, without probing whether Ollama already answers. Under WSL mirrored networking the Windows-host daemon answers on the distro's own 127.0.0.1, so findReachableOllamaHost resolves the host as local and isWindowsHostOllama reads false. The provider menu keeps the install entry, the requested key matches it, and onboarding reinstalls through PowerShell interop. When that interop is unreachable, which is the condition that produced the false reading, the run ends with "Install did not produce ollama.exe on PATH". PR #7476 added a !isWindowsHostOllama term to the menu gate. That term is a no-op on this route because isWindowsHostOllama is already false here. Two sites answered a local question from a network address: - resolveRequestedProviderSelection now collapses an install-windows-ollama request to the running ollama entry when a daemon answers, before the key is matched. A Windows-host daemon on an unsupported container runtime still falls through to the existing rejection. - pullOllamaModel now takes the HTTP pull path whenever no local ollama binary exists, not only when the resolved host is host.docker.internal. On mirrored networking the CLI branch ran and failed with "ollama: command not found" against a daemon that answered /api/tags. install-ollama is left alone so the Ollama upgrade entry keeps working. With PowerShell reachable on the same route, onboarding previously selected start-windows-ollama, which stopped and restarted a running daemon and rewrote OLLAMA_HOST to 0.0.0.0:11434 at Windows User scope. It now reuses the daemon and leaves the process and the variable unchanged. Verified on Windows 11 with WSL2 Ubuntu 24.04, Docker Desktop 4.85 and Ollama 0.32.5. The failure reproduces on main under mirrored networking, and onboarding reaches the sandbox build after the change. Reverting the three source files turns exactly the three new tests red. Fixes #7472 Signed-off-by: Hung Le <hple@nvidia.com>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
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)
📝 WalkthroughWalkthroughOllama onboarding now reuses detected Windows-host daemons in supported WSL environments. Model pulling now selects HTTP when the local CLI is unavailable or the host is Docker-internal, and otherwise uses the CLI. ChangesOllama runtime selection
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in commit bf003cd in the TypeScript / code-coverage/cliThe overall coverage in commit bf003cd in the Show a code coverage summary of the most impacted files.
Updated |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/inference/ollama/proxy.test.ts`:
- Around line 432-440: Update the test case around loadProxyForDispatch and
“pulls over HTTP when the daemon resolves on the Windows host” to set
hasLocalCli: true, isolating the Docker-host predicate from the
missing-local-CLI condition while preserving the existing HTTP-versus-bash
assertions.
🪄 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: 8da61e8d-8a3b-402c-b18d-d621b763a4b9
📒 Files selected for processing (6)
src/lib/inference/ollama/proxy.test.tssrc/lib/inference/ollama/proxy.tssrc/lib/onboard/provider-selection.test.tssrc/lib/onboard/provider-selection.tssrc/lib/onboard/setup-nim-flow.test.tssrc/lib/onboard/setup-nim-flow.ts
PR Review Advisor — InformationalAdvisor assessment: Informational / low confidence Model lanes
Second-opinion terminology and E2E selections are advisory. They do not change the primary assessment or E2E / PR Gate. 3 semantic terminology decisionsTerminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.
E2E guidanceAdvisory only. E2E / PR Gate selects and runs jobs independently. Recommended E2E: This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge. |
Signed-off-by: Hung Le <hple@nvidia.com>
…w into fix/mirrored-ollama-reuse
<!-- markdownlint-disable MD041 --> ## Summary Prepares the canonical v0.0.102 release documentation from the current release-labeled scope. The change adds a dated changelog for all 38 user-facing shipping PRs and corrects the OpenClaw agent command reference for the behavior delivered by #8191. ## Changes - Add `docs/changelog/2026-08-04.mdx` with the v0.0.102 release summary, detailed behavior changes, support boundaries, security evidence links, and links to durable documentation. - Update `docs/reference/commands.mdx` to describe non-JSON OpenClaw output capture, its combined limit, marker handling, stream suppression, recovery guidance, and exit behavior. - [#8167](#8167) -> `docs/changelog/2026-08-04.mdx`: Records authenticated attachment of operator-managed llama.cpp servers. - [#8129](#8129) -> `docs/changelog/2026-08-04.mdx`: Records the Experimental managed vLLM profile for two DGX Spark systems. - [#7983](#7983) -> `docs/changelog/2026-08-04.mdx`: Records qualification of the May 2026 GB300WS factory image. - [#8207](#8207) -> `docs/changelog/2026-08-04.mdx`: Records the qualified DGX Station driver transaction. - [#8208](#8208) -> `docs/changelog/2026-08-04.mdx`: Records mode-bound Express resume state. - [#8158](#8158) -> `docs/changelog/2026-08-04.mdx`: Records recovery of host-global dual-Station runtime ownership. - [#8145](#8145) -> `docs/changelog/2026-08-04.mdx`: Records Windows-host Ollama validation from Docker Desktop's network context. - [#8190](#8190) -> `docs/changelog/2026-08-04.mdx`: Records HTTP model pulls when WSL has no local Ollama executable. - [#8195](#8195) -> `docs/changelog/2026-08-04.mdx`: Records reuse of a healthy installer-managed CLI. - [#8053](#8053) -> `docs/changelog/2026-08-04.mdx`: Records early rejection of incompatible OpenShell gateway versions. - [#8098](#8098) -> `docs/changelog/2026-08-04.mdx`: Records the bounded package-service-to-standalone gateway recovery transition. - [#8216](#8216) -> `docs/changelog/2026-08-04.mdx`: Records the final dashboard port selected during multi-sandbox onboarding. - [#8146](#8146) -> `docs/changelog/2026-08-04.mdx`: Records managed startup-state restoration for stopped sandboxes. - [#8092](#8092) -> `docs/changelog/2026-08-04.mdx`: Records gateway watchdog recovery for classified not-serving states. - [#8182](#8182) -> `docs/changelog/2026-08-04.mdx`: Records consistent managed-recovery wait configuration. - [#8040](#8040) -> `docs/changelog/2026-08-04.mdx`: Records Docker sandbox rollback authority through late validation. - [#8130](#8130) -> `docs/changelog/2026-08-04.mdx`: Records bounded Shields deadline recovery and durable containment. - [#8086](#8086) -> `docs/changelog/2026-08-04.mdx`: Records repair of narrowly validated permission-only configuration drift. - [#8122](#8122) -> `docs/changelog/2026-08-04.mdx`: Records prompt failure and guidance for corrupt transition locks. - [#8124](#8124) -> `docs/changelog/2026-08-04.mdx`: Records policy restoration flags, previews, and target revalidation. - [#7886](#7886) -> `docs/changelog/2026-08-04.mdx`: Records explicit destruction after pre-delete Shields hardening failures while preserving recovery authority. - [#7901](#7901) -> `docs/changelog/2026-08-04.mdx`: Records multi-port uninstall behavior and shared-resource preservation. - [#7984](#7984) -> `docs/changelog/2026-08-04.mdx`: Records one classified transient remote MCP startup retry. - [#7954](#7954) -> `docs/changelog/2026-08-04.mdx`: Records bounded hosted-inference probe replies. - [#7574](#7574) -> `docs/changelog/2026-08-04.mdx`: Records preservation of validated reasoning capabilities through onboarding. - [#8089](#8089) -> `docs/changelog/2026-08-04.mdx`: Records proxy routing for Hermes WhatsApp pairing and media traffic. - [#7682](#7682) -> `docs/changelog/2026-08-04.mdx`: Records native Hermes session deletion and identifier validation. - [#8150](#8150) -> `docs/changelog/2026-08-04.mdx`: Records corporate CA trust for LangChain Deep Agents Code image builds. - [#8156](#8156) -> `docs/changelog/2026-08-04.mdx`: Records reviewed managed runtime dependency remediation. - [#8180](#8180) -> `docs/changelog/2026-08-04.mdx`: Records reviewed MCP discovery runtime dependency updates. - [#8196](#8196) -> `docs/changelog/2026-08-04.mdx`: Records private npm dependency remediation across managed images. - [#8203](#8203) -> `docs/changelog/2026-08-04.mdx`: Records reviewed Hermes and LangChain Deep Agents Code Python dependency updates. - [#8125](#8125) -> `docs/changelog/2026-08-04.mdx`: Records bounded diagnostics for invalid enumerated CLI values. - [#8193](#8193) -> `docs/changelog/2026-08-04.mdx`: Records bounded diagnostics for unresolved sandbox base images. - [#8118](#8118) -> `docs/changelog/2026-08-04.mdx`: Records bounded diagnostics for changed gateway authority. - [#8191](#8191) -> `docs/changelog/2026-08-04.mdx`, `docs/reference/commands.mdx`: Records output capture, marker handling, recovery guidance, and exit behavior for non-JSON OpenClaw agent commands. - [#8187](#8187) -> `docs/changelog/2026-08-04.mdx`: Records the aligned interactive-installation start across supported agents. - [#8153](#8153) -> `docs/changelog/2026-08-04.mdx`: Records current product capabilities and support boundaries. ## 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 documentation-only release preparation does not change executable behavior. Existing changelog and published-route tests pass. - [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: Independently reviewed `docs/changelog/2026-08-04.mdx` and `docs/reference/commands.mdx` at commit `b89913780`. All 38 user-facing v0.0.102 PRs are represented, #8191 behavior matches the implementation, and the writing rules, documentation style, controlled terminology, route structure, and skip policy pass review. Targeted tests pass 36/36 and the documentation build completes with 0 errors. - Agent: Codex Desktop independent documentation writer <!-- docs-review-head-sha: b899137 --> <!-- docs-review-agents-blob-sha: 3dd7c24 --> ## DGX Station Hardware Evidence - [ ] Tested on DGX Station - Tested commit: Not applicable - Station profile/scenario: Not applicable - Result: Not applicable - Supporting evidence: Not applicable ## 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 — `npx vitest run --project integration test/changelog-docs.test.ts test/check-docs-published-routes.test.ts` passed 36/36. - [x] Applicable broad gate passed — not applicable to documentation-only changes; `npm run docs` completed successfully with 0 errors. - [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) — completed 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) - [x] New doc pages include SPDX header and frontmatter (new pages only) — the native dated changelog uses the required parser-safe MDX SPDX comment and intentionally has no frontmatter. --- Signed-off-by: Apurv Kumaria <akumaria@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Documentation** - Added release notes for v0.0.102, covering authentication, hardware setup, WSL, installer recovery, sandbox resilience, policy management, inference reliability, CLI improvements, and unified quickstarts. - Updated command documentation to explain how non-JSON agent output is collected, replayed, and reported. - **Bug Fixes** - Improved command-output recovery guidance when output exceeds limits or contains unsupported fallback markers. - Preserved accurate command exit-status reporting after output processing. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Summary
WSL express install aborted when Ollama was already running on the Windows host and WSL used mirrored networking. The daemon answers on the distro's own
127.0.0.1there, soisWindowsHostOllamaread false, the provider menu kept the install entry, and onboarding tried to reinstall through PowerShell interop. Onboarding now reuses the running daemon on that route, and the model pull no longer shells out to anollamabinary that does not exist in WSL.Related Issue
Fixes #7472
Changes
resolveRequestedProviderSelectioncollapses aninstall-windows-ollamarequest to the runningollamaentry when a daemon already answers, before the requested key is matched. A Windows-host daemon on an unsupported container runtime still falls through to the existingunsupported-windows-host-ollamarejection.pullOllamaModeltakes the HTTP pull path whenever no localollamabinary exists, not only when the resolved host ishost.docker.internal. On mirrored networking the CLI branch ran and failed withollama: command not foundagainst a daemon that answered/api/tags.setup-nim-flowpasses the existingollamaRunningprobe result into provider selection.install-ollamais deliberately untouched:resolveOllamaInstallMenuEntrykeeps that entry for a running-but-stale daemon, and collapsing it would skip the Ollama upgrade path.provider-selection.test.tslocks that scope.The new
ollamaRunninginput onResolveRequestedProviderSelectionInputis optional rather than required. Current requirement:test/onboard-selection.test.tssits exactly at its 4769-line legacy budget inci/test-file-size-budget.json, and adding the field to its helper pushed it to 4770 and failed thetest-file-size-budgethook. A required field would grow a file the repository is ratcheting down. The single production consumer,setup-nim-flow.ts, passes it explicitly.preferManagedVllmDefaulton the same interface is already optional. The absent-value path is exercised bytest/onboard-selection.test.tsandtest/onboard-selection-windows-provider-rejection.test.ts, whose helpers omit the field, and the false path bystill installs on the Windows host when no daemon responds (#7472).Type of Change
Quality Gates
docs/get-started/windows-preparation.mdx:170states that NemoClaw can use an already-running Windows-host daemon; this fix restores that promise on mirrored networking. No command, flag, environment variable, configuration key, or error string is added or renamed.Documentation Writer Review
no-docs-neededdocs/for WSL onboarding, Windows-host Ollama, mirrored networking, express install, andOLLAMA_HOST=0.0.0.0and examineddocs/get-started/windows-preparation.mdx:169-180,docs/inference/set-up-ollama.mdx:39-40,101-127,docs/reference/troubleshooting.mdx:2650-2662, anddocs/resources/prompt-assets/windows-wsl.md:20. No passage becomes inaccurate: the pages describe the documented reuse behavior this fix restores, and thehost.docker.internalreferences remain valid for bridged networking. The reviewer also checked the new code comments and test titles againstWRITING.mdand.agents/skills/_shared/controlled-words.md; all findings were applied before this commit. Nodocs/changelog/YYYY-MM-DD.mdxentry is required, because that file belongs to the pre-tag release-notes workflow rather than a contributor PR.DGX Station Hardware Evidence
Verification
Signed-off-by:line and every commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run validate:prpassed after refreshingorigin/mainwhen hooks were skipped or unavailablenpx vitest run --project cli src/lib/onboard/provider-selection.test.ts src/lib/onboard/setup-nim-flow.test.ts src/lib/inference/ollama/proxy.test.tspassed 53/53.npx vitest run --project integration test/onboard-selection.test.ts test/onboard-selection-windows-provider-rejection.test.ts test/ollama-pull-timeout.test.tspassed 73/73.npm run typecheck:cliandnpm run checks:repositorypassed. Reverting only the three source files turns exactly the three new#7472tests red and leaves the other 50 green.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: Hung Le hple@nvidia.com
Summary by CodeRabbit
New Features
Bug Fixes