Skip to content

fix: install package CLI alias shims - #6084

Merged
ericksoa merged 1 commit into
NVIDIA:mainfrom
WilliamK112:codex/nemoclaw-install-nemohermes-6041
Jul 3, 2026
Merged

fix: install package CLI alias shims#6084
ericksoa merged 1 commit into
NVIDIA:mainfrom
WilliamK112:codex/nemoclaw-install-nemohermes-6041

Conversation

@WilliamK112

@WilliamK112 WilliamK112 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix the source installer so every packaged NemoClaw CLI alias is made available through the user-local shim directory. This restores nemohermes after a default nemoclaw install while preserving the active CLI's failure semantics.

Related Issue

Closes #6041.

Changes

  • Create best-effort user-local shims for nemoclaw, nemohermes, and nemo-deepagents after installing the active CLI.
  • Verify that every generated alias shim points to its corresponding packaged binary.
  • Keep the installer test fixture portable across POSIX and Windows development shells.
  • Replay the validated contributor change onto current main with repository formatter output applied.

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 — installer restores already-packaged CLI aliases without changing the documented interface
  • Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging)
  • Sensitive-path review completed or maintainer-approved waiver recorded — installer shim targets and best-effort failure boundaries reviewed; focused alias tests pass 5/5
  • 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 replayed commit is expected to appear as Verified in GitHub
  • Git hooks passed during commit and push, or npx prek run --from-ref main --to-ref HEAD passes — formatting and read-only hooks passed; the broad local coverage lane did not settle under shared host load, so exact-head CI remains required
  • Targeted tests pass for changed behavior — npx vitest run --project integration test/install-npm-resolution.test.ts (5/5)
  • Full npm test passes (broad runtime changes only)
  • 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)

Signed-off-by: WilliamK112 164879897+WilliamK112@users.noreply.github.com
Signed-off-by: Aaron Erickson aerickson@nvidia.com

Summary by CodeRabbit

  • New Features
    • Installer now creates local command shims for all bundled CLI aliases, so more entry points are available after setup.
  • Bug Fixes
    • Improved installer behavior across platforms, including better Windows support and more reliable path handling.
    • Fallback installation paths are now reported more consistently when npm isn’t available.
  • Tests
    • Expanded installer coverage for alias creation, fallback behavior, and cross-platform path normalization.

@copy-pr-bot

copy-pr-bot Bot commented Jul 1, 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 1, 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: 3aa2e621-ff4b-44eb-b48d-05383871f7ab

📥 Commits

Reviewing files that changed from the base of the PR and between ea0eaf4 and 01c1cac.

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

📝 Walkthrough

Walkthrough

Updates the installer to create shims for all packaged CLI aliases, and expands the npm-resolution test suite with cross-platform Bash handling, path normalization, and assertions for alias shim creation and platform-specific behavior.

Changes

Multi-alias shim installation

Layer / File(s) Summary
Ensure shims for all CLI aliases
scripts/install.sh
ensure_nemoclaw_shim() now iterates over nemoclaw, nemohermes, and nemo-deepagents, ensuring the active shim and attempting the others in best-effort mode.
Cross-platform bash/path test infrastructure
test/install-npm-resolution.test.ts
Adds dynamic Bash discovery, platform-aware system bin directory selection, path normalization for assertions, and updates installer execution to use the resolved Bash binary and delimiter-aware PATH construction.
Shim and npm-resolution test coverage
test/install-npm-resolution.test.ts
Adds coverage for alias shim creation, adjusts path assertions for platform normalization, verifies nvm sourcing via marker contents, and skips the unwritable npm link test on Windows.

Estimated code review effort: 2 (Simple) | ~12 minutes

Suggested reviewers: brandonpelfrey, ericksoa

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 11.11% 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 clearly summarizes the main change: installing package CLI alias shims.
Linked Issues check ✅ Passed The PR restores the missing nemohermes shim in ~/.local/bin and adds regression coverage for the reported Hermes-mode failure.
Out of Scope Changes check ✅ Passed The Windows test harness updates and extra alias shims support the stated installer fix and are not unrelated scope creep.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@WilliamK112
WilliamK112 force-pushed the codex/nemoclaw-install-nemohermes-6041 branch from 4d0663f to 0744ea7 Compare July 1, 2026 01:25

@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: 2

🤖 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 `@test/install-npm-resolution.test.ts`:
- Around line 99-144: The shim coverage in install-npm-resolution.test.ts only
checks that each alias created by ensure_nemoclaw_shim is executable, but it
does not verify that every shim points to its own packaged binary. Update the
test to assert the generated shim content for nemoclaw, nemohermes, and
nemo-deepagents embeds the correct target path under prefixBin for each alias,
following the install-preflight.test.ts content-check pattern so a miswired
alias cannot pass.
- Around line 14-24: The resolveBashBin() helper assumes spawnSync("where.exe",
["bash"]) always returns a string stdout, but on spawn failure it can be null
and the split call will throw. Update resolveBashBin() to defensively handle a
null or missing stdout before splitting, and only use the discovered path when
stdout is present; otherwise fall back to "bash" as intended.
🪄 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: 0b34f559-9c00-4206-ad60-2d4ca00c253a

📥 Commits

Reviewing files that changed from the base of the PR and between e4b9111 and 4d0663f.

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

Comment thread test/install-npm-resolution.test.ts
Comment thread test/install-npm-resolution.test.ts
@WilliamK112
WilliamK112 force-pushed the codex/nemoclaw-install-nemohermes-6041 branch from 0744ea7 to bc9cfef Compare July 1, 2026 18:02

@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 `@test/install-npm-resolution.test.ts`:
- Around line 27-39: Guard buildIsolatedSystemPath() in
test/install-npm-resolution.test.ts so Windows symlink creation failures do not
abort the test file at module load. Update the symlinkSync handling inside
buildIsolatedSystemPath() (and any related setup that builds TEST_SYSTEM_PATH)
to treat EPERM like EEXIST, or skip symlink creation on win32 when privileges
are unavailable, while still continuing to build the isolated path for the
remaining entries.
🪄 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: 5dcaf488-4ba2-4499-904c-2ca3a8701298

📥 Commits

Reviewing files that changed from the base of the PR and between 0744ea7 and bc9cfef.

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

Comment thread test/install-npm-resolution.test.ts
@WilliamK112
WilliamK112 force-pushed the codex/nemoclaw-install-nemohermes-6041 branch from bc9cfef to 53ceedc Compare July 1, 2026 18:11
@wscurran wscurran added area: cli Command line interface, flags, terminal UX, or output area: install Install, setup, prerequisites, or uninstall flow bug-fix PR fixes a bug or regression labels Jul 1, 2026
@wscurran

wscurran commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

✨ Thanks for the fix. Adding user-local shims for all packaged CLI aliases and regression coverage for the default install path is a solid improvement for Hermes mode.


Related open issues:

@wscurran wscurran added integration: dcode LangChain Deep Code integration behavior v0.0.74 labels Jul 2, 2026
@cjagwani cjagwani self-assigned this Jul 2, 2026
@wscurran
wscurran requested a review from cv July 2, 2026 22:06
Replay the validated contributor change onto current main and apply the repository formatter output.

Signed-off-by: WilliamK112 <164879897+WilliamK112@users.noreply.github.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
@ericksoa
ericksoa force-pushed the codex/nemoclaw-install-nemohermes-6041 branch from ea0eaf4 to 01c1cac Compare July 3, 2026 17:57

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

Reviewed exact replayed head 01c1cac. No blocking findings. The installer alias behavior is covered by focused tests, all 34 check contexts are green, DCO and GitHub verification pass, CodeRabbit is clean, and both manual PR Review Advisor lanes recommend merge_as_is.

@ericksoa
ericksoa merged commit 9dc2cd5 into NVIDIA:main Jul 3, 2026
34 of 36 checks passed
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
<!-- markdownlint-disable MD041 -->
## Summary
Fix the source installer so every packaged NemoClaw CLI alias is made
available through the user-local shim directory. This restores
`nemohermes` after a default `nemoclaw` install while preserving the
active CLI's failure semantics.

## Related Issue
Closes NVIDIA#6041.

## Changes
- Create best-effort user-local shims for `nemoclaw`, `nemohermes`, and
`nemo-deepagents` after installing the active CLI.
- Verify that every generated alias shim points to its corresponding
packaged binary.
- Keep the installer test fixture portable across POSIX and Windows
development shells.
- Replay the validated contributor change onto current `main` with
repository formatter output applied.

## 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
<!-- Check all that apply. For any "covered by existing tests", "not
applicable", or waiver entry, add a brief justification on the same line
or in the Changes section. -->
- [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 — installer restores already-packaged CLI
aliases without changing the documented interface
- [x] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [x] Sensitive-path review completed or maintainer-approved waiver
recorded — installer shim targets and best-effort failure boundaries
reviewed; focused alias tests pass 5/5
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Verification
<!-- Check each item you ran and confirmed. Leave unchecked items you
skipped. Doc-only changes do not require npm test unless you ran it. -->
- [x] PR description includes the DCO sign-off declaration and every
replayed commit is expected to appear as `Verified` in GitHub
- [ ] Git hooks passed during commit and push, or `npx prek run
--from-ref main --to-ref HEAD` passes — formatting and read-only hooks
passed; the broad local coverage lane did not settle under shared host
load, so exact-head CI remains required
- [x] Targeted tests pass for changed behavior — `npx vitest run
--project integration test/install-npm-resolution.test.ts` (5/5)
- [ ] Full `npm test` passes (broad runtime changes only)
- [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)
- [ ] 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: WilliamK112
<164879897+WilliamK112@users.noreply.github.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>


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

## Summary by CodeRabbit

* **New Features**
* Installer now creates local command shims for all bundled CLI aliases,
so more entry points are available after setup.
* **Bug Fixes**
* Improved installer behavior across platforms, including better Windows
support and more reliable path handling.
* Fallback installation paths are now reported more consistently when
npm isn’t available.
* **Tests**
* Expanded installer coverage for alias creation, fallback behavior, and
cross-platform path normalization.

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

Signed-off-by: WilliamK112 <164879897+WilliamK112@users.noreply.github.com>
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli Command line interface, flags, terminal UX, or output area: install Install, setup, prerequisites, or uninstall flow bug-fix PR fixes a bug or regression integration: dcode LangChain Deep Code integration behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[All Platforms][Install] nemohermes binary not installed — nemoclaw connect fails in hermes mode

4 participants