Skip to content

fix(cli): isolate install.sh tests from nve home - #300

Closed
cursor[bot] wants to merge 1 commit into
mainfrom
topic/fix-nightly-ci-cli-install-env
Closed

fix(cli): isolate install.sh tests from nve home#300
cursor[bot] wants to merge 1 commit into
mainfrom
topic/fix-nightly-ci-cli-install-env

Conversation

@cursor

@cursor cursor Bot commented Sep 10, 2026

Copy link
Copy Markdown

Failed run

First causal error

projects/cli:test:coveragesrc/install.test.ts > install.sh > should verify checksum and execute downloaded nve install

AssertionError: expected null to be +0 // Object.is equality
 ❯ src/install.test.ts:710:33

spawnSync(canonicalPath, ['--version']) returned status: null after install.sh itself exited 0. Vitest retried once and failed again. The triggering commit only updated SVGO / lockfile and did not touch the CLI installer.

Root cause

runInstaller() spread process.env into the install.sh child, so a parent NVE_HOME diverted the fake bootstrap to $NVE_HOME/bin/nve while the test asserted $HOME/.nve/bin/nve. Missing file → spawnSync ENOENTstatus: null.

Reproduced locally:

  • 0/30 failures with a clean env
  • 30/30 failures when NVE_HOME is set in the parent (ENOENT on $HOME/.nve/bin/nve)

Another test in the same file (should install with default options from process environment) mutates process.env.NVE_HOME and copies process.execPath. That test retried at 6322ms against a 5s default timeout, so a leaked NVE_HOME can overlap later install.sh tests.

Previous successful main CI: https://github.com/NVIDIA/elements/actions/runs/34489543201 (2c79c023). No open PR already covers this signature.

Fix

  • Delete NVE_HOME from the env passed to install.sh so the script uses HOME
  • Assert the installer does not write under a diverted NVE_HOME
  • Report spawnSync error text on failure
  • Raise the default-options test timeout to 30s so copying the Node binary does not trip the 5s limit

Validation

Command Result
Standalone installer loop without NVE_HOME (30x) 0 failures
Same loop with parent NVE_HOME (pre-fix) 30/30 ENOENT
CI=true pnpm run test -- src/install.test.ts 52 passed
Isolated checksum test ×5 passed
CI=true pnpm run test:coverage (cli) 197 passed
CI=true pnpm run lint (cli) passed
CI=true pnpm run ci (cli) passed
prettier --check projects/cli/src/install.test.ts passed
git diff --check passed

Full-repo pnpm run ci could not be used as a green signal in this VM: visual suites fail with pngjs unrecognised content at end of stream on Git LFS baselines (scene/themes/styles). The GitHub Actions run under investigation completed visual jobs; only projects/cli:test:coverage failed.

Remaining risk

If other tests still mutate process.env for installer behavior, they can affect any helper that still spreads the parent env. runInstaller is now isolated. A GitHub Actions rerun of 34522057605 is not a substitute for this fix.

Open in Web View Automation 

Signed-off-by: Cursor Agent <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 513bc707-377e-4f3b-9d18-f9ed5f6aaea8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

@cursor
cursor Bot marked this pull request as ready for review September 10, 2026 20:10
@coryrylan coryrylan closed this Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants