Skip to content

fix(onboard): offer Ollama upgrade when host version too old#4186

Merged
cv merged 16 commits into
mainfrom
fix/4178-ollama-version-upgrade
May 25, 2026
Merged

fix(onboard): offer Ollama upgrade when host version too old#4186
cv merged 16 commits into
mainfrom
fix/4178-ollama-version-upgrade

Conversation

@laitingsheng
Copy link
Copy Markdown
Contributor

@laitingsheng laitingsheng commented May 25, 2026

Summary

DGX Spark express setup pins NEMOCLAW_PROVIDER=install-ollama + NEMOCLAW_MODEL=qwen3.6:35b. With Ollama already on the host, the onboard menu dropped the install-ollama entry, the provider-key fallback rewrote the request to plain ollama, and the stale 0.6.2 daemon was reused — crashing the runner on qwen3.6:35b and looping the validation prompt. This PR detects both the host CLI binary version and the locally running daemon's /api/version, keeps install-ollama in the menu as an explicit "Upgrade Ollama" entry when either is below MIN_OLLAMA_VERSION (0.7.0), routes the install/upgrade through the right per-platform path, pins the resolved host to local loopback so a cached host.docker.internal from an earlier WSL probe cannot misroute validation, re-probes the daemon after the upgrade command to fail the run if the upgrade did not take effect, and exits cleanly when validation fails under isNonInteractive() instead of looping.

Related Issue

Fixes #4178

Changes

  • src/lib/inference/ollama-version.ts (new) — MIN_OLLAMA_VERSION (0.7.0), getInstalledOllamaVersion parsing ollama --version, getRunningOllamaDaemonVersion parsing /api/version on a chosen endpoint, isOllamaVersionAtLeast component comparator, OllamaVersionRunCapture typed as readonly string[]. inference/local.ts re-exports.
  • src/lib/onboard/ollama-install-menu.ts (new) — resolveOllamaInstallMenuEntry probes both the CLI binary and the local daemon (skipping the daemon side when ollamaHost === host.docker.internal), labels the stale source ("running daemon" or "installed binary"), and returns a hasUpgradableOllama flag. assertOllamaUpgradeApplied re-probes the daemon after an upgrade (skipped for fresh installs) to catch silent failures.
  • src/lib/onboard/install-ollama-linux.ts — new isUpgrade?: boolean option. decideInstallOllamaLinuxMode forces the sudo system path during upgrades, refuses NEMOCLAW_OLLAMA_INSTALL_MODE=user for upgrades, and exits with an actionable error when sudo is unavailable in non-interactive mode (including NEMOCLAW_OLLAMA_INSTALL_MODE=system). installOllamaSystem's non-systemd fallback (WSL / minimal containers) re-probes loopback with a fresh waitForHttp instead of trusting the cached findReachableOllamaHost resolver. On the upgrade path it stops the stale daemon (pkill -x ollama + brief sleep) and always relaunches ollama serve, so the freshly installed binary owns :11434 before the post-upgrade version probe runs. installOllamaOnLinux pins setResolvedOllamaHost("127.0.0.1") on success.
  • src/lib/onboard/install-ollama-macos.ts (new) — mirrors the Linux contract: runs brew upgrade ollama on upgrades (without ignoreError), brew install ollama on fresh, starts the daemon on loopback, waits for :11434, and pins the resolved host to loopback on success.
  • src/lib/onboard.ts — replace the inline install-ollama macOS + Linux blocks with a single dispatcher that picks installOllamaOnMacOS or installOllamaOnLinux and calls assertOllamaUpgradeApplied on success. Add isNonInteractive() process.exit(1) at the !validation.ok branch of selectAndValidateOllamaModel so non-interactive runs cannot loop on a probe their pinned model can never pass. Net-negative line count to keep onboard-entrypoint-budget green.
  • Tests — new unit coverage in src/lib/inference/ollama-version.test.ts, src/lib/onboard/ollama-install-menu.test.ts, src/lib/onboard/install-ollama-linux.test.ts (env-override refusal, sudo-required gate, host pin, WSL host.docker.internal carve-out). Branch-level test in test/onboard-selection.test.ts mocks an installed 0.6.2 host, drives NEMOCLAW_PROVIDER=install-ollama, and verifies the official installer runs.
  • docs/inference/use-local-inference.mdx — describe the dual binary/daemon gate, the Windows-host carve-out, the platform install/upgrade path, the sudo-required Linux upgrade constraint, and the post-upgrade daemon re-probe.

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Verification

  • npx prek run --all-files passes
  • npm test passes
  • Tests added or updated for new or changed behavior
  • No secrets, API keys, or credentials committed
  • Docs updated for user-facing behavior changes
  • make docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Signed-off-by: Tinson Lai tinsonl@nvidia.com

Summary by CodeRabbit

  • New Features

    • Exposed Ollama version utilities and minimum-required version; added OS-aware install/upgrade flows and a macOS installer with post-upgrade readiness checks.
  • Bug Fixes

    • Non-interactive onboarding now fails fast on local Ollama validation; upgrade paths enforce install-mode constraints and sudo requirements where appropriate.
  • Documentation

    • Updated onboarding and command docs to describe version gating, CLI/daemon checks, and OS-specific upgrade/install instructions.
  • Tests

    • Added coverage for version detection, install/upgrade menu logic, upgrade verification, install-mode decisions, and installer behaviors.

Review Change Stack

Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 25, 2026

📝 Walkthrough

Walkthrough

Adds MIN_OLLAMA_VERSION and utilities to detect/compare Ollama CLI and daemon versions, surfaces Install/Upgrade menu entries, integrates macOS/Linux installers with upgrade semantics and verification, updates onboarding wiring and docs, and adds unit and integration tests for these flows.

Changes

Ollama version detection and upgrade flow

Layer / File(s) Summary
Version detection helpers and re-export
src/lib/inference/ollama-version.ts, src/lib/inference/local.ts
Adds MIN_OLLAMA_VERSION, OllamaVersionRunCapture type, getInstalledOllamaVersion(), getRunningOllamaDaemonVersion(), and isOllamaVersionAtLeast(); re-exports them from local.ts.
Version detection tests
src/lib/inference/ollama-version.test.ts
Unit tests for installed/binary/daemon parsing, null/unparseable outputs, and minimum-version comparisons.
Install/upgrade menu resolver and assertions
src/lib/onboard/ollama-install-menu.ts
Adds resolveOllamaInstallMenuEntry() to compute install vs upgrade entries with OS tagging and assertOllamaUpgradeApplied() to verify the daemon meets MIN_OLLAMA_VERSION post-install.
Menu resolver tests
src/lib/onboard/ollama-install-menu.test.ts
Tests covering install vs upgrade labels, platform-specific wording, unknown/version-below-min handling, and assertOllamaUpgradeApplied outcomes.
Onboard flow integration and wiring
src/lib/onboard.ts, docs/inference/use-local-inference.mdx
Integrates resolver into setupNim (append install/upgrade menu entry), imports macOS installer helper, exits on non-interactive model-validation failure, routes install actions through platform installers with { isNonInteractive, isUpgrade }, verifies upgrade application, and documents the behavior.
macOS installer implementation
src/lib/onboard/install-ollama-macos.ts, src/lib/onboard/install-ollama-macos.test.ts
Adds installOllamaOnMacOS with injected run/wait hooks, Homebrew install/upgrade semantics, stops stale daemon on upgrade, starts daemon on loopback, polls for HTTP readiness, and tests these behaviors.
Linux install-mode resolution
src/lib/onboard/install-ollama-linux-mode.ts
Adds decideInstallOllamaLinuxMode, sudo probing, env-var validation, and headless upgrade rejection rules.
Linux installer behavior and tests
src/lib/onboard/install-ollama-linux.ts, src/lib/onboard/install-ollama-linux.test.ts, src/lib/onboard/install-ollama-linux-upgrade.test.ts
Composes installer options with mode types, removes test seam, enforces upgrade semantics (stop stale daemon, re-probe, pin loopback host), and adds/adjusts tests for upgrade recovery and mode validation.
Integration test for upgrade flow
test/onboard-selection.test.ts
End-to-end subprocess test ensuring express setup with outdated Ollama triggers the official installer script and upgrades the host Ollama rather than reusing the old daemon; related tests adjust loopback probe timing mocks.

Sequence Diagram

sequenceDiagram
  participant User as User/NemoClaw CLI
  participant Resolver as resolveOllamaInstallMenuEntry
  participant RunCapture as runCapture (shell)
  participant Installer as Installer (brew / install.sh)
  participant Daemon as Ollama daemon
  User->>Resolver: probe installed and daemon versions
  Resolver->>RunCapture: ["ollama","--version"]
  RunCapture-->>Resolver: binary version stdout
  Resolver->>RunCapture: ["curl","http://127.0.0.1:11434/api/version"]
  RunCapture-->>Resolver: daemon JSON {version}
  Resolver->>User: show Install/Upgrade menu entry when below MIN_OLLAMA_VERSION
  User->>Installer: run installer (brew / install.sh) with isUpgrade flag
  Installer->>Daemon: start/restart daemon
  User->>RunCapture: ["curl","http://127.0.0.1:11434/api/version"]
  RunCapture-->>User: daemon version JSON
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#4135: Related edits to the Linux install-ollama onboarding path and installer wiring.
  • NVIDIA/NemoClaw#3969: Related changes touching host/WSL Ollama detection used by the install/upgrade decision.

Suggested labels

NemoClaw CLI, Local Models, enhancement: inference

Suggested reviewers

  • ericksoa
  • cv

"I sniffed the version in the air,
I parsed the dots with careful care,
When old binaries stall the run,
I hop and nudge: 'Upgrade, hun!'
The daemon wakes — the rabbit's glad."

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Out of Scope Changes check ❓ Inconclusive Most changes directly support the upgrade objective, but the macOS implementation lacks daemon stopping before ollama serve restart in the upgrade path, contrary to the acknowledged issue and the parallel Linux upgrade logic. Review installOllamaOnMacOS to ensure upgrade path includes explicit daemon termination via pkill before relaunching ollama serve, mirroring Linux behavior to prevent port binding and stale daemon detection.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(onboard): offer Ollama upgrade when host version too old' accurately and concisely summarizes the main change—adding version detection and an explicit upgrade path when Ollama is below the minimum version.
Linked Issues check ✅ Passed The PR comprehensively addresses all coding requirements from #4178: version detection utilities (MIN_OLLAMA_VERSION), platform-specific install/upgrade logic, post-upgrade verification, non-interactive failure handling to prevent loops, and daemon re-probing to avoid host.docker.internal misrouting.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/4178-ollama-version-upgrade

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 25, 2026

E2E Advisor Recommendation

Required E2E: gpu-e2e
Optional E2E: gpu-double-onboard-e2e, ollama-proxy-e2e, macos-e2e, wsl-e2e

Dispatch hint: gpu-e2e

Auto-dispatched E2E: gpu-e2e via nightly-e2e.yaml at ba1b68f0454d690de4abfbfef7788c04f26c0bcdnightly run

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • gpu-e2e (high): Required because this PR changes the local Ollama onboarding path, Ollama install/start behavior, auth-proxy startup path after install, and sandbox inference validation. The existing GPU E2E follows the real user flow: install Ollama binary, run NemoClaw with NEMOCLAW_PROVIDER=ollama, let onboard start Ollama/proxy and pull a model, then verify Ollama inference through the sandbox.

Optional E2E

  • gpu-double-onboard-e2e (high): Useful adjacent confidence for re-running local Ollama onboarding against an existing Ollama/proxy state. The PR changes existing-Ollama menu resolution and daemon handling, but this is less directly targeted than gpu-e2e and does not explicitly create a stale pre-0.7.0 daemon.
  • ollama-proxy-e2e (medium): Useful host-side confidence for the Ollama auth proxy chain after install/start changes. It validates proxy auth, token persistence, recovery, and container reachability with a real Ollama model, though it does not exercise the changed onboard install/upgrade menu logic.
  • macos-e2e (medium): Optional cross-platform smoke because this PR adds a macOS Ollama install/upgrade helper. The existing macOS E2E mostly validates build and cloud onboarding, so it can catch platform build regressions but not the new Ollama upgrade flow itself.
  • wsl-e2e (high): Optional platform smoke because the new version gate intentionally skips Windows-host Ollama reached through WSL host.docker.internal. The current WSL E2E is cloud-oriented and will not fully validate Windows-host Ollama upgrade/menu behavior.

New E2E recommendations

  • local-inference-ollama-upgrade-linux (high): No existing E2E appears to preinstall a stale Ollama daemon below MIN_OLLAMA_VERSION, run onboard, assert the provider menu/express path chooses Upgrade Ollama, verify Linux uses the sudo-driven system path, and confirm /api/version reports the upgraded daemon before model selection.
    • Suggested test: Add a Linux stale-Ollama-upgrade E2E that installs or shims an older Ollama daemon on :11434, runs nemoclaw onboard through the install-ollama upgrade path, and asserts upgrade diagnostics plus successful local Ollama sandbox inference.
  • local-inference-ollama-upgrade-noninteractive-negative (high): The PR adds safety behavior refusing a non-interactive Linux upgrade without passwordless sudo instead of falling back to user-local. Existing unit tests cover this, but no E2E validates the user-facing diagnostic in a real shell/onboard invocation.
    • Suggested test: Add a non-interactive Linux Ollama upgrade negative E2E that runs with stale system Ollama, no passwordless sudo, and verifies the actionable failure instead of a hang or silent user-local fallback.
  • local-inference-ollama-upgrade-macos (medium): The PR adds brew upgrade ollama, stale daemon stop/relaunch, and post-upgrade daemon version checks on macOS. Existing macOS E2E does not exercise local Ollama install/upgrade.
    • Suggested test: Add a macOS local Ollama upgrade E2E or scenario that runs the macOS install-ollama upgrade path and verifies the restarted daemon version and local inference route.
  • wsl-windows-host-ollama-version-gate (medium): The new menu logic explicitly skips the version gate for Windows-host Ollama reached via host.docker.internal, relying on separate Windows-host actions. Existing WSL E2E is cloud-focused and does not validate this Ollama-specific branch.
    • Suggested test: Add a WSL Windows-host Ollama E2E that simulates or installs Windows-host Ollama, verifies the WSL menu does not offer Linux upgrade for host.docker.internal, and confirms the Windows-host start/use path still onboards successfully.

Dispatch hint

  • Workflow: nightly-e2e.yaml
  • jobs input: gpu-e2e

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 25, 2026

E2E Scenario Advisor Recommendation

Required scenario E2E: None
Optional scenario E2E: None

Workflow run

Full scenario advisor summary

E2E Scenario Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required scenario E2E

  • None. No scenario workflow, scenario metadata, scenario runtime, or validation-suite files changed.

Optional scenario E2E

  • None.

Relevant changed files

  • None.

@github-actions
Copy link
Copy Markdown
Contributor

Selective E2E Results — ⚠️ No requested jobs ran

Run: 26398290698
Target ref: 2a8e3aadbcc48d09297095b9abf1adb92a1414ed
Workflow ref: main
Requested jobs: gpu-e2e
Summary: 0 passed, 0 failed, 1 skipped

Job Result
gpu-e2e ⏭️ skipped

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 25, 2026

PR Review Advisor

Findings: 0 needs attention, 2 worth checking, 0 nice ideas
Since last review: 0 prior items resolved, 2 still apply, 0 new items found

Review findings

🛠️ Needs attention

  • None.

🔎 Worth checking

  • Ollama upgrade path still relies on unpinned external installers (src/lib/onboard/install-ollama-linux.ts:118): The PR intentionally broadens when NemoClaw invokes external install/update mechanisms for in-place Ollama upgrades. Linux still runs a live remote installer through the shell, and macOS uses Homebrew upgrade. This may be an accepted existing onboarding trust model, and the docs now disclose it, but it remains a supply-chain trust decision in high-risk host glue.
    • Recommendation: Keep an explicit maintainer trust decision for this installer model. If practical, add pinned-version, checksum, or signature-verification support, or document why the official installer/Homebrew trust model is acceptable for both fresh installs and upgrades.
    • Evidence: src/lib/onboard/install-ollama-linux.ts runs `set -o pipefail; curl -fsSL https://ollama.com/install.sh | sh`; src/lib/onboard/install-ollama-macos.ts runs `brew upgrade ollama` for upgrades. resolveOllamaInstallMenuEntry exposes install-ollama when an installed binary or running daemon is below MIN_OLLAMA_VERSION.
  • local inference hotspot grows for version-helper re-exports (src/lib/inference/local.ts:82): The added re-export is small and preserves import compatibility, but src/lib/inference/local.ts is already a large local-inference hotspot. Continuing to grow the barrel can compound refactor debt even when the implementation itself was correctly extracted to ollama-version.ts.
    • Recommendation: If the public surface allows it, prefer importing Ollama version helpers from src/lib/inference/ollama-version directly. Otherwise consider offsetting the barrel addition with nearby cleanup in local.ts.
    • Evidence: monolithDeltas reports src/lib/inference/local.ts baseLines=1089, headLines=1096, delta=7, severity=warning. The diff adds re-exports for getInstalledOllamaVersion, getRunningOllamaDaemonVersion, isOllamaVersionAtLeast, and MIN_OLLAMA_VERSION.

🌱 Nice ideas

  • None.
Since last review details

Current findings:

  • Ollama upgrade path still relies on unpinned external installers (src/lib/onboard/install-ollama-linux.ts:118): The PR intentionally broadens when NemoClaw invokes external install/update mechanisms for in-place Ollama upgrades. Linux still runs a live remote installer through the shell, and macOS uses Homebrew upgrade. This may be an accepted existing onboarding trust model, and the docs now disclose it, but it remains a supply-chain trust decision in high-risk host glue.
    • Recommendation: Keep an explicit maintainer trust decision for this installer model. If practical, add pinned-version, checksum, or signature-verification support, or document why the official installer/Homebrew trust model is acceptable for both fresh installs and upgrades.
    • Evidence: src/lib/onboard/install-ollama-linux.ts runs `set -o pipefail; curl -fsSL https://ollama.com/install.sh | sh`; src/lib/onboard/install-ollama-macos.ts runs `brew upgrade ollama` for upgrades. resolveOllamaInstallMenuEntry exposes install-ollama when an installed binary or running daemon is below MIN_OLLAMA_VERSION.
  • local inference hotspot grows for version-helper re-exports (src/lib/inference/local.ts:82): The added re-export is small and preserves import compatibility, but src/lib/inference/local.ts is already a large local-inference hotspot. Continuing to grow the barrel can compound refactor debt even when the implementation itself was correctly extracted to ollama-version.ts.
    • Recommendation: If the public surface allows it, prefer importing Ollama version helpers from src/lib/inference/ollama-version directly. Otherwise consider offsetting the barrel addition with nearby cleanup in local.ts.
    • Evidence: monolithDeltas reports src/lib/inference/local.ts baseLines=1089, headLines=1096, delta=7, severity=warning. The diff adds re-exports for getInstalledOllamaVersion, getRunningOllamaDaemonVersion, isOllamaVersionAtLeast, and MIN_OLLAMA_VERSION.

Workflow run details

This is an automated advisory review. A human maintainer must make the final merge decision.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
src/lib/onboard.ts (2)

4225-4232: Run the onboarding E2E set for this change before merge.

These updates touch non-interactive failure control flow and provider-option generation in core onboarding; I’d run the listed onboarding-related E2Es (or the selective nightly-e2e.yaml jobs command) for regression coverage.

As per coding guidelines: src/lib/onboard.ts: “This file contains core onboarding logic. Changes here affect the full sandbox creation and configuration flow.” and includes the explicit E2E test recommendation list.

Also applies to: 4274-4414

🤖 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.ts` around lines 4225 - 4232, The change alters
non-interactive failure control flow around the validation check (the block
using validation.ok and isNonInteractive()) and other onboarding provider-option
generation (areas around lines covering the onboarding flow, e.g., code
referenced between 4274-4414); before merging, run the onboarding end-to-end
tests (the listed onboarding-related E2E jobs or the selective nightly-e2e.yaml
job) to exercise non-interactive paths and provider-option generation, reproduce
the failure scenario where validation fails in non-interactive mode, and fix any
regressions found (restore expected behavior for isNonInteractive() exit path
and provider option outputs) before approving the PR.

4400-4406: ⚡ Quick win

Align macOS “Upgrade Ollama” labeling with Homebrew upgrade behavior

labelPrefix becomes “Upgrade Ollama” when hasUpgradableOllama is true, but the macOS handler still runs brew install ollama. Homebrew typically upgrades an already-installed outdated formula via brew install (unless HOMEBREW_NO_INSTALL_UPGRADE is set), so this usually won’t leave Ollama outdated—however switching to brew upgrade makes the behavior match the UI and is more robust to that env var.

💡 Proposed fix
       } else if (selected.key === "install-ollama") {
         if (!checkOllamaPortsOrWarn()) continue selectionLoop;
         if (process.platform === "darwin") {
-          console.log("  Installing Ollama via Homebrew...");
-          run(["brew", "install", "ollama"], { ignoreError: true });
+          if (hasUpgradableOllama) {
+            console.log("  Upgrading Ollama via Homebrew...");
+            run(["brew", "upgrade", "ollama"], { ignoreError: true });
+          } else {
+            console.log("  Installing Ollama via Homebrew...");
+            run(["brew", "install", "ollama"], { ignoreError: true });
+          }
           // brew install doesn't auto-start a service; launch directly.
           // Shell required: backgrounding (&), env var prefix, output redirection.
           console.log("  Starting Ollama...");
🤖 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.ts` around lines 4400 - 4406, The macOS branch builds a menu
item using labelPrefix/upgradeSuffix when hasUpgradableOllama is true but still
invokes `brew install ollama`; update the macOS handler (the branch where
process.platform === "darwin" and the options entry with key "install-ollama")
so that when hasUpgradableOllama is true it runs `brew upgrade ollama` (or calls
the upgrade flow) instead of `brew install ollama`, keeping the
labelPrefix/upgradeSuffix logic intact so UI and action match; ensure the
existing installedOllamaVersion and MIN_OLLAMA_VERSION logic are preserved when
choosing the command.
🤖 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.ts`:
- Around line 4274-4276: The new Ollama version/menu logic
(installedOllamaVersion, hasUpgradableOllama) should be extracted out of the
large onboard entrypoint into a small helper module: create a new helper (e.g.,
an ollama utility) that exports a function like getOllamaStatus() which
internally calls getInstalledOllamaVersion(), isOllamaVersionAtLeast(), and
references MIN_OLLAMA_VERSION to compute and return { installedOllamaVersion,
hasUpgradableOllama }; then replace the inline logic in onboard.ts with a single
import and call to getOllamaStatus() so the entrypoint stays thin and the heavy
logic moves behind the helper.

---

Nitpick comments:
In `@src/lib/onboard.ts`:
- Around line 4225-4232: The change alters non-interactive failure control flow
around the validation check (the block using validation.ok and
isNonInteractive()) and other onboarding provider-option generation (areas
around lines covering the onboarding flow, e.g., code referenced between
4274-4414); before merging, run the onboarding end-to-end tests (the listed
onboarding-related E2E jobs or the selective nightly-e2e.yaml job) to exercise
non-interactive paths and provider-option generation, reproduce the failure
scenario where validation fails in non-interactive mode, and fix any regressions
found (restore expected behavior for isNonInteractive() exit path and provider
option outputs) before approving the PR.
- Around line 4400-4406: The macOS branch builds a menu item using
labelPrefix/upgradeSuffix when hasUpgradableOllama is true but still invokes
`brew install ollama`; update the macOS handler (the branch where
process.platform === "darwin" and the options entry with key "install-ollama")
so that when hasUpgradableOllama is true it runs `brew upgrade ollama` (or calls
the upgrade flow) instead of `brew install ollama`, keeping the
labelPrefix/upgradeSuffix logic intact so UI and action match; ensure the
existing installedOllamaVersion and MIN_OLLAMA_VERSION logic are preserved when
choosing the command.
🪄 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: 08557d2b-a65d-4f08-8d77-77f8f8ffcad2

📥 Commits

Reviewing files that changed from the base of the PR and between 50c208b and 2a8e3aa.

📒 Files selected for processing (3)
  • src/lib/inference/local.test.ts
  • src/lib/inference/local.ts
  • src/lib/onboard.ts

Comment thread src/lib/onboard.ts Outdated
…budget

Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

Selective E2E Results — ⚠️ No requested jobs ran

Run: 26399404006
Target ref: d6c7199bd84ed08dd7d8fce5c2b0ef2cad3bdef7
Workflow ref: main
Requested jobs: gpu-e2e
Summary: 0 passed, 0 failed, 1 skipped

Job Result
gpu-e2e ⏭️ skipped

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/lib/inference/ollama-version.ts (1)

12-15: ⚡ Quick win

Type signature mismatch with actual runCapture implementation.

The OllamaVersionRunCapture type accepts string | string[], but the actual runCapture function from runner.ts (lines 214-218) only accepts readonly string[] and explicitly throws on strings with the error: "runCapture no longer accepts shell strings; pass an argv array instead".

Additionally, local.ts already defines RunCaptureFn at line 79 with an identical signature, creating duplication.

Consider either:

  1. Reusing the existing RunCaptureFn type instead of defining a duplicate, or
  2. Narrowing this type to match the actual implementation: (cmd: readonly string[], opts?: { ignoreError?: boolean }) => string
♻️ Proposed fix: Reuse existing type
-export type OllamaVersionRunCapture = (
-  cmd: string | string[],
-  opts?: { ignoreError?: boolean },
-) => string;
+import type { RunCaptureFn } from "./local";

Then update the function signature at line 26:

 export function getInstalledOllamaVersion(
-  runCaptureImpl?: OllamaVersionRunCapture,
+  runCaptureImpl?: RunCaptureFn,
 ): string | null {
🤖 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/inference/ollama-version.ts` around lines 12 - 15, The
OllamaVersionRunCapture type is incompatible with the real runCapture (which
only accepts readonly string[] and throws on shell strings) and duplicates
RunCaptureFn from local.ts; replace the new type by reusing the existing
RunCaptureFn (or if you prefer, change OllamaVersionRunCapture to (cmd: readonly
string[], opts?: { ignoreError?: boolean }) => string) so signatures match
runCapture, and remove the redundant duplicate type; update any references to
use RunCaptureFn (or the narrowed signature) to ensure callers and the
implementation align.
🤖 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.ts`:
- Around line 5268-5270: The brew upgrade path currently swallows errors (see
brewAction, ollamaInstallMenu.hasUpgradableOllama and run([...], { ignoreError:
true })); change the logic so that when brewAction === "upgrade" you do not
ignore errors: run the upgrade and check its exit status/output, and if it
fails, log the failure (including the error), then attempt a fallback (e.g.,
run(["brew","install","ollama"]) without ignoreError) or abort/exit with a clear
error so we don't continue with an unknown Ollama state; keep the install path
behavior unchanged.

---

Nitpick comments:
In `@src/lib/inference/ollama-version.ts`:
- Around line 12-15: The OllamaVersionRunCapture type is incompatible with the
real runCapture (which only accepts readonly string[] and throws on shell
strings) and duplicates RunCaptureFn from local.ts; replace the new type by
reusing the existing RunCaptureFn (or if you prefer, change
OllamaVersionRunCapture to (cmd: readonly string[], opts?: { ignoreError?:
boolean }) => string) so signatures match runCapture, and remove the redundant
duplicate type; update any references to use RunCaptureFn (or the narrowed
signature) to ensure callers and the implementation align.
🪄 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: 27936163-876d-498d-8b54-ba2bd6f25e26

📥 Commits

Reviewing files that changed from the base of the PR and between d6c7199 and c39e816.

📒 Files selected for processing (8)
  • docs/inference/use-local-inference.mdx
  • src/lib/inference/local.ts
  • src/lib/inference/ollama-version.test.ts
  • src/lib/inference/ollama-version.ts
  • src/lib/onboard.ts
  • src/lib/onboard/ollama-install-menu.test.ts
  • src/lib/onboard/ollama-install-menu.ts
  • test/onboard-selection.test.ts
✅ Files skipped from review due to trivial changes (2)
  • src/lib/inference/ollama-version.test.ts
  • docs/inference/use-local-inference.mdx

Comment thread src/lib/onboard.ts Outdated
…stall

Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
@github-actions
Copy link
Copy Markdown
Contributor

Selective E2E Results — ⚠️ No requested jobs ran

Run: 26403458954
Target ref: cd081784d21cae9475b5b13b30433ff9f57378e1
Workflow ref: main
Requested jobs: gpu-e2e
Summary: 0 passed, 0 failed, 1 skipped

Job Result
gpu-e2e ⏭️ skipped

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/install-ollama-linux.ts (1)

113-115: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Block NEMOCLAW_OLLAMA_INSTALL_MODE=user during upgrades.

isUpgrade only takes effect after the env override path, so NEMOCLAW_OLLAMA_INSTALL_MODE=user still selects user-local here. That leaves the old system daemon on :11434, which defeats the upgrade flow this PR is adding. Please reject that combination explicitly and add the matching regression test.

Proposed fix
 export function decideInstallOllamaLinuxMode(
   opts: InstallOllamaLinuxOptions,
 ): InstallOllamaLinuxMode {
   if (opts.modeOverride) return opts.modeOverride;
   const explicit = String(process.env[INSTALL_MODE_ENV] || "").trim().toLowerCase();
+  if (opts.isUpgrade && explicit === "user") {
+    const errorLog = opts.errorLog ?? ((m: string) => console.error(m));
+    errorLog(
+      `  ${INSTALL_MODE_ENV}=user is not supported while upgrading Ollama because it would leave the stale system daemon on :${OLLAMA_PORT}.`,
+    );
+    process.exit(1);
+  }
   if (explicit === "user") return "user-local";
   if (explicit === "system") return "system";

Also applies to: 127-142

🧹 Nitpick comments (1)
docs/inference/use-local-inference.mdx (1)

34-34: ⚡ Quick win

Split this long paragraph into one sentence per source line.

Line 34 currently packs several sentences onto one line, which violates the docs diff/readability rule.

As per coding guidelines: "One sentence per line in source (makes diffs readable)."

🤖 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 `@docs/inference/use-local-inference.mdx` at line 34, The long paragraph
describing the Ollama upgrade flow should be split so each sentence is on its
own source line: break the single combined paragraph into separate sentences
(mentioning the "Upgrade Ollama" provider entry, the express setup resolving to
that entry, the platform install/upgrade commands like `brew upgrade ollama` and
`https://ollama.com/install.sh`, the Linux sudo behavior and fallback, and the
final `ollama --version` re-probe) and place each sentence on its own line in
the MDX source so diffs/readability rules are satisfied.
🤖 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/install-ollama-macos.ts`:
- Around line 54-56: The returned binPath currently hardcodes
/opt/homebrew/bin/ollama which fails on Intel macs; update the logic in the
function that returns { ok: ..., binPath: ... } (in
src/lib/onboard/install-ollama-macos.ts) to compute the binary path dynamically:
first try to resolve the binary with a platform-safe lookup (e.g.,
spawnSync('which'/'command -v') or fs.existsSync checks), fallback to
architecture-based defaults (use /opt/homebrew/bin/ollama for arm64/Apple
Silicon and /usr/local/bin/ollama for x86_64), and return the resolved path (or
null/empty) rather than always /opt/homebrew/bin/ollama so Intel installs are
supported. Ensure the function uses process.arch or uname detection and checks
existence before returning the path.

---

Nitpick comments:
In `@docs/inference/use-local-inference.mdx`:
- Line 34: The long paragraph describing the Ollama upgrade flow should be split
so each sentence is on its own source line: break the single combined paragraph
into separate sentences (mentioning the "Upgrade Ollama" provider entry, the
express setup resolving to that entry, the platform install/upgrade commands
like `brew upgrade ollama` and `https://ollama.com/install.sh`, the Linux sudo
behavior and fallback, and the final `ollama --version` re-probe) and place each
sentence on its own line in the MDX source so diffs/readability rules are
satisfied.
🪄 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: f3c8284b-074f-452e-8478-d2d95fb81319

📥 Commits

Reviewing files that changed from the base of the PR and between c39e816 and cd08178.

📒 Files selected for processing (8)
  • docs/inference/use-local-inference.mdx
  • src/lib/inference/ollama-version.ts
  • src/lib/onboard.ts
  • src/lib/onboard/install-ollama-linux.test.ts
  • src/lib/onboard/install-ollama-linux.ts
  • src/lib/onboard/install-ollama-macos.ts
  • src/lib/onboard/ollama-install-menu.test.ts
  • src/lib/onboard/ollama-install-menu.ts

Comment thread src/lib/onboard/install-ollama-macos.ts Outdated
… override

Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
@github-actions
Copy link
Copy Markdown
Contributor

Selective E2E Results — ⚠️ No requested jobs ran

Run: 26404645139
Target ref: 4be19f8c65310a1d9050f509e2ad458fb97bc62b
Workflow ref: main
Requested jobs: gpu-e2e
Summary: 0 passed, 0 failed, 1 skipped

Job Result
gpu-e2e ⏭️ skipped

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-version.ts`:
- Around line 44-47: The new helper getRunningOllamaDaemonVersion declared in
src/lib/inference/ollama-version.ts is not exported from the local inference
facade; update src/lib/inference/local.ts to re-export
getRunningOllamaDaemonVersion alongside the existing Ollama version helpers (the
same place where other functions from ollama-version are re-exported) so the
public API remains consistent; locate the export block that currently re-exports
other Ollama helpers and add getRunningOllamaDaemonVersion to that list.
🪄 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: 6c581f66-7b17-42ae-b2a4-594df0122b07

📥 Commits

Reviewing files that changed from the base of the PR and between cd08178 and 4be19f8.

📒 Files selected for processing (7)
  • src/lib/inference/ollama-version.test.ts
  • src/lib/inference/ollama-version.ts
  • src/lib/onboard/install-ollama-linux.test.ts
  • src/lib/onboard/install-ollama-linux.ts
  • src/lib/onboard/ollama-install-menu.test.ts
  • src/lib/onboard/ollama-install-menu.ts
  • test/onboard-selection.test.ts

Comment thread src/lib/inference/ollama-version.ts
…grade menu

Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
@github-actions
Copy link
Copy Markdown
Contributor

Selective E2E Results — ⚠️ No requested jobs ran

Run: 26406491772
Target ref: e7d34ed71b50ef4d455b13b99bd9776ee0c2405f
Workflow ref: main
Requested jobs: gpu-e2e
Summary: 0 passed, 0 failed, 1 skipped

Job Result
gpu-e2e ⏭️ skipped

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/onboard/ollama-install-menu.ts`:
- Around line 86-90: The upgrade suffix text currently always says "installed
..." even though reportedVersion may come from runningOllamaVersion; change it
to reflect the actual source: compute a sourceLabel (e.g., sourceLabel =
runningOllamaVersion != null ? "running" : "installed") and use that in the
template for upgradeSuffix, e.g., ` — upgrade ${sourceLabel} ${reportedVersion
?? "unknown"} to ≥ ${MIN_OLLAMA_VERSION}`; update the code paths around
reportedVersion, runningOllamaVersion, installedOllamaVersion,
hasUpgradableOllama and upgradeSuffix so the label matches the chosen version
source and still handles null reportedVersion.
🪄 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: e125f4ea-0ee5-4d82-82c8-583b092c3205

📥 Commits

Reviewing files that changed from the base of the PR and between 4be19f8 and e7d34ed.

📒 Files selected for processing (5)
  • docs/inference/use-local-inference.mdx
  • src/lib/inference/local.ts
  • src/lib/onboard/install-ollama-macos.ts
  • src/lib/onboard/ollama-install-menu.test.ts
  • src/lib/onboard/ollama-install-menu.ts

Comment thread src/lib/onboard/ollama-install-menu.ts Outdated
…el stale source

Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
@github-actions
Copy link
Copy Markdown
Contributor

Selective E2E Results — ⚠️ No requested jobs ran

Run: 26407218367
Target ref: 262bbea65dd539ae60a565a0a17f52e91a6bdf9c
Workflow ref: main
Requested jobs: gpu-e2e,gpu-double-onboard-e2e
Summary: 0 passed, 0 failed, 2 skipped

Job Result
gpu-double-onboard-e2e ⏭️ skipped
gpu-e2e ⏭️ skipped

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
src/lib/onboard/ollama-install-menu.ts (1)

112-119: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use a source-aware suffix instead of always saying “installed”.

Line 118 always renders upgrade installed ..., but Lines 112-116 can intentionally report the daemon as the stale source. This makes the prompt misleading.

💡 Minimal fix
-  const reportedVersion = daemonNeedsUpgrade
+  const reportedSource = daemonNeedsUpgrade
+    ? "daemon"
+    : binaryNeedsUpgrade
+      ? "binary"
+      : "installed";
+  const reportedVersion = daemonNeedsUpgrade
     ? (runningOllamaVersion ?? installedOllamaVersion)
     : binaryNeedsUpgrade
       ? (installedOllamaVersion ?? runningOllamaVersion)
       : null;
   const upgradeSuffix = hasUpgradableOllama
-    ? ` — upgrade installed ${reportedVersion ?? "unknown"} to ≥ ${MIN_OLLAMA_VERSION}`
+    ? ` — upgrade ${reportedSource} ${reportedVersion ?? "unknown"} to ≥ ${MIN_OLLAMA_VERSION}`
     : "";
🤖 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/ollama-install-menu.ts` around lines 112 - 119, The prompt
always says "upgrade installed ..." even when the stale source is the running
daemon; update the logic that builds upgradeSuffix to choose a source-aware
label based on which source produced reportedVersion (use daemonNeedsUpgrade to
label as "running daemon", binaryNeedsUpgrade to label as "installed binary",
fall back to "source" or "unknown" when needed). Modify the upgradeSuffix
construction (and if helpful add a small helper variable like sourceLabel) so it
reads e.g. `— upgrade [installed binary|running daemon|source unknown]
${reportedVersion ?? "unknown"} to ≥ ${MIN_OLLAMA_VERSION}` and still only shows
when hasUpgradableOllama is true, keeping the existing reportedVersion and
MIN_OLLAMA_VERSION symbols.
🤖 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.

Duplicate comments:
In `@src/lib/onboard/ollama-install-menu.ts`:
- Around line 112-119: The prompt always says "upgrade installed ..." even when
the stale source is the running daemon; update the logic that builds
upgradeSuffix to choose a source-aware label based on which source produced
reportedVersion (use daemonNeedsUpgrade to label as "running daemon",
binaryNeedsUpgrade to label as "installed binary", fall back to "source" or
"unknown" when needed). Modify the upgradeSuffix construction (and if helpful
add a small helper variable like sourceLabel) so it reads e.g. `— upgrade
[installed binary|running daemon|source unknown] ${reportedVersion ?? "unknown"}
to ≥ ${MIN_OLLAMA_VERSION}` and still only shows when hasUpgradableOllama is
true, keeping the existing reportedVersion and MIN_OLLAMA_VERSION symbols.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 7bd4c503-a7be-49a9-98e6-221297d27b03

📥 Commits

Reviewing files that changed from the base of the PR and between e7d34ed and 262bbea.

📒 Files selected for processing (3)
  • src/lib/onboard.ts
  • src/lib/onboard/ollama-install-menu.test.ts
  • src/lib/onboard/ollama-install-menu.ts

…source

Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
docs/inference/use-local-inference.mdx (1)

35-35: ⚡ Quick win

Split into separate lines and use active voice.

This line contains two sentences on the same line, which makes diffs harder to read.
Additionally, "is intentionally excluded" uses passive voice.

As per coding guidelines: "One sentence per line in source (makes diffs readable)" and "Active voice required. Flag passive constructions."

Suggested rewrite
-The wizard inspects both the CLI binary (`ollama --version`) and the locally running daemon (`/api/version` on `:11434`) so the upgrade entry still appears when only one side is stale, for example a fresh user-local binary paired with the original system daemon. Windows-host Ollama reached from WSL via `host.docker.internal` is intentionally excluded from this gate — that case is handled by the separate **Use / Start / Install Ollama on Windows host** entries, which run their own actions on the Windows side.
+The wizard inspects both the CLI binary (`ollama --version`) and the locally running daemon (`/api/version` on `:11434`) so the upgrade entry still appears when only one side is stale, for example a fresh user-local binary paired with the original system daemon.
+The wizard intentionally excludes Windows-host Ollama reached from WSL via `host.docker.internal` from this gate — that case is handled by the separate **Use / Start / Install Ollama on Windows host** entries, which run their own actions on the Windows side.
🤖 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 `@docs/inference/use-local-inference.mdx` at line 35, Split the long sentence
into multiple lines so each sentence occupies its own source line and rewrite
the passive phrase "is intentionally excluded" into active voice; specifically,
break the current line describing the checks of the CLI binary (`ollama
--version`) and the locally running daemon (`/api/version` on `:11434`) into
separate sentences/lines, and change the Windows-host case sentence to an active
form that names the actor (e.g., "We/The system exclude Windows-host Ollama
reached from WSL via `host.docker.internal` from this gate — the separate Use /
Start / Install Ollama on Windows host entries handle that case by running their
own actions on the Windows side.").
🤖 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/install-ollama-linux.ts`:
- Around line 442-445: The code currently pins the resolved host to 127.0.0.1
immediately after calling installOllamaUserLocal/installOllamaSystem, which can
overwrite a previously discovered host when installOllamaSystem returns ok true
via the overrideState === "not-applicable" path (which uses
findReachableOllamaHostImpl); instead, change the install paths to return the
actually validated host (e.g., include validatedHost on the result of
installOllamaUserLocal/installOllamaSystem) or only call
setResolvedOllamaHost("127.0.0.1") inside the branches within
installOllamaUserLocal/installOllamaSystem that explicitly start or verify a
loopback daemon (the branches that confirm loopback connectivity), ensuring
setResolvedOllamaHost is invoked with the real validated host rather than
unconditionally after the install call.

---

Nitpick comments:
In `@docs/inference/use-local-inference.mdx`:
- Line 35: Split the long sentence into multiple lines so each sentence occupies
its own source line and rewrite the passive phrase "is intentionally excluded"
into active voice; specifically, break the current line describing the checks of
the CLI binary (`ollama --version`) and the locally running daemon
(`/api/version` on `:11434`) into separate sentences/lines, and change the
Windows-host case sentence to an active form that names the actor (e.g., "We/The
system exclude Windows-host Ollama reached from WSL via `host.docker.internal`
from this gate — the separate Use / Start / Install Ollama on Windows host
entries handle that case by running their own actions on the Windows side.").
🪄 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: cf2800ec-0d92-435f-9941-7ad6a7664915

📥 Commits

Reviewing files that changed from the base of the PR and between 262bbea and c5b23c1.

📒 Files selected for processing (6)
  • docs/inference/use-local-inference.mdx
  • src/lib/onboard/install-ollama-linux.test.ts
  • src/lib/onboard/install-ollama-linux.ts
  • src/lib/onboard/install-ollama-macos.ts
  • src/lib/onboard/ollama-install-menu.test.ts
  • src/lib/onboard/ollama-install-menu.ts

Comment thread src/lib/onboard/install-ollama-linux.ts
@github-actions
Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 26408223904
Target ref: c5b23c12742d93dd8a0d38ce035cf8eeb92e8b8d
Workflow ref: main
Requested jobs: gpu-e2e,cloud-onboard-e2e
Summary: 1 passed, 0 failed, 1 skipped

Job Result
cloud-onboard-e2e ✅ success
gpu-e2e ⏭️ skipped

…responded

Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
@github-actions
Copy link
Copy Markdown
Contributor

Selective E2E Results — ⚠️ No requested jobs ran

Run: 26408967119
Target ref: 761237014175a2f3a467309f3b717c4cb08cf272
Workflow ref: main
Requested jobs: gpu-e2e
Summary: 0 passed, 0 failed, 1 skipped

Job Result
gpu-e2e ⏭️ skipped

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
src/lib/onboard/install-ollama-linux.ts (1)

418-425: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Re-probe loopback before treating the install as ready.

findReachableOllamaHost() is cached for the rest of the onboard run, so this can reuse an earlier 127.0.0.1 success instead of the daemon state after the install. On the non-systemd upgrade path that means we can skip ollama serve, then Line 453 pins validation to loopback while the old daemon is still the one answering there. Use a fresh loopback probe/restart here instead of relying on the cached host string.

🤖 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/install-ollama-linux.ts` around lines 418 - 425, The code
currently relies on the cached findReachableOllamaHost() result; instead, re-run
an uncached probe here before deciding the install is ready by calling the
lower-level probe function findReachableOllamaHostImpl() (or otherwise
performing a fresh loopback probe) and compute localDaemonReachable from that
fresh result (check against "127.0.0.1" / "localhost"); if the fresh probe is
not loopback, proceed with the start/restart path rather than treating
overrideState === "not-applicable" as ready. Ensure you replace any use of the
cached findReachableOllamaHost() for this readiness decision and keep references
to overrideState and localDaemonReachable.
🤖 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.

Duplicate comments:
In `@src/lib/onboard/install-ollama-linux.ts`:
- Around line 418-425: The code currently relies on the cached
findReachableOllamaHost() result; instead, re-run an uncached probe here before
deciding the install is ready by calling the lower-level probe function
findReachableOllamaHostImpl() (or otherwise performing a fresh loopback probe)
and compute localDaemonReachable from that fresh result (check against
"127.0.0.1" / "localhost"); if the fresh probe is not loopback, proceed with the
start/restart path rather than treating overrideState === "not-applicable" as
ready. Ensure you replace any use of the cached findReachableOllamaHost() for
this readiness decision and keep references to overrideState and
localDaemonReachable.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 2517848b-f066-49b7-94e9-e9739c22ad14

📥 Commits

Reviewing files that changed from the base of the PR and between c5b23c1 and 7612370.

📒 Files selected for processing (3)
  • docs/inference/use-local-inference.mdx
  • src/lib/onboard/install-ollama-linux.test.ts
  • src/lib/onboard/install-ollama-linux.ts
✅ Files skipped from review due to trivial changes (1)
  • docs/inference/use-local-inference.mdx

…lver result

Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
@github-actions
Copy link
Copy Markdown
Contributor

Selective E2E Results — ⚠️ No requested jobs ran

Run: 26409430782
Target ref: 5c43b26211a7d4ef97b9172687b4afd8805f7975
Workflow ref: main
Requested jobs: gpu-e2e
Summary: 0 passed, 0 failed, 1 skipped

Job Result
gpu-e2e ⏭️ skipped

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/install-ollama-linux.ts (1)

114-129: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Handle NEMOCLAW_OLLAMA_INSTALL_MODE=system upgrades the same as other headless upgrades.

If isUpgrade is true, Line 129 returns "system" before the non-interactive/no-sudo guard at Lines 145-153. In a headless run with NEMOCLAW_OLLAMA_INSTALL_MODE=system and no passwordless sudo, we still fall into the sudo-driven installer instead of failing with the actionable upgrade message this PR is trying to guarantee.

Suggested fix
 export function decideInstallOllamaLinuxMode(
   opts: InstallOllamaLinuxOptions,
 ): InstallOllamaLinuxMode {
   if (opts.modeOverride) return opts.modeOverride;
   const explicit = String(process.env[INSTALL_MODE_ENV] || "").trim().toLowerCase();
+  const isTty = opts.isTty ?? (() => Boolean(process.stdin.isTTY));
+  const exitIfHeadlessUpgradeWithoutSudo = () => {
+    if (!opts.isUpgrade || canRunSudoNonInteractive(opts)) return;
+    if (!opts.isNonInteractive() && isTty()) return;
+    const errorLog = opts.errorLog ?? ((m: string) => console.error(m));
+    errorLog(
+      "  Upgrading the system Ollama requires sudo, which is not available in this non-interactive run.",
+    );
+    errorLog(
+      "  Run interactively, configure passwordless sudo, or upgrade manually: curl -fsSL https://ollama.com/install.sh | sh",
+    );
+    process.exit(1);
+  };
   if (opts.isUpgrade && explicit === "user") {
     const errorLog = opts.errorLog ?? ((m: string) => console.error(m));
     errorLog(
       `  ${INSTALL_MODE_ENV}=user is incompatible with the Ollama upgrade path:`,
     );
@@
   }
   if (explicit === "user") return "user-local";
-  if (explicit === "system") return "system";
+  if (explicit === "system") {
+    exitIfHeadlessUpgradeWithoutSudo();
+    return "system";
+  }
   if (explicit) {
     const errorLog = opts.errorLog ?? ((m: string) => console.error(m));
     errorLog(
       `  Unsupported ${INSTALL_MODE_ENV} value: ${explicit}. Use 'system', 'user', or leave it unset.`,
     );
@@
   const getEuid = opts.getEuid ?? (() => process.getuid?.());
   if (getEuid() === 0) return "system";
   if (canRunSudoNonInteractive(opts)) return "system";
-  const isTty = opts.isTty ?? (() => Boolean(process.stdin.isTTY));
   if (opts.isUpgrade) {
-    if (opts.isNonInteractive() || !isTty()) {
-      const errorLog = opts.errorLog ?? ((m: string) => console.error(m));
-      errorLog(
-        "  Upgrading the system Ollama requires sudo, which is not available in this non-interactive run.",
-      );
-      errorLog(
-        "  Run interactively, configure passwordless sudo, or upgrade manually: curl -fsSL https://ollama.com/install.sh | sh",
-      );
-      process.exit(1);
-    }
+    exitIfHeadlessUpgradeWithoutSudo();
     return "system";
   }

Also applies to: 141-156

🤖 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/install-ollama-linux.ts` around lines 114 - 129, The current
logic returns "system" when INSTALL_MODE_ENV is set to "system" before the
headless/no-sudo upgrade guard runs, so a headless upgrade with no passwordless
sudo incorrectly proceeds to the sudo-driven installer; update the branch
handling the explicit variable so that when opts.isUpgrade is true and explicit
=== "system" you treat it like other headless upgrades (emit the same actionable
error via opts.errorLog and call process.exit(1)) instead of immediately
returning "system"; locate the check using INSTALL_MODE_ENV, opts.isUpgrade and
the explicit variable in install-ollama-linux.ts and add the isUpgrade +
explicit==="system" guard (mirroring the existing opts.isUpgrade +
explicit==="user" behavior) before returning "system".
🤖 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.

Outside diff comments:
In `@src/lib/onboard/install-ollama-linux.ts`:
- Around line 114-129: The current logic returns "system" when INSTALL_MODE_ENV
is set to "system" before the headless/no-sudo upgrade guard runs, so a headless
upgrade with no passwordless sudo incorrectly proceeds to the sudo-driven
installer; update the branch handling the explicit variable so that when
opts.isUpgrade is true and explicit === "system" you treat it like other
headless upgrades (emit the same actionable error via opts.errorLog and call
process.exit(1)) instead of immediately returning "system"; locate the check
using INSTALL_MODE_ENV, opts.isUpgrade and the explicit variable in
install-ollama-linux.ts and add the isUpgrade + explicit==="system" guard
(mirroring the existing opts.isUpgrade + explicit==="user" behavior) before
returning "system".

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 22cb5bfa-9285-4bbf-ba55-76ed17de23c8

📥 Commits

Reviewing files that changed from the base of the PR and between 7612370 and 5c43b26.

📒 Files selected for processing (2)
  • src/lib/onboard/install-ollama-linux.test.ts
  • src/lib/onboard/install-ollama-linux.ts

@cv cv added the v0.0.51 Release target label May 25, 2026
…ck test fake-curl

Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
@github-actions
Copy link
Copy Markdown
Contributor

Selective E2E Results — ⚠️ No requested jobs ran

Run: 26410649517
Target ref: 3f2b8b5ed8b59235e689dd2f86b07d24878e4b75
Workflow ref: main
Requested jobs: gpu-e2e
Summary: 0 passed, 0 failed, 1 skipped

Job Result
gpu-e2e ⏭️ skipped

@kiwigitops
Copy link
Copy Markdown

One macOS upgrade edge case looks unresolved: installOllamaOnMacOS() runs brew upgrade ollama and then backgrounds ollama serve on 127.0.0.1:11434, but it does not stop or restart an already-running stale daemon first.

If the old daemon is still bound to the port, the new ollama serve process will fail to bind, waitForHttp() can still succeed against the old daemon, and the post-upgrade version check will keep seeing the stale /api/version. For the upgrade path, this probably needs an explicit daemon restart/stop step on macOS before the readiness probe.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/lib/onboard/install-ollama-linux.ts (1)

411-412: 💤 Low value

Remove unused findReachableOllamaHostImpl variable.

This variable is defined but never used in installOllamaSystem—the implementation now uses waitForHttpImpl directly for the fresh loopback probe. Consider also removing the corresponding option from InstallOllamaLinuxOptions (lines 73-74) and the import since it's no longer needed as a test seam here.

♻️ Proposed cleanup
 function installOllamaSystem(opts: InstallOllamaLinuxOptions): InstallOllamaLinuxResult {
   const log = opts.log ?? ((m: string) => console.log(m));
   const errorLog = opts.errorLog ?? ((m: string) => console.error(m));
   const runShellImpl = opts.runShellImpl ?? runShell;
   const sleepSecondsImpl = opts.sleepSecondsImpl ?? sleepSeconds;
   const waitForHttpImpl = opts.waitForHttpImpl ?? waitForHttp;
-  const findReachableOllamaHostImpl =
-    opts.findReachableOllamaHostImpl ?? findReachableOllamaHost;
   const ensureOverrideImpl =
🤖 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/install-ollama-linux.ts` around lines 411 - 412, Remove the
unused findReachableOllamaHostImpl binding and its test seam: delete the const
findReachableOllamaHostImpl = opts.findReachableOllamaHostImpl ??
findReachableOllamaHost; from installOllamaSystem, remove the corresponding
optional property (findReachableOllamaHostImpl) from the
InstallOllamaLinuxOptions type, and drop the related import for
findReachableOllamaHost since installOllamaSystem now uses waitForHttpImpl
directly for the loopback probe; ensure no other code in this module references
findReachableOllamaHostImpl before committing.
🤖 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/install-ollama-linux.ts`:
- Around line 411-412: Remove the unused findReachableOllamaHostImpl binding and
its test seam: delete the const findReachableOllamaHostImpl =
opts.findReachableOllamaHostImpl ?? findReachableOllamaHost; from
installOllamaSystem, remove the corresponding optional property
(findReachableOllamaHostImpl) from the InstallOllamaLinuxOptions type, and drop
the related import for findReachableOllamaHost since installOllamaSystem now
uses waitForHttpImpl directly for the loopback probe; ensure no other code in
this module references findReachableOllamaHostImpl before committing.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 29aa2444-4402-4da7-a1e7-8c3a136531ac

📥 Commits

Reviewing files that changed from the base of the PR and between 7612370 and 3f2b8b5.

📒 Files selected for processing (4)
  • docs/inference/use-local-inference.mdx
  • src/lib/onboard/install-ollama-linux.test.ts
  • src/lib/onboard/install-ollama-linux.ts
  • test/onboard-selection.test.ts
✅ Files skipped from review due to trivial changes (1)
  • docs/inference/use-local-inference.mdx

…Linux probe seam

Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
@github-actions
Copy link
Copy Markdown
Contributor

Selective E2E Results — ⚠️ No requested jobs ran

Run: 26412131198
Target ref: 373b05ffbf791e4ff0f71315c3b3e619017f44f0
Workflow ref: main
Requested jobs: gpu-e2e
Summary: 0 passed, 0 failed, 1 skipped

Job Result
gpu-e2e ⏭️ skipped

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/install-ollama-linux.ts (1)

423-438: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Restart the daemon explicitly in the non-systemd upgrade path.

When overrideState === "not-applicable", Line 428 treats any loopback responder as success. On upgrade runs that can still be the pre-upgrade ollama serve process, so the new binary never takes ownership of :11434 and the post-upgrade version check will keep seeing the stale daemon. The macOS path already handles this by stopping the old process before relaunch; Linux needs the same step here.

🔧 Proposed fix
   if (overrideState === "not-applicable") {
+    if (opts.isUpgrade) {
+      log("  Stopping stale Ollama daemon before relaunching...");
+      runShellImpl("sudo pkill -x ollama || pkill -x ollama", {
+        ignoreError: true,
+      });
+      sleepSecondsImpl(1);
+    }
+
     // Re-probe loopback fresh here so this decision reflects the
     // post-install daemon state. The earlier `findReachableOllamaHost`
     // shortcut was cached for the rest of the onboard run and could echo
🤖 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/install-ollama-linux.ts` around lines 423 - 438, When
overrideState === "not-applicable" the code assumes any loopback responder is
the new daemon; change the non-systemd path to explicitly stop any pre-upgrade
ollama before relaunching: use runShellImpl to detect/terminate the old process
(e.g., pkill -f "ollama serve" or use lsof/netstat to find the PID and kill it)
prior to calling runShellImpl(`OLLAMA_HOST=127.0.0.1:${OLLAMA_PORT} ollama serve
...`); keep the existing waitForHttpImpl checks (first probe, then probe again
after restart) and preserve the existing timeout/errorLog and return behavior if
the new daemon does not become ready. Ensure these changes touch the block that
references overrideState, waitForHttpImpl, runShellImpl, OLLAMA_PORT, and
errorLog.
🧹 Nitpick comments (1)
docs/reference/commands.mdx (1)

1259-1259: ⚡ Quick win

Rewrite in active voice and adjust punctuation.

The description contains passive constructions and a colon that does not introduce a list:

  1. Passive voice (flag as suggestion per style guide):

    • "user is refused" → use active voice: "the installer refuses user" or "NemoClaw refuses user"
    • "system is also refused" → "the installer also refuses system" or "NemoClaw also refuses system"
  2. Colon usage: The colon after "Upgrades:" does not introduce a list. As per coding guidelines, colons should only introduce lists, not general explanations. Replace the colon with a period or integrate the label differently.

  3. Bold label (possible LLM pattern): The "Upgrades:" bold label may be unnecessary emphasis. Bold is reserved for UI labels, parameter names, and genuine warnings. Consider whether this label is essential or if the upgrade constraints can be integrated into the description without the bold label.

As per coding guidelines, active voice is required for all documentation, colons should only introduce lists, and bold should be reserved for specific use cases.

🤖 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 `@docs/reference/commands.mdx` at line 1259, Rewrite the
NEMOCLAW_OLLAMA_INSTALL_MODE description in active voice and remove the colon
after "Upgrades" (or drop the bold label), e.g. say that NemoClaw or the
installer "refuses `user`" or "refuses `system`" rather than using passive
phrasing; keep the behavior details for `system`, `user`, and empty/unset
values, clarify auto-detection rules (root or passwordless sudo selects system;
non-interactive without passwordless sudo selects user; interactive shell falls
back to system so the installer can prompt), and integrate the upgrade
constraints into the sentence (explain that the installer refuses `user` for
upgrades because a user-local install cannot replace the system daemon on
:11434, and that NemoClaw/installer also refuses `system` when
NEMOCLAW_NON_INTERACTIVE=1 without passwordless sudo to avoid a hanging sudo
prompt) while removing unnecessary bolding.
🤖 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.

Outside diff comments:
In `@src/lib/onboard/install-ollama-linux.ts`:
- Around line 423-438: When overrideState === "not-applicable" the code assumes
any loopback responder is the new daemon; change the non-systemd path to
explicitly stop any pre-upgrade ollama before relaunching: use runShellImpl to
detect/terminate the old process (e.g., pkill -f "ollama serve" or use
lsof/netstat to find the PID and kill it) prior to calling
runShellImpl(`OLLAMA_HOST=127.0.0.1:${OLLAMA_PORT} ollama serve ...`); keep the
existing waitForHttpImpl checks (first probe, then probe again after restart)
and preserve the existing timeout/errorLog and return behavior if the new daemon
does not become ready. Ensure these changes touch the block that references
overrideState, waitForHttpImpl, runShellImpl, OLLAMA_PORT, and errorLog.

---

Nitpick comments:
In `@docs/reference/commands.mdx`:
- Line 1259: Rewrite the NEMOCLAW_OLLAMA_INSTALL_MODE description in active
voice and remove the colon after "Upgrades" (or drop the bold label), e.g. say
that NemoClaw or the installer "refuses `user`" or "refuses `system`" rather
than using passive phrasing; keep the behavior details for `system`, `user`, and
empty/unset values, clarify auto-detection rules (root or passwordless sudo
selects system; non-interactive without passwordless sudo selects user;
interactive shell falls back to system so the installer can prompt), and
integrate the upgrade constraints into the sentence (explain that the installer
refuses `user` for upgrades because a user-local install cannot replace the
system daemon on :11434, and that NemoClaw/installer also refuses `system` when
NEMOCLAW_NON_INTERACTIVE=1 without passwordless sudo to avoid a hanging sudo
prompt) while removing unnecessary bolding.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 89cd6c44-4c10-437b-a12a-e882bf537fcb

📥 Commits

Reviewing files that changed from the base of the PR and between 3f2b8b5 and 373b05f.

📒 Files selected for processing (4)
  • docs/reference/commands.mdx
  • src/lib/onboard/install-ollama-linux.test.ts
  • src/lib/onboard/install-ollama-linux.ts
  • src/lib/onboard/install-ollama-macos.ts
💤 Files with no reviewable changes (1)
  • src/lib/onboard/install-ollama-linux.test.ts

…ystemd upgrade

Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
@github-actions
Copy link
Copy Markdown
Contributor

Selective E2E Results — ⚠️ No requested jobs ran

Run: 26412792605
Target ref: 8497696bd82285ec0e62cd64dc6c918c7f8bab1a
Workflow ref: main
Requested jobs: gpu-e2e
Summary: 0 passed, 0 failed, 1 skipped

Job Result
gpu-e2e ⏭️ skipped

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
docs/reference/commands.mdx (1)

1259-1259: ⚡ Quick win

Split this table-cell text to keep one sentence per source line.

This updated row packs multiple sentences into one source line, which hurts diff readability under the docs style rules.

As per coding guidelines: "One sentence per line in source (makes diffs readable). Flag paragraphs where multiple sentences appear on the same line."

🤖 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 `@docs/reference/commands.mdx` at line 1259, The table cell for
NEMOCLAW_OLLAMA_INSTALL_MODE currently contains multiple sentences on one source
line; split that cell's content so each sentence is on its own source line to
improve diff readability. Edit the row text for the
`NEMOCLAW_OLLAMA_INSTALL_MODE` entry in docs/reference/commands.mdx (the table
cell describing `system`, `user`, auto-detect rules, and upgrade/upgrade-path
constraints) and break it into separate lines such that each sentence is a
distinct source line while preserving the original wording and punctuation.
🤖 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 `@docs/reference/commands.mdx`:
- Line 1259: The table cell for NEMOCLAW_OLLAMA_INSTALL_MODE currently contains
multiple sentences on one source line; split that cell's content so each
sentence is on its own source line to improve diff readability. Edit the row
text for the `NEMOCLAW_OLLAMA_INSTALL_MODE` entry in docs/reference/commands.mdx
(the table cell describing `system`, `user`, auto-detect rules, and
upgrade/upgrade-path constraints) and break it into separate lines such that
each sentence is a distinct source line while preserving the original wording
and punctuation.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: f71d3cb8-8bc2-41a8-8413-a032af507eb2

📥 Commits

Reviewing files that changed from the base of the PR and between 373b05f and 8497696.

📒 Files selected for processing (4)
  • docs/reference/commands.mdx
  • src/lib/onboard/install-ollama-linux.test.ts
  • src/lib/onboard/install-ollama-linux.ts
  • src/lib/onboard/install-ollama-macos.test.ts

@github-actions
Copy link
Copy Markdown
Contributor

Selective E2E Results — ⚠️ No requested jobs ran

Run: 26414414171
Target ref: 0ecfbc091bac29d60c5c2320dbb6c5c878faab13
Workflow ref: main
Requested jobs: gpu-e2e
Summary: 0 passed, 0 failed, 1 skipped

Job Result
gpu-e2e ⏭️ skipped

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
docs/inference/use-local-inference.mdx (1)

40-40: ⚡ Quick win

Format sudo as inline code for command consistency.

Use `sudo` in this sentence to match CLI-token formatting used elsewhere on the page.

As per coding guidelines: "CLI commands, file paths, flags, parameter names, and values must use inline code formatting."

🤖 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 `@docs/inference/use-local-inference.mdx` at line 40, Wrap the word sudo in
inline code formatting in the sentence "If sudo is not available in a
non-interactive run, NemoClaw refuses to silently downgrade the path and asks
you to rerun interactively or upgrade Ollama manually." so it reads with `sudo`
as a CLI token; update the Markdown/MDX content where that exact sentence
appears (search for the string starting "If sudo is not available...") to use
backticks around sudo to match CLI-token formatting used elsewhere.
🤖 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 `@docs/inference/use-local-inference.mdx`:
- Line 40: Wrap the word sudo in inline code formatting in the sentence "If sudo
is not available in a non-interactive run, NemoClaw refuses to silently
downgrade the path and asks you to rerun interactively or upgrade Ollama
manually." so it reads with `sudo` as a CLI token; update the Markdown/MDX
content where that exact sentence appears (search for the string starting "If
sudo is not available...") to use backticks around sudo to match CLI-token
formatting used elsewhere.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: c4056db7-2226-4e28-8a75-c9172d29f55e

📥 Commits

Reviewing files that changed from the base of the PR and between 8497696 and 74b8723.

📒 Files selected for processing (7)
  • docs/inference/use-local-inference.mdx
  • docs/reference/commands.mdx
  • src/lib/onboard.ts
  • src/lib/onboard/install-ollama-linux-mode.ts
  • src/lib/onboard/install-ollama-linux-upgrade.test.ts
  • src/lib/onboard/install-ollama-linux.test.ts
  • src/lib/onboard/install-ollama-linux.ts
✅ Files skipped from review due to trivial changes (1)
  • docs/reference/commands.mdx

@github-actions
Copy link
Copy Markdown
Contributor

Selective E2E Results — ❌ Some jobs failed

Run: 26414889786
Target ref: 74b87234d50dc59cf02e4427c41dd4693c07e49b
Workflow ref: main
Requested jobs: gpu-e2e,cloud-onboard-e2e
Summary: 0 passed, 1 failed, 1 skipped

Job Result
cloud-onboard-e2e ❌ failure
gpu-e2e ⏭️ skipped

Failed jobs: cloud-onboard-e2e. Check run artifacts for logs.

@github-actions
Copy link
Copy Markdown
Contributor

Selective E2E Results — ⚠️ No requested jobs ran

Run: 26415193873
Target ref: ba1b68f0454d690de4abfbfef7788c04f26c0bcd
Workflow ref: main
Requested jobs: gpu-e2e
Summary: 0 passed, 0 failed, 1 skipped

Job Result
gpu-e2e ⏭️ skipped

@cv cv merged commit 727c017 into main May 25, 2026
28 checks passed
@miyoungc miyoungc mentioned this pull request May 26, 2026
12 tasks
miyoungc added a commit that referenced this pull request May 26, 2026
## Summary
Refresh NemoClaw documentation and generated user skills for the v0.0.50
and v0.0.51 release-prep window.
Remove obsolete legacy docs version metadata now that Fern docs no
longer use `docs/project.json`, `docs/versions1.json`, or the legacy
Sphinx config.

## Source summary
- #1757 -> `docs/manage-sandboxes/messaging-channels.mdx`,
`docs/reference/commands.mdx`, `docs/about/release-notes.mdx`: Document
Slack channel allowlisting with `SLACK_ALLOWED_CHANNELS`.
- #4134 -> `docs/manage-sandboxes/messaging-channels.mdx`,
`docs/reference/commands.mdx`, `docs/about/release-notes.mdx`: Document
Cloudflare named tunnel support through `CLOUDFLARE_TUNNEL_TOKEN`.
- #4186 and #4135 -> `docs/inference/use-local-inference.mdx`,
`docs/reference/commands.mdx`, `docs/about/release-notes.mdx`: Document
Ollama upgrade and user-local install behavior.
- #4185 -> `docs/network-policy/integration-policy-examples.mdx`,
`docs/about/release-notes.mdx`: Clarify Jira policy validation probes.
- Release cleanup ->
`.claude/skills/nemoclaw-contributor-update-docs/SKILL.md`,
`docs/CONTRIBUTING.md`, `.github/PULL_REQUEST_TEMPLATE.md`,
`scripts/bump-version.ts`: Stop using legacy docs version JSON files and
align docs verification on `npm run docs`.

## Changes
- Add v0.0.50 and v0.0.51 release notes.
- Regenerate NemoClaw user skills from the current Fern docs.
- Remove obsolete `docs/conf.py`, `docs/project.json`, and
`docs/versions1.json`.
- Update docs workflow guidance and PR templates to use `npm run docs`
instead of `make docs`.
- Remove release-version JSON handling from `scripts/bump-version.ts`.

## 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)

## Verification
- [ ] `npx prek run --all-files` passes
- [ ] `npm test` passes
- [ ] Tests added or updated for new or changed behavior
- [x] No secrets, API keys, or credentials committed
- [x] Docs updated for user-facing behavior changes
- [ ] `npm run docs` builds without warnings (doc changes only)
- [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)

Additional verification:
- `python3 scripts/docs-to-skills.py docs/ .agents/skills/ --prefix
nemoclaw-user --doc-platform fern-mdx`
- `npm run build:cli`
- `npx tsc --noEmit --allowSyntheticDefaultImports --module NodeNext
--moduleResolution NodeNext --target ES2022 --types node
scripts/bump-version.ts`
- `ReadLints` on touched docs, skills, template, and script files
- Searched for stale `versions1.json`, `project.json`, and `make docs`
references

Known gaps:
- `npm run docs` was not rerun after cleanup because the earlier Fern
CLI fetch failed with npm registry `403 Forbidden` in this environment.
- A broad `npm run typecheck -- --noEmit` hit an unrelated existing
`scripts/dev-tier-selector.js` type error.

---
Signed-off-by: Miyoung Cho <miyoungc@nvidia.com>

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added resource profiling with CPU/RAM configuration controls for
sandboxes
* Enhanced local Ollama inference with automatic GPU memory-aware model
fallback
* Added `nemoclaw resources` command to display host hardware inventory
* Enabled Cloudflare named tunnel support via environment configuration

* **Documentation**
* Improved setup guides for local inference, sandbox hardening, and
policy validation
* Enhanced troubleshooting for messaging delivery and host service
routing
  * Added release notes for v0.0.50 and v0.0.51

* **Chores**
* Updated build documentation commands from `make docs` to `npm run
docs`

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/NVIDIA/NemoClaw/pull/4262?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix v0.0.51 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DGX Spark][Onboard] Express setup with pre-installed old Ollama (0.6.2) loops on model probe — no version check, no upgrade, no actionable error

4 participants