When upgrading Electron, keep runtime and native-module rebuild settings aligned in the same change:
- Update
devDependencies.electroninpackage.json. - Align
@types/nodeinpackage.jsonto the bundled Node.js major for the target Electron release. - Bump the fallback target version in
bin/rebuild-node-pty.cjs. - Adjust
app/package.jsonif runtime dependencies (for example,node-pty) need a compatibility bump for the new Electron Application Binary Interface (ABI). - If CI rebuilds native modules, align
.github/workflows/nodejs.ymlNODE_VERSIONand any architecture-specific Node bootstrap downloads to the same Node.js major family. - Run
bun installto validate snapshot generation,install-app-deps, andnode-ptyrebuilding before running the remaining gates. - The installation pipeline intentionally invokes
node bin/copy-node-modules.mjsduring postinstall. Bun remains the default runner elsewhere, but Node's native copy path is currently the stable option for mirroring largenode_modulestrees on Linux/Windows Subsystem for Linux (WSL) afterinstall-app-deps.
Current repository runtime baseline after roadmap item 1.4.13:
electronandelectron-mksnapshot:^40.2.1@types/node:^24.10.12- CI workflow
NODE_VERSION:24.11.1
CI Python/node-gyp baseline after roadmap item 1.4.15 macOS scope:
- In CI jobs that prepare native-module builds, create a per-job Python virtual
environment for node-gyp bootstrap packages instead of running system-level
pip install. - Install
pip,packaging, andsetuptoolsinside that virtual environment, then setPYTHONandnpm_config_pythonto the virtual-environment interpreter path for the install/rebuild steps that need node-gyp. - Keep
npm_config_node_gypaligned to the workspacenode-gypentrypoint in the same job, so Python and node-gyp resolution stay deterministic. - Run this isolated Python bootstrap before
bun install; this keeps hosted macOS lanes compliant with Python Enhancement Proposal (PEP) 668 (externally-managed-environment) and avoids host-level Python mutation.
Linux runtime reliability baseline after roadmap item 1.4.15 Linux scope:
- Linux ARM CI coverage is Linux aarch64 only; do not reintroduce armv7
(
armv7l) lanes or release artefact targets. - Prefer native ARM runners for Linux aarch64 CI lanes instead of emulated copy-to-image flows, which previously failed with disk-exhaustion errors.
- Keep Linux dependency installation shared via
.github/actions/install-linux-e2e-runtime-deps/action.ymlso fast-lane and deep-lane jobs stay in sync. - Before running
bun installon Linux aarch64 CI lanes, provisionqemu-x86_64-static, add theamd64dpkg architecture, and install the required x86_64 runtime libraries (libc6,libstdc++6,libgcc-s1,libglib2.0-0,libexpat1, andlibpcre2-8-0) so Electron's x64mksnapshotandv8_context_snapshot_generatorbinaries can run. - On Ubuntu arm runners that default to
ports.ubuntu.com, use explicit apt source entries (portsforarm64andarchive.ubuntu.complussecurity.ubuntu.comforamd64) before installing:amd64packages. Otherwise, apt tries to resolveamd64indexes fromportsand fails with404 Not Found. Keep this source pinning for all later apt invocations in the same job after addingamd64; the Linux dependency installation action now applies it automatically when it detects an Ubuntu arm64 host withamd64multiarch enabled. - The shared Linux dependency installation action resolves the
Advanced Linux Sound Architecture (ALSA) runtime package by availability
(
libasound2t64on newer Ubuntu releases,libasound2on Ubuntu 22.04) so the same workflow configuration works across Jammy and Noble runners. - After provisioning amd64 runtime packages on Linux aarch64 CI lanes, export
QEMU_LD_PREFIX=/so Quick Emulator (QEMU) resolves x86_64 shared libraries from the host multiarch rootfs. - For Linux aarch64 CI lanes, set
SKIP_V8_SNAPSHOT=1duringbun installso snapshot generation cannot stall install for hours under emulation. - For Linux aarch64 CI lanes, set
SKIP_NODE_PTY_REBUILD=1duringbun installso the lane does not hang in long-runningnode-gypElectron header extraction fornode-pty; keepnpm_config_node_gypand Python toolchain wiring in place for the remaining native-module install steps. - When Linux aarch64 CI lanes package artefacts after install-time snapshot
skipping, set
SKIP_V8_SNAPSHOT_COPY=1for the packaging step, so CI uses Electron's default snapshots instead of waiting on arm64 custom snapshot generation that can stall under QEMU. - For local Linux aarch64 validation where snapshots are still required, set
SKIP_X64_V8_SNAPSHOT=1to avoid generating the additional x64 snapshot pass under QEMU. - For Linux aarch64 native-module rebuild reliability, run
bun installbefore other gates and keepnpm_config_node_gyppointed at the workspacenode-gypentrypoint in CI jobs that rebuild native modules.
Windows runtime reliability baseline after roadmap item 1.4.15 Windows scope:
- Keep Windows CI on
windows-2022(x64) in the shared build matrix and run Windows install in a dedicated workflow step. This retains Visual Studio 2022 until Electron's node-gyp recognizes the Visual Studio 2026 toolchain used bywindows-latest. - Run
.github/scripts/setup-node-gyp-python.sh"$RUNNER_TEMP/node-gyp-python"beforebun install, then setPYTHON,npm_config_python, andnpm_config_node_gypfrom step outputs for the install step. - Windows CI run
22405749378(2026-02-25) exposed a native rebuild failure inInstall (Windows):bun installcan fail withExecutable not found in $PATH: "node-gyp.cmd". - Mitigate this Windows-only failure mode by running
bun install --ignore-scriptsbefore the fullbun install, then prependingnode_modules/.bintoPATHsonode-gyp.cmdis available during native rebuild. - Do not use
npm installfor this bootstrap in this repository: npm can fail early on the repository override graph (Override without name) before Bun install starts. - After the scriptless Bun bootstrap, ensure
node_modules/.bin/node-gyp.cmdexists. Bun's Windows package shim can exposenode-gypwithout the.cmdwrapper; create a minimalnode-gyp.cmdlauncher that delegates to..\node-gyp\bin\node-gyp.jsbefore runningbun install. - For Windows install, map
TMP,TEMP, andnpm_config_tmpto${{ runner.temp }}sonode-gypextraction uses a deterministic writable path instead of the short-name%LOCALAPPDATA%alias. bin/download-mksnapshot.jsnow retries transient artefact download failures (for example,ECONNRESET, timeout/DNS errors, and 5xx/429 responses) with exponential backoff before failing the installation.- Tune retry behaviour with
MKSNAPSHOT_DOWNLOAD_RETRY_ATTEMPTS(default4) andMKSNAPSHOT_DOWNLOAD_RETRY_DELAY_MS(default1000) when debugging unstable network environments. - Keep
npm_config_node_gypin the forward-slash form used by theInstall (Windows)step in.github/workflows/nodejs.yml:${{ github.workspace }}/node_modules/node-gyp/bin/node-gyp.js. Preserve this forward-slashnpm_config_node_gypvalue to avoid introducing path-separator regressions. - Keep
bin/rebuild-node-pty.cjsrunning node-gyp through the Node executable (NODEenvironment variable when present, otherwisenodeonPATH), notprocess.execPath. CI runs this script via Bun; invoking node-gyp with Bun can trigger Windows header-extractionEINVALfailures. - Keep repository script/config text files normalized to LF in
.gitattributesfor extensions checked by Biome (*.json,*.jsonc,*.js,*.cjs,*.mjs,*.ts, and*.tsx). Windows checkout can otherwise convert those files to CRLF and tripmake lint/Biome formatting checks. - Windows aarch64 CI is currently blocked by upstream Bun distribution support.
Evidence (captured 2026-02-25): latest Bun release
bun-v1.3.9(published 2026-02-08) includesbun-windows-x64*assets and no Windows arm64 asset. - Mitigation and ownership are tracked in
WINARM64-001indocs/tracking-issues.md(issue: #35, owner:@leynos). Re-evaluate lane enablement when a Bun release publishes a Windows arm64 artefact andsetup-bunsupports it.
When preparing future Electron upgrades, update these anchors together and avoid merging partial baseline updates.