Skip to content

fix(ollama): verify pulled model discovery - #6481

Merged
cv merged 8 commits into
mainfrom
fix/issue-6038-ollama-discovery
Jul 8, 2026
Merged

fix(ollama): verify pulled model discovery#6481
cv merged 8 commits into
mainfrom
fix/issue-6038-ollama-discovery

Conversation

@cjagwani

@cjagwani cjagwani commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Confirms that Ollama exposes a newly pulled model before onboarding accepts the route. This is a current-main replacement for #6075 that preserves Ho Lim's original authorship without carrying the conflicted test reshuffle.

Related Issue

Fixes #6038.

Changes

  • Poll Ollama model discovery with bounded exponential backoff after a successful pull.
  • Return to model selection with a clear error when the daemon never lists the pulled model.
  • Treat omitted model tags as Ollama's canonical :latest form across pull authorization and post-pull discovery.
  • Keep model-reference, pull-readiness, and bounded discovery logic in a focused typed module.\n- Remove the legacy @ts-nocheck from proxy.ts while shrinking that hotspot below its main-branch line count.
  • Add deterministic wait success/exhaustion tests plus integrated delayed-registration and zero-exit/unlisted reprompt coverage.
  • Update existing successful-pull onboarding fixtures without growing the legacy test file.

Type of Change

  • Code change (bug fix)
  • Code change with doc updates
  • Doc only

Quality Gates

  • Tests added or updated for changed behavior
  • Docs not applicable — this corrects existing onboarding behavior and error handling
  • Sensitive paths changed — local Ollama onboarding and inference preparation.
  • No secrets, API keys, or credentials committed

Notes

The registration-wait status and post-pull failure message make an existing onboarding contract explicit. The current Ollama docs already describe pull, load, and validation, so this reliability fix adds no new command, option, or workflow.

Verification

  • npm run build:cli
  • npm run typecheck:cli
  • model-discovery.test.ts + proxy.test.ts — 18/18 passed
  • test/onboard-selection.test.ts — 64/64 passed
  • Biome format and lint on all touched files
  • proxy.ts shrank from 972 to 969 lines and now passes CLI type-checking without @ts-nocheck\n- [x] npm run test-conditionals:scan -- --top 25\n- [x] npm run test-size:check
  • All commits are signed and the original contributor remains the first commit author

Signed-off-by: Ho Lim subhoya@gmail.com
Signed-off-by: cjagwani cjagwani@nvidia.com
Signed-off-by: Carlos Villela cvillela@nvidia.com

Summary by CodeRabbit

  • New Features

    • Enhanced Ollama model recognition to handle implied or differently formatted tags (e.g., latest) during selection and onboarding.
    • Added a post-pull discovery retry flow that waits for a newly pulled model to become available before proceeding.
  • Bug Fixes

    • Fixed cases where onboarding could continue before the model appeared in Ollama, leading to “model not found” and inconsistent recovery behavior.
  • Tests

    • Expanded coverage for pull completion, discovery retries, and deterministic onboarding scenarios.

Port the narrow behavior from #6075 onto current main while preserving the existing onboarding test layout.

Signed-off-by: Ho Lim <subhoya@gmail.com>
Signed-off-by: cjagwani <cjagwani@nvidia.com>
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 35730a9a-cff8-4a69-9b4e-ea4adb06b2e8

📥 Commits

Reviewing files that changed from the base of the PR and between b9f5bed and 80b5734.

📒 Files selected for processing (5)
  • src/lib/inference/ollama/model-discovery.test.ts
  • src/lib/inference/ollama/model-discovery.ts
  • src/lib/inference/ollama/proxy.test.ts
  • src/lib/inference/ollama/proxy.ts
  • test/onboard-selection.test.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/lib/inference/ollama/proxy.test.ts
  • test/onboard-selection.test.ts

📝 Walkthrough

Walkthrough

Adds Ollama model-reference matching, waits for pulled models to appear before continuing, and updates onboarding plus tests to handle delayed discovery and implicit latest tags.

Changes

Ollama model pull verification

Layer / File(s) Summary
Model reference normalization and matching
src/lib/inference/ollama/model-discovery.ts, src/lib/onboard.ts
Adds Ollama model reference normalization and matching helpers, and uses reference equivalence for installed-model validation in onboarding.
Proxy discovery wiring
src/lib/inference/ollama/proxy.ts
Replaces inline pull handling in prepareOllamaModel with post-pull discovery checks, adds dependency injection for discovery timing, and tightens local type annotations.
Discovery and proxy tests
src/lib/inference/ollama/model-discovery.test.ts, src/lib/inference/ollama/proxy.test.ts
Adds tests for reference matching, bounded polling, and post-pull discovery behavior, plus proxy harness updates for mocked pull completion.
Onboarding integration scenarios
src/lib/onboard.ts, test/onboard-selection.test.ts, ci/test-file-size-budget.json
Updates onboarding and repair tests to use pull-log-driven discovery and implicit latest-tag matching, and adjusts the related test budget.

Estimated code review effort: 4 (Complex) | ~45 minutes

Suggested labels: bug-fix, area: cli

Suggested reviewers: cv, ericksoa

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly reflects the core Ollama model discovery fix and is concise.
Linked Issues check ✅ Passed The PR implements post-pull discovery and onboarding retries so a pulled Ollama model is confirmed before onboarding completes, matching #6038.
Out of Scope Changes check ✅ Passed The changes stay focused on Ollama onboarding/discovery logic, related tests, and the supporting file-size budget tweak.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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/issue-6038-ollama-discovery

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

@github-code-quality

github-code-quality Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage remains at 96%, unchanged from the main branch.

TypeScript / code-coverage/cli

The overall coverage in the fix/issue-6038-ollam... branch is 76%. Coverage data for the main branch is not yet available.

Show a code coverage summary of the most covered files.
File main fix/issue-6038-ollam... 80b5734 +/-
src/lib/onboard/preflight.ts 82%
src/lib/state/o...oard-session.ts 82%
src/lib/actions...all/run-plan.ts 81%
src/lib/actions...licy-channel.ts 79%
src/lib/actions...box/snapshot.ts 79%
src/lib/state/sandbox.ts 75%
src/lib/onboard...er-gpu-patch.ts 69%
src/lib/policy/index.ts 65%
src/lib/shields/index.ts 60%
src/lib/onboard.ts 28%

Updated July 08, 2026 19:12 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor (Nemotron Ultra) — No blocking findings

Merge posture: No blocking advisor findings
Primary next action: Add or justify PRA-T1 and any related test follow-ups.
Open items: 0 required · 0 warnings · 4 suggestions · 4 test follow-ups
Since last review: 0 prior items resolved · 0 still apply · 0 new items found

Action checklist

  • PRA-T1 Add or justify test follow-up: Runtime validation
  • PRA-T2 Add or justify test follow-up: Runtime validation
  • PRA-T3 Add or justify test follow-up: Runtime validation
  • PRA-T4 Add or justify test follow-up: Add runtime validation against real Ollama daemon for registration latency
  • PRA-1 In-scope improvement: Add runtime validation against real Ollama daemon for registration latency in src/lib/inference/ollama/model-discovery.ts:1
  • PRA-2 In-scope improvement: Add edge-case tests for normalizeOllamaModelRef empty/null input in src/lib/inference/ollama/model-discovery.ts:24
  • PRA-3 In-scope improvement: NEMOCLAW_TEST_NO_SLEEP env var is a legitimate test knob — keep but document in src/lib/inference/ollama/proxy.ts:873
  • PRA-4 In-scope improvement: Explicit security boundary documentation for normalizeOllamaModelRef is a positive pattern in src/lib/inference/ollama/model-discovery.ts:19

Findings index

ID Severity Category Location Required action
PRA-1 Improvement tests src/lib/inference/ollama/model-discovery.ts:1 Add CI job that spawns real Ollama, pulls a representative model (e.g., qwen3.5:9b), measures registration latency, and verifies 10s timeout is adequate. Can be a separate follow-up PR since unit coverage is complete.
PRA-2 Improvement correctness src/lib/inference/ollama/model-discovery.ts:24 Add two unit tests: normalizeOllamaModelRef('') === ':latest' and normalizeOllamaModelRef(null) === ':latest' to document and lock coercion behavior.
PRA-3 Improvement architecture src/lib/inference/ollama/proxy.ts:873 Add JSDoc comment above testSleep line noting this is a test-only escape hatch. No code change needed.
PRA-4 Improvement security src/lib/inference/ollama/model-discovery.ts:19 Keep this pattern. Consider adding similar boundary comments to other comparison-only helpers.
Review findings by urgency: 0 required fixes, 0 items to resolve/justify, 4 in-scope improvements

⚠️ Resolve or justify before merge

Investigate these in the current review; either fix them, explain why they are not applicable, or document the accepted risk.

  • None.

💡 In-scope improvements

These are lower-risk, not throwaway. Prefer fixing them in this PR when they are local to changed code; defer only with rationale or a linked follow-up.

PRA-1 Improvement — Add runtime validation against real Ollama daemon for registration latency

  • Location: src/lib/inference/ollama/model-discovery.ts:1
  • Category: tests
  • Problem: Unit tests mock getModelOptions/pullModel/sleep/now deterministically but don't exercise real Ollama daemon registration timing. The 10s/8-attempt timeout is unvalidated on DGX Spark, Ubuntu, WSL, macOS with various model sizes.
  • Impact: If real registration exceeds 10s on some platforms/models, onboarding will fail with 'Ollama did not list the model' even though pull succeeded.
  • Suggested action: Add CI job that spawns real Ollama, pulls a representative model (e.g., qwen3.5:9b), measures registration latency, and verifies 10s timeout is adequate. Can be a separate follow-up PR since unit coverage is complete.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Run: npx vitest run src/lib/inference/ollama/model-discovery.test.ts src/lib/inference/ollama/proxy.test.ts test/onboard-selection.test.ts — all pass. Check CI for real-Ollama registration latency job.
  • Missing regression test: Integration test: spawn Ollama, pull model, measure time from pull exit to model appearing in /api/tags across platforms. Assert p99 < 10s.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: testDepth.verdict='runtime_validation_recommended'; model-discovery.test.ts uses mocked time/sleep; PR body verification lists only unit test passes

PRA-2 Improvement — Add edge-case tests for normalizeOllamaModelRef empty/null input

  • Location: src/lib/inference/ollama/model-discovery.ts:24
  • Category: correctness
  • Problem: normalizeOllamaModelRef('') returns ':latest' and normalizeOllamaModelRef(null) returns ':latest' due to String coercion. No explicit tests cover these coercions.
  • Impact: If empty string or null reaches this function (e.g., from malformed user input), it produces ':latest' which may match unintended models.
  • Suggested action: Add two unit tests: normalizeOllamaModelRef('') === ':latest' and normalizeOllamaModelRef(null) === ':latest' to document and lock coercion behavior.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Read normalizeOllamaModelRef implementation (model-discovery.ts:24-30) and test cases (model-discovery.test.ts:15-35). Run vitest to confirm current behavior.
  • Missing regression test: it('coerces empty string to :latest', () => { expect(normalizeOllamaModelRef('')).toBe(':latest'); }); it('coerces null to :latest', () => { expect(normalizeOllamaModelRef(null)).toBe(':latest'); });
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: normalizeOllamaModelRef uses String(model || '').trim(); no tests for empty/null in model-discovery.test.ts

PRA-3 Improvement — NEMOCLAW_TEST_NO_SLEEP env var is a legitimate test knob — keep but document

  • Location: src/lib/inference/ollama/proxy.ts:873
  • Category: architecture
  • Problem: prepareOllamaModel uses process.env.NEMOCLAW_TEST_NO_SLEEP === '1' to disable sleeps in tests. Used by onboard-selection.test.ts for delayed-registration and reprompt tests.
  • Impact: Test-only env var in production code path; acceptable but should be documented as test-only.
  • Suggested action: Add JSDoc comment above testSleep line noting this is a test-only escape hatch. No code change needed.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: grep NEMOCLAW_TEST_NO_SLEEP src/lib/inference/ollama/proxy.ts test/onboard-selection.test.ts
  • Missing regression test: None — existing tests exercise this path.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: proxy.ts:873 const testSleep = process.env.NEMOCLAW_TEST_NO_SLEEP === '1' ? () => {} : undefined; onboard-selection.test.ts sets NEMOCLAW_TEST_NO_SLEEP=1

PRA-4 Improvement — Explicit security boundary documentation for normalizeOllamaModelRef is a positive pattern

  • Location: src/lib/inference/ollama/model-discovery.ts:19
  • Category: security
  • Problem: Comment at model-discovery.ts:19-22 states 'This comparison-only helper never authorizes network access; buildLocalOllamaPullUrl separately retains the allowlist boundary' — good security hygiene.
  • Impact: Prevents future misuse of normalizeOllamaModelRef for network authorization decisions.
  • Suggested action: Keep this pattern. Consider adding similar boundary comments to other comparison-only helpers.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Read model-discovery.ts lines 19-22 and compare with buildLocalOllamaPullUrl in proxy.ts:585-595
  • Missing regression test: None — documentation pattern.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: model-discovery.ts:19-22 JSDoc comment explicitly separates comparison logic from network authorization
Test follow-ups to resolve or justify

If these cover changed behavior, prefer adding them in this PR; otherwise state why existing coverage is enough or link the follow-up.

  • PRA-T1 Runtime validation — Integration test: spawn real Ollama, pull qwen3.5:9b, measure registration latency (pull exit to /api/tags appearance) across platforms. Unit tests mock getModelOptions, pullModel, sleep, now deterministically with excellent coverage (7 model-discovery tests, 2 proxy integration tests, 2 onboard integration tests). However, real Ollama registration latency varies by platform, version, model size. The 10s/8-attempt timeout is unvalidated against real daemon behavior on DGX Spark, Ubuntu, WSL, macOS.
  • PRA-T2 Runtime validation — Stress test: pull large model (e.g., 30B+ params) on slower hardware, verify 10s timeout adequacy. Unit tests mock getModelOptions, pullModel, sleep, now deterministically with excellent coverage (7 model-discovery tests, 2 proxy integration tests, 2 onboard integration tests). However, real Ollama registration latency varies by platform, version, model size. The 10s/8-attempt timeout is unvalidated against real daemon behavior on DGX Spark, Ubuntu, WSL, macOS.
  • PRA-T3 Runtime validation — Version matrix test: test against minimum and maximum supported Ollama versions. Unit tests mock getModelOptions, pullModel, sleep, now deterministically with excellent coverage (7 model-discovery tests, 2 proxy integration tests, 2 onboard integration tests). However, real Ollama registration latency varies by platform, version, model size. The 10s/8-attempt timeout is unvalidated against real daemon behavior on DGX Spark, Ubuntu, WSL, macOS.
  • PRA-T4 Add runtime validation against real Ollama daemon for registration latency — Add CI job that spawns real Ollama, pulls a representative model (e.g., qwen3.5:9b), measures registration latency, and verifies 10s timeout is adequate. Can be a separate follow-up PR since unit coverage is complete.
Since last review details

Current findings, using the urgency labels above:

PRA-1 Improvement — Add runtime validation against real Ollama daemon for registration latency

  • Location: src/lib/inference/ollama/model-discovery.ts:1
  • Category: tests
  • Problem: Unit tests mock getModelOptions/pullModel/sleep/now deterministically but don't exercise real Ollama daemon registration timing. The 10s/8-attempt timeout is unvalidated on DGX Spark, Ubuntu, WSL, macOS with various model sizes.
  • Impact: If real registration exceeds 10s on some platforms/models, onboarding will fail with 'Ollama did not list the model' even though pull succeeded.
  • Suggested action: Add CI job that spawns real Ollama, pulls a representative model (e.g., qwen3.5:9b), measures registration latency, and verifies 10s timeout is adequate. Can be a separate follow-up PR since unit coverage is complete.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Run: npx vitest run src/lib/inference/ollama/model-discovery.test.ts src/lib/inference/ollama/proxy.test.ts test/onboard-selection.test.ts — all pass. Check CI for real-Ollama registration latency job.
  • Missing regression test: Integration test: spawn Ollama, pull model, measure time from pull exit to model appearing in /api/tags across platforms. Assert p99 < 10s.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: testDepth.verdict='runtime_validation_recommended'; model-discovery.test.ts uses mocked time/sleep; PR body verification lists only unit test passes

PRA-2 Improvement — Add edge-case tests for normalizeOllamaModelRef empty/null input

  • Location: src/lib/inference/ollama/model-discovery.ts:24
  • Category: correctness
  • Problem: normalizeOllamaModelRef('') returns ':latest' and normalizeOllamaModelRef(null) returns ':latest' due to String coercion. No explicit tests cover these coercions.
  • Impact: If empty string or null reaches this function (e.g., from malformed user input), it produces ':latest' which may match unintended models.
  • Suggested action: Add two unit tests: normalizeOllamaModelRef('') === ':latest' and normalizeOllamaModelRef(null) === ':latest' to document and lock coercion behavior.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Read normalizeOllamaModelRef implementation (model-discovery.ts:24-30) and test cases (model-discovery.test.ts:15-35). Run vitest to confirm current behavior.
  • Missing regression test: it('coerces empty string to :latest', () => { expect(normalizeOllamaModelRef('')).toBe(':latest'); }); it('coerces null to :latest', () => { expect(normalizeOllamaModelRef(null)).toBe(':latest'); });
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: normalizeOllamaModelRef uses String(model || '').trim(); no tests for empty/null in model-discovery.test.ts

PRA-3 Improvement — NEMOCLAW_TEST_NO_SLEEP env var is a legitimate test knob — keep but document

  • Location: src/lib/inference/ollama/proxy.ts:873
  • Category: architecture
  • Problem: prepareOllamaModel uses process.env.NEMOCLAW_TEST_NO_SLEEP === '1' to disable sleeps in tests. Used by onboard-selection.test.ts for delayed-registration and reprompt tests.
  • Impact: Test-only env var in production code path; acceptable but should be documented as test-only.
  • Suggested action: Add JSDoc comment above testSleep line noting this is a test-only escape hatch. No code change needed.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: grep NEMOCLAW_TEST_NO_SLEEP src/lib/inference/ollama/proxy.ts test/onboard-selection.test.ts
  • Missing regression test: None — existing tests exercise this path.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: proxy.ts:873 const testSleep = process.env.NEMOCLAW_TEST_NO_SLEEP === '1' ? () => {} : undefined; onboard-selection.test.ts sets NEMOCLAW_TEST_NO_SLEEP=1

PRA-4 Improvement — Explicit security boundary documentation for normalizeOllamaModelRef is a positive pattern

  • Location: src/lib/inference/ollama/model-discovery.ts:19
  • Category: security
  • Problem: Comment at model-discovery.ts:19-22 states 'This comparison-only helper never authorizes network access; buildLocalOllamaPullUrl separately retains the allowlist boundary' — good security hygiene.
  • Impact: Prevents future misuse of normalizeOllamaModelRef for network authorization decisions.
  • Suggested action: Keep this pattern. Consider adding similar boundary comments to other comparison-only helpers.
  • Expected follow-up: Prefer a current-PR fix when local to changed code; defer only with rationale or linked follow-up.
  • Verification: Read model-discovery.ts lines 19-22 and compare with buildLocalOllamaPullUrl in proxy.ts:585-595
  • Missing regression test: None — documentation pattern.
  • Done when: The local improvement is applied, or the PR notes why it should be deferred.
  • Evidence: model-discovery.ts:19-22 JSDoc comment explicitly separates comparison logic from network authorization

Workflow run details

This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision.

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: gpu-e2e, ollama-auth-proxy, cloud-onboard
Optional E2E: cloud-onboard

Dispatch hint: gpu-e2e,ollama-auth-proxy

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • gpu-e2e (high): Required because the change affects the real local Ollama onboarding path: install/onboard with provider=ollama, model pull/availability, auth proxy setup, sandbox route configuration, and live sandbox inference on a GPU host.
  • ollama-auth-proxy (medium): Required because src/lib/inference/ollama/proxy.ts was changed. This live E2E validates the token-protected Ollama proxy boundary and lifecycle that share the modified module with the new model-preparation flow.
  • cloud-onboard (high): Changed onboard, trace timing, scorecard, or E2E workflow code can affect cloud onboard wall-clock behavior and should refresh the trusted cloud-onboard trace timing signal.

Optional E2E

  • cloud-onboard (high): Useful adjacent confidence because src/lib/onboard.ts changed, but the modified logic is scoped to local Ollama selection/model preparation and does not appear to affect hosted onboarding directly.

New E2E recommendations

  • local-ollama-onboarding-and-model-preparation (medium): Existing live coverage exercises real Ollama onboarding, but there is no dedicated E2E that deterministically simulates a successful pull followed by delayed /api/tags or ollama list registration. The PR adds unit/subprocess coverage for that race, but a future hermetic E2E with a fake Ollama daemon would guard the exact user-facing retry path without needing a GPU runner.
    • Suggested test: Add a hermetic local-Ollama onboarding E2E target with a fake Ollama API/CLI that returns pull success, delays model discovery for several polls, then verifies onboarding proceeds and configures the local inference route.

Dispatch hint

  • Workflow: .github/workflows/e2e.yaml
  • jobs input: gpu-e2e,ollama-auth-proxy

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

E2E Target Recommendation

Required E2E targets: gpu-e2e
Optional E2E targets: gpu-double-onboard

Dispatch required E2E targets:

  • gh workflow run e2e.yaml --ref <pr-head-ref> --field jobs=gpu-e2e

Workflow run

Full E2E target advisor summary

E2E Target Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E targets

  • gpu-e2e: The PR changes local Ollama onboarding/model preparation: post-pull model discovery, implicit latest-tag matching, and prepareOllamaModel integration in the onboarding flow. The dispatchable live path that exercises real Ollama pulls, GPU-backed local Ollama onboarding, auth proxy setup, and sandbox inference is the gpu-e2e free-standing job.
    • Dispatch: gh workflow run e2e.yaml --ref <pr-head-ref> --field jobs=gpu-e2e

Optional E2E targets

  • gpu-double-onboard: Adjacent GPU/local-Ollama coverage for repeated onboarding behavior. Useful because the PR changes installed-model matching and post-pull discovery paths that can affect subsequent local Ollama onboarding, but gpu-e2e is the primary required live coverage.
    • Dispatch: gh workflow run e2e.yaml --ref <pr-head-ref> --field jobs=gpu-double-onboard

Relevant changed files

  • src/lib/inference/ollama/model-discovery.ts
  • src/lib/inference/ollama/proxy.ts
  • src/lib/onboard.ts

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings

Merge posture: No blocking advisor findings
Primary next action: Add or justify PRA-T1 and any related test follow-ups.
Open items: 0 required · 0 warnings · 0 suggestions · 4 test follow-ups

Action checklist

  • PRA-T1 Add or justify test follow-up: Runtime validation
  • PRA-T2 Add or justify test follow-up: Runtime validation
  • PRA-T3 Add or justify test follow-up: Runtime validation
  • PRA-T4 Add or justify test follow-up: Acceptance clause
Test follow-ups to resolve or justify

If these cover changed behavior, prefer adding them in this PR; otherwise state why existing coverage is enough or link the follow-up.

  • PRA-T1 Runtime validation — Validate on a real empty Ollama daemon that onboarding pulls a selected starter model and does not configure the route until `ollama list` shows that model.. Static and unit/subprocess coverage is strong, but the touched behavior spans host Ollama daemon timing, local model discovery, and onboarding flow, so a targeted runtime validation would add confidence without changing the code review outcome.
  • PRA-T2 Runtime validation — Validate that when a pull exits successfully but model discovery remains empty, onboarding returns to Ollama model selection with the new post-pull discovery failure message instead of warming or validating the model.. Static and unit/subprocess coverage is strong, but the touched behavior spans host Ollama daemon timing, local model discovery, and onboarding flow, so a targeted runtime validation would add confidence without changing the code review outcome.
  • PRA-T3 Runtime validation — Validate that a requested untagged model such as `llama3.2` is treated as installed when the daemon lists `llama3.2:latest`, without prompting for a redundant download.. Static and unit/subprocess coverage is strong, but the touched behavior spans host Ollama daemon timing, local model discovery, and onboarding flow, so a targeted runtime validation would add confidence without changing the code review outcome.
  • PRA-T4 Acceptance clause — 1. Install NemoClaw v0.0.69 on DGX Spark — add test evidence or identify existing coverage. Version/device setup is historical issue context rather than a code acceptance condition directly reproducible from this diff.

Workflow run details

This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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/inference/ollama/proxy.ts (1)

897-913: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add user-facing feedback while waiting on model registration.

The pull step logs Pulling Ollama model: ${model}, but the subsequent waitForPulledOllamaModel poll (up to several seconds) prints nothing until it fails. Given the linked issue explicitly calls out the wizard appearing to time out, a short status line (e.g. "Waiting for Ollama to register the model...") before Line 906 would reduce perceived hangs during onboarding.

💡 Suggested addition
     if (!(await pullOllamaModel(model))) {
       return {
         ok: false,
         message:
           `Failed to pull Ollama model '${model}'. ` +
           "Check the model name and that Ollama can access the registry, then try another model.",
       };
     }
+    console.log(`  Waiting for Ollama to register '${model}'...`);
     if (!waitForPulledOllamaModel(model)) {
🤖 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/proxy.ts` around lines 897 - 913, The Ollama pull
flow in proxy.ts logs the initial pull but stays silent during the wait for
registration, which makes the wizard look hung. In the code path around
pullOllamaModel and waitForPulledOllamaModel, add a brief user-facing status
message before waiting for the model to appear, so users see progress while the
polling runs. Keep the existing failure returns unchanged, and place the new
feedback adjacent to the waitForPulledOllamaModel check for easy discovery.
🤖 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/inference/ollama/proxy.ts`:
- Around line 897-913: The Ollama pull flow in proxy.ts logs the initial pull
but stays silent during the wait for registration, which makes the wizard look
hung. In the code path around pullOllamaModel and waitForPulledOllamaModel, add
a brief user-facing status message before waiting for the model to appear, so
users see progress while the polling runs. Keep the existing failure returns
unchanged, and place the new feedback adjacent to the waitForPulledOllamaModel
check for easy discovery.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: a1f0251a-9d3d-41ce-8ea8-17305d677400

📥 Commits

Reviewing files that changed from the base of the PR and between 7bf427e and 449f07f.

📒 Files selected for processing (3)
  • src/lib/inference/ollama/proxy.test.ts
  • src/lib/inference/ollama/proxy.ts
  • test/onboard-selection.test.ts

@cv

cv commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Comparator update: #6481 remains the preferred replacement vehicle for #6075, but it is not ready as-is. The repaired #6075 head exposed three gaps that match the exact-head advisor findings here:

  • exact .includes(model) matching can reject an untagged request such as llama3.2 when Ollama lists llama3.2:latest;
  • the current unit tests do not exercise prepareOllamaModel after a zero-exit pull that never appears in discovery;
  • the onboarding retry fixture still covers a nonzero pull failure rather than the reported zero-exit/unlisted-model path.

I am porting those focused fixes/tests from #6075 onto this replacement branch now, then will rerun the exact-head gates.

Exercise the real onboarding polling path and surface progress while Ollama registers a completed pull.

Signed-off-by: cjagwani <cjagwani@nvidia.com>
@cjagwani

cjagwani commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed the exact-head advisor gap in 9228e937:

  • the spawned onboarding acceptance test now keeps ollama list empty for two post-pull probes, then exposes the model on the third and asserts the polling path completed
  • the CLI prints and tests a registration-wait status line
  • the localized compatibility wait now documents the invalid state, upstream source boundary, bounded fallback, regression coverage, and removal condition
  • focused coverage includes the immediate-success path as well as delayed and exhausted discovery

Validation: proxy unit suite 8/8, full onboard-selection suite 64/64, build/typecheck, Biome, and the ratcheted test-size budget all pass.

Treat an untagged model request as its Ollama :latest listing during installed and post-pull discovery checks.

Signed-off-by: cjagwani <cjagwani@nvidia.com>
@cjagwani

cjagwani commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator Author

Folded the remaining useful edge case from the independently refreshed #6075 into exact head fe624a80: untagged requests now match Ollama listings normalized to :latest, including registry-host ports and digest references. The implementation keeps the bounded deadline/test seams and real delayed-registration acceptance coverage here; proxy tests are now 12/12 and the onboarding suite remains 64/64.

@cv

cv commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Thanks — fe624a80 covers canonical matching inside the poller and prepareOllamaModel. One exact-match call site still remains at src/lib/onboard.ts in the pre-pull authorization check, and the zero-exit/unlisted failure path still lacks an integrated reprompt assertion. I have both passing locally, including a non-interactive llama3.2 vs llama3.2:latest caller regression. I am rebasing that focused commit onto fe624a80 now; please hold further pushes for this iteration so we do not overlap again.

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

E2E Target Results — ⚠️ Run cancelled — no signal

Run: 28966561570
Workflow ref: fix/issue-6038-ollama-discovery
Requested targets: (default — all supported)
Requested jobs: gpu-e2e
Summary: 0 passed, 0 failed, 1 cancelled, 0 skipped

Job Result
gpu-e2e ⚠️ cancelled

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

E2E Target Results — ⚠️ Run cancelled — no signal

Run: 28967026083
Workflow ref: fix/issue-6038-ollama-discovery
Requested targets: gpu-repo-local-ollama-openclaw,ollama-auth-proxy
Requested jobs: (default — all default-enabled free-standing jobs; explicit-only jobs openshell-gateway-auth-contract, mcp-bridge-dev, hermes-gpu-startup, sandbox-rlimits-connect, and jetson-nvmap-gpu are skipped unless selected)
Summary: 0 passed, 0 failed, 2 cancelled, 0 skipped

Job Result
live ⚠️ cancelled
ollama-auth-proxy ⚠️ cancelled

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

E2E Target Results — ⚠️ Run cancelled — no signal

Run: 28967026051
Workflow ref: fix/issue-6038-ollama-discovery
Requested targets: (default — all supported)
Requested jobs: gpu-e2e,cloud-onboard
Summary: 0 passed, 0 failed, 2 cancelled, 0 skipped

Job Result
cloud-onboard ⚠️ cancelled
gpu-e2e ⚠️ cancelled

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

E2E Target Results — ✅ All selected jobs passed

Run: 28967132377
Workflow ref: fix/issue-6038-ollama-discovery
Requested targets: gpu-repo-local-ollama-openclaw,ollama-auth-proxy
Requested jobs: (default — all default-enabled free-standing jobs; explicit-only jobs openshell-gateway-auth-contract, mcp-bridge-dev, hermes-gpu-startup, sandbox-rlimits-connect, and jetson-nvmap-gpu are skipped unless selected)
Summary: 2 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
live ✅ success
ollama-auth-proxy ✅ success

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
src/lib/inference/ollama/model-discovery.test.ts (1)

1-81: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Solid coverage for success, delayed, and exhausted discovery paths.

Tests exercise the public waitForPulledOllamaModel via injected getModelOptions/now/sleep, and correctly assert the bounded backoff sequence and attempt counts for both the eventual-success and never-registers cases. This directly addresses the previously flagged gap.

One optional addition: none of the it.each cases assert a non-match (e.g., acme/model:7b vs. listed acme/model:8b should return false), so a regression in normalizeOllamaModelRef/ollamaModelRefsMatch that makes everything match could slip through.

✅ Suggested additional case
   it.each([
     ["llama3.2", "llama3.2:latest"],
     ["registry.example:5000/acme/model", "registry.example:5000/acme/model:latest"],
     ["acme/model:7b", "acme/model:7b"],
     ["acme/model@sha256:abc", "acme/model@sha256:abc"],
   ])("matches pulled model reference %s to listed reference %s", (requested, listed) => {
     expect(
       waitForPulledOllamaModel(requested, {
         getModelOptions: () => [listed],
         now: () => 0,
         sleep: () => {},
       }),
     ).toBe(true);
   });
+
+  it("does not match a different tag on the same model", () => {
+    expect(
+      waitForPulledOllamaModel("acme/model:7b", {
+        getModelOptions: () => ["acme/model:8b"],
+        now: () => 0,
+        sleep: () => {},
+      }),
+    ).toBe(false);
+  });
🤖 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/model-discovery.test.ts` around lines 1 - 81, Add a
negative matching test to cover the reference normalization logic in
waitForPulledOllamaModel, since the current suite only checks matching cases.
Extend the existing it.each block in model-discovery.test.ts with a case where
the requested and listed refs should not match (for example, a different tag for
the same model), and assert the function returns false so regressions in
normalizeOllamaModelRef or ollamaModelRefsMatch are caught.
src/lib/inference/ollama/model-discovery.ts (1)

41-57: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Move the no-op sleep hook out of waitForPulledOllamaModel. The helper already accepts deps.sleep; keep src/lib/inference/ollama/model-discovery.ts process-free by deciding the NEMOCLAW_TEST_NO_SLEEP fallback in the caller or test harness instead of reading process.env here.

🤖 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/model-discovery.ts` around lines 41 - 57, Move the
no-op sleep fallback out of waitForPulledOllamaModel and keep model-discovery
process-free. In waitForPulledOllamaModel, continue to use deps.sleep directly
and remove the process.env.NEMOCLAW_TEST_NO_SLEEP check; decide that fallback in
the caller or test harness instead. Update any nearby callers or tests that rely
on this behavior so the function stays focused on getOllamaModelOptions,
ollamaModelRefsMatch, and waitUntil.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/lib/inference/ollama/model-discovery.test.ts`:
- Around line 1-81: Add a negative matching test to cover the reference
normalization logic in waitForPulledOllamaModel, since the current suite only
checks matching cases. Extend the existing it.each block in
model-discovery.test.ts with a case where the requested and listed refs should
not match (for example, a different tag for the same model), and assert the
function returns false so regressions in normalizeOllamaModelRef or
ollamaModelRefsMatch are caught.

In `@src/lib/inference/ollama/model-discovery.ts`:
- Around line 41-57: Move the no-op sleep fallback out of
waitForPulledOllamaModel and keep model-discovery process-free. In
waitForPulledOllamaModel, continue to use deps.sleep directly and remove the
process.env.NEMOCLAW_TEST_NO_SLEEP check; decide that fallback in the caller or
test harness instead. Update any nearby callers or tests that rely on this
behavior so the function stays focused on getOllamaModelOptions,
ollamaModelRefsMatch, and waitUntil.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: c0b4d155-efd2-4639-8285-f966789e6561

📥 Commits

Reviewing files that changed from the base of the PR and between 37fe0ff and a748f0b.

📒 Files selected for processing (5)
  • src/lib/inference/ollama/model-discovery.test.ts
  • src/lib/inference/ollama/model-discovery.ts
  • src/lib/inference/ollama/proxy.test.ts
  • src/lib/inference/ollama/proxy.ts
  • src/lib/onboard.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/lib/onboard.ts

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

E2E Target Results — ✅ All requested jobs passed

Run: 28967132313
Workflow ref: fix/issue-6038-ollama-discovery
Requested targets: (default — all supported)
Requested jobs: gpu-e2e,cloud-onboard
Summary: 2 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
cloud-onboard ✅ success
gpu-e2e ✅ success

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv

cv commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@cjagwani
cjagwani requested a review from ericksoa July 8, 2026 18:58
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

E2E Target Results — ⚠️ Some jobs cancelled — partial pass

Run: 28967771349
Workflow ref: fix/issue-6038-ollama-discovery
Requested targets: (default — all supported)
Requested jobs: gpu-e2e,cloud-onboard,ollama-auth-proxy
Summary: 2 passed, 0 failed, 1 cancelled, 0 skipped

Job Result
cloud-onboard ✅ success
gpu-e2e ⚠️ cancelled
ollama-auth-proxy ✅ success

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv

cv commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

E2E Target Results — ✅ All requested jobs passed

Run: 28968430828
Workflow ref: fix/issue-6038-ollama-discovery
Requested targets: (default — all supported)
Requested jobs: gpu-e2e,ollama-auth-proxy,cloud-onboard
Summary: 3 passed, 0 failed, 0 cancelled, 0 skipped

Job Result
cloud-onboard ✅ success
gpu-e2e ✅ success
ollama-auth-proxy ✅ success

@cjagwani

cjagwani commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator Author

Exact-head maintainer verification for signed 80b5734862f53bc1545af3951ce72fae9e384e12:

  • The follow-up findings are resolved in code: model preparation now lives in the typed discovery module, the legacy @ts-nocheck is gone from proxy.ts, malformed-reference and deadline boundaries are covered, and the no-sleep test override preserves a caller-provided sleep function.
  • Exact-head CI is fully green. Locally, the 82 focused discovery/proxy/onboarding tests, Node 22 CLI typecheck, generated CLI build, and test-size guard all pass.
  • fix: verify Ollama model discovery after pull #6075 is now closed as superseded by this hardened replacement.

The remaining repository gate is independent human approval; @ericksoa is requested. I am not claiming unrun hardware acceptance: because #6038 reports the zero-model flow on DGX Spark, Ubuntu, and DGX Station and this worker has no Ollama daemon, a current-head real-flow confirmation from @wangericnv or QA (zero installed models -> pull -> registration -> warm/probe) would close that residual acceptance gap.

@cv

cv commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Exact-head runtime evidence and acceptance scope

Head 80b5734862f53bc1545af3951ce72fae9e384e12 passed all advisor-required live jobs in run 28968430828: gpu-e2e, ollama-auth-proxy, and cloud-onboard.

The GPU job and artifact 8179228189 provide this real-daemon chain on Linux x86_64 with an RTX PRO 6000:

  1. command -v ollama exited 1 on the fresh runner. The official Ollama installer then completed, created/started its systemd service, and detected the NVIDIA GPU.
  2. bash install.sh --non-interactive selected provider ollama, transferred the full 23 GB qwen3.6:35b model, verified the digest, wrote the manifest, and reported success.
  3. The onboarding log orders Pulling Ollama modelWaiting for Ollama to register modelLoading Ollama model before provider creation and Inference route set: ollama-local / qwen3.6:35b.
  4. Authenticated proxy /api/tags returned exactly qwen3.6:35b; direct backend /api/tags detection returned the same model.
  5. openshell inference get reported provider ollama-local and model qwen3.6:35b. A sandbox request through https://inference.local/v1/chat/completions exited 0 and returned a completion envelope from that model with token usage.

The deterministic layers cover the timing boundaries that a live daemon cannot reliably force:

  • model-discovery unit tests cover delayed success, exact failure at 8 attempts, deadline-before-attempt-cap, implicit :latest, mismatched tags, and malformed references;
  • proxy tests prove warmup/validation happen only after discovery and that a zero-exit pull which never appears is rejected;
  • onboarding integration covers success on attempt 7 with the exact wait message and the never-listed path returning to model selection with the expected error;
  • the live GPU lane above exercises the real non-interactive onboarding path, while the real auth-proxy lane exercises /api/tags and model inference.

Source-of-truth rationale: the invalid state is a successful Ollama pull whose model is not yet visible. Ollama owns pull completion and daemon registration, so NemoClaw cannot repair that external source boundary; it can only observe Ollama's public discovery surfaces. The local mitigation is bounded to 10 seconds / 8 attempts and fails back to model selection. The code records the removal condition: remove it only when NemoClaw's minimum supported Ollama version guarantees immediate visibility and live CI verifies that guarantee. Inventing a version constant before Ollama provides such a guarantee would be misleading.

Scope disclosure: the artifact does not capture a pre-pull empty /api/tags response or a multi-attempt live registration delay. The absent executable plus full model transfer are strong practical evidence of a fresh pull, not a literal empty-store assertion. The run also does not independently validate DGX Spark/GB10, arm64, Ubuntu 22.04/24.04, DGX Station, or the interactive wizard, and the live model uses an explicit tag. This PR's acceptance is therefore scoped to one full real Linux x86_64 non-interactive GPU path plus deterministic platform-independent state-machine coverage; it does not claim separate runtime proof for every platform named in #6038.

Advisor cleanup is otherwise complete: the legacy @ts-nocheck is removed, proxy.ts shrank from 972 to 969 lines, the test budget exactly matches the 4771-line file, injected sleeps take precedence over the test fallback, and the advisor's two security items themselves state that no code change is needed.

@cv cv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved at exact head 80b5734. Ordinary CI and CodeRabbit are clean; GPT-5.5 and Nemotron Ultra both recommend merge_as_is; all required live E2Es passed, with the real-Ollama evidence and platform scope recorded in the PR. I am not merging this PR.

@cv
cv merged commit 5ddf9a1 into main Jul 8, 2026
129 of 130 checks passed
@cv
cv deleted the fix/issue-6038-ollama-discovery branch July 8, 2026 19:23
@cjagwani cjagwani mentioned this pull request Jul 9, 2026
21 tasks
cv pushed a commit that referenced this pull request Jul 9, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Prepares the user documentation for NemoClaw v0.0.78 by replacing the
unreleased section with release highlights and synchronizing the
affected inference, lifecycle, messaging, and CLI reference pages with
merged behavior.

## Changes

- Publish the v0.0.78 release-notes section with links to the most
specific user guides for each shipped behavior.
- Document authoritative Deep Agents route health, Nemotron Ultra
profile behavior, and Hermes compatible-endpoint context metadata.
- Document forced rebuild recovery after total backup failure and the
ownership-safe tunnel/full-stop behavior.
- Keep command examples and shared agent variants aligned with the
current OpenClaw, Hermes, and Deep Agents interfaces.

Source mapping:

- [#3787](#3787) ->
`docs/about/release-notes.mdx`: Record reliable workspace template
seeding during sandbox startup.
- [#4960](#4960) ->
`docs/about/release-notes.mdx`: Record safer detection of rewritten
OpenClaw gateway processes.
- [#5676](#5676) ->
`docs/about/release-notes.mdx`: Record warning-tolerant agent-list JSON
handling.
- [#5857](#5857) ->
`docs/about/release-notes.mdx`: Record synchronization of explicit
OpenClaw main-agent model state.
- [#5929](#5929) ->
`docs/about/release-notes.mdx`: Record copyable SSH port-forward
guidance for remote dashboards.
- [#6068](#6068) ->
`docs/about/release-notes.mdx`: Record custom-image plugin provenance
reconciliation.
- [#6116](#6116) ->
`docs/about/release-notes.mdx`: Record live-loopback dashboard-forward
recovery.
- [#6122](#6122) ->
`docs/about/release-notes.mdx`: Announce validated, round-trippable
policy YAML output.
- [#6211](#6211) ->
`docs/manage-sandboxes/lifecycle.mdx`, `docs/reference/commands.mdx`,
`docs/about/release-notes.mdx`: Explain the explicit no-backup `rebuild
--force` recovery boundary.
- [#6283](#6283) ->
`docs/about/release-notes.mdx`: Record Hermes WebUI port alignment.
- [#6293](#6293) ->
`docs/inference/switch-inference-providers.mdx`,
`docs/about/release-notes.mdx`: Document compatible-endpoint
context-length probing for Hermes.
- [#6320](#6320) ->
`docs/about/release-notes.mdx`: Record bounded gateway-recovery waits.
- [#6377](#6377) ->
`docs/reference/commands.mdx`, `docs/about/release-notes.mdx`: Explain
rebuild diagnostics and prepared MCP-destroy recovery.
- [#6412](#6412) ->
`docs/get-started/quickstart-langchain-deepagents-code.mdx`,
`docs/about/release-notes.mdx`: Document authoritative agent-visible
inference route health.
- [#6421](#6421) ->
`docs/about/release-notes.mdx`: Record the longer quiet-pull window for
managed vLLM images.
- [#6431](#6431) ->
`docs/inference/model-capability-audit.mdx`,
`docs/about/release-notes.mdx`: Document the version-pinned Nemotron
Ultra profile plugin.
- [#6439](#6439) ->
`docs/about/release-notes.mdx`: Summarize the authenticated, pinned
credential-capture helper boundary.
- [#6450](#6450) ->
`docs/manage-sandboxes/messaging-channels.mdx`,
`docs/reference/commands.mdx`, `docs/about/release-notes.mdx`: Document
host-forward cleanup and ownership-safe gateway-port release.
- [#6474](#6474) ->
`docs/manage-sandboxes/messaging-channels.mdx`,
`docs/about/release-notes.mdx`: Record composable OpenClaw messaging
runtime loaders.
- [#6475](#6475) ->
`docs/about/release-notes.mdx`: Record removal of the unavailable Kimi
K2.6 production endpoint option.
- [#6480](#6480) ->
`docs/about/release-notes.mdx`: Record stderr routing for the plugin
registration banner.
- [#6481](#6481) ->
`docs/about/release-notes.mdx`: Record post-pull Ollama model discovery
checks.
- [#6482](#6482) ->
`docs/about/release-notes.mdx`: Record Ollama model warm-up after daemon
restart.
- [#6486](#6486) ->
`docs/about/release-notes.mdx`: Publish the opt-in, thread-scoped Deep
Agents auto-approval boundary.
- [#6490](#6490) ->
`docs/about/release-notes.mdx`: Record diagnostics for custom images
missing the managed runtime.
- [#6494](#6494) ->
`docs/inference/model-capability-audit.mdx`,
`docs/about/release-notes.mdx`: Document nonempty tool-call content
preservation and placeholder rejection.
- [#6497](#6497) ->
`docs/get-started/quickstart-langchain-deepagents-code.mdx`,
`docs/about/release-notes.mdx`: Document isolated Deep Agents
route-probe output.
- [#6506](#6506) ->
`docs/get-started/quickstart-langchain-deepagents-code.mdx`,
`docs/about/release-notes.mdx`: Document observability-preserving
managed route probes.
- [#6508](#6508) ->
`docs/about/release-notes.mdx`: Link the new extension taxonomy and
SDK-readiness reference from the release summary.

Release-source verification: GitHub reports all 29 cited source PRs as
merged with base `main`, and every merge commit is an ancestor of
`origin/main` at `17bf9a6a9688b3b1d69cf4b37d3f23110acb055e`. No
source-mapping mismatches were found.

## Type of Change

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

## Quality Gates

<!-- Check exactly one tests line and one docs line. Check other lines
when applicable. Add every requested justification or approval
reference. -->
- [ ] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [x] Tests not applicable — justification: Documentation-only
release-prep changes; `npm run docs` validates variants, routes, and
Fern content.
- [x] Docs updated for user-facing behavior changes
- [ ] Docs not applicable — justification:
- [ ] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [ ] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification:
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Verification

<!-- Check each applicable item only when supported by the requested
evidence. Run targeted tests once per relevant change set and rerun
after later edits or hook autofixes that can affect the tested behavior.
Do not rerun hook-covered checks. -->
- [x] PR description includes the DCO sign-off declaration and every
commit appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run check:diff` passed when hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — command/result or justification: Tests
are not applicable to this documentation-only change set.
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result:
- [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) — exited
0 with zero errors; Fern reported the existing unauthenticated
redirect-check and light-mode contrast warnings.
- [x] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

---
<!-- DCO sign-off is required in this PR description, and every commit
must appear as Verified in GitHub. Run: git config user.name && git
config user.email -->
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>

---------

Signed-off-by: cjagwani <cjagwani@nvidia.com>
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Confirms that Ollama exposes a newly pulled model before onboarding
accepts the route. This is a current-main replacement for NVIDIA#6075 that
preserves Ho Lim's original authorship without carrying the conflicted
test reshuffle.

## Related Issue

Fixes NVIDIA#6038.

## Changes

- Poll Ollama model discovery with bounded exponential backoff after a
successful pull.
- Return to model selection with a clear error when the daemon never
lists the pulled model.
- Treat omitted model tags as Ollama's canonical `:latest` form across
pull authorization and post-pull discovery.
- Keep model-reference, pull-readiness, and bounded discovery logic in a
focused typed module.\n- Remove the legacy `@ts-nocheck` from `proxy.ts`
while shrinking that hotspot below its main-branch line count.
- Add deterministic wait success/exhaustion tests plus integrated
delayed-registration and zero-exit/unlisted reprompt coverage.
- Update existing successful-pull onboarding fixtures without growing
the legacy test file.

## Type of Change

- [x] Code change (bug fix)
- [ ] Code change with doc updates
- [ ] Doc only

## Quality Gates

- [x] Tests added or updated for changed behavior
- [x] Docs not applicable — this corrects existing onboarding behavior
and error handling
- [x] Sensitive paths changed — local Ollama onboarding and inference
preparation.
- [x] No secrets, API keys, or credentials committed

## Notes

The registration-wait status and post-pull failure message make an
existing onboarding contract explicit. The current Ollama docs already
describe pull, load, and validation, so this reliability fix adds no new
command, option, or workflow.

## Verification

- [x] `npm run build:cli`
- [x] `npm run typecheck:cli`
- [x] `model-discovery.test.ts` + `proxy.test.ts` — 18/18 passed
- [x] `test/onboard-selection.test.ts` — 64/64 passed
- [x] Biome format and lint on all touched files
- [x] `proxy.ts` shrank from 972 to 969 lines and now passes CLI
type-checking without `@ts-nocheck`\n- [x] `npm run
test-conditionals:scan -- --top 25`\n- [x] `npm run test-size:check`
- [x] All commits are signed and the original contributor remains the
first commit author

---
Signed-off-by: Ho Lim <subhoya@gmail.com>
Signed-off-by: cjagwani <cjagwani@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>


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

* **New Features**
* Enhanced Ollama model recognition to handle implied or differently
formatted tags (e.g., `latest`) during selection and onboarding.
* Added a post-pull discovery retry flow that waits for a newly pulled
model to become available before proceeding.

* **Bug Fixes**
* Fixed cases where onboarding could continue before the model appeared
in Ollama, leading to “model not found” and inconsistent recovery
behavior.

* **Tests**
* Expanded coverage for pull completion, discovery retries, and
deterministic onboarding scenarios.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Ho Lim <subhoya@gmail.com>
Signed-off-by: cjagwani <cjagwani@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Co-authored-by: Ho Lim <subhoya@gmail.com>
Co-authored-by: Carlos Villela <cvillela@nvidia.com>
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Prepares the user documentation for NemoClaw v0.0.78 by replacing the
unreleased section with release highlights and synchronizing the
affected inference, lifecycle, messaging, and CLI reference pages with
merged behavior.

## Changes

- Publish the v0.0.78 release-notes section with links to the most
specific user guides for each shipped behavior.
- Document authoritative Deep Agents route health, Nemotron Ultra
profile behavior, and Hermes compatible-endpoint context metadata.
- Document forced rebuild recovery after total backup failure and the
ownership-safe tunnel/full-stop behavior.
- Keep command examples and shared agent variants aligned with the
current OpenClaw, Hermes, and Deep Agents interfaces.

Source mapping:

- [NVIDIA#3787](NVIDIA#3787) ->
`docs/about/release-notes.mdx`: Record reliable workspace template
seeding during sandbox startup.
- [NVIDIA#4960](NVIDIA#4960) ->
`docs/about/release-notes.mdx`: Record safer detection of rewritten
OpenClaw gateway processes.
- [NVIDIA#5676](NVIDIA#5676) ->
`docs/about/release-notes.mdx`: Record warning-tolerant agent-list JSON
handling.
- [NVIDIA#5857](NVIDIA#5857) ->
`docs/about/release-notes.mdx`: Record synchronization of explicit
OpenClaw main-agent model state.
- [NVIDIA#5929](NVIDIA#5929) ->
`docs/about/release-notes.mdx`: Record copyable SSH port-forward
guidance for remote dashboards.
- [NVIDIA#6068](NVIDIA#6068) ->
`docs/about/release-notes.mdx`: Record custom-image plugin provenance
reconciliation.
- [NVIDIA#6116](NVIDIA#6116) ->
`docs/about/release-notes.mdx`: Record live-loopback dashboard-forward
recovery.
- [NVIDIA#6122](NVIDIA#6122) ->
`docs/about/release-notes.mdx`: Announce validated, round-trippable
policy YAML output.
- [NVIDIA#6211](NVIDIA#6211) ->
`docs/manage-sandboxes/lifecycle.mdx`, `docs/reference/commands.mdx`,
`docs/about/release-notes.mdx`: Explain the explicit no-backup `rebuild
--force` recovery boundary.
- [NVIDIA#6283](NVIDIA#6283) ->
`docs/about/release-notes.mdx`: Record Hermes WebUI port alignment.
- [NVIDIA#6293](NVIDIA#6293) ->
`docs/inference/switch-inference-providers.mdx`,
`docs/about/release-notes.mdx`: Document compatible-endpoint
context-length probing for Hermes.
- [NVIDIA#6320](NVIDIA#6320) ->
`docs/about/release-notes.mdx`: Record bounded gateway-recovery waits.
- [NVIDIA#6377](NVIDIA#6377) ->
`docs/reference/commands.mdx`, `docs/about/release-notes.mdx`: Explain
rebuild diagnostics and prepared MCP-destroy recovery.
- [NVIDIA#6412](NVIDIA#6412) ->
`docs/get-started/quickstart-langchain-deepagents-code.mdx`,
`docs/about/release-notes.mdx`: Document authoritative agent-visible
inference route health.
- [NVIDIA#6421](NVIDIA#6421) ->
`docs/about/release-notes.mdx`: Record the longer quiet-pull window for
managed vLLM images.
- [NVIDIA#6431](NVIDIA#6431) ->
`docs/inference/model-capability-audit.mdx`,
`docs/about/release-notes.mdx`: Document the version-pinned Nemotron
Ultra profile plugin.
- [NVIDIA#6439](NVIDIA#6439) ->
`docs/about/release-notes.mdx`: Summarize the authenticated, pinned
credential-capture helper boundary.
- [NVIDIA#6450](NVIDIA#6450) ->
`docs/manage-sandboxes/messaging-channels.mdx`,
`docs/reference/commands.mdx`, `docs/about/release-notes.mdx`: Document
host-forward cleanup and ownership-safe gateway-port release.
- [NVIDIA#6474](NVIDIA#6474) ->
`docs/manage-sandboxes/messaging-channels.mdx`,
`docs/about/release-notes.mdx`: Record composable OpenClaw messaging
runtime loaders.
- [NVIDIA#6475](NVIDIA#6475) ->
`docs/about/release-notes.mdx`: Record removal of the unavailable Kimi
K2.6 production endpoint option.
- [NVIDIA#6480](NVIDIA#6480) ->
`docs/about/release-notes.mdx`: Record stderr routing for the plugin
registration banner.
- [NVIDIA#6481](NVIDIA#6481) ->
`docs/about/release-notes.mdx`: Record post-pull Ollama model discovery
checks.
- [NVIDIA#6482](NVIDIA#6482) ->
`docs/about/release-notes.mdx`: Record Ollama model warm-up after daemon
restart.
- [NVIDIA#6486](NVIDIA#6486) ->
`docs/about/release-notes.mdx`: Publish the opt-in, thread-scoped Deep
Agents auto-approval boundary.
- [NVIDIA#6490](NVIDIA#6490) ->
`docs/about/release-notes.mdx`: Record diagnostics for custom images
missing the managed runtime.
- [NVIDIA#6494](NVIDIA#6494) ->
`docs/inference/model-capability-audit.mdx`,
`docs/about/release-notes.mdx`: Document nonempty tool-call content
preservation and placeholder rejection.
- [NVIDIA#6497](NVIDIA#6497) ->
`docs/get-started/quickstart-langchain-deepagents-code.mdx`,
`docs/about/release-notes.mdx`: Document isolated Deep Agents
route-probe output.
- [NVIDIA#6506](NVIDIA#6506) ->
`docs/get-started/quickstart-langchain-deepagents-code.mdx`,
`docs/about/release-notes.mdx`: Document observability-preserving
managed route probes.
- [NVIDIA#6508](NVIDIA#6508) ->
`docs/about/release-notes.mdx`: Link the new extension taxonomy and
SDK-readiness reference from the release summary.

Release-source verification: GitHub reports all 29 cited source PRs as
merged with base `main`, and every merge commit is an ancestor of
`origin/main` at `17bf9a6a9688b3b1d69cf4b37d3f23110acb055e`. No
source-mapping mismatches were found.

## Type of Change

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

## Quality Gates

<!-- Check exactly one tests line and one docs line. Check other lines
when applicable. Add every requested justification or approval
reference. -->
- [ ] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [x] Tests not applicable — justification: Documentation-only
release-prep changes; `npm run docs` validates variants, routes, and
Fern content.
- [x] Docs updated for user-facing behavior changes
- [ ] Docs not applicable — justification:
- [ ] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [ ] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification:
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Verification

<!-- Check each applicable item only when supported by the requested
evidence. Run targeted tests once per relevant change set and rerun
after later edits or hook autofixes that can affect the tested behavior.
Do not rerun hook-covered checks. -->
- [x] PR description includes the DCO sign-off declaration and every
commit appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run check:diff` passed when hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — command/result or justification: Tests
are not applicable to this documentation-only change set.
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result:
- [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) — exited
0 with zero errors; Fern reported the existing unauthenticated
redirect-check and light-mode contrast warnings.
- [x] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

---
<!-- DCO sign-off is required in this PR description, and every commit
must appear as Verified in GitHub. Run: git config user.name && git
config user.email -->
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>

---------

Signed-off-by: cjagwani <cjagwani@nvidia.com>
@wscurran wscurran added area: local-models Local model providers, downloads, launch, or connectivity area: providers Inference provider integrations and provider behavior bug-fix PR fixes a bug or regression provider: ollama Ollama local model provider behavior labels Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: local-models Local model providers, downloads, launch, or connectivity area: providers Inference provider integrations and provider behavior bug-fix PR fixes a bug or regression provider: ollama Ollama local model provider behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Multiple Platforms][Onboard] NemoClaw does not pull Ollama model during onboard when no models are present

4 participants