Skip to content

test(node-runtime): stop the refused-download test hanging under the bun runner (fix red main) - #30967

Merged
nwparker merged 1 commit into
mainfrom
nwparker/fix-materializer-test-retry-delay
Oct 20, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/fix-materializer-test-retry-delay

Conversation

@nwparker

@nwparker nwparker commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​22 $\color{#cf222e}{\Huge{\mathbf{−}}}$​33 $\color{#cf222e}{\Huge{\mathbf{−}}}$​11
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​5 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​3

ELI5

A test added in #30911 ("says this computer could not reach the download…") hangs for 30 s and fails in CI's bun test shard. That fails tests node 24 1/5 and 2/5 on every PR that runs them. The download really retries three times, with 1 s, 3 s and 9 s pauses. The test skipped those pauses with fake timers driven by a fixed setImmediate loop, which runs out of turns under the bun runner before the retries finish.

What Changed

  • PinnedRuntimeMaterializeOptions takes an optional retryDelaysMs, passed to downloadVerifiedArchive, which already accepted it. Production callers don't set it, so the default schedule is unchanged.
  • The test passes [0, 0, 0]: all four attempts still run, without the pauses. No fake timers.

Testing

  • pnpm test src/main/node-runtime/pinned-runtime-materializer-node.test.ts: 9 passed, three runs in a row.
  • pnpm tc:node: clean.
  • oxlint: clean.
  • Failing CI before this: runs 39355837546 and 39356046610.

…stead of faking timers

Under CI's bun runner the fake-timer loop ran out of turns before the retries finished, and the
test hung to its 30 s timeout.
@coderabbitai

coderabbitai Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9a59314b-7dc6-4590-9ce8-cbbe42da27a3
📥 Commits

Reviewing files that changed from the base of the PR and between 11b925d and a01c079.

📒 Files selected for processing: 2
  • src/main/node-runtime/pinned-runtime-materializer-node.test.ts
  • src/main/node-runtime/pinned-runtime-materializer.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

📝 Walkthrough

The materializer options now accept optional retry delays and pass them to archive downloads for runtime archives and cached executables. The offline download test uses zero retry delays instead of fake timers and still checks four fetch attempts and the offline error details.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to a01c0

The refused-download test can exercise all four attempts without the long retry pauses. No issue identified here needs to block merging.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description explains the problem, the retry-delay change, and test results. However, it omits the required Why, Linked Issue, Visual Proof or N/A, AI Disclosure, Review, boundary, Notes, and check… Complete the required template sections. Add an actual linked issue after “Fixes #”, provide the rationale in “Why”, add “N/A” with a reason for Visual Proof, complete the Testing and checklist items, and address the remaining required sect…
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly identifies the main change: preventing the refused-download test from hanging under the Bun runner. It is specific and related to the pull request.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the problem, the retry-delay change, and test results. However, it omits the required Why, Linked Issue, Visual Proof or N/A, AI Disclosure, Review, boundary, Notes, and checklist sections. The required issue link is also missing.

Resolution

Complete the required template sections. Add an actual linked issue after “Fixes #”, provide the rationale in “Why”, add “N/A” with a reason for Visual Proof, complete the Testing and checklist items, and address the remaining required sections or mark them not applicable.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@nwparker
nwparker merged commit c0202b4 into main Oct 20, 2026
43 checks passed
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.

1 participant