feat: add minimal Windows bootstrap installer#3744
Conversation
Signed-off-by: zyang-dev <267119621+zyang-dev@users.noreply.github.com>
📝 WalkthroughWalkthroughPowerShell bootstrap that elevates, enables WSL2 features (with reboot/resume), ensures an Ubuntu WSL distro (install/convert/set-default), optionally installs and verifies Docker Desktop integration, and hands off a curl-based NemoClaw installer command into Ubuntu. ChangesWindows NemoClaw Bootstrap
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 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 unit tests (beta)
Comment |
E2E Advisor RecommendationRequired E2E: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
|
There was a problem hiding this comment.
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/bootstrap-windows.ps1`:
- Around line 695-698: The installer command currently interpolates
$InstallerUrl and $InstallerArgs directly into $installerCommand, allowing
broken URLs and shell injection; fix by validating $InstallerUrl with
[System.Uri]::IsWellFormedUriString(...) and erroring on invalid input, and
safely shell-escape $InstallerUrl and each token in $InstallerArgs before
concatenation (implement a small helper like Escape-BashArg that wraps values in
single quotes and encodes embedded single quotes as '\''), then build
$installerCommand using the escaped values (e.g., $escapedUrl and $escapedArgs)
instead of raw variables so the curl ... | bash command is safe.
🪄 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: 457eeb14-12ec-4ad2-b482-92092aaed515
📒 Files selected for processing (1)
scripts/bootstrap-windows.ps1
Signed-off-by: zyang-dev <267119621+zyang-dev@users.noreply.github.com>
There was a problem hiding this comment.
🧹 Nitpick comments (2)
scripts/bootstrap-windows.ps1 (2)
87-113: ⚡ Quick winRename
$argsto avoid shadowing PowerShell's automatic variable.
$argsis a built-in automatic variable containing unbound positional arguments. Assigning to it shadows this behavior and can cause subtle bugs if the function ever needs to access actual unbound arguments.Proposed fix
function Get-ScriptInvocationArguments { param([switch]$ResumeRun) - $args = @( + $scriptArgs = @( '-NoLogo', '-NoProfile', '-ExecutionPolicy', 'Bypass', '-File', $PSCommandPath, '-DistroName', $DistroName, '-InstallerUrl', $InstallerUrl ) if ($InstallerArgs) { - $args += @('-InstallerArgs', $InstallerArgs) + $scriptArgs += @('-InstallerArgs', $InstallerArgs) } - $args += ('-InstallDockerDesktop:{0}' -f ([bool]$InstallDockerDesktop).ToString().ToLowerInvariant()) + $scriptArgs += ('-InstallDockerDesktop:{0}' -f ([bool]$InstallDockerDesktop).ToString().ToLowerInvariant()) if ($AutoReboot) { - $args += '-AutoReboot' + $scriptArgs += '-AutoReboot' } if ($ResumeRun) { - $args += '-Resume' + $scriptArgs += '-Resume' } - return $args + return $scriptArgs }Also update references in
Invoke-SelfElevation(lines 127, 129).🤖 Prompt for 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. In `@scripts/bootstrap-windows.ps1` around lines 87 - 113, Rename the local variable $args in Get-ScriptInvocationArguments to a non-automatic name (e.g. $scriptArgs) to avoid shadowing PowerShell's automatic $args; update every use inside Get-ScriptInvocationArguments (building, appending, and returning the array) to the new name, and then update the corresponding callers in Invoke-SelfElevation (the places that currently reference the returned/constructed $args at the Invoke-SelfElevation spots referenced in the review) to use the renamed variable/return value so the function still supplies the same argument array without clobbering the automatic variable.
676-685: 💤 Low value
Write-WslSubsystemMissingNoticeis defined but never called.This function is not invoked anywhere in the script. Consider removing it or adding the intended call site.
🤖 Prompt for 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. In `@scripts/bootstrap-windows.ps1` around lines 676 - 685, The function Write-WslSubsystemMissingNotice is defined but never used; either remove it or call it from the WSL availability check. Fix by locating the place where the script verifies WSL state (the block that checks Windows optional features or the routine that detects whether a distro can be installed/run) and invoke Write-WslSubsystemMissingNotice $Name when features are enabled but the distro failed to install/run; alternatively, delete the Write-WslSubsystemMissingNotice function if no notice is needed. Ensure the chosen fix references the existing Write-WslSubsystemMissingNotice symbol so the codebase no longer contains an unused function.
🤖 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.
Nitpick comments:
In `@scripts/bootstrap-windows.ps1`:
- Around line 87-113: Rename the local variable $args in
Get-ScriptInvocationArguments to a non-automatic name (e.g. $scriptArgs) to
avoid shadowing PowerShell's automatic $args; update every use inside
Get-ScriptInvocationArguments (building, appending, and returning the array) to
the new name, and then update the corresponding callers in Invoke-SelfElevation
(the places that currently reference the returned/constructed $args at the
Invoke-SelfElevation spots referenced in the review) to use the renamed
variable/return value so the function still supplies the same argument array
without clobbering the automatic variable.
- Around line 676-685: The function Write-WslSubsystemMissingNotice is defined
but never used; either remove it or call it from the WSL availability check. Fix
by locating the place where the script verifies WSL state (the block that checks
Windows optional features or the routine that detects whether a distro can be
installed/run) and invoke Write-WslSubsystemMissingNotice $Name when features
are enabled but the distro failed to install/run; alternatively, delete the
Write-WslSubsystemMissingNotice function if no notice is needed. Ensure the
chosen fix references the existing Write-WslSubsystemMissingNotice symbol so the
codebase no longer contains an unused function.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: a2b2cf21-4ac0-4c72-a660-186b97a0276e
📒 Files selected for processing (1)
scripts/bootstrap-windows.ps1
ericksoa
left a comment
There was a problem hiding this comment.
Reviewed the current head against main. The Windows bootstrap is isolated to a new script, the installer handoff quoting issue is fixed, and the required WSL plus CI/security/self-hosted checks are green. Regression risk is mainly limited to the new bootstrap path itself.
## Summary Refreshes the NemoClaw docs for v0.0.46 by updating version metadata, release notes, and generated user skills. The refresh also keeps public docs aligned with the docs skip list by removing non-public experimental references from the generated output. ## Related Issue None. ## Changes - #3744 and #3824 -> `docs/about/release-notes.mdx`: Added Windows bootstrap and WSL express install coverage for v0.0.46. - #3392 -> `docs/manage-sandboxes/messaging-channels.mdx`, `docs/reference/commands.mdx`, `docs/reference/network-policies.mdx`, and policy examples: Refreshed public messaging channel docs around WhatsApp and matching policy presets. - #3742, #3767, #3732, #3786, #3777, and #3808 -> `docs/about/release-notes.mdx`: Added release-note coverage for Hermes managed tools, Bedrock Runtime endpoint detection, WSL Ollama proxying, Model Router Python fallback, plugin command registration, and tool-catalog latency improvements. - #3124 -> `docs/about/release-notes.mdx`: Added release-note coverage for hosted uninstall flag guidance. - Generated `nemoclaw-user-*` skills from the updated MDX docs for the v0.0.46 release. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [x] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Verification - [ ] `npx prek run --all-files` passes - [ ] `npm test` passes - [ ] Tests added or updated for new or changed behavior - [x] No secrets, API keys, or credentials committed - [x] Docs updated for user-facing behavior changes - [ ] `make docs` builds without warnings (doc changes only) - [x] 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) Verification notes: - Commit hooks passed, including markdownlint, gitleaks, docs-to-skills verification, env-var docs, and skills YAML checks. - `python3 scripts/docs-to-skills.py docs/ .agents/skills/ --prefix nemoclaw-user --doc-platform fern-mdx` passed. - `bash test/e2e/e2e-cloud-experimental/check-docs.sh --only-links --local-only --with-skills` passed. - `git diff --check` passed. - `make docs` was attempted but blocked before MDX validation because `npx` received HTTP 403 fetching `fern-api` from npm. --- Signed-off-by: Miyoung Choi <miyoungc@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Released v0.0.46: improved Windows setup, WhatsApp messaging support, Hermes sandbox/tool routing, Anthropic endpoint compatibility, Ollama proxy routing, model-router fallback, OpenClaw plugin/backup compatibility, sandbox build tooling fixes, and updated uninstall flag behavior. * **Documentation** * Removed WeChat from messaging flows and presets across guides and CLI docs; clarified onboarding and channel setup for WhatsApp. Clarified runtime mutability and filesystem (Landlock) behavior — some changes require sandbox rebuilds; prefer host-side commands for durable config. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/NVIDIA/NemoClaw/pull/3911?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary
Adds a minimal Windows bootstrap installer that prepares WSL 2, Ubuntu, and Docker Desktop before handing users off to the standard NemoClaw
curl | bashinstaller.Changes
scripts/bootstrap-windows.ps1.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesmake docsbuilds without warnings (doc changes only)Signed-off-by: zyang-dev 267119621+zyang-dev@users.noreply.github.com
Summary by CodeRabbit