Skip to content

fix(hermes): honor Ollama context floor - #6767

Merged
cv merged 22 commits into
NVIDIA:mainfrom
HwangJohn:codex/6760-hermes-ollama-context
Jul 15, 2026
Merged

fix(hermes): honor Ollama context floor#6767
cv merged 22 commits into
NVIDIA:mainfrom
HwangJohn:codex/6760-hermes-ollama-context

Conversation

@HwangJohn

@HwangJohn HwangJohn commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

NemoHermes Local Ollama onboarding now carries Hermes Agent's 64000-token context floor through daemon setup, model validation, and generated Hermes config. OpenClaw keeps the existing 16384-token Ollama floor, while explicit Hermes NEMOCLAW_CONTEXT_WINDOW values below 64000 fail config generation instead of producing a sandbox that fails on first inference.

Related Issue

Fixes #6760

Changes

  • Add a consumer-specific Ollama context floor helper so OpenClaw remains at 16384 tokens and Hermes uses 64000 tokens.
  • Thread the Hermes floor through Local Ollama systemd override repair, managed Linux/macOS Ollama startup, and model validation.
  • Reject explicit Hermes NEMOCLAW_CONTEXT_WINDOW values below 64000 in config generation.
  • Update Hermes/Ollama docs and troubleshooting guidance for the 64000-token minimum.
  • Add targeted tests across Ollama runtime context, onboarding selection, install startup, systemd override, and Hermes config generation.

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)

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • 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: maintainer review requested for onboarding/inference boundary changes; no waiver claimed before review.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Verification

  • PR description includes the DCO sign-off declaration and every commit appears as Verified in GitHub
  • Normal pre-commit, commit-msg, and pre-push hooks passed, or npm run check:diff passed when hooks were skipped or unavailable — local Windows note: npm run check:diff reaches repository checks but the existing runner hits Windows-only spawnSync("tsx.cmd") and executable-bit limitations; manual equivalent repository checks, npx commitlint --from origin/main --to HEAD, and npx prek run --from-ref origin/main --to-ref HEAD --stage pre-push passed.
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — command/result or justification: targeted Vitest checks passed for src/lib/inference/ollama-runtime-context.test.ts, src/lib/onboard/ollama-systemd.test.ts, src/lib/onboard/setup-nim-flow.test.ts, src/lib/onboard/setup-nim-ollama.test.ts, src/lib/onboard/install-ollama-macos.test.ts, src/lib/onboard/install-ollama-linux.test.ts, and test/generate-hermes-config.test.ts with the new [All Platforms][Onboard] NemoHermes Ollama onboard reports Ready but hermes inference fails: Ollama context 16384 below Hermes 64K minimum #6760 cases selected.
  • Applicable broad gate passed — npm test for broad runtime/test-harness changes; npm run check for repo-wide validation/coverage changes — command/result:
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • npm run docs builds without warnings (doc changes only) — local Windows note: npm run docs:check-agent-variants, npm run docs:check-routes, and PowerShell-equivalent Fern check passed with 0 errors; full npm run docs does not complete under Windows PowerShell because the existing script uses POSIX FERN_VERSION=$(...) syntax.
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Signed-off-by: HwangJohn angelic805@gmail.com

Summary by CodeRabbit

  • New Features

    • Hermes onboarding now enforces a minimum context window of 64,000 tokens using a Hermes-specific “context window floor” during Ollama setup.
    • Ollama startup/restart now sets OLLAMA_CONTEXT_LENGTH=... when required, including systemd-managed installs.
  • Bug Fixes

    • Hermes onboarding now fails closed when the runtime context is missing, malformed, unverified, or below the required floor (including resume/repair flows).
  • Documentation

    • Updated Hermes configuration, commands, and troubleshooting guidance to reflect the 64,000 minimum and runtime verification behavior.
  • Tests

    • Expanded Vitest coverage for strict Hermes enforcement, failure paths, and correct floor propagation through setup/start/repair.

@copy-pr-bot

copy-pr-bot Bot commented Jul 13, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Jul 13, 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
📝 Walkthrough

Walkthrough

Hermes now requires a minimum 64,000-token context window. Local Ollama onboarding, runtime validation, configuration generation, resume recovery, tests, and documentation propagate and enforce this floor.

Changes

Hermes validation and runtime enforcement

Layer / File(s) Summary
Hermes minimum validation
agents/hermes/config/build-env.ts, test/generate-hermes-config.test.ts, docs/inference/*, docs/reference/*
Hermes rejects explicit context values below 64,000 tokens and documents runtime verification and failure behavior.
Runtime floor resolution
src/lib/inference/ollama-runtime-context.ts, src/lib/inference/ollama-runtime-context.test.ts, src/lib/inference/local.ts, src/lib/onboard.ts, src/lib/onboard/ollama-probe-failure.ts
Agent-specific floors are resolved, daemon context is validated, and model selection receives explicit success or failure results.

Ollama onboarding and resume propagation

Layer / File(s) Summary
Onboarding floor propagation
src/lib/onboard/setup-nim-*, src/lib/onboard/ollama-startup.*, src/lib/onboard/install-ollama-*, src/lib/onboard/ollama-systemd.*
The floor flows through selection state, startup commands, installers, systemd overrides, and model validation on Linux and macOS.
Strict resume validation
src/lib/onboard/local-inference-topology.*, src/lib/onboard/machine/handlers/provider-inference.*, test/onboard-ollama-context-floor.test.ts
Resume and recovery validate the recorded model, Ollama reachability, model warming, and runtime context before continuing.

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

Sequence Diagram(s)

sequenceDiagram
  participant SetupNim
  participant OllamaStartup
  participant OllamaSystemd
  participant OllamaRuntime
  participant OllamaAPI
  SetupNim->>OllamaStartup: pass contextWindowFloor
  SetupNim->>OllamaSystemd: configure contextWindowFloor
  OllamaStartup->>OllamaSystemd: start Ollama with OLLAMA_CONTEXT_LENGTH
  SetupNim->>OllamaRuntime: validate selected model context
  OllamaRuntime->>OllamaAPI: probe loaded model via /api/ps
  OllamaAPI-->>OllamaRuntime: return context_length
  OllamaRuntime-->>SetupNim: return success or validation failure
Loading

Possibly related PRs

Suggested labels: area: inference

Suggested reviewers: cv, jyaunches

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 30.77% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately reflects the main change: enforcing Hermes Ollama context limits.
Linked Issues check ✅ Passed The PR enforces a 64,000-token Hermes floor, blocks or raises onboarding when the daemon context is too small, and adds matching tests.
Out of Scope Changes check ✅ Passed The changes are focused on Hermes Ollama context-floor handling, validation, onboarding flows, docs, and tests with no clear unrelated additions.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@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.

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 `@docs/reference/troubleshooting.mdx`:
- Line 2419: Update the adjacent shared troubleshooting commands by splitting
them into agent-specific <AgentOnly> blocks: retain OLLAMA_CONTEXT_LENGTH=16384
for OpenClaw and use OLLAMA_CONTEXT_LENGTH=64000 for Hermes. Keep each command’s
existing behavior and agent-specific context unchanged.
🪄 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: efa5bc21-d1b6-4a63-b484-1fcf11b88629

📥 Commits

Reviewing files that changed from the base of the PR and between 3de1de6 and 9d2dca1.

📒 Files selected for processing (20)
  • agents/hermes/config/build-env.ts
  • docs/inference/configure-model-limits.mdx
  • docs/inference/set-up-ollama.mdx
  • docs/reference/troubleshooting.mdx
  • src/lib/inference/local.ts
  • src/lib/inference/ollama-runtime-context.test.ts
  • src/lib/inference/ollama-runtime-context.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.test.ts
  • src/lib/onboard/install-ollama-macos.ts
  • src/lib/onboard/ollama-systemd.test.ts
  • src/lib/onboard/ollama-systemd.ts
  • src/lib/onboard/setup-nim-flow.test.ts
  • src/lib/onboard/setup-nim-flow.ts
  • src/lib/onboard/setup-nim-ollama.test.ts
  • src/lib/onboard/setup-nim-ollama.ts
  • src/lib/onboard/setup-nim-selection.ts
  • test/generate-hermes-config.test.ts

Comment thread docs/reference/troubleshooting.mdx Outdated
@HwangJohn
HwangJohn force-pushed the codex/6760-hermes-ollama-context branch from 9d2dca1 to 9c7952b Compare July 13, 2026 11:58
Signed-off-by: HwangJohn <angelic805@gmail.com>
@HwangJohn
HwangJohn force-pushed the codex/6760-hermes-ollama-context branch from 9c7952b to 24a97b8 Compare July 13, 2026 12:00
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
putComment timed out

@wscurran wscurran added area: local-models Local model providers, downloads, launch, or connectivity area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow bug-fix PR fixes a bug or regression integration: hermes Hermes integration behavior labels Jul 13, 2026
@wscurran

Copy link
Copy Markdown
Contributor

✨ Thanks for the fix, @HwangJohn. Honoring the Hermes Ollama context floor should prevent the silent inference failure after onboarding reports Ready. Ready for maintainer review.


Related open issues:


Related open issues:

Signed-off-by: HwangJohn <angelic805@gmail.com>
@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — Informational

Advisor assessment: Informational / medium confidence
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions
Status: No actionable findings remain in the canonical review ledger.

Model lanes

  • GPT-5.6 Terra (primary): Completed · medium confidence · 0 blockers · 0 warnings · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Completed · high confidence · 0 blockers · 3 warnings · 0 suggestions
  • Model comparison: normalized findings differ; normalized E2E selections differ; Nemotron reported the same number of blockers, 3 more warnings, the same number of suggestions.

Nemotron output stays in workflow artifacts and does not change the assessment above.

E2E guidance

Advisory only. E2E / PR Gate selects and runs jobs independently.

Recommended E2E: cloud-onboard, full-e2e, hermes-e2e, security-posture, inference-routing, network-policy, onboard-repair, onboard-resume

3 optional E2E recommendations
  • ollama-auth-proxy
  • rebuild-hermes
  • docs-validation

Workflow run details

This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge.

cjagwani added 2 commits July 14, 2026 12:17
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
@jyaunches jyaunches removed the v0.0.83 label Jul 14, 2026
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>

@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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/lib/onboard/local-inference-topology.test.ts (1)

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

New Hermes-floor describe blocks omit the (#1234) issue-reference suffix. Both new describe blocks were added specifically to codify the fix for issue #6760, but neither includes the local-issue-reference suffix the repo's test-title convention calls for.

  • src/lib/onboard/local-inference-topology.test.ts#L114-125: append (#6760) to describe("repairLocalInferenceSystemdOverrideOrExit", ...).
  • src/lib/onboard/machine/handlers/provider-inference-ollama-context.test.ts#L11-11: append (#6760) to describe("handleProviderInferenceState Ollama context resume", ...).

As per coding guidelines, **/*.test.{js,ts}: "Use behavior-oriented test titles and place local issue references in a final (#1234) suffix."

🤖 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/local-inference-topology.test.ts` at line 1, Append the final
issue-reference suffix "(`#6760`)" to the two new describe titles:
"repairLocalInferenceSystemdOverrideOrExit" in local-inference-topology.test.ts
and "handleProviderInferenceState Ollama context resume" in
provider-inference-ollama-context.test.ts. Preserve the existing
behavior-oriented wording and test structure.

Source: Coding guidelines

🤖 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/local-inference-topology.ts`:
- Around line 161-201: Replace the direct process exit in exitOllamaResumeRepair
with throwing an error so repair failures propagate to the caller. Preserve the
existing failure messages and call sites in
repairLocalInferenceSystemdOverrideOrExit, allowing provider-inference.ts to
catch each missing-model, unreachable-host, validation, and runtime-context
failure, record state.repair.failed, then perform logging and exit.

---

Nitpick comments:
In `@src/lib/onboard/local-inference-topology.test.ts`:
- Line 1: Append the final issue-reference suffix "(`#6760`)" to the two new
describe titles: "repairLocalInferenceSystemdOverrideOrExit" in
local-inference-topology.test.ts and "handleProviderInferenceState Ollama
context resume" in provider-inference-ollama-context.test.ts. Preserve the
existing behavior-oriented wording and test structure.
🪄 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: eefaffcf-58f5-4408-b3e1-d98f3210276e

📥 Commits

Reviewing files that changed from the base of the PR and between dd2cd37 and c1b25f5.

📒 Files selected for processing (19)
  • docs/inference/configure-model-limits.mdx
  • docs/inference/set-up-ollama.mdx
  • docs/reference/commands.mdx
  • docs/reference/troubleshooting.mdx
  • src/lib/inference/local.ts
  • src/lib/inference/ollama-runtime-context.test.ts
  • src/lib/inference/ollama-runtime-context.ts
  • src/lib/onboard.ts
  • src/lib/onboard/local-inference-topology.test.ts
  • src/lib/onboard/local-inference-topology.ts
  • src/lib/onboard/machine/handlers/provider-inference-ollama-context.test.ts
  • src/lib/onboard/machine/handlers/provider-inference.test.ts
  • src/lib/onboard/machine/handlers/provider-inference.ts
  • src/lib/onboard/ollama-startup.test.ts
  • src/lib/onboard/ollama-startup.ts
  • src/lib/onboard/setup-nim-flow.test.ts
  • src/lib/onboard/setup-nim-flow.ts
  • src/lib/onboard/setup-nim-ollama.test.ts
  • src/lib/onboard/setup-nim-ollama.ts
🚧 Files skipped from review as they are similar to previous changes (7)
  • src/lib/onboard.ts
  • src/lib/onboard/setup-nim-flow.ts
  • docs/reference/troubleshooting.mdx
  • src/lib/onboard/setup-nim-flow.test.ts
  • docs/inference/configure-model-limits.mdx
  • src/lib/onboard/setup-nim-ollama.ts
  • src/lib/inference/local.ts

Comment thread src/lib/onboard/local-inference-topology.ts Outdated
cjagwani added 3 commits July 14, 2026 12:38
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
@cjagwani
cjagwani requested a review from cv July 14, 2026 20:17
@cjagwani

Copy link
Copy Markdown
Collaborator

@cv, could you vet and approve the fork workflows for this fresh exact head?

  • head: cbbc2e1a5c4877d4fe282bdffe8b68990dfc6426
  • base: 3461d7186ae9272571b54e5de5a7f79ca67152ef
  • blocker: all pull_request workflows are action_required pending NVIDIA runner vetting (including CI / Pull Request run 29364526342)
  • automated review: Terra 0/0/0, Nemotron 0/0/0, CodeRabbit 0 unresolved threads
  • commits: GitHub Verified with DCO sign-off

The E2E gate is reserved at check 87192720554 and will plan only after the vetted PR CI completes.

@cjagwani
cjagwani requested a review from jyaunches July 14, 2026 20:23
HwangJohn and others added 3 commits July 15, 2026 22:18
Signed-off-by: HwangJohn <angelic805@gmail.com>
Signed-off-by: HwangJohn <angelic805@gmail.com>
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
@cjagwani

cjagwani commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Current exact head is synced, mergeable, and includes both the pinned-context fix and the final test hardening.

  • head: a203b46ff4fd64118276397a94a476c568c07768
  • base: 88f2dd8b5d53cb6b499b6dd43dd66d7c3a704924 (current main)
  • pinned behavior: interactive NEMOCLAW_PROVIDER=ollama exits after strict runtime-context proof fails, before any return-to-selection outcome; non-interactive abort and unpinned interactive escape remain unchanged
  • Windows-host coverage: the strict 64000-token path now asserts the resolved host.docker.internal /api/ps probe and fails closed with remediation when runtime context is missing
  • deterministic fixture: child onboarding tests pin their mocked Ollama and proxy ports and clear ambient OLLAMA_HOST; they pass even with deliberately polluted inherited host/port variables
  • base conflict: the one import-only conflict retained both feat(inference): allow trusted private endpoints #6886 trusted-private-endpoint capability state and this PRs agent-specific Ollama floor; independent merge/security review PASS
  • validation: 83 focused Ollama/setup tests, 75 focused overlap tests, 22 direct follow-up tests, adversarial polluted-env run, CLI typecheck, Biome, check:diff, and normal commit/push hooks passed
  • review audit: the earlier CodeRabbit OLLAMA_HOST mechanism alone did not reproduce, but the broader fixed-port determinism concern is addressed; Windows-host Ollama remains externally managed and onboarding satisfies [All Platforms][Onboard] NemoHermes Ollama onboard reports Ready but hermes inference fails: Ollama context 16384 below Hermes 64K minimum #6760 by failing closed before sandbox creation when it cannot prove 64000 tokens
  • documentation: no further user-facing change is needed; existing guidance already documents the 64000-token proof/remediation and trusted-endpoint behavior
  • compliance: the test and merge commits are GitHub Verified and DCO-signed

Fresh exact-head CI, Terra/Nemotron, CodeRabbit, and the native E2E gate are running. I will renew the runner-vetting request only after these exact-head reviews settle.

@cjagwani

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@cjagwani

Copy link
Copy Markdown
Collaborator

@cv @jyaunches, please vet and approve the fork workflows for this exact, current PR head.

  • head: f91962aaa8591325cc608bd4a3225feb6f284b70
  • base: 55fdc3f0a52b481d1e84657a6af8ec023c50fc5c
  • state: open, mergeable, and current with the requested base; review is still required
  • fork gate: all nine pull_request workflows are action_required and have not run: Installer Hash Check, macOS E2E, CLI Parity, WSL E2E, Fern Preview, DCO Check, Pull Request CI, Code Scanning, and Commit Lint
  • automated review: the exact-head canonical advisor is info_only, high confidence, with 0 blockers, 0 warnings, and 0 suggestions; Terra is 0/0/0
  • Nemotron audit: its three non-canonical test warnings are non-actionable—two point to exact tests already present, and the Windows-host path uses the same host-agnostic strict-context branch and was directly confirmed against host.docker.internal
  • CodeRabbit: both historical inline threads are resolved/outdated with no active thread; a fresh exact-head review has just been requested because automatic review was paused during the prior commit burst
  • validation: the pinned-context fix has 45 focused tests passing, CLI typecheck, Biome, conditional scan, check:diff, and normal hooks; independent correctness/security review PASS
  • documentation: no further change is needed because the existing docs already promise pinned strict-context exit behavior
  • compliance: the current commit is GitHub Verified and DCO-signed

The native E2E gate remains pending and will be monitored after workflow vetting. No credentialed job or stale authorization will be reused.

@coderabbitai

coderabbitai Bot commented Jul 15, 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.

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
test/onboard-ollama-context-floor.test.ts (1)

157-166: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Clear inherited Ollama configuration from the child environment.

Spreading process.env allows values such as OLLAMA_HOST to redirect probes away from the mocked 127.0.0.1:11434 endpoint, making this deterministic test fail for unrelated host configuration.

Proposed fix
+    const env = {
+      ...process.env,
+      HOME: tmpDir,
+      PATH: `${fakeBin}:${process.env.PATH || ""}`,
+      NEMOCLAW_NON_INTERACTIVE: "1",
+      NEMOCLAW_PROVIDER: "ollama",
+      NEMOCLAW_MODEL: OLLAMA_MODEL,
+      NEMOCLAW_YES: "1",
+      NEMOCLAW_CONTEXT_WINDOW: configuredContextWindow,
+    };
+    delete env.OLLAMA_HOST;
+
     return spawnSync(process.execPath, [scriptPath], {
       cwd: repoRoot,
       encoding: "utf-8",
-      env: {
-        ...process.env,
-        HOME: tmpDir,
-        PATH: `${fakeBin}:${process.env.PATH || ""}`,
-        NEMOCLAW_NON_INTERACTIVE: "1",
-        NEMOCLAW_PROVIDER: "ollama",
-        NEMOCLAW_MODEL: OLLAMA_MODEL,
-        NEMOCLAW_YES: "1",
-        NEMOCLAW_CONTEXT_WINDOW: configuredContextWindow,
-      },
+      env,
     });

As per coding guidelines, deterministic tests must undo environment and global stubs explicitly when needed. <coding_guidelines>

🤖 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 `@test/onboard-ollama-context-floor.test.ts` around lines 157 - 166, Update the
child environment in the test around the env configuration to explicitly remove
inherited Ollama settings, especially OLLAMA_HOST, after spreading process.env.
Ensure the spawned process always probes the mocked 127.0.0.1:11434 endpoint
while preserving the existing test-specific environment values.

Source: Coding guidelines

🤖 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 `@test/onboard-ollama-context-floor.test.ts`:
- Around line 157-166: Update the child environment in the test around the env
configuration to explicitly remove inherited Ollama settings, especially
OLLAMA_HOST, after spreading process.env. Ensure the spawned process always
probes the mocked 127.0.0.1:11434 endpoint while preserving the existing
test-specific environment values.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 242253aa-3596-4e4b-8044-7a8265ea45d4

📥 Commits

Reviewing files that changed from the base of the PR and between c1b25f5 and f91962a.

📒 Files selected for processing (17)
  • docs/inference/set-up-ollama.mdx
  • docs/reference/commands.mdx
  • docs/reference/troubleshooting.mdx
  • src/lib/inference/ollama-runtime-context.test.ts
  • src/lib/onboard.ts
  • src/lib/onboard/local-inference-topology.test.ts
  • src/lib/onboard/local-inference-topology.ts
  • src/lib/onboard/machine/handlers/provider-inference-ollama-context.test.ts
  • src/lib/onboard/machine/handlers/provider-inference.ts
  • src/lib/onboard/ollama-probe-failure.test.ts
  • src/lib/onboard/ollama-probe-failure.ts
  • src/lib/onboard/ollama-startup.test.ts
  • src/lib/onboard/ollama-startup.ts
  • src/lib/onboard/setup-nim-ollama.test.ts
  • src/lib/onboard/setup-nim-ollama.ts
  • src/lib/onboard/setup-nim-selection.ts
  • test/onboard-ollama-context-floor.test.ts
🚧 Files skipped from review as they are similar to previous changes (11)
  • src/lib/onboard/machine/handlers/provider-inference-ollama-context.test.ts
  • src/lib/onboard/setup-nim-ollama.test.ts
  • src/lib/onboard/local-inference-topology.ts
  • src/lib/onboard/machine/handlers/provider-inference.ts
  • src/lib/onboard/setup-nim-selection.ts
  • src/lib/onboard/ollama-probe-failure.ts
  • src/lib/onboard/setup-nim-ollama.ts
  • src/lib/inference/ollama-runtime-context.test.ts
  • docs/reference/troubleshooting.mdx
  • docs/inference/set-up-ollama.mdx
  • src/lib/onboard.ts

@cjagwani cjagwani self-assigned this Jul 15, 2026
cjagwani added 2 commits July 15, 2026 07:30
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>

# Conflicts:
#	src/lib/onboard/setup-nim-flow.ts
@cjagwani

Copy link
Copy Markdown
Collaborator

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 15, 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

Copy link
Copy Markdown
Collaborator

@cv @jyaunches, please vet and approve all fork workflows for this exact current revision. The earlier f91962… request is superseded.

  • head: a203b46ff4fd64118276397a94a476c568c07768
  • base: 88f2dd8b5d53cb6b499b6dd43dd66d7c3a704924 (current main)
  • state: open and mergeable; the one base-sync conflict was import-only and independently reviewed PASS
  • primary fork runs: all nine pull_request workflows are action_required—Installer Hash Check, macOS E2E, CLI Parity, WSL E2E, Fern Preview, DCO Check, Pull Request CI, Code Scanning, and Commit Lint
  • duplicate bot-triggered runs: DCO 29424826625, Pull Request CI 29424826709, and Commit Lint 29424826831 are also action_required; please vet these with the primary exact-head set
  • automated review: exact-head canonical advisor is info_only, high confidence, 0 blockers / 0 warnings / 0 suggestions; Terra 0/0/0 and Nemotron 0/0/0
  • CodeRabbit: exact incremental review completed with no actionable comments and no active unresolved thread
  • validation: 83 focused Ollama/setup tests, 75 focused base-overlap tests, 22 direct follow-up tests, polluted-env regression run, CLI typecheck, Biome, check:diff, normal hooks, and independent correctness/security review all pass
  • Windows-host behavior: exact host.docker.internal strict-context coverage proves fail-closed remediation before sandbox creation when the external daemon cannot prove 64000 tokens
  • compliance: current test and merge commits are GitHub Verified and DCO-signed

The native E2E gate remains pending and will be monitored after runner vetting. No stale fork approval or credentialed authorization will be reused.

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

Copy link
Copy Markdown
Collaborator

@cv @jyaunches — please vet and approve the fork-triggered workflows for the current exact revision of #6767.

  • Head: 74e3fee13a3abacd2a093494f665491520567c44
  • Base: 6ef2df929a7554026b0fbebd640777bc6fb27a78
  • Current merge commit is GitHub Verified and includes the DCO Signed-off-by trailer.
  • Exact-head Terra and Nemotron reviews are both clean: 0 blockers, 0 warnings, 0 suggestions.
  • CodeRabbit status is successful with 0 active/unresolved threads; its incremental review is paused because the only delta since the previously reviewed head is the merge of current main (fix(ci): keep PR E2E authorization pending #6914).
  • Local validation after the sync: 128/128 focused tests passed, npm run check:diff passed, and the normal pre-push hook passed.

Exact action-required runs:

This supersedes the earlier request for stale head a203b46ff4fd64118276397a94a476c568c07768.

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

cjagwani commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Important

Superseded: main advanced to b3c3170c7393889be1fcc9d3d3e68bbae7a2ae47. Please do not approve the runs below; a new exact-head request will follow after the inference-overlap sync is validated.

@cv @jyaunches — please vet and approve the fork-triggered workflows for the current exact revision of #6767.

  • Head: b2216998b5064675ba009cbd1af303b7dce74518
  • Base/current main: f79b09aacf31a0d54feb8b05a172587f24bc873e
  • The current merge commit is GitHub Verified and includes the DCO Signed-off-by trailer.
  • Exact-head Terra and Nemotron reviews are both high-confidence and clean: 0 blockers, 0 warnings, 0 suggestions.
  • CodeRabbit status is successful with 0 active unresolved/non-outdated threads. Its incremental review is paused; the changes since its last feature review are current-main sync merges only.
  • Validation: the fix(hermes): honor Ollama context floor #6767 focused suite previously passed 128/128; the final base sync passed 36/36 affected tests and the normal pre-push hook.

Exact action-required runs:

This supersedes request #6767 (comment) and every earlier stale-head request.

cjagwani added 2 commits July 15, 2026 09:08
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
@cjagwani

cjagwani commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

SUPERSEDED — do not approve these runs. main advanced to 468fade2fd08304b07e5112c9ecc50d23d289dae after this request was posted. A fresh exact-head/current-base request will follow after the PR is resynced.

@cv @jyaunches — please vet and approve the fork-triggered workflows for the current exact revision of #6767.

  • Head: 7f4ef719d4c18d7a5becce17bdceba6e61e5d025
  • Base/current main: 051bb4e3a81c6f586cc2d5f10061eecd95520be9
  • The current merge commit is GitHub Verified and DCO-signed.
  • Canonical exact-head advisor: informational/high confidence, Terra 0 blockers, 0 warnings, 0 suggestions, no follow-up.
  • Nemotron had 0 blockers plus 7 warnings/1 suggestion from an explicitly truncated diff. Every item was independently checked against the omitted caller paths and tests and is non-actionable; the audit ran 115 focused tests successfully.
  • CodeRabbit is successful with zero active unresolved/non-outdated threads. Its incremental review is paused because the post-review deltas are current-main sync merges only.
  • Final sync validation: feature diff fingerprint unchanged, 84/84 affected tooling tests, CLI typecheck/build, and the normal pre-push hook passed. The earlier inference-overlap suite passed 174/174.

Exact action-required runs:

This supersedes #6767 (comment) and every earlier stale-head request. The native credentialed E2E gate remains pending and will be monitored after workflow vetting.

cjagwani added 2 commits July 15, 2026 09:57
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>

@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.

Reviewed the behavior and tests, including the signed merge refresh onto current main. Product scope is established by #6760; focused validation and security review are clean.

cjagwani and others added 2 commits July 15, 2026 10:16
@cv
cv merged commit a8c47d7 into NVIDIA:main Jul 15, 2026
43 checks passed
cv pushed a commit that referenced this pull request Jul 16, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Adds the canonical `docs/changelog/2026-07-15.mdx` entry with the exact
`## v0.0.84` heading for the release candidate range from `v0.0.83`
through `710d2b36b9eebcb6bca3c2b2f796a1bdb69c3a31`.
Fills two owner-page gaps for model-aware local inference health and
pre-write OpenClaw candidate validation.

## Changes

- Add the complete shared Fern changelog entry for `v0.0.84`, with
literal CLI names and root-absolute OpenClaw and Hermes routes.
- Document that sandbox status and doctor compare the configured Ollama
or vLLM model with provider inventory without issuing a completion.
- Document that host-side OpenClaw `config set` validates the complete
candidate before replacing live config or reaching gateway restart.
- Reconcile the `v0.0.84` release label with the commit range. PR #6773
is already contained in `v0.0.83` and remains documented there; CI,
test-harness, docs-infrastructure, and `.js` to `.mts` migration-only
changes require no additional user guidance.

### Source summary

- [#6882](#6882) ->
`docs/manage-sandboxes/backup-restore.mdx`,
`docs/changelog/2026-07-15.mdx`: Explain that OpenClaw runtime identity
and pairing state are excluded from snapshots and ignored during
restore.
- [#6873](#6873) ->
`docs/inference/set-up-ollama.mdx`, `docs/changelog/2026-07-15.mdx`:
Record the Ollama requested-model environment fallback and interactive
default.
- [#6835](#6835) ->
`docs/changelog/2026-07-15.mdx`: Include the sandbox name in the
documented rebuild resume-recovery behavior.
- [#6886](#6886) ->
`docs/inference/custom-endpoint-security.mdx`,
`docs/inference/set-up-openai-compatible-endpoint.mdx`,
`docs/changelog/2026-07-15.mdx`: Explain the exact-host trusted-private
endpoint opt-in and retained SSRF boundaries.
- [#6887](#6887) ->
`docs/reference/commands.mdx`, `docs/changelog/2026-07-15.mdx`: Document
Telegram channel health verdicts, summary behavior, and exit status.
- [#6863](#6863) ->
`docs/manage-sandboxes/lifecycle.mdx`, `docs/changelog/2026-07-15.mdx`:
Add the missing model-inventory behavior for local status and doctor
checks.
- [#6902](#6902) ->
`docs/manage-sandboxes/runtime-controls.mdx`,
`docs/changelog/2026-07-15.mdx`: Add the missing pre-write OpenClaw
candidate-validation contract.
- [#6916](#6916) ->
`docs/changelog/2026-07-15.mdx`: Preserve the failed-session
fresh-install recovery correction in the release entry.
- [#6934](#6934) ->
`docs/reference/commands.mdx`, `docs/reference/troubleshooting.mdx`,
`docs/security/credential-storage.mdx`, `docs/changelog/2026-07-15.mdx`:
Summarize completed-prompt checkpointing and validated credential reuse
during OpenClaw resume.
- [#6898](#6898) ->
`docs/inference/switch-models.mdx`,
`docs/inference/switch-providers.mdx`,
`docs/reference/troubleshooting.mdx`, `docs/changelog/2026-07-15.mdx`:
Explain Hermes dashboard convergence after in-place inference changes.
- [#6711](#6711) ->
`docs/manage-sandboxes/run-sandboxes.mdx`,
`docs/manage-sandboxes/uninstall-nemoclaw.mdx`,
`docs/reference/architecture.mdx`, `docs/reference/commands.mdx`,
`docs/changelog/2026-07-15.mdx`: Summarize port-scoped host state and
uninstall preservation.
- [#6767](#6767) ->
`docs/inference/configure-model-limits.mdx`,
`docs/inference/set-up-ollama.mdx`,
`docs/reference/troubleshooting.mdx`, `docs/changelog/2026-07-15.mdx`:
Record the Hermes `64000`-token Ollama floor and unchanged OpenClaw
floor.
- [#6862](#6862) ->
`docs/get-started/quickstart.mdx`,
`docs/inference/verify-inference-route.mdx`,
`docs/changelog/2026-07-15.mdx`: Explain retryable not-ready
finalization for unhealthy inference routes.
- [#6766](#6766) ->
`docs/security/tcb-boundary.mdx`, `docs/changelog/2026-07-15.mdx`:
Document definitive stale transition-lock recovery and fail-closed
ambiguous cases.
- [#6948](#6948) ->
`docs/manage-sandboxes/manage-mcp-servers.mdx`,
`docs/changelog/2026-07-15.mdx`: Include Hermes MCP apply-state race
recovery in the release entry without changing the established user
workflow.
- [#6964](#6964) ->
`docs/reference/troubleshooting.mdx`, `docs/changelog/2026-07-15.mdx`:
Record complete agent-specific fresh-install and resume recovery
commands.
- [#6883](#6883) ->
`docs/get-started/quickstart.mdx`, `docs/inference/set-up-vllm.mdx`,
`docs/reference/platform-support.mdx`, `docs/changelog/2026-07-15.mdx`:
Summarize the DGX Station Nemotron Ultra express path and pinned
managed-vLLM recipe.
- [#6985](#6985) ->
`docs/inference/set-up-vllm.mdx`, `docs/reference/commands.mdx`,
`docs/changelog/2026-07-15.mdx`: Capture the final automated and
interactive storage-warning behavior.

## Type of Change

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

## Quality Gates

- [ ] Tests added or updated for changed behavior
- [x] Existing tests cover changed behavior —
`test/changelog-docs.test.ts` validates the dated-entry structure, exact
version heading, and preserved history.
- [ ] Tests not applicable — justification:
- [x] Docs updated for user-facing behavior changes
- [ ] Docs not applicable — justification:
- [ ] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [ ] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification:
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Verification

- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run check:diff` passed when hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — `npx vitest run
test/changelog-docs.test.ts` (6 passed)
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — not run for this doc-only change.
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only) —
completed with 0 errors; Fern reported the unchanged unauthenticated
redirect-check and light-theme 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)
— the native changelog entry uses the required parser-safe MDX SPDX
comment and intentionally has no frontmatter.

---
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>


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

## Summary by CodeRabbit

* **Documentation**
* Added the v0.0.84 changelog entry covering setup, endpoint onboarding,
model handling, sandbox readiness, recovery, channel status, and
configuration safeguards.
* Clarified that sandbox health checks validate configured models
against local Ollama and vLLM provider inventories without generating
completions or consuming tokens.
* Documented that invalid runtime configuration changes are rejected
while preserving the existing working configuration.

<!-- 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

area: local-models Local model providers, downloads, launch, or connectivity area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow bug-fix PR fixes a bug or regression integration: hermes Hermes integration behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[All Platforms][Onboard] NemoHermes Ollama onboard reports Ready but hermes inference fails: Ollama context 16384 below Hermes 64K minimum

5 participants