Skip to content

fix(inference): keep Local NIM shared on DCode native route - #13220

Merged
prekshivyas merged 24 commits into
codex/13197-dcode-native-local-implementationfrom
fix/13116-dcode-shared-route
Oct 16, 2026
Merged

prekshivyas merged 24 commits into
codex/13197-dcode-native-local-implementationfrom
fix/13116-dcode-shared-route

Conversation

@prekshivyas

@prekshivyas prekshivyas commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Outcome

Keep experimental Local NVIDIA NIM on its existing inference.local route while Deep Agents Code uses native attachments for standalone local providers. Local NIM and standalone vLLM share vllm-local, so the owned nimContainer marker determines which route applies.

Reason

The accepted DCode-first native-local slice in #13197 would otherwise treat an owned Local NIM selection or an older NIM sandbox as standalone vLLM and require a native attachment that NIM does not have.

Related issues

Fixes #13116. Stacked on #13203, which delivers the DCode-first native-local slice. This replaces #13122, whose #12977 base contains the superseded OpenClaw-inclusive scope.

Changes

  • Carry the Local NIM identity from selection through route compatibility, setup, policy smoke, registration, reservation, and deployment verification. The selection marker is needed before the NIM container starts; the persisted nimContainer handles resume and rebuild.
  • Omit stale native vLLM attachments for an owned NIM route while retaining standalone vLLM and managed llama.cpp attachment behavior. Count owned NIM registry rows as shared-route peers even if a stale attachment remains.
  • Add regressions for NIM versus standalone vLLM, selected-agent routing, shared-route policy proof, registration, stale attachments, resume, managed startup, and verification.
  • Carry the owned NIM selection into managed startup so it keeps the shared endpoint without demanding a native attachment. Clarify DCode routing and recovery documentation for that exception, including the generated platform support claims, routing guide, local-server comparison, quickstart, and sandbox-state reference.

Verification

  • Initial eight affected CLI test files: 146 tests passed.
  • Repair-focused route and resume tests: 43 passed; adjacent registry, selected-agent, and rebuild tests: 18 passed; managed vLLM readiness tests: 10 passed. The managed-startup repair passed 76 focused tests across four files.
  • npm run build:cli and npm run docs passed. Generated Deep Agents Code variants were inspected.
  • Commit hooks and pre-push publication validation, including TypeScript CLI, passed on 3b924cad250174ea9dc35bbd7a85d7094fa0065; the docs commits 545aaf755fe586571455f6a0442ef79d8c274e38 and 1bd5e09a2fab14cdb32dcd85c2ffa164f48862f9 passed matrix sync where applicable, docs validation, commit hooks, and pre-push publication validation. The managed-startup repair 7bfe797278d24810ce2e65a014112b5df011a801 passed its focused tests, CLI build, commit hooks, and pre-push TypeScript and publication validation. After merging parent feat(inference): attach Deep Agents Code local providers #13203 at 26474e1f, 105 focused tests across five files passed; merge commit af029a04 passed commit hooks and pre-push publication validation and TypeScript CLI. After merging the newer parent 08e5c4bd, 165 focused tests across seven files and npm run docs passed; merge commit 56be19d4 passed commit hooks, pre-push publication validation, and TypeScript CLI. Reference-documentation repairs 3b03be0f and 7eebf9de passed npm run docs, commit hooks, and pre-push publication validation. NIM retry repair c1015ddf passed 12 focused tests, CLI build, commit hooks, pre-push publication validation, and CLI typecheck. Health-failure repair 011d9b58 passed 45 focused tests, CLI build, commit hooks, pre-push publication validation, and CLI typecheck. Integration-test alignment 19fb8582 and caller-level proof e18ff696 passed all four NIM memory-selection tests, commit hooks, pre-push publication validation, and CLI typecheck.

Review notes

This changes sensitive inference and onboarding paths. The first exact-head Advisor review found shared-route, documentation, and resume-regression gaps; commit 3b924cad addresses those. A second review found an ecosystem documentation claim; commit 545aaf75 corrected it. A third review found a routing-guide claim; commit 1bd5e09a corrects it and aligned related guide pages. A fourth review found an omitted managed-startup handoff; commit 7bfe7972 fixes it and adds a regression test. Advisor cleared 7bfe7972 and the parent-merge head af029a04. A second exact-head run on af029a04 identified three stale reference-page route descriptions; 3b03be0f corrects them and clarifies that inference set does not create native local attachments. The next run identified matching architecture and operational-page claims; 7eebf9de aligns those pages. Advisor cleared that documentation repair. The latest merge incorporates parent 08e5c4bd and resolves its overlapping reference edits. Advisor then found a NIM retry path that could clear the ownership marker while the container remained; c1015ddf removes the owned container before clearing that marker and adds a retry regression. Advisor then identified a silent cloud switch after failed NIM health check; 011d9b58 stops onboarding after cleaning up the owned container and also removes the silent cloud switch when no NIM model fits. The first CI run on 011d9b58 found one stale integration test expecting cloud fallback; 19fb8582 updates it to require cleanup and a visible stop. Advisor cleared 011d9b58. A verification specialist requested explicit caller-level proof; e18ff696 now checks that the production handler cleans up the container returned by startup, throws, and skips model adoption and endpoint probing. Advisor then identified one stale NIM recovery sentence; 371d919b aligns it with stop-after-cleanup behavior and passed npm run docs, commit hooks, and pre-push publication validation. Advisor cleared 371d919b, and full required CI passed. Parent #13203 advanced to 5111b16d; merge commit 4bd23472 resolves its documentation overlap, with 164 focused tests across nine files, CLI build, docs validation, commit hooks, and pre-push publication validation passing. The exact-head Advisor blocker gate, required CI, managed-image and rootless runtime qualification, and self-hosted E2E all passed on 4bd23472. Parent #13203 advanced again to b3f89d24; merge commit ac009c9f resolves the overlapping reference edits and passed 235 focused tests across ten files, CLI build, docs validation, commit hooks, and pre-push publication validation. Exact-head Advisor on ac009c9f identified a caller-level health-failure test gap. Commit 5ca0cd38 adds the test against the production handler, proving container cleanup and a stop before model adoption. The focused tests, CLI build, TypeScript check, commit hooks, and pre-push publication validation pass; Advisor on 5ca0cd38 cleared the health-failure test but found a stale native attachment in the Local NIM rebuild target. Commit 3521d195 makes the owned NIM marker take precedence, with a regression test; 41 relevant tests, TypeScript, commit hooks, and pre-push validation pass. The exact-head Advisor rerun on 3521d195 cleared the rebuild fix but found a stale managed NIM health-wait timeout in troubleshooting. Commit 2776deda corrects the documented default to 20 minutes (1,200 seconds); the NIM test suite, docs build, commit hooks, and pre-push validation pass. Advisor on 2776deda found that a failed post-start identity revalidation could prevent owned NIM cleanup. Commit 9d961fd2 captures the exact Docker container ID at startup and removes that ID after a failed health wait, with tests for cleanup and retained recovery state if removal fails. Focused tests, TypeScript, commit hooks, and pre-push validation pass. Advisor cleared 9d961fd2; CI shard 10 then found child-process NIM fixtures still returning a string instead of the new startup receipt. Commit 060a0e70 updates the fixtures and cleanup assertions; the affected tests, TypeScript, commit hooks, and pre-push validation pass. The exact-head Advisor on 060a0e70 found that an invalid Docker launch receipt could leave a credential-bearing NIM container running. Commit 5ad4b3a5 removes the named container before reporting receipt failure and reports cleanup failure when removal fails. The focused NIM tests, full local PR validation, commit hooks, and pre-push validation pass on 5ad4b3a5; exact-head CI and Advisor are running. The earlier managed-image retry passed its image build and direct startup on 060a0e70; its all-agent activation jobs were still running when 5ad4b3a5 was pushed. Parent #13203 remains draft; it must merge before this stacked PR can land. Native NIM migration and GPU/NGC qualification remain separate.

Current status (2026-10-15)

The latest child head is ebf136b2964a4c698adb64c4d99fb5aa67b4cfef, mergeable on parent #13203 head 81ee22de5a1fd0071e252b6fa032b720286182bc. It preserves owned Local NIM on inference.local while standalone vLLM remains eligible for the Deep Agents native local route. The earlier fixture and integration-test repairs are included in this head.

All 63 exact-head PR checks completed successfully, including CLI tests, static checks, amd64 and arm64 activation, rootless Podman activation, and the llama.cpp generic NVIDIA GPU live test. The exact-head Advisor run completed all nine specialists with clear finding ledgers and a passing blocker gate. CodeRabbit skips automatic reviews on this nondefault target branch. No review threads remain open. The branch is ready for independent review; parent #13203 remains open and draft and must merge before this stacked PR can land. Native NIM migration and NIM GPU/NGC qualification remain separate work.


Signed-off-by: Prekshi Vyas [email protected]

@copy-pr-bot

copy-pr-bot Bot commented Oct 15, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/NemoClaw/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 7d540e91-239f-4c29-bc56-1cac90811669

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-code-quality

github-code-quality Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Code coverage overview

Languages: TypeScript

TypeScript / code-coverage/plugin

codex/13197-dcode-na... 63002cd fix/13116-dcode-shar... ebf136b +/-
96% 97% +1%
View coverage of the 10 most impacted files.
File codex/13197-dcode-na... 63002cd fix/13116-dcode-shar... ebf136b +/-
nemoclaw/src/onboard/config.ts 98% 96% -2%
nemoclaw/src/index.ts 94% 93% -1%
nemoclaw/src/bl...print/runner.ts 95% 95% 0%
nemoclaw/src/bl...ime-identity.ts 97% 97% 0%
nemoclaw/src/bl...t-management.ts 100% 100% 0%
nemoclaw/src/co.../config-show.ts 100% 100% 0%
nemoclaw/src/commands/slash.ts 100% 100% 0%
nemoclaw/src/ru...time-context.ts 100% 100% 0%
nemoclaw/src/sh...er-boundary.cts 100% 100% 0%
nemoclaw/src/on...native-route.ts 0% 100% +100%

TypeScript / code-coverage/cli

codex/13197-dcode-na... 63002cd fix/13116-dcode-shar... ebf136b +/-
84% 86% +2%
View coverage of the 10 most impacted files.
File codex/13197-dcode-na... 63002cd fix/13116-dcode-shar... ebf136b +/-
src/lib/onboard.ts 62% 50% -12%
src/lib/state/l...diness-lease.ts 66% 83% +17%
src/lib/inferen...ollama/proxy.ts 41% 61% +20%
src/lib/onboard.../application.ts 55% 84% +29%
src/lib/inferen...er/lifecycle.ts 0% 65% +65%
src/lib/domain/...y/dimensions.ts 0% 71% +71%
src/lib/actions...ry/operation.ts 0% 76% +76%
src/lib/actions...try/snapshot.ts 0% 78% +78%
src/lib/inferen...ovider/index.ts 0% 88% +88%
src/lib/onboard...ternal-image.ts 0% 91% +91%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated October 15, 2026 21:46 UTC

@prekshivyas
prekshivyas marked this pull request as ready for review October 15, 2026 05:41
…b.com:NVIDIA/NemoClaw into fix/13116-review-repair

Signed-off-by: Prekshi Vyas <[email protected]>

# Conflicts:
#	docs/deployment/deploy-to-headless-server.mdx
#	docs/inference/understand-provider-validation.mdx
#	docs/reference/architecture.mdx
#	docs/reference/commands.mdx
@wscurran wscurran added area: providers Inference provider integrations and provider behavior area: security Security controls, permissions, secrets, or hardening bug-fix PR fixes a bug or regression labels Oct 15, 2026
@wscurran wscurran added integration: dcode LangChain Deep Code integration behavior platform: container Affects Docker, containerd, Podman, or images provider: nvidia NVIDIA inference endpoint, NIM, or NVIDIA provider behavior labels Oct 15, 2026
Preserve the validated staged native attachment during DCode recreation.

Keep owned Local NIM on its shared inference route.

Signed-off-by: Prekshi Vyas <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

PR Review Advisor finished for commit ebf136b. Include the Advisor findings in the complete PR feedback collection. Verify and group valid findings before repair.

Request review only when Require no Advisor blockers is green.

All previous runs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: providers Inference provider integrations and provider behavior area: security Security controls, permissions, secrets, or hardening bug-fix PR fixes a bug or regression integration: dcode LangChain Deep Code integration behavior platform: container Affects Docker, containerd, Podman, or images provider: nvidia NVIDIA inference endpoint, NIM, or NVIDIA provider behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants