You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to #3200 (which fixed #3156 and extracted the shared install-path-refresh helper): migrate the remaining 23 e2e scripts that still carry an inline copy of the .local/bin on PATH pattern to use the new helper at test/e2e/lib/install-path-refresh.sh.
Background
On cloud images whose ~/.bashrc rewrites PATH, sourcing .bashrc after running install.sh wipes the ~/.local/bin entry and breaks all downstream nemoclaw ... invocations in e2e. The original fix (#3156, cherry-picked into #3200) re-adds ~/.local/bin to PATH after the .bashrc source.
As part of #3200's review feedback, the pattern was extracted into two shared helpers:
nemoclaw_refresh_install_env — source .bashrc then guarantee ~/.local/bin is on PATH
nemoclaw_ensure_local_bin_on_path — idempotent prepend of ~/.local/bin
#3200 migrated the 6 scripts the original PR touched (or were directly adjacent). A full grep of test/e2e/ afterward found 23 more scripts carrying the same inline pattern that were intentionally left out to keep #3200 small and reviewable.
Scope
Migrate all 23 scripts below to use the helper.
Standard migrations (~18 scripts)
One .bashrc source + 2 PATH guards → replace with nemoclaw_refresh_install_env at the first site and nemoclaw_ensure_local_bin_on_path at the second.
test/e2e/test-device-auth-health.sh
test/e2e/test-gpu-double-onboard.sh
test/e2e/test-gpu-e2e.sh
test/e2e/test-hermes-discord-e2e.sh
test/e2e/test-inference-routing.sh
test/e2e/test-messaging-providers.sh
test/e2e/test-overlayfs-autofix.sh
test/e2e/test-rebuild-hermes.sh
test/e2e/test-rebuild-openclaw.sh
test/e2e/test-sandbox-operations.sh
test/e2e/test-sandbox-survival.sh
test/e2e/test-shields-config.sh
test/e2e/test-snapshot-commands.sh
test/e2e/test-spark-install.sh
test/e2e/test-token-rotation.sh
test/e2e/test-upgrade-stale-sandbox.sh
Heavy users — check for redundant guards (2 scripts)
One .bashrc source + 3 PATH guards each. Worth checking whether all 3 sites are still needed after consolidation, or whether one invocation of nemoclaw_refresh_install_env at the top is sufficient.
test/e2e/test-full-e2e.sh
test/e2e/test-hermes-e2e.sh
Odd ducks — review before migrating (4 scripts)
These don't match the standard shape and may involve small behavioral fixes rather than a pure refactor.
test/e2e/test-kimi-inference-compat.sh — sources .bashrc but has 0 PATH guards. Likely broken today on images that rewrite PATH; migrating fixes a latent bug.
test/e2e/test-messaging-compatible-endpoint.sh — same shape as above (sources .bashrc, 0 PATH guards). Same latent-bug note.
test/e2e/test-docs-validation.sh — has a PATH guard but does not source .bashrc. Probably wants nemoclaw_ensure_local_bin_on_path only, not the full refresh.
test/e2e/test-skill-agent-e2e.sh — same shape (1 PATH guard). Same note.
Acceptance criteria
All 23 scripts source test/e2e/lib/install-path-refresh.sh and use one of the two helpers at each site that currently inlines the pattern.
Zero inline leftovers of the old .local/bin / .bashrc pattern in the migrated scripts (verify with grep -rn '\.local/bin' test/e2e/ --include='*.sh' — only the helper and explicit helper calls should match).
Summary
Follow-up to #3200 (which fixed #3156 and extracted the shared
install-path-refreshhelper): migrate the remaining 23 e2e scripts that still carry an inline copy of the.local/bin on PATHpattern to use the new helper attest/e2e/lib/install-path-refresh.sh.Background
On cloud images whose
~/.bashrcrewritesPATH, sourcing.bashrcafter runninginstall.shwipes the~/.local/binentry and breaks all downstreamnemoclaw ...invocations in e2e. The original fix (#3156, cherry-picked into #3200) re-adds~/.local/bintoPATHafter the.bashrcsource.As part of #3200's review feedback, the pattern was extracted into two shared helpers:
nemoclaw_refresh_install_env— source.bashrcthen guarantee~/.local/binis onPATHnemoclaw_ensure_local_bin_on_path— idempotent prepend of~/.local/bin#3200 migrated the 6 scripts the original PR touched (or were directly adjacent). A full grep of
test/e2e/afterward found 23 more scripts carrying the same inline pattern that were intentionally left out to keep #3200 small and reviewable.Scope
Migrate all 23 scripts below to use the helper.
Standard migrations (~18 scripts)
One
.bashrcsource + 2 PATH guards → replace withnemoclaw_refresh_install_envat the first site andnemoclaw_ensure_local_bin_on_pathat the second.test/e2e/test-device-auth-health.shtest/e2e/test-gpu-double-onboard.shtest/e2e/test-gpu-e2e.shtest/e2e/test-hermes-discord-e2e.shtest/e2e/test-inference-routing.shtest/e2e/test-messaging-providers.shtest/e2e/test-overlayfs-autofix.shtest/e2e/test-rebuild-hermes.shtest/e2e/test-rebuild-openclaw.shtest/e2e/test-sandbox-operations.shtest/e2e/test-sandbox-survival.shtest/e2e/test-shields-config.shtest/e2e/test-snapshot-commands.shtest/e2e/test-spark-install.shtest/e2e/test-token-rotation.shtest/e2e/test-upgrade-stale-sandbox.shHeavy users — check for redundant guards (2 scripts)
One
.bashrcsource + 3 PATH guards each. Worth checking whether all 3 sites are still needed after consolidation, or whether one invocation ofnemoclaw_refresh_install_envat the top is sufficient.test/e2e/test-full-e2e.shtest/e2e/test-hermes-e2e.shOdd ducks — review before migrating (4 scripts)
These don't match the standard shape and may involve small behavioral fixes rather than a pure refactor.
test/e2e/test-kimi-inference-compat.sh— sources.bashrcbut has 0 PATH guards. Likely broken today on images that rewritePATH; migrating fixes a latent bug.test/e2e/test-messaging-compatible-endpoint.sh— same shape as above (sources.bashrc, 0 PATH guards). Same latent-bug note.test/e2e/test-docs-validation.sh— has a PATH guard but does not source.bashrc. Probably wantsnemoclaw_ensure_local_bin_on_pathonly, not the full refresh.test/e2e/test-issue-2478-crash-loop-recovery.sh— only 1 PATH guard. Probably missing the post-.bashrcre-add; migration fixes the same latent bug as fix(e2e): re-add ~/.local/bin to PATH after .bashrc sourcing #3156.test/e2e/test-skill-agent-e2e.sh— same shape (1 PATH guard). Same note.Acceptance criteria
test/e2e/lib/install-path-refresh.shand use one of the two helpers at each site that currently inlines the pattern..local/bin/.bashrcpattern in the migrated scripts (verify withgrep -rn '\.local/bin' test/e2e/ --include='*.sh'— only the helper and explicit helper calls should match).bash -npasses on all 23 scripts.test-full-e2e.shortest-hermes-e2e.sh) is run end-to-end to confirm no regression.Suggested PR shape
refactor(e2e): migrate remaining scripts to install-path-refresh helperRelated