Skip to content

fix(extension): give the app's Vite build a 4 GB heap (Closes #2201) - #2202

Merged
bc037 merged 1 commit into
mainfrom
fix/2201-app-build-heap
Dec 2, 2026
Merged

bc037 merged 1 commit into
mainfrom
fix/2201-app-build-heap

Conversation

@bc037

@bc037 bc037 commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Related Issue

Closes #2201

Description

vsix-gate failed at random. The app's Vite build (bun run build, run in Node) ran out of memory at Node's default heap of about 2 GB. The logs show JavaScript heap out of memory at 2025 MB and 2028 MB, then SIGABRT. The build peaks near the limit, so some runs pass and some fail. Evidence: runs 46968852814 and 46508428057, and three failures on PR #2194.

Fix. build_app_bundle.mjs passes NODE_OPTIONS=--max-old-space-size=4096 to the Vite build step only. The new withHeapLimit helper (scripts/build_app_heap.mjs) keeps other NODE_OPTIONS flags and does not override a limit the caller already set. The deploy_guard fixture copies the helper next to the script, because it copies the script files one by one.

Changes: scripts/build_app_heap.mjs (new), scripts/build_app_bundle.mjs, test/build_app_heap.test.ts (new, written first), test/deploy_guard.test.ts (fixture).

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Config / infrastructure (CI, tooling, build, docs)
  • Breaking change (fix or feature that changes existing behavior)

Verification

  • pnpm -r run build exits 0
  • pnpm -r run test exits 0 (or pnpm -r run typecheck if tests aren't relevant)
  • Manual testing described below

pnpm -r run typecheck passes. The new test failed before the helper existed and passes now (4 tests). deploy_guard.test.ts passes (41 tests). I ran only these two test files locally. CI runs the full suite.

Manual Testing Notes

  • The flake cannot be reproduced on demand. One green run does not prove the fix. Issue ci: vsix-gate fails at random (app build runs out of memory) #2201 asks for vsix-gate to pass on repeated runs, and I will check that after the merge.
  • Not proven: the Vite build's real peak heap. The 4 GB limit is a margin over the 2 GB limit that failed. The runner has more memory than that.

🤖 Generated with Claude Code

vsix-gate failed at random: the app's Vite build (bun run build, in Node) ran
out of memory at the default ~2 GB heap ("JavaScript heap out of memory" at
about 2025 MB, then SIGABRT). The build peaks near that limit, so some runs
passed and some failed.

build_app_bundle.mjs now passes NODE_OPTIONS=--max-old-space-size=4096 to the
build step only, through withHeapLimit (new build_app_heap.mjs). It keeps other
NODE_OPTIONS flags and does not override a limit the caller already set. The
deploy_guard fixture copies the new helper next to the script.

Refs #2201

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6e578e34-253a-445f-963a-31f520bcf7ac
  • 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

@bc037
bc037 marked this pull request as ready for review December 2, 2026 21:31
@bc037
bc037 merged commit e1d054b into main Dec 2, 2026
11 checks passed
@bc037
bc037 deleted the fix/2201-app-build-heap branch December 2, 2026 21:31
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.

ci: vsix-gate fails at random (app build runs out of memory)

2 participants