Skip to content

fix(installer): probe the user shim when the npm prefix has no CLI - #8440

Open
Dongni-Yang wants to merge 6 commits into
mainfrom
fix/8311-verify-shim-probe
Open

fix(installer): probe the user shim when the npm prefix has no CLI#8440
Dongni-Yang wants to merge 6 commits into
mainfrom
fix/8311-verify-shim-probe

Conversation

@Dongni-Yang

@Dongni-Yang Dongni-Yang commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

verify_nemoclaw reached the user-local shim check only from inside the npm-prefix branch, so a host whose active npm prefix differs from the prefix the CLI was installed under exited 1 with "Installation failed: nemoclaw binary not found." while the shim the installer had just created was working. The installer now probes $NEMOCLAW_SHIM_DIR/$_CLI_BIN after the npm-prefix branch and continues through that path, so the reported install succeeds and still prints the PATH-refresh hint.

Related Issue

Closes #8311

Changes

  • Probe the user-local shim in verify_nemoclaw after the npm-prefix branch, so the shim is reachable when the active npm prefix has no CLI. Previously the shim path was only printed in the "Searched:" diagnostic, which implied a probe that never ran.
  • Re-check what $_CLI_BIN resolves to before recording state. record_cli_resolution_state clears NEMOCLAW_CURRENT_SHELL_NEEDS_PATH_REFRESH once the shim directory is on the initial PATH, which is correct only when the name resolves to that shim. When a rejected binary still shadows it, the branch forces the refresh flag so print_done keeps emitting the hint instead of reporting a clean install for a shell where $_CLI_BIN runs the refused binary. The shadowed and prefix-placeholder cases in test/install-npm-resolution.test.ts protect both arms.
  • NEMOCLAW_READY_NOW stays false on the shadowed path, matching the documented meaning used by the sibling stale-PATH branch: the calling shell cannot resolve $_CLI_BIN by name.
  • Add four cases to test/install-npm-resolution.test.ts: the reported stale-prefix repro, a shadowed-shim case, a shim-on-PATH case, and a no-shim control that must still exit 1.

Reachability note for review: this changes whether the installer aborts before onboarding runs. It does not change onboarding, preflight, credential, or policy code.

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: Superseded by the canonical troubleshooting update in this branch.
  • 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: Nine-category maintainer security review passed with no findings: fix(installer): probe the user shim when the npm prefix has no CLI #8440 (comment)
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Documentation Writer Review

  • Documentation writer subagent reviewed the completed changes
  • Result: docs-updated
  • Evidence: The canonical troubleshooting page now documents that installer verification checks the user-local shim independently of the active npm prefix and continues through the shim while preserving PATH-refresh guidance. Focused installer tests passed 10/10; the docs build and route checks pass with 0 errors and 2 baseline tool warnings; diff checks pass.
  • Agent: Codex documentation writer subagent

DGX Station Hardware Evidence

  • Tested on DGX Station
  • Tested commit:
  • Station profile/scenario:
  • Result:
  • Supporting evidence:

Verification

  • PR description includes a Signed-off-by: line and every commit appears as Verified in GitHub
  • Normal pre-commit, commit-msg, and pre-push hooks passed, or npm run validate:pr passed after refreshing origin/main when hooks were skipped or unavailable
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — npx vitest run test/install-npm-resolution.test.ts → 10 passed. Six installer suites that exercise verify_nemoclaw → 92 passed and 5 skipped (install-npm-resolution, install-station-controller-binding, install-preexisting-sandbox-recovery, install-openshell-upgrade-prompt, install-onboard-exit, install-onboard-yes). npm run typecheck:cli clean; shfmt -i 2 -ci -bn and ShellCheck clean.
  • 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)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Platform verification

Verified on the reported platform (macOS 26.5.2 (25F84) arm64, stock /bin/bash 3.2.57, Homebrew npm 11.12.1 at prefix /opt/homebrew — the condition described in #8311). A harness ran the pre-fix scripts/install.sh from 422fe95 and this branch's version side by side on identical fixtures in a throwaway HOME:

VERDICT: PASS | #8311 | host=Darwin/arm64 macOS 26.5.2 (25F84) | bash=/bin/bash=3.2.57(1)-release
| npm=fake(T3)+real(T2) | checks=131 failures=0 | pre-fix exits 1 with "Installation failed:
nemoclaw binary not found." while a working shim exists; the fix exits 0 via the shim with
READY=false/REFRESH=true, and still exits 1 when no real shim exists.

Both arms of the re-check were pinned by xtrace at install.sh:2264: [[ '' -ef …/nemoclaw ]] when PATH resolves nothing, and [[ …/shadow/nemoclaw -ef …/.local/bin/nemoclaw ]] when a placeholder shadows the shim. The no-shim and fake-shim controls still exit 1 with the original message.

Scope caveat: the harness calls verify_nemoclaw directly, because in a full install finish_nemoclaw_install calls refresh_path before verification. It shows that the reported symptom, exit code, and message reproduce with the pre-fix installer and are gone with this change. It does not explain how the reporter's shell reached a state where the PATH lookup found nothing; ensure_cli_shim calls refresh_path immediately after writing the shim, so that precondition remains unexplained. This change makes the installer correct either way, because it probes the shim by absolute path rather than through PATH.

Signed-off-by: Dongni Yang dongniy@nvidia.com

Summary by CodeRabbit

  • Bug Fixes

    • Improved CLI detection when the active npm prefix does not expose the installed command.
    • Added support for onboarding through a valid user-local CLI path when it is not on PATH.
    • Preserved guidance for refreshing PATH when another binary shadows the expected CLI.
    • Improved errors for missing or invalid CLI installations.
  • Documentation

    • Updated installation troubleshooting guidance for user-local CLI paths and PATH refreshes.
  • Tests

    • Added coverage for CLI fallback, conflicts, and missing installations.

verify_nemoclaw only reached the user-local shim check from inside the
npm-prefix branch, so a host whose active npm prefix differs from the one
the CLI was installed under -- a Homebrew npm shadowing the installer's
nvm npm -- fell through to "binary not found" and exited 1 while the shim
the installer had just created was working. The diagnostic even printed
the shim path, implying it had been searched when it never was.

Probe the shim directly after the npm-prefix branch. Resolution state
comes from record_cli_resolution_state so the recovery export directory
stays consistent with the sibling stale-PATH branch, then the branch
re-checks what the name actually resolves to: the shim itself means the
shell is ready, while a rejected binary still shadowing it keeps the
PATH-refresh hint that record_cli_resolution_state would otherwise clear
once the shim directory is on PATH. Without that re-check print_done()
reports a clean install for a shell where the CLI name still runs the
binary this function just refused.

This clears the spurious exit 1 whenever a working shim exists. It does
not explain why the PATH lookup failed on the reporter's host given that
ensure_cli_shim calls refresh_path immediately after writing the shim;
that remains open and is not reproducible without the macOS host.

Refs #8311

Signed-off-by: Dongni Yang <dongniy@nvidia.com>
@Dongni-Yang Dongni-Yang self-assigned this Aug 6, 2026
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

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: 347d278e-06de-483c-9e75-70895bb19f7b

📥 Commits

Reviewing files that changed from the base of the PR and between ad84922 and a724492.

📒 Files selected for processing (2)
  • docs/reference/troubleshooting.mdx
  • test/install-npm-resolution.test.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • docs/reference/troubleshooting.mdx
  • test/install-npm-resolution.test.ts

📝 Walkthrough

Walkthrough

verify_nemoclaw now falls back to the user-local CLI shim when the npm prefix lacks the binary. It validates exact PATH resolution, preserves PATH-refresh guidance, and adds documentation and tests for shim and failure scenarios.

Changes

CLI shim resolution

Layer / File(s) Summary
Shim fallback and readiness handling
scripts/install.sh, docs/reference/troubleshooting.mdx
verify_nemoclaw checks the user-local shim when the npm prefix lacks the CLI. It sets readiness only when PATH resolves that exact shim. Troubleshooting guidance describes absolute-path continuation and PATH refresh commands.
Shim resolution test coverage
test/install-npm-resolution.test.ts
Tests cover fallback resolution, PATH shadowing, successful PATH resolution, missing CLI cases, and invalid user-local shims.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested labels: area: install, bug-fix

Sequence Diagram(s)

sequenceDiagram
  participant verify_nemoclaw
  participant npm_prefix
  participant user_local_shim
  participant PATH
  verify_nemoclaw->>npm_prefix: Check installed CLI
  verify_nemoclaw->>user_local_shim: Check fallback shim
  verify_nemoclaw->>PATH: Resolve exact shim
  PATH-->>verify_nemoclaw: Return matching or shadowing binary
  verify_nemoclaw-->>verify_nemoclaw: Set readiness or PATH guidance
Loading
🚥 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 and concisely describes the main installer change: probing the user shim when the npm prefix lacks the CLI.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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/8311-verify-shim-probe

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

@github-code-quality

github-code-quality Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage in commit a724492 in the fix/8311-verify-shim... branch remains at 96%, unchanged from commit e323de1 in the main branch.

TypeScript / code-coverage/cli

The overall coverage in commit a724492 in the fix/8311-verify-shim... branch remains at 81%, unchanged from commit e323de1 in the main branch.

Show a code coverage summary of the most impacted files.
File main e323de1 fix/8311-verify-shim... a724492 +/-
src/lib/domain/.../connect-env.ts 97% 89% -8%
src/lib/platform.ts 89% 84% -5%
src/lib/actions...air-approval.ts 90% 89% -1%
src/lib/inferen...ompatibility.ts 94% 94% 0%
src/lib/messagi...nnels/policy.ts 100% 100% 0%
src/lib/messagi...an-authority.ts 100% 100% 0%
src/lib/onboard/temp-files.ts 100% 100% 0%
src/lib/runner.ts 77% 77% 0%
src/lib/sandbox...rce-identity.ts 87% 87% 0%
src/lib/inferen...a/model-size.ts 83% 96% +13%

Updated August 06, 2026 14:37 UTC

@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 `@scripts/install.sh`:
- Around line 2244-2275: Update the user-facing installation documentation to
describe the shim fallback when the active npm prefix differs, including that
installation succeeds while emitting PATH-refresh guidance when the shell does
not resolve the shim. Document the relevant validation or verification for this
outcome, using the installer’s shim resolution and PATH-refresh behavior as the
reference.
🪄 Autofix

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: 5d1657e8-0649-42e9-ab67-b2a0065f7a48

📥 Commits

Reviewing files that changed from the base of the PR and between ce9d174 and 7e5440c.

📒 Files selected for processing (2)
  • scripts/install.sh
  • test/install-npm-resolution.test.ts

Comment thread scripts/install.sh
@Dongni-Yang Dongni-Yang added the v0.0.104 Release target label Aug 6, 2026
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — No blocking findings reported

Advisor assessment: No blocking advisor findings reported
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions

Model lanes

  • GPT-5.6 Terra (primary): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Failed

Second-opinion terminology and E2E selections are advisory. Live E2E does not run automatically for pull requests.

2 semantic terminology decisions

Terminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.

  • established — user-local shim at docs/reference/troubleshooting.mdx:37: Keep `user-local shim`; it is the established repository term for this entry point.
  • justified — development shim at docs/reference/troubleshooting.mdx:36: Keep `development shim`; the modifier states the source-checkout-only use and matches existing command documentation.

E2E guidance

Advisory only. A maintainer can dispatch the default E2E suite against this exact revision.

Recommended E2E: cloud-onboard, managed-image-multiarch-startup

Workflow run details

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

@Dongni-Yang

Copy link
Copy Markdown
Contributor Author

CI status: the 14 failures come from main, not this PR

build-typecheck fails on src/lib/inference/serving/resolver.ts with TS2393: Duplicate function implementation, and cli-tests, the eight cli-test-shards, cli-parity, installer-integration, macos-e2e, and codebase-growth-guardrails all cascade from that build failure. This PR touches only scripts/install.sh and test/install-npm-resolution.test.ts.

Confirmed against a pristine checkout of main with nothing from this branch applied:

$ git worktree add --detach /tmp/chk upstream/main && cd /tmp/chk
$ npx tsc -p tsconfig.cli.json --noEmit
src/lib/inference/serving/resolver.ts(203,10): error TS2393: Duplicate function implementation.
src/lib/inference/serving/resolver.ts(247,10): error TS2393: Duplicate function implementation.

readinessComparisonMatches is declared twice; 054b5ff65 ("fix(inference): honor host-local serving recipe contracts", #8391) carries both declarations while 7d4f7bda0 and 35b15d503 carry one.

This is already tracked as #8438 with a fix in #8437. Once #8437 lands I will re-run the checks here. Happy to sequence behind it.

On the documentation finding

The docs review for this change came back no-docs-needed, and I want to show the evidence rather than just assert it:

  • rg over docs/ finds zero occurrences of binary not found, Could not locate the ... executable, or any statement that the installer aborts when the CLI is not resolvable. The failure mode this PR removes was never documented, so no page goes stale.
  • The outcome users land on after this change is already documented. docs/reference/troubleshooting.mdx line 17 and the nemoclaw not found after install section at lines 28-39 already describe sourcing ~/.bashrc / ~/.zshrc, opening a new terminal, and adding ~/.local/bin to PATH, and line 36 already names the managed shim at ~/.local/bin/nemoclaw.
  • Per docs/CONTRIBUTING.md (98-114), a dated docs/changelog/ entry belongs to the pre-tag release-note PR rather than an individual bug fix.

So the change moves an undocumented failure onto an already-documented success path. If a maintainer would still like an explicit note in troubleshooting.mdx saying the installer now completes and prints the refresh hint instead of aborting, I am glad to add it — just say the word and I will push it here.

Platform verification

Verified on the reported platform, not only in CI: macOS 26.5.2 (25F84) arm64, stock /bin/bash 3.2.57, Homebrew npm 11.12.1 at prefix /opt/homebrew. A harness ran the pre-fix scripts/install.sh from 422fe9545 and this branch's version side by side on identical fixtures in a throwaway HOME: 131 checks, 0 failures. Pre-fix reproduces the reported exit 1 and message while a working shim exists; this branch exits 0 through the shim with READY=false / REFRESH=true, and both the no-shim and fake-shim controls still exit 1. Details are in the PR description.

@Dongni-Yang Dongni-Yang removed their assignment Aug 6, 2026
@apurvvkumaria apurvvkumaria self-assigned this Aug 6, 2026
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

@apurvvkumaria

Copy link
Copy Markdown
Collaborator

CI classification update: every required check is green for the current branch revision.

Two non-required automation lanes failed for reasons outside this change:

  • The managed runtime lane invokes the removed test/e2e/live/managed-image-activation-e2e.test.ts file and exits before exercising the installer. That obsolete PR gate was removed by #8445.
  • The second-opinion advisor lane completed its early analysis with an empty finding ledger, then failed because its terminology-receipt tool rejected all six submissions under a schema-validation conflict. This is deterministic advisor tooling behavior, not an actionable code or documentation finding.

Neither unchanged lane is safe or useful to rerun. The installer tests, docs build, required CI, DCO, commit verification, documentation review, and security review pass, and the actionable review thread is resolved. The remaining merge gate is independent maintainer approval.

Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
@apurvvkumaria

Copy link
Copy Markdown
Collaborator

Maintainer follow-up for the current branch revision (a7244927c):

  • Addressed the PR Review Advisor request by adding an executable-but-invalid user-local shim case. Verification still exits 1 and retains the existing nemoclaw binary not found error when neither the active npm prefix nor the shim contains the real CLI.
  • Refreshed the branch from current main. The earlier managed-runtime activation failure was base/workflow drift: that run invoked a managed-activation test file that did not exist in the older branch. The refreshed branch contains the test surface expected by the workflow.
  • The earlier Nemotron advisor failure occurred inside model analysis rather than in PR code. The successful Terra lane produced the actionable invalid-shim request above; that request is now covered. Fresh CI on this branch revision is authoritative.
  • Local validation passes: the focused installer file has 10 passing tests; six installer suites have 92 passing and 5 skipped tests; CLI type checking, shfmt, ShellCheck, and diff checks pass. The documentation build and route checks complete with 0 errors and 2 existing tool warnings.
  • Independent documentation-writer review passes after separating source-checkout development shims from installer-managed per-CLI shims. The active CLI path now renders correctly for NemoClaw, Hermes, and Deep Agents. No other user-facing documentation update is required.

Nine-category security review: PASS, no findings. (1) no secrets or credentials added; (2) the shim must be executable and pass the existing real-CLI version validation, with an explicit invalid-shim regression; (3) no authentication or authorization behavior changes; (4) no dependency changes; (5) existing failure diagnostics are retained and no sensitive data is logged; (6) no cryptographic changes; (7) no security configuration or header changes; (8) positive, shadowed, on-PATH, absent, and invalid shim paths are covered; (9) the holistic trust boundary is unchanged because execution remains limited to the existing user-local path and validated CLI identity.

No CI waiver or merge bypass is requested. The PR should merge only after the fresh required checks pass and the required approval is present.

@apurvvkumaria

Copy link
Copy Markdown
Collaborator

CI follow-up: the fresh Nemotron advisor lane repeated the same external analysis failure on this branch revision. Setup, trusted checkout, isolated workspace preparation, OpenShell configuration, advisor execution, artifact download/upload, cleanup, and summary publication all passed; only Verify advisor analysis outcome failed with PR review advisor analysis did not complete: outcome=failure. The independent GPT-5.6 Terra advisor lane passed, and its earlier actionable invalid-shim request is covered by the new regression test.

This failure has now reproduced across two advisor runs while the PR code and the other advisor lane validate successfully, so another unchanged rerun is not justified. If this lane is required by the ruleset, its analyzer/output service is the remaining external CI blocker: https://github.com/NVIDIA/NemoClaw/actions/runs/31110751505/job/92647596999

prekshivyas pushed a commit that referenced this pull request Aug 6, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Fixes installer verification when npm prefix changes leave NemoClaw
available only through the user-local shim. The installer now probes the
shim after the npm-prefix checks and records whether the calling shell
needs a PATH refresh.

This replacement preserves Dongni Yang's original commit from #8440 and
adds the missing regression coverage.

## Related Issue

Closes #8311

## Changes

- Probe the user-local shim when the active npm prefix does not expose
the CLI.
- Re-check command resolution before recording readiness so a rejected
binary that shadows the shim keeps the PATH-refresh guidance.
- Cover stale-prefix, shadowing, shim-on-PATH, npm-uninstall, and
missing-shim behavior.

## Type of Change

- [x] 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

- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [ ] Docs updated for user-facing behavior changes
- [x] Docs not applicable — justification:
`docs/reference/troubleshooting.mdx` already explains how to source the
shell profile and add `~/.local/bin` to `PATH`. The removed installer
failure was not documented.
- [x] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [x] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification: An independent review
passed all nine security categories for PR commit
`d2b1ea5139076b45bf366dcec04a3a75dd8cf49e` against base SHA
`2f297843b8fddad80b046eaf34f2987bdd922711`. The existing shim trust
boundary does not change.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue: No waiver is recorded.

## Documentation Writer Review

- [x] Documentation writer subagent reviewed the completed changes
- Result: `no-docs-needed`
- Evidence: Reviewed `scripts/install.sh`,
`test/install-npm-resolution.test.ts`, and the existing user-local shim
recovery in `docs/reference/troubleshooting.mdx` for PR commit
`d2b1ea5139076b45bf366dcec04a3a75dd8cf49e` against base SHA
`2f297843b8fddad80b046eaf34f2987bdd922711`. The change removes an
undocumented failure and retains the documented recovery action. The
review covered repository terminology, test titles, comments, security
wording, and documentation ownership; no documentation or code sample
changed.
- Agent: Codex Desktop
<!-- docs-review-head-sha: d2b1ea5 -->
<!-- docs-review-agents-blob-sha:
c69aad4 -->

## DGX Station Hardware Evidence

- [ ] Tested on DGX Station
- Tested commit: Not applicable; `scripts/prepare-dgx-station-host.sh`
does not change.
- Station profile/scenario: Not applicable.
- Result: Not applicable.
- Supporting evidence: Not applicable.

## Verification

- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub — both contributor commits and the
current-main refresh commit are GitHub Verified.
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run validate:pr` passed after refreshing `origin/main` when hooks
were skipped or unavailable — normal hooks passed for the contributor
fix, remediation, and current-main refresh.
- [ ] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — GitHub Actions is authoritative; no
standalone local test suite ran for the reviewed replacement commit.
- [ ] Applicable broad gate passed — GitHub Actions has not completed
for the replacement PR.
- [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) — not
applicable; no documentation changes.
- [ ] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only) — not applicable; no documentation changes.
- [ ] New doc pages include SPDX header and frontmatter (new pages only)
— not applicable; no new page.

---

Signed-off-by: Dongni Yang <dongniy@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>


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

## Summary by CodeRabbit

* **Bug Fixes**
* Improved CLI detection when the active npm installation path does not
contain the command.
  * Added support for valid user-local CLI shims.
  * Provides clearer onboarding guidance when PATH needs refreshing.
* Correctly resolves valid shims and removes conflicting invalid command
entries.
  * Reports a clear failure when no usable CLI installation is found.

* **Tests**
* Added coverage for local shim discovery, PATH handling, conflicting
binaries, and missing installations.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Dongni Yang <dongniy@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Co-authored-by: Dongni Yang <dongniy@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[macOS][Install] fresh install exits 1 "nemoclaw binary not found" although the CLI shim is installed and works

2 participants