fix(cli): stop compile test hanging on npm audit - #7396
Merged
Conversation
macko911
marked this pull request as ready for review
September 4, 2026 08:50
The test shells out to a real `npm i`. npm's audit step POSTs to the registry and can leave that socket open after the install itself has finished, and the child process then never exits. The 20s test timeout hits and `npm run test:cli` fails on unrelated PRs. It reproduces on every local run but only intermittently in CI, which is why the test has been flaking rather than failing outright. Skipping audit fixed it on every attempt.
macko911
force-pushed
the
matej/fix-cli-compile-test-npm-audit-hang
branch
from
September 4, 2026 08:52
8a94d2b to
aca6190
Compare
marcindobry
approved these changes
Sep 4, 2026
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.
Problem
compile.unit.cli-test.ts > should compile a minimal integrationtimes out at 20s and failsnpm run test:clion unrelated PRs — this run, plus the #7391 merge-queue run and several other branches.The test shells out to a real
npm i. npm's audit step POSTs to the registry and can leave that socket open after the install itself has finished, so the child process never exits. It reproduces on every local run but only intermittently in CI, which is why the test has been flaking rather than failing outright.Solution
--no-audit --no-fundto thenpm ithe test runs, so the child exits when the install does.Testing
Plain
npm ihung on all five local attempts (up to a 300s timeout);--no-auditpassed on all three;--no-fundalone still hung. The file now passes 30/30 in ~3s.