fix(e2e): re-add ~/.local/bin to PATH after .bashrc sourcing#3200
Merged
Conversation
install.sh places openshell/nemoclaw under ~/.local/bin, but sourcing .bashrc triggers nvm.sh which rebuilds $PATH from scratch, dropping the entry. Four E2E test helpers (deployment-services, diagnostics, network-policy, credential-migration) checked for the binaries after .bashrc but before re-adding ~/.local/bin, causing them to fail with "nemoclaw not found" / "openshell still missing after install". Apply the same PATH-refresh guard already used by the passing test-cloud-onboard-e2e.sh: re-add ~/.local/bin immediately after sourcing .bashrc so the check succeeds regardless of nvm ordering. Signed-off-by: Hung Le <hple@nvidia.com> (cherry picked from commit 372e514)
Collapse six copies of the "source ~/.bashrc + re-add ~/.local/bin to PATH" recipe into a single test/e2e/lib/install-path-refresh.sh helper with two small functions: - nemoclaw_ensure_local_bin_on_path — defensive PATH guard - nemoclaw_refresh_install_env — post-install .bashrc + PATH refresh Updated callers (the four scripts patched in the preceding commit plus the two existing reference scripts that already had the inline pattern): - test/e2e/test-credential-migration.sh - test/e2e/test-deployment-services.sh - test/e2e/test-diagnostics.sh - test/e2e/test-network-policy.sh - test/e2e/test-cloud-onboard-e2e.sh - test/e2e/test-cloud-inference-e2e.sh Net −27 lines in the callers; logic is byte-equivalent to the previous inline recipe. Follow-up: the remaining ~23 e2e scripts also carry a copy of the ".local/bin on PATH" guard and can be migrated in a separate pass. Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
Contributor
📝 WalkthroughWalkthroughThis pull request extracts common E2E test environment and PATH setup logic into a shared Bash helper script, then refactors six E2E test scripts to source and invoke these helper functions instead of duplicating inline shell profile sourcing and ChangesE2E PATH Management Refactoring
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsTimed out fetching pipeline failures after 30000ms Comment |
5 tasks
8 tasks
cv
approved these changes
May 7, 2026
jyaunches
pushed a commit
that referenced
this pull request
May 8, 2026
## Summary - Bump the docs release metadata to `0.0.37`. - Document release-prep updates for messaging policy presets, sandbox runtime utilities, and the GPU CDI troubleshooting path. - Refresh generated `nemoclaw-user-*` skills from the updated docs. ## Source summary - #3159 -> `docs/reference/troubleshooting.md`: Documents the GPU CDI preflight warning and remediation for `nvidia.com/gpu=all` gateway start failures. - #2415 -> `docs/reference/network-policies.md`, `docs/manage-sandboxes/messaging-channels.md`, `docs/network-policy/customize-network-policy.md`: Clarifies that Telegram, Discord, and Slack egress comes from opt-in messaging presets, not the baseline policy. - #3091 -> `docs/deployment/sandbox-hardening.md`, `docs/network-policy/customize-network-policy.md`: Documents the retained sandbox utilities `vi`, `jq`, and `dos2unix` while keeping host-side policy files as the durable source of truth. ## Test plan - `python3 scripts/docs-to-skills.py docs/ .agents/skills/ --prefix nemoclaw-user` - `make docs` - `npm run build:cli` - `npm run typecheck:cli` - Commit and pre-push hooks: markdownlint, docs-to-skills verification, gitleaks, commitlint, CLI typecheck ## Skipped - #3193 and #3191 matched `docs/.docs-skip` entries for experimental shields/config paths. - #3200 and #3183 were test-only fixes. - #3189 and #3163 were internal documentation/refactor changes with no public docs impact. Made with [Cursor](https://cursor.com) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Clarified which utilities remain in the sandbox runtime for lightweight inspection and cleanup * Noted that messaging endpoints (Discord, Slack, Telegram) are not in the baseline policy and that channel presets are applied during onboarding * Added GPU passthrough troubleshooting for gateway startup * Updated release/version bump and release-prep workflow guidance, including Discord preset description updates <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The e2e test harness sources
~/.bashrcto pick up the freshly-installednemoclawCLI, but on images whose.bashrcresetsPATH(or unconditionally prepends system paths) this wipes the~/.local/binentry thatinstall.shjust added, breaking every downstreamnemoclaw ...invocation. This PR re-adds~/.local/bintoPATHafter.bashrcsourcing and extracts the pattern into a shared helper so it stays consistent as more scripts adopt it.Related Issue
Supersedes #3156 (cherry-picked with author credit preserved to Hung Le).
Changes
~/.local/bintoPATHafter sourcing~/.bashrcin the cloud e2e test scripts, so the installednemoclawCLI remains resolvable on images whose.bashrcrewritesPATH.test/e2e/lib/install-path-refresh.shwith two helpers:nemoclaw_refresh_install_env— source.bashrcthen guarantee~/.local/binis onPATHnemoclaw_ensure_local_bin_on_path— idempotent prepend of~/.local/bintest-cloud-inference-e2e.sh,test-cloud-onboard-e2e.sh,test-credential-migration.sh,test-deployment-services.sh,test-diagnostics.sh,test-network-policy.sh.Follow-up (not in this PR): ~23 additional e2e scripts also carry a copy of the inline
.local/bin on PATHguard. Intentionally left out to keep this PR scoped to the scripts flagged in the original review. Tracked in #3201.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesmake docsbuilds without warnings (doc changes only)Verification notes:
bash -nsyntax check passes on the new helper and all 6 migrated scripts.dirname "${BASH_SOURCE[0]}"/lib/,${E2E_DIR}/lib/, and${SCRIPT_DIR_TIMEOUT}/lib/.nemoclaw_ensure_local_bin_on_pathconfirmed: prepends~/.local/binwhen missing, is idempotent when already present.npm testhas 18 unrelated timeout failures intest/install-preflight.test.ts(installer integration suite) on this machine; this PR does not touch that file (0 diff lines against it) and does not modify any code path it exercises. The actual e2e scripts changed here run in the Brev cloud suite, which is out of thenpm testscope.Signed-off-by: Julie Yaunches jyaunches@nvidia.com