Skip to content

fix(cli): stop compile test hanging on npm audit - #7396

Merged
marcindobry merged 1 commit into
masterfrom
matej/fix-cli-compile-test-npm-audit-hang
Sep 4, 2026
Merged

fix(cli): stop compile test hanging on npm audit#7396
marcindobry merged 1 commit into
masterfrom
matej/fix-cli-compile-test-npm-audit-hang

Conversation

@macko911

@macko911 macko911 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Problem

compile.unit.cli-test.ts > should compile a minimal integration times out at 20s and fails npm run test:cli on 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

  • Pass --no-audit --no-fund to the npm i the test runs, so the child exits when the install does.

Testing

Plain npm i hung on all five local attempts (up to a 300s timeout); --no-audit passed on all three; --no-fund alone still hung. The file now passes 30/30 in ~3s.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@macko911
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
macko911 force-pushed the matej/fix-cli-compile-test-npm-audit-hang branch from 8a94d2b to aca6190 Compare September 4, 2026 08:52
@macko911
macko911 requested a review from a team September 4, 2026 09:22
@marcindobry
marcindobry added this pull request to the merge queue Sep 4, 2026
Merged via the queue into master with commit 316b051 Sep 4, 2026
37 checks passed
@marcindobry
marcindobry deleted the matej/fix-cli-compile-test-npm-audit-hang branch September 4, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants