Skip to content

fix(onboard): stream OpenShell upgrade progress instead of a silent wait (#4431)#4529

Merged
cv merged 1 commit into
NVIDIA:mainfrom
latenighthackathon:fix/4431-openshell-upgrade-progress
May 29, 2026
Merged

fix(onboard): stream OpenShell upgrade progress instead of a silent wait (#4431)#4529
cv merged 1 commit into
NVIDIA:mainfrom
latenighthackathon:fix/4431-openshell-upgrade-progress

Conversation

@latenighthackathon
Copy link
Copy Markdown
Contributor

@latenighthackathon latenighthackathon commented May 29, 2026

Summary

runOpenshellInstall now streams scripts/install-openshell.sh output live during the in-onboard OpenShell upgrade, so the upgrade reports progress instead of going quiet between the Upgrading... line and completion. Reported by NV QA.

Related Issue

Closes #4431

Problem

When nemoclaw onboard finds an installed OpenShell below the blueprint minimum, it runs scripts/install-openshell.sh to upgrade. runOpenshellInstall (src/lib/onboard/openshell-pin.ts) spawned that script with stdio: ["ignore", "pipe", "pipe"], which buffers stdout/stderr and only prints the buffer when the script exits non-zero. On a successful upgrade the buffer is discarded, so after openshell X.Y.Z is below minimum required version. Upgrading... no further output reaches the terminal for the entire download and checksum step (about 145s in the report). download_with_curl compounds it: curl -fsSL suppresses the progress meter via -s, so the release download is silent even once the script's stream is surfaced.

Changes

  • src/lib/onboard/openshell-pin.ts: spawn install-openshell.sh with stdio: ["ignore", "inherit", "inherit"] so its info() progress lines reach the terminal as they are emitted. The call stays synchronous, so no async change propagates into the onboard entry point, and the failure path no longer needs to re-print a captured buffer because the output has already streamed.
  • scripts/install-openshell.sh: print a Downloading OpenShell release assets... line before the download dispatch so the gh release download path is not silent either.
  • download_with_curl now passes --progress-bar when stdout or stderr is a terminal, falling back to -sS (errors only) when non-interactive so CI logs stay clean.

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
  • npm run 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)

Ran: new test/onboard-openshell-install-stream.test.ts confirms runOpenshellInstall spawns with inherited stdio, no longer pipes or buffers, and returns a not-installed result without throwing on a non-zero exit; existing OpenShell suites pass (onboard-openshell-version, install-openshell-version-check, install-openshell-upgrade-prompt, resolve-openshell), 54/54; script behavior verified with a stubbed curl, where a non-interactive run issues curl -fL -sS ... and a pty-backed run issues curl -fL --progress-bar ...; bash -n scripts/install-openshell.sh, npx biome check, and npm run typecheck:cli clean.


Signed-off-by: latenighthackathon latenighthackathon@users.noreply.github.com

…ait (NVIDIA#4431)

runOpenshellInstall captured install-openshell.sh stdout/stderr into a
buffer that was only printed on failure, so a successful in-onboard
OpenShell upgrade sat silent for the whole download/verify (~145s in the
report). Switch the spawn to stdio inherit so the script progress lines
stream live, and have install-openshell.sh show a curl progress bar when
interactive plus a Downloading marker so the slow release download is not
a silent gap. Keeps runOpenshellInstall synchronous, so no async change
ripples into the onboard entrypoint.

Signed-off-by: latenighthackathon <latenighthackathon@users.noreply.github.com>
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented May 29, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 29, 2026

📝 Walkthrough

Walkthrough

This PR fixes the OpenShell upgrade hang by enabling live progress output during installation. The child process stdio is switched from buffering to terminal inheritance, allowing the install script's progress messages to stream to the user in real time. The shell script is enhanced with conditional curl progress bar display based on terminal interactivity. Test coverage validates the inherited stdio configuration and error handling.

Changes

OpenShell Installation Progress Streaming

Layer / File(s) Summary
Child process output streaming setup
src/lib/onboard/openshell-pin.ts
runOpenshellInstall() switches spawnSync from stdio: ["ignore", "pipe", "pipe"] to stdio: ["ignore", "inherit", "inherit"], enabling install script output to stream directly to the terminal. Import specifiers are reordered.
Shell script interactive progress bar control
scripts/install-openshell.sh
download_with_curl() detects terminal interactivity and selects between curl --progress-bar (interactive) and curl -sS (non-interactive). The asset download loop uses this configurable progress array.
Progress streaming test coverage
test/onboard-openshell-install-stream.test.ts
Mocked spawnSync test suite verifies inherited stdio for live output, absence of pipe buffering, and graceful non-zero exit handling that returns not-installed result without throwing.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested labels

fix, NemoClaw CLI, bug, Getting Started

Suggested reviewers

  • ericksoa

Poem

🐰 A rabbit hops through the upgrade stage,
No silent gaps to test the user's page—
Progress bars hop, curl shows the dance,
No hidden pipes hide the chance,
Output streams inherit the light,
Now two-and-a-half minutes feel quite right! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% 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
Title check ✅ Passed The title clearly and concisely summarizes the main change: streaming OpenShell upgrade progress instead of silent buffering.
Linked Issues check ✅ Passed The PR implements the minimal suggested fix from #4431: changes stdio from ['ignore','pipe','pipe'] to ['ignore','inherit','inherit'] to stream progress live, and updates the shell script to emit progress markers with proper curl output control.
Out of Scope Changes check ✅ Passed All changes (openshell-pin.ts, install-openshell.sh, and the new test) are directly scoped to addressing the #4431 issue of streaming upgrade progress to the terminal.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ 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 fix NemoClaw CLI Use this label to identify issues with the NemoClaw command-line interface (CLI). OpenShell Support for OpenShell, a safe, private runtime for autonomous AI agents labels May 29, 2026
@wscurran
Copy link
Copy Markdown
Contributor

✨ Thanks for submitting this detailed PR about streaming OpenShell upgrade progress. This proposes a code change to make the upgrade process more transparent for users.


Related open issues:

@cv cv merged commit 5029fc0 into NVIDIA:main May 29, 2026
23 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix NemoClaw CLI Use this label to identify issues with the NemoClaw command-line interface (CLI). OpenShell Support for OpenShell, a safe, private runtime for autonomous AI agents

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Ubuntu 24.04][Upgrade] OpenShell upgrade step displays no progress for ~145s between "Upgrading..." line and completion

3 participants