Skip to content

fix(deploy): use the remote user's home for Brev sync#1364

Open
WuKongAI-CMU wants to merge 1 commit intoNVIDIA:mainfrom
WuKongAI-CMU:fix/1319-brev-home
Open

fix(deploy): use the remote user's home for Brev sync#1364
WuKongAI-CMU wants to merge 1 commit intoNVIDIA:mainfrom
WuKongAI-CMU:fix/1319-brev-home

Conversation

@WuKongAI-CMU
Copy link
Copy Markdown
Contributor

@WuKongAI-CMU WuKongAI-CMU commented Apr 2, 2026

Summary

  • stop hardcoding /home/ubuntu/nemoclaw in nemoclaw deploy
  • sync, upload .env, and reconnect through ~/nemoclaw so existing Brev instances work across non-Ubuntu usernames
  • update the remote-deploy docs and generated skill snippets to match the new path

Verification

  • npm test -- test/cli.test.js -t "deploy uses the remote user's home directory instead of /home/ubuntu"
  • npm test -- test/cli.test.js
  • python3 scripts/docs-to-skills.py docs/ .agents/skills/ --prefix nemoclaw
  • make docs
  • git diff --check

Closes #1319.

Summary by CodeRabbit

  • Documentation

    • Updated SSH command paths across deployment and network policy documentation for consistency.
  • Tests

    • Added comprehensive CLI test for the deploy command to validate remote path handling and command generation.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 75235be3-c25e-453e-8931-0e3fc5af1d69

📥 Commits

Reviewing files that changed from the base of the PR and between db82a7c and 94efcd8.

📒 Files selected for processing (5)
  • .agents/skills/nemoclaw-deploy-remote/SKILL.md
  • .agents/skills/nemoclaw-manage-policy/SKILL.md
  • docs/deployment/deploy-to-remote-gpu.md
  • docs/network-policy/approve-network-requests.md
  • test/cli.test.js
✅ Files skipped from review due to trivial changes (5)
  • docs/network-policy/approve-network-requests.md
  • .agents/skills/nemoclaw-manage-policy/SKILL.md
  • .agents/skills/nemoclaw-deploy-remote/SKILL.md
  • docs/deployment/deploy-to-remote-gpu.md
  • test/cli.test.js

📝 Walkthrough

Walkthrough

Documentation and test updates replacing hardcoded absolute paths with home directory shortcuts. SSH commands in deployment and skill documentation changed from /home/ubuntu/nemoclaw to ~/nemoclaw. Added CLI test validating that deployment commands use the remote user's home directory instead of hardcoded paths.

Changes

Cohort / File(s) Summary
Documentation Path Updates
.agents/skills/nemoclaw-deploy-remote/SKILL.md, .agents/skills/nemoclaw-manage-policy/SKILL.md, docs/deployment/deploy-to-remote-gpu.md, docs/network-policy/approve-network-requests.md
Updated SSH command working directory from absolute path /home/ubuntu/nemoclaw to home directory shorthand ~/nemoclaw in remote-sandbox commands.
CLI Test Coverage
test/cli.test.js
Added new test case for deploy shade-box command that verifies deployment uses the remote user's home directory in generated commands and does not hardcode /home/ubuntu/nemoclaw paths. Test stubs SSH, rsync, and scp binaries to validate correct path resolution.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A rabbit hopped through paths so plain,
Where /home/ubuntu caused much pain,
Now ~/nemoclaw shortcuts the way,
And tests ensure it works each day! 🎉

🚥 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 PR title 'fix(deploy): use the remote user's home for Brev sync' directly and clearly describes the main change: replacing hardcoded /home/ubuntu with dynamic remote user home directory.
Linked Issues check ✅ Passed The PR addresses all coding requirements from issue #1319: removes hardcoded /home/ubuntu paths from deploy commands, uses remote user's home directory dynamically for mkdir/rsync/scp operations, and adds test coverage verifying this behavior works across varying usernames.
Out of Scope Changes check ✅ Passed All changes are in-scope: documentation updates reflect the code fix, skill snippets are regenerated per verification steps, and the new test validates the exact issue from #1319 without introducing unrelated functionality.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@wscurran wscurran added bug Something isn't working Platform: Brev Support for Brev deployment labels Apr 3, 2026
@wscurran
Copy link
Copy Markdown
Contributor

wscurran commented Apr 3, 2026

✨ Thanks for submitting this pull request, which proposes a way to improve Brev compatibility by using the user's home directory instead of a hardcoded path.


Possibly related open issues:

ericksoa pushed a commit that referenced this pull request Apr 4, 2026
…ty (#1470)

## Summary
- unify installer and onboarding host detection around shared TypeScript
preflight logic
- move `deploy` behavior into TypeScript, thin the Brev compatibility
wrapper, and harden Brev readiness handling
- demote or remove legacy platform-specific setup paths (`setup-spark`,
`brev-setup.sh`) in favor of the canonical installer + onboard flow
- update docs, CLI help, and Brev E2E coverage to match the new behavior

## What Changed
- added shared host assessment and remediation planning in
`src/lib/preflight.ts`
- wired installer and onboard flows to the same host preflight decisions
- changed Podman handling from hard block to unsupported-runtime warning
- migrated deploy logic into `src/lib/deploy.ts`
- updated `nemoclaw deploy` to use the authenticated Brev CLI, current
Brev create flags, explicit GCP provider default, stricter readiness
checks, and standard installer/onboard flow
- removed `scripts/setup-spark.sh` and reduced `scripts/brev-setup.sh`
to a deprecated compatibility wrapper
- updated README/docs/help text and hardened the Brev E2E cleanup path

## Validation
- `npm run build:cli`
- targeted Vitest coverage for `src/lib/preflight.test.ts`,
`src/lib/deploy.test.ts`, `test/install-preflight.test.js`,
`test/cli.test.js`, `test/runner.test.js`
- live Brev validation with `TEST_SUITE=deploy-cli` on
`cpu-e2.4vcpu-16gb`
- confirmed successful end-to-end remote deploy after waiting for Brev
`status=RUNNING`, `build_status=COMPLETED`, `shell_status=READY`

## Related Issues
- Fixes #1377
- Addresses #1330
- Addresses #1390
- Related to #1404

## Credit / Prior Work
This branch builds on ideas and prior work from:
- #1368 by @zyang-dev for simplifying Spark setup and removing the old
cgroup workaround
- #1395 and #1468 by @kjw3 for the thin installer/bootstrap direction
and installer path reliability
- #1450 by @cjagwani for switching Brev flows toward GCP for reliability
- #1383 by @13ernkastel for the current Brev create flag compatibility
work
- #1364 by @WuKongAI-CMU for deploy sync-path fixes
- #1362 and #1266 by @jyaunches for the Brev E2E/launchable
infrastructure direction
- issue ideas from #1377 and #1404 by @zNeill, #1330 by @Marcelo5444,
and #1390 by @ericksoa


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

* **New Features**
* Improved host diagnostics with actionable remediation guidance
surfaced during installer/onboard preflight.

* **Improvements**
* macOS (Intel) now recommends Docker Desktop; DGX Spark guidance now
uses the standard installer + `nemoclaw onboard`.
* Preflight output shows detected runtime and WSL notes; installer
prints remediation actions and will skip onboarding on blocking issues.

* **Deprecations**
* `nemoclaw deploy`, `nemoclaw setup-spark`, and the legacy bootstrap
wrapper are now deprecated compatibility paths.

* **Documentation**
* Quickstart, troubleshooting, and command reference updated to reflect
installer+onboard flow and deprecation guidance.

* **Tests**
* Added/updated tests covering preflight, deploy compatibility, CLI
aliases, and deploy e2e scenarios.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Signed-off-by: Intern Dev <dev@wukongai.io>
Made-with: Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Platform: Brev Support for Brev deployment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[NemoClaw][Brev] nemoclaw deploy — hardcoded /home/ubuntu path fails on non-ubuntu cloud providers

2 participants