From d6f6a9afa01116114655940b1a109e70c6fb2e17 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Fri, 11 Sep 2026 17:19:55 +0200 Subject: [PATCH 1/3] fix(ci): keep the nightly's pnpm store off the runner's pnpm install The two Windows nightly jobs share one persistent win-signing runner, and both re-download the whole dependency tree from npm on every run, twice. That download is what fails: a tarball fetch timeout on Sep 9, hundreds of connection resets on Sep 10, and a store import error against a half-written store on Sep 11, after which the arm64 job built against the incomplete tree and share-theme's esbuild step reported 43 missing files. pnpm derives its store from PNPM_HOME, which pnpm/action-setup points at /node_modules/.bin, so the store sits inside the directory the action reinstalls on every run and starts empty. The last green run reports "reused 0, downloaded 2284"; the Sep 11 failure reports "reused 269". Pin the store to C:\pnpm-store on Windows so it survives between jobs, and copy packages out of it rather than hardlinking, because the better-sqlite3 rebuild and electron-forge's pruning both write into node_modules. "Update nightly version" rewrites the version field of six workspace manifests, so the next `pnpm run` re-installs the whole workspace before running the script it was asked for. That second install shows up under `chore:update-build-info` in every Windows job, the green one included. The dependency graph is unchanged and `pnpm install --frozen-lockfile` has already run, so turn the check off for the job. The npm_config_package_import_method this replaces never applied: pnpm 12 reads PNPM_CONFIG_*, not npm_config_*. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/nightly.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 6f3cb7cbb9..19678e38f3 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -65,19 +65,33 @@ jobs: shell: bash forge_platform: linux runs-on: ${{ matrix.os.image }} + env: + # "Update nightly version" rewrites the version field of six workspace manifests, which + # makes the next `pnpm run` re-install the whole workspace even though the dependency + # graph is unchanged. "Install dependencies" below is the authoritative install. + PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN: "false" steps: - uses: actions/checkout@v7 with: persist-credentials: false - uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 + # pnpm derives its store from PNPM_HOME, which pnpm/action-setup points inside the + # directory it reinstalls on every run. The win-signing runner is persistent, so the + # store has to sit somewhere that survives between jobs, and packages have to be copied + # out of it: rebuilding better-sqlite3 and electron-forge's pruning both write into + # node_modules, which a hardlink would carry back into the shared store. + - name: Keep the pnpm store outside the pnpm installation + if: ${{ matrix.os.name == 'windows' }} + shell: powershell + run: | + Add-Content -Path $env:GITHUB_ENV -Value "PNPM_CONFIG_STORE_DIR=C:\pnpm-store" + Add-Content -Path $env:GITHUB_ENV -Value "PNPM_CONFIG_PACKAGE_IMPORT_METHOD=copy" - name: Set up node & dependencies uses: actions/setup-node@v7 with: node-version: 24 - name: Install dependencies run: pnpm install --frozen-lockfile - env: - npm_config_package_import_method: copy - name: Update nightly version run: pnpm run chore:ci-update-nightly-version - name: Run the build From 7b3e2bdeece348015c392072062beb121a43d484 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Fri, 11 Sep 2026 17:30:58 +0200 Subject: [PATCH 2/3] fix(ci): run the nightly's pnpm steps through the platform's own shell Under pnpm/action-setup 6.1.0's pnpm 12 bootstrap, `pnpm` invoked from PowerShell on the win-signing runner writes nothing and exits 0 without installing anything. The same command under cmd works, which is why the build step's implicit re-install was the only install the Windows jobs had been getting since that bump, and why "Update nightly version" has been leaving the version field untouched there. So the previous commit removed the install that was actually running, and the build failed on `'tsx' is not recognized`. Take the job's default shell from the matrix, so the two job-level pnpm steps use cmd on Windows and bash elsewhere, matching what build-electron already does. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/nightly.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 19678e38f3..8330fbd510 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -65,6 +65,12 @@ jobs: shell: bash forge_platform: linux runs-on: ${{ matrix.os.image }} + defaults: + run: + # Under pnpm/action-setup's pnpm 12 bootstrap, `pnpm` invoked from PowerShell on the + # win-signing runner exits 0 without running anything, so the steps below have to + # reach it through the same shell the build uses. + shell: ${{ matrix.os.shell }} env: # "Update nightly version" rewrites the version field of six workspace manifests, which # makes the next `pnpm run` re-install the whole workspace even though the dependency From 3ec854f96738d8e3c152b65dfc7bb373fe127067 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Fri, 11 Sep 2026 17:46:27 +0200 Subject: [PATCH 3/3] fix(ci): give the release build the same shell as the nightly make-electron runs on the same win-signing runner, where `pnpm` invoked from PowerShell under pnpm/action-setup's pnpm 12 bootstrap exits 0 without installing anything. The job has not run since that bootstrap landed, the last release being v0.105.0 on Aug 19, so the next tag push would have hit what the nightly hit. Unlike the nightly this job never rewrites the workspace versions, so it never triggered the implicit re-install that was covering for the dead install step, and setup-node already caches its store. The shell is the only part it needs. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/release.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d1dad6d76a..c37646ed7b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -66,6 +66,12 @@ jobs: shell: bash forge_platform: linux runs-on: ${{ matrix.os.image }} + defaults: + run: + # Under pnpm/action-setup's pnpm 12 bootstrap, `pnpm` invoked from PowerShell on the + # win-signing runner exits 0 without running anything, so the steps below have to + # reach it through the same shell the build uses. + shell: ${{ matrix.os.shell }} steps: - uses: actions/checkout@v7 with: