fix(onboard): color preflight WARN/ERROR check lines (#6004) - #6017
Conversation
Preflight check results printed plain ✓/⚠/✗ lines in the default terminal color, so warnings and failures were visually indistinguishable from passing checks in the lengthy onboard preflight output. Add warnLine/failLine helpers in terminal-style.ts (⚠ yellow, ✗ red) — color auto-suppressed under NO_COLOR or non-TTY via the existing useColor gate, so CI stays plain text. Apply them to the dedicated preflight-check modules (bridge-dns-preflight, sandbox-gpu-preflight). ✓/INFO lines are left in default color per the issue. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Jason Ma <jama@nvidia.com>
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds stderr-aware severity formatting for CLI preflight lines, shared onboarding message helpers, and updates bridge-DNS, sandbox-GPU, gateway reachability, HTTP proxy, and runtime preflight output to use the new colored warning/error rendering. ChangesColored preflight output helpers
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in the Show a code coverage summary of the most covered files.
TypeScript / code-coverage/cliThe overall coverage in the Show a code coverage summary of the most covered files.
Updated |
PR Review Advisor — Changes requestedMerge posture: Do not merge yet Action checklist
Findings index
🚨 Required before mergeAddress these before merging unless a maintainer explicitly overrides the advisor with rationale.
|
E2E Advisor RecommendationRequired E2E: Dispatch hint: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
Vitest E2E Scenario RecommendationRequired Vitest E2E scenarios: Dispatch required Vitest E2E scenarios:
Full Vitest E2E advisor summaryVitest E2E Scenario AdvisorBase: Required Vitest E2E scenarios
Optional Vitest E2E scenarios
Relevant changed files
|
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 `@src/lib/onboard/bridge-dns-preflight.ts`:
- Around line 214-216: The inconclusive DNS warning path is only partially
migrated to warnLine, leaving other branches in bridge-dns-preflight on the old
hardcoded ⚠ formatting. Update the remaining inconclusive warning sites in the
same entrypoint to call warnLine consistently so all DNS preflight warnings
share the TTY/NO_COLOR-aware formatting, and keep any ANSI styling centralized
in terminal-style.ts rather than duplicating it in onboard preflight code.
🪄 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: 33a327ef-aeb8-412e-94c8-20b19a75647b
📒 Files selected for processing (4)
src/lib/cli/terminal-style.test.tssrc/lib/cli/terminal-style.tssrc/lib/onboard/bridge-dns-preflight.tssrc/lib/onboard/sandbox-gpu-preflight.ts
PR Review Advisor (Nemotron Ultra) — Changes requestedMerge posture: Do not merge yet Action checklist
Findings index
🚨 Required before mergeAddress these before merging unless a maintainer explicitly overrides the advisor with rationale.
|
…sive message PRA-1: console.warn at bridge-dns-preflight.ts:173 was rendering in default color instead of using warnLine() like the other warn messages added in this PR. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
E2E Target RecommendationRequired E2E targets: Dispatch required E2E targets:
Full E2E target advisor summaryE2E Target AdvisorBase: Required E2E targets
Optional E2E targets
Relevant changed files
|
Vitest E2E Scenario Results — ❌ Some jobs failedRun: 28552134018
|
Vitest E2E Target Results — ❌ Some jobs failedRun: 28553969502
|
Complete the warnLine cutover for inconclusive container-DNS warnings: the image_pull_failed branch still emitted a hardcoded '⚠' line, bypassing the helper's TTY/NO_COLOR handling. Route it through warnLine so all inconclusive DNS warnings share one authoritative formatting path. Addresses CodeRabbit review comment on #6017. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Jason Ma <jama@nvidia.com>
|
I don't think we should merge this as a two-module formatting change. It adds another selectively adopted We should build this on the Node standard-library primitives we already have at our runtime floor ( Please define one severity renderer backed by those stdlib APIs and apply it consistently—at minimum across the complete onboard preflight surface, with representative call-site tests—instead of landing a scoped helper and leaving the rest as follow-up debt. |
…rn-error-color Signed-off-by: Jason Ma <jama@nvidia.com> # Conflicts: # src/lib/onboard/bridge-dns-preflight.ts
…xt (#6004) Replace the module-load YW/RD-string preflight helpers with one severity renderer backed by node:util.styleText. warnLine/failLine now decide color from process.stderr (where console.warn/error write) and okLine/infoLine from process.stdout, so styleText's per-stream capability and NO_COLOR / NODE_DISABLE_COLORS / FORCE_COLOR handling apply to the stream the line actually lands on. Previously color was computed from process.stdout.isTTY while WARN/ERROR printed to stderr, so 'onboard >log' dropped their color on a color-capable terminal and 'onboard 2>log' leaked raw ANSI into the file. Apply the renderer across the onboard environment-preflight surface that emits through console.warn/error: unsupported/under-provisioned runtime, low-memory swap, and missing messaging providers in onboard.ts; Docker bridge / DNS in bridge-dns-preflight.ts; sandbox GPU in sandbox-gpu-preflight.ts; and sandbox->gateway bridge reachability in gateway-sandbox-reachability.ts. The two low-memory warnings move from console.log to console.warn so their stream matches their severity. The single-sink log(msg) surfaces (wsl-docker-desktop-gpu and the interactive provider/messaging verifiers) route all levels to stdout and are left for a follow-up sink refactor, since stderr-keyed color there would recreate the mismatch this change removes. Signed-off-by: Jason Ma <jama@nvidia.com>
|
Confirmed the stream-routing defect and reworked the change around it (3c9cb0c).
Applied the renderer across the onboard environment-preflight surface that emits through One scope boundary I want your read on: |
Revert the inline severity-line conversions in src/lib/onboard.ts. The codebase-growth-guardrails check requires onboard.ts to be net-neutral or smaller, and wrapping its multi-line WARN/ERROR messages in warnLine/failLine (plus the new import) grew the file. Converting those inline lines needs a module extraction, which is deferred to the same follow-up as the log-sink severity refactor. The severity renderer and the already-extracted preflight modules (bridge-dns-preflight, sandbox-gpu-preflight, gateway-sandbox-reachability) still carry the stream-keyed color fix, covering the Docker/DNS/GPU preflight failures including the #6004 Docker-not-running repro. Signed-off-by: Jason Ma <jama@nvidia.com>
|
Correction to my previous note: I've reverted the inline conversions in What remains in this PR carries the actual fix: the stream-keyed Proposed follow-up (happy to do it here if you'd rather one pass): extract the |
… adopt the renderer (#6004) Move the inline onboard.ts preflight WARN/ERROR emitters — unsupported runtime, under-provisioned runtime, low-memory, failed swap, and missing messaging provider — into src/lib/onboard/preflight-messages.ts, where they use the shared stream-keyed warnLine/failLine renderer. onboard.ts now calls one-liners, so it shrinks (net -9 lines) and stays within the codebase-growth / onboard-entrypoint budget instead of growing as the earlier inline attempt did. WARN lines route through console.warn and ERROR lines through console.error, so the renderer's stderr-keyed color matches the stream. The two low-memory warnings therefore move from console.log to console.warn. Adds representative call-site tests for each emitter, including the colima vs docker-desktop resize branch. This closes the onboard.ts side of #6004; the single-sink log() surfaces (wsl-docker-desktop-gpu, provider/messaging verifiers) remain a separate follow-up. Signed-off-by: Jason Ma <jama@nvidia.com>
|
Update: the onboard.ts extraction (follow-up #1) has landed (d004a26), so this PR now covers the onboard.ts side too. The inline preflight severity emitters — unsupported / under-provisioned runtime, low-memory, failed swap, missing messaging provider — moved into Verified on a Linux Node 22.23.1 host (exact SHA d004a26): Remaining: only the single-sink |
…6004) CodeQL / code-quality flagged the unused `beforeEach` named import left behind when the color tests moved to stream stubbing in afterEach. Signed-off-by: Jason Ma <jama@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com> # Conflicts: # src/lib/onboard.ts # src/lib/onboard/sandbox-gpu-preflight.ts
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
|
@coderabbitai review |
✅ Action performedReview finished.
|
Keep NO_COLOR authoritative when FORCE_COLOR is also set. Make the color-depth fixtures branch-free. Refresh generated source references after the preflight extraction. Co-authored-by: Jason Ma <jama@nvidia.com> Signed-off-by: Jason Ma <jama@nvidia.com> Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
|
🌿 Preview your docs: https://nvidia-preview-pr-6017.docs.buildwithfern.com/nemoclaw |
Route the missing or stale CDI failure through the shared stderr renderer. Cover red terminal output and NO_COLOR plain output. Preserve remediation and exit behavior. Co-authored-by: Jason Ma <jama@nvidia.com> Signed-off-by: Jason Ma <jama@nvidia.com> Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Route the preflight gateway recreation warning through the stderr severity renderer. Preserve cleanup behavior and cover color-capable and NO_COLOR output. Co-authored-by: Jason Ma <jama@nvidia.com> Signed-off-by: Jason Ma <jama@nvidia.com> Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary This PR prepares the user-facing documentation for v0.0.74 before the release plan is frozen. It expands the release notes across the 56-commit train and closes durable documentation gaps found during the pre-tag commit scan. ## Changes - Expand the `v0.0.74` release notes to cover OpenShell 0.0.72, managed MCP, progressive tool disclosure, LangChain Deep Agents Code, onboarding, local inference, messaging, recovery, and contributor workflows. - Correct the `destroy` contract for retained per-name volumes, gateway-unreachable `--force` cleanup, managed MCP ownership, and same-name recovery. - Document separate remediation for an unreachable container DNS resolver versus one that answers with `NXDOMAIN` or `REFUSED`. - Document the Windows on Arm N1X automatic Ollama safeguard and its remaining large-model limitations. - State that messaging conflicts abort rebuild before backup or deletion, leaving the original sandbox intact. - Link the agent-runnable value benchmark from the contributor task index. - Synchronize generated agent command variants. - Validate with `npm run docs:sync-agent-variants` and `npm run docs`; Fern completed with 0 errors and 2 existing warnings. - Source summary: - [#6020](#6020) and [#5876](#5876) -> `docs/about/release-notes.mdx`: Consolidate the OpenShell 0.0.72 policy boundary and managed MCP lifecycle. - [#6251](#6251) and [#5989](#5989) -> `docs/about/release-notes.mdx`: Summarize progressive tool disclosure and sandbox-first inference controls. - [#6232](#6232), [#6082](#6082), [#6219](#6219), [#6214](#6214), [#6215](#6215), [#6230](#6230), and [#6260](#6260) -> `docs/about/release-notes.mdx`: Summarize the experimental LangChain Deep Agents Code status, secret, version, rebuild, snapshot, and MCP boundaries. - [#6166](#6166), [#6254](#6254), [#6265](#6265), [#6164](#6164), and [#6017](#6017) -> `docs/about/release-notes.mdx`: Summarize BuildKit prebuild, validated image reuse, bounded readiness, and preflight improvements. - [#6150](#6150) -> `docs/about/release-notes.mdx` and `docs/reference/troubleshooting.mdx`: Separate unreachable-resolver remediation from reachable-but-rejected DNS responses. - [#6234](#6234) -> `docs/about/release-notes.mdx`, `docs/inference/use-local-inference.mdx`, and `docs/get-started/windows-preparation.mdx`: Document N1X automatic 9B selection and the remaining explicit-large-model boundary. - [#6129](#6129), [#5987](#5987), [#5955](#5955), and [#6220](#6220) -> `docs/about/release-notes.mdx`, `docs/manage-sandboxes/messaging-channels.mdx`, `docs/reference/commands.mdx`, and `docs/reference/commands-nemohermes.mdx`: Document messaging policy persistence, status, and the pre-destructive conflict check. - [#5963](#5963), [#6050](#6050), [#6094](#6094), [#6238](#6238), [#5988](#5988), [#6235](#6235), [#6181](#6181), and [#5986](#5986) -> `docs/about/release-notes.mdx`, `docs/reference/commands.mdx`, and `docs/reference/commands-nemohermes.mdx`: Summarize day-two recovery and clarify retained-volume and local-only destroy semantics. - [#6200](#6200), [#6248](#6248), [#6168](#6168), [#6270](#6270), and [#5649](#5649) -> `docs/about/release-notes.mdx` and `CONTRIBUTING.md`: Summarize contributor setup and verification improvements and expose the advisory value benchmark. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [x] Doc only (includes code sample changes) ## Quality Gates <!-- Check exactly one tests line and one docs line. Check other lines when applicable. Add every requested justification or approval reference. --> - [ ] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [x] Tests not applicable — justification: documentation-only release preparation; generated-variant synchronization and the Fern docs build validate the changed pages and routes. - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [ ] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [ ] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Verification <!-- Check each applicable item only when supported by the requested evidence. Run targeted tests once per relevant change set and rerun after later edits or hook autofixes that can affect the tested behavior. Do not rerun hook-covered checks. --> - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or `npm run check:diff` passed when hooks were skipped or unavailable - [x] Targeted behavior tests pass for the current change set, or tests are marked not applicable above — command/result or justification: tests are not applicable to this documentation-only change; `npm run docs` validates the source and generated routes. - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — command/result: - [x] Quality Gates section completed with required justifications or waivers - [x] No secrets, API keys, or credentials committed - [ ] `npm run 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) --- <!-- DCO sign-off is required in this PR description, and every commit must appear as Verified in GitHub. Run: git config user.name && git config user.email --> Signed-off-by: Aaron Erickson <aerickson@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Expanded setup guidance for Windows on Arm devices with safer default local model selection. * Clarified local inference and sandbox messaging behavior, including conflict checks before rebuilds and safer recovery steps. * Updated destroy/rebuild/reference docs with more detailed warnings, failure handling, and volume-retention guidance. * Improved troubleshooting instructions for Docker DNS issues with clearer paths for unreachable vs. blocked resolvers. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
<!-- markdownlint-disable MD041 --> ## Summary This PR prepares the user-facing documentation for v0.0.74 before the release plan is frozen. It expands the release notes across the 56-commit train and closes durable documentation gaps found during the pre-tag commit scan. ## Changes - Expand the `v0.0.74` release notes to cover OpenShell 0.0.72, managed MCP, progressive tool disclosure, LangChain Deep Agents Code, onboarding, local inference, messaging, recovery, and contributor workflows. - Correct the `destroy` contract for retained per-name volumes, gateway-unreachable `--force` cleanup, managed MCP ownership, and same-name recovery. - Document separate remediation for an unreachable container DNS resolver versus one that answers with `NXDOMAIN` or `REFUSED`. - Document the Windows on Arm N1X automatic Ollama safeguard and its remaining large-model limitations. - State that messaging conflicts abort rebuild before backup or deletion, leaving the original sandbox intact. - Link the agent-runnable value benchmark from the contributor task index. - Synchronize generated agent command variants. - Validate with `npm run docs:sync-agent-variants` and `npm run docs`; Fern completed with 0 errors and 2 existing warnings. - Source summary: - [NVIDIA#6020](NVIDIA#6020) and [NVIDIA#5876](NVIDIA#5876) -> `docs/about/release-notes.mdx`: Consolidate the OpenShell 0.0.72 policy boundary and managed MCP lifecycle. - [NVIDIA#6251](NVIDIA#6251) and [NVIDIA#5989](NVIDIA#5989) -> `docs/about/release-notes.mdx`: Summarize progressive tool disclosure and sandbox-first inference controls. - [NVIDIA#6232](NVIDIA#6232), [NVIDIA#6082](NVIDIA#6082), [NVIDIA#6219](NVIDIA#6219), [NVIDIA#6214](NVIDIA#6214), [NVIDIA#6215](NVIDIA#6215), [NVIDIA#6230](NVIDIA#6230), and [NVIDIA#6260](NVIDIA#6260) -> `docs/about/release-notes.mdx`: Summarize the experimental LangChain Deep Agents Code status, secret, version, rebuild, snapshot, and MCP boundaries. - [NVIDIA#6166](NVIDIA#6166), [NVIDIA#6254](NVIDIA#6254), [NVIDIA#6265](NVIDIA#6265), [NVIDIA#6164](NVIDIA#6164), and [NVIDIA#6017](NVIDIA#6017) -> `docs/about/release-notes.mdx`: Summarize BuildKit prebuild, validated image reuse, bounded readiness, and preflight improvements. - [NVIDIA#6150](NVIDIA#6150) -> `docs/about/release-notes.mdx` and `docs/reference/troubleshooting.mdx`: Separate unreachable-resolver remediation from reachable-but-rejected DNS responses. - [NVIDIA#6234](NVIDIA#6234) -> `docs/about/release-notes.mdx`, `docs/inference/use-local-inference.mdx`, and `docs/get-started/windows-preparation.mdx`: Document N1X automatic 9B selection and the remaining explicit-large-model boundary. - [NVIDIA#6129](NVIDIA#6129), [NVIDIA#5987](NVIDIA#5987), [NVIDIA#5955](NVIDIA#5955), and [NVIDIA#6220](NVIDIA#6220) -> `docs/about/release-notes.mdx`, `docs/manage-sandboxes/messaging-channels.mdx`, `docs/reference/commands.mdx`, and `docs/reference/commands-nemohermes.mdx`: Document messaging policy persistence, status, and the pre-destructive conflict check. - [NVIDIA#5963](NVIDIA#5963), [NVIDIA#6050](NVIDIA#6050), [NVIDIA#6094](NVIDIA#6094), [NVIDIA#6238](NVIDIA#6238), [NVIDIA#5988](NVIDIA#5988), [NVIDIA#6235](NVIDIA#6235), [NVIDIA#6181](NVIDIA#6181), and [NVIDIA#5986](NVIDIA#5986) -> `docs/about/release-notes.mdx`, `docs/reference/commands.mdx`, and `docs/reference/commands-nemohermes.mdx`: Summarize day-two recovery and clarify retained-volume and local-only destroy semantics. - [NVIDIA#6200](NVIDIA#6200), [NVIDIA#6248](NVIDIA#6248), [NVIDIA#6168](NVIDIA#6168), [NVIDIA#6270](NVIDIA#6270), and [NVIDIA#5649](NVIDIA#5649) -> `docs/about/release-notes.mdx` and `CONTRIBUTING.md`: Summarize contributor setup and verification improvements and expose the advisory value benchmark. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [x] Doc only (includes code sample changes) ## Quality Gates <!-- Check exactly one tests line and one docs line. Check other lines when applicable. Add every requested justification or approval reference. --> - [ ] Tests added or updated for changed behavior - [ ] Existing tests cover changed behavior — justification: - [x] Tests not applicable — justification: documentation-only release preparation; generated-variant synchronization and the Fern docs build validate the changed pages and routes. - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [ ] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [ ] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Verification <!-- Check each applicable item only when supported by the requested evidence. Run targeted tests once per relevant change set and rerun after later edits or hook autofixes that can affect the tested behavior. Do not rerun hook-covered checks. --> - [x] PR description includes the DCO sign-off declaration and every commit appears as `Verified` in GitHub - [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or `npm run check:diff` passed when hooks were skipped or unavailable - [x] Targeted behavior tests pass for the current change set, or tests are marked not applicable above — command/result or justification: tests are not applicable to this documentation-only change; `npm run docs` validates the source and generated routes. - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — command/result: - [x] Quality Gates section completed with required justifications or waivers - [x] No secrets, API keys, or credentials committed - [ ] `npm run 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) --- <!-- DCO sign-off is required in this PR description, and every commit must appear as Verified in GitHub. Run: git config user.name && git config user.email --> Signed-off-by: Aaron Erickson <aerickson@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Expanded setup guidance for Windows on Arm devices with safer default local model selection. * Clarified local inference and sandbox messaging behavior, including conflict checks before rebuilds and safer recovery steps. * Updated destroy/rebuild/reference docs with more detailed warnings, failure handling, and volume-retention guidance. * Improved troubleshooting instructions for Docker DNS issues with clearer paths for unreachable vs. blocked resolvers. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
Summary
The
nemoclaw onboardpreflight printed its✓/⚠/✗check lines in the default terminal color, so warnings and failures were visually indistinguishable from passing checks in the lengthy preflight output. This colors⚠warnings yellow and✗failures red (passing✓/INFO lines stay default), making problems easy to spot.Related Issue
Fixes #6004
Changes
src/lib/cli/terminal-style.ts: addwarnLine()/failLine()helpers (⚠yellow,✗red). Color is auto-suppressed via the existinguseColorgate (!NO_COLOR && stdout.isTTY), soNO_COLOR=1and non-TTY/CI output stay plain text with no escape sequences — satisfying the issue'sNO_COLORrequirement with no new gating.src/lib/onboard/bridge-dns-preflight.ts+src/lib/onboard/sandbox-gpu-preflight.ts: route the dedicated preflight modules'⚠/✗lines through the helpers (16 sites).src/lib/cli/terminal-style.test.ts: unit tests for the colored TTY path, theNO_COLOR=1plain path, and the non-TTY plain path.Scoped to the two dedicated preflight-check modules to keep the diff reviewable and the output consistent. Passing
✓/INFO lines are intentionally left in the default color per the issue. Follow-ups (not in this PR): the few symbol warnings in theonboard.ts[1/8]block and the bare-text hard-failure lines (e.g. "Docker is not reachable") use a different output shape and can be unified separately.Type of Change
Quality Gates
useColorgate), no control-flow/exit-code change. The two modules' 24 existing unit tests still pass (non-TTY → plain text, unchanged), plus new color/NO_COLOR/non-TTY tests.Verification
Verifiedin GitHubnpx prek run --from-ref main --to-ref HEADpassesnpm testpasses (broad runtime changes only)npm run docsbuilds without warnings (doc changes only)Signed-off-by: Jason Ma jama@nvidia.com
Summary by CodeRabbit
warnLine/failLinehelpers for consistent⚠/✗CLI preflight formatting.NO_COLOR/limited-color conditions.