Skip to content

fix(onboard): allow sudo prompts in express install - #3492

Merged
cv merged 5 commits into
mainfrom
fix/non-interactive-sudo-prompt-mode
May 15, 2026
Merged

fix(onboard): allow sudo prompts in express install#3492
cv merged 5 commits into
mainfrom
fix/non-interactive-sudo-prompt-mode

Conversation

@zyang-dev

@zyang-dev zyang-dev commented May 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Allows express install to keep non-interactive onboarding defaults while permitting sudo password prompts for required host setup. This fixes Ollama systemd override setup on hosts where the drop-in is readable normally, but sudo -n fails because sudo requires a password.

Changes

  • Added NEMOCLAW_NON_INTERACTIVE_SUDO_MODE=prompt for prompt-capable sudo during non-interactive onboarding.
  • Exported that sudo mode from DGX Spark/Station express install.
  • Updated Ollama systemd override inspection to read readable drop-ins without sudo before falling back to sudo.
  • Added focused coverage for express sudo mode, readable drop-in inspection, and invalid sudo mode values.
  • Documented the new sudo mode and express install behavior.

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)

Verification

  • npx prek run --all-files passes
  • npm test passes
  • Tests added or updated for new or changed behavior
  • No secrets, API keys, or credentials committed
  • Docs updated for user-facing behavior changes
  • make 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: zyang-dev 267119621+zyang-dev@users.noreply.github.com

Summary by CodeRabbit

  • New Features

    • Express install now uses a non-interactive flow and can enable prompt-capable sudo for required host changes, applies suggested security policy, and selects managed local inference where applicable.
  • Documentation

    • Quickstart and CLI help updated to document NEMOCLAW_NON_INTERACTIVE_SUDO_MODE and its prompt behavior.
  • Bug Fixes

    • Improved guidance when non-interactive sudo cannot read system files (suggests enabling prompt mode).
  • Tests

    • Installer and onboarding tests updated to validate express-install outputs, sudo-mode behaviors, and invalid-value rejection.

Review Change Stack

Signed-off-by: zyang-dev <267119621+zyang-dev@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented May 14, 2026

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • ✅ Review completed - (🔄 Check again to review again)

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: 2961c5a4-b7b8-44e3-b8a0-f4c973960ceb

📥 Commits

Reviewing files that changed from the base of the PR and between ef77d15 and b2bb4a5.

📒 Files selected for processing (4)
  • docs/get-started/quickstart.md
  • docs/reference/commands.md
  • scripts/install.sh
  • test/install-preflight.test.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • docs/reference/commands.md
  • scripts/install.sh
  • test/install-preflight.test.ts

📝 Walkthrough

Walkthrough

Expands the quickstart “Express install” text to state it switches onboarding to non-interactive mode, may enable sudo password prompts for host changes, applies the suggested security policy, and selects the managed local inference path.

Changes

Quickstart Express Install Clarification

Layer / File(s) Summary
Quickstart express install text
docs/get-started/quickstart.md
Adds details that Express install switches onboarding to non-interactive mode, enables sudo password prompts for required host changes, applies the suggested security policy, and selects the managed local inference path.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

documentation

Suggested reviewers

  • ericksoa
  • cv

Poem

🐰 I nibble docs with careful paws,
A prompt for sudo when needed because,
Policies set and paths aligned,
Quickstart clearer, neatly signed,
A hop of joy for readers' cause.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% 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 'fix(onboard): allow sudo prompts in express install' clearly and concisely summarizes the main change: enabling sudo prompts during express install onboarding.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/non-interactive-sudo-prompt-mode

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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

@zyang-dev zyang-dev self-assigned this May 14, 2026
@github-actions

github-actions Bot commented May 14, 2026

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: cloud-onboard-e2e, gpu-e2e
Optional E2E: gpu-double-onboard-e2e, cloud-e2e

Dispatch hint: cloud-onboard-e2e,gpu-e2e

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • cloud-onboard-e2e (high): Validates the public curl installer plus non-interactive onboarding, sandbox health, and security checks after scripts/install.sh changes installer/onboard behavior and documented environment handling.
  • gpu-e2e (high): Validates real local Ollama onboarding, auth proxy/inference path, and the Linux service setup path most likely to exercise the changed Ollama systemd loopback override and sudo behavior.

Optional E2E

  • gpu-double-onboard-e2e (high): Adjacent confidence for local Ollama re-onboarding and proxy consistency after changing the systemd override/sudo setup path used by Ollama onboarding.
  • cloud-e2e (high): Broader install → onboard → live inference smoke for the standard non-interactive OpenClaw path; useful if maintainers want extra confidence beyond the focused cloud-onboard split test.

New E2E recommendations

  • DGX Spark/Station express install (high): The PR specifically changes express install to export NEMOCLAW_NON_INTERACTIVE_SUDO_MODE=prompt, but existing workflow jobs do not appear to run an interactive DGX Spark/Station express prompt end-to-end on matching hardware with prompt-capable sudo.
    • Suggested test: Add a DGX Spark/Station express-install E2E scenario that accepts the express prompt from a TTY, verifies NEMOCLAW_NON_INTERACTIVE_SUDO_MODE=prompt reaches onboarding, and completes managed local inference setup.
  • Ollama systemd sudo prompt mode (medium): Unit tests cover the new sudo prefix selection, but there is no focused E2E that provisions a real systemd Ollama service with an unreadable drop-in and confirms prompt-capable sudo preserves existing settings while enforcing loopback binding.
    • Suggested test: Add an Ollama systemd loopback E2E on a Linux systemd runner that creates or uses a real ollama.service drop-in requiring sudo, runs non-interactive onboarding with NEMOCLAW_NON_INTERACTIVE_SUDO_MODE=prompt, and verifies the final drop-in preserves existing Environment lines and binds OLLAMA_HOST to 127.0.0.1.

Dispatch hint

  • Workflow: nightly-e2e.yaml
  • jobs input: cloud-onboard-e2e,gpu-e2e

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

🧹 Nitpick comments (1)
docs/get-started/quickstart.md (1)

66-66: ⚡ Quick win

Format sudo as inline code.

Line 66 uses sudo as prose; format it as inline code for command-token consistency.

As per coding guidelines "CLI commands, file paths, flags, parameter names, and values must use inline code formatting."

🤖 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 `@docs/get-started/quickstart.md` at line 66, The sentence "Express install
switches onboarding to non-interactive mode, allows sudo password prompts for
required host changes, applies the suggested security policy, and selects the
managed local inference path for that platform." should use inline code
formatting for the sudo token; update the content in
docs/get-started/quickstart.md by wrapping the word sudo in inline code
backticks (i.e., `sudo`) so it follows the guideline that CLI commands and flags
use code formatting, leaving the rest of the sentence unchanged.
🤖 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 `@docs/get-started/quickstart.md`:
- Line 66: The sentence "Express install switches onboarding to non-interactive
mode, allows sudo password prompts for required host changes, applies the
suggested security policy, and selects the managed local inference path for that
platform." should use inline code formatting for the sudo token; update the
content in docs/get-started/quickstart.md by wrapping the word sudo in inline
code backticks (i.e., `sudo`) so it follows the guideline that CLI commands and
flags use code formatting, leaving the rest of the sentence unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 7e9c1309-0e46-46a9-bcaa-097f574665ba

📥 Commits

Reviewing files that changed from the base of the PR and between 5818cfa and 09d00c4.

📒 Files selected for processing (6)
  • docs/get-started/quickstart.md
  • docs/reference/commands.md
  • scripts/install.sh
  • src/lib/onboard/ollama-systemd.ts
  • test/install-preflight.test.ts
  • test/onboard-selection.test.ts

Signed-off-by: zyang-dev <267119621+zyang-dev@users.noreply.github.com>
@cv cv added v0.0.42 and removed v0.0.41 labels May 14, 2026

@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 `@docs/reference/commands.md`:
- Line 1138: Update the table row for NEMOCLAW_NON_INTERACTIVE_SUDO_MODE to list
all valid values and behaviors: explicitly state that valid values are "prompt"
(allowing non-interactive onboarding to use prompt-capable sudo which will ask
for a password), empty/unset (default behavior: use sudo -n and fail if a
password is required), and any other accepted tokens if applicable; change the
Format column to show "`prompt` or empty/unset" (or mirror the "Valid values:
..." pattern used elsewhere) and expand the Effect column to describe what each
value does and which one is the default (empty/unset => sudo -n). Ensure you
edit the NEMOCLAW_NON_INTERACTIVE_SUDO_MODE row only and follow the same
wording/format as other entries that list valid values.
🪄 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: cf391c6e-fc9c-4416-9be2-0c4822f8ff97

📥 Commits

Reviewing files that changed from the base of the PR and between cda88aa and b950468.

📒 Files selected for processing (3)
  • docs/reference/commands.md
  • scripts/install.sh
  • test/install-preflight.test.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • scripts/install.sh
  • test/install-preflight.test.ts

Comment thread docs/reference/commands.md Outdated
@cv cv added v0.0.43 and removed v0.0.42 labels May 14, 2026
@zyang-dev zyang-dev added v0.0.43 and removed v0.0.43 labels May 14, 2026
Signed-off-by: zyang-dev <267119621+zyang-dev@users.noreply.github.com>
@cv cv added v0.0.44 and removed v0.0.43 labels May 15, 2026
@cv
cv merged commit 9be0357 into main May 15, 2026
34 checks passed
@zyang-dev
zyang-dev deleted the fix/non-interactive-sudo-prompt-mode branch June 1, 2026 23:45
@wscurran wscurran added area: cli Command line interface, flags, terminal UX, or output bug-fix PR fixes a bug or regression and removed NemoClaw CLI labels Jun 3, 2026
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 bug-fix PR fixes a bug or regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants