fix(cli): isolate install.sh tests from nve home - #300
Closed
cursor[bot] wants to merge 1 commit into
Closed
Conversation
Signed-off-by: Cursor Agent <cursoragent@cursor.com>
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Failed run
9577c5caedab286236b4526f26c9b32654cb4846(chore(ci): update svgo)main)ci/ Run CI checksFirst causal error
projects/cli:test:coverage—src/install.test.ts > install.sh > should verify checksum and execute downloaded nve installspawnSync(canonicalPath, ['--version'])returnedstatus: nullafterinstall.shitself 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()spreadprocess.envinto theinstall.shchild, so a parentNVE_HOMEdiverted the fake bootstrap to$NVE_HOME/bin/nvewhile the test asserted$HOME/.nve/bin/nve. Missing file →spawnSyncENOENT→status: null.Reproduced locally:
NVE_HOMEis set in the parent (ENOENTon$HOME/.nve/bin/nve)Another test in the same file (
should install with default options from process environment) mutatesprocess.env.NVE_HOMEand copiesprocess.execPath. That test retried at 6322ms against a 5s default timeout, so a leakedNVE_HOMEcan overlap laterinstall.shtests.Previous successful main CI: https://github.com/NVIDIA/elements/actions/runs/34489543201 (
2c79c023). No open PR already covers this signature.Fix
NVE_HOMEfrom the env passed toinstall.shso the script usesHOMENVE_HOMEspawnSyncerror text on failureValidation
NVE_HOME(30x)NVE_HOME(pre-fix)CI=true pnpm run test -- src/install.test.tsCI=true pnpm run test:coverage(cli)CI=true pnpm run lint(cli)CI=true pnpm run ci(cli)prettier --check projects/cli/src/install.test.tsgit diff --checkFull-repo
pnpm run cicould not be used as a green signal in this VM: visual suites fail with pngjsunrecognised content at end of streamon Git LFS baselines (scene/themes/styles). The GitHub Actions run under investigation completed visual jobs; onlyprojects/cli:test:coveragefailed.Remaining risk
If other tests still mutate
process.envfor installer behavior, they can affect any helper that still spreads the parent env.runInstalleris now isolated. A GitHub Actions rerun of34522057605is not a substitute for this fix.