ci: per-job pnpm install dir to fix the host-runner setup-pnpm race #23

Merged
developer merged 1 commits from feature/ci-pnpm-setup-isolation into development 2026-05-20 15:31:12 +00:00
Owner

Problem

The post-merge ui-test run for #22 failed at the Set up pnpm step (before
any test ran) with:

ENOTEMPTY: directory not empty, rmdir '/home/runner/setup-pnpm/node_modules/.bin/store/v11/files'

pnpm/action-setup@v4 installs pnpm into the shared default ~/setup-pnpm. On
the single host-mode runner $HOME is shared across concurrent jobs, so when a
post-merge dev-deploy (deploy) and ui-test (test) — which live in different
concurrency groups — overlap, their self-installers race on that directory and
one dies with ENOTEMPTY. (The identical commit passed ui-test twice when it
did not overlap a deploy.)

Fix

Point each pnpm step's dest at ${{ runner.temp }}/setup-pnpm, a per-job
isolated directory, so concurrent jobs never share the install location.

  • The action adds dest to PATH, so actions/setup-node (cache: pnpm) and
    later pnpm calls are unaffected.
  • The pnpm package store stays shared — that is safe, pnpm locks it; the
    failure was the action's own self-install dir, not the store.

Applied to the three workflows that set up pnpm: ui-test.yaml,
dev-deploy.yaml, prod-build.yaml. No serialization / concurrency-group
change, so it cannot cancel an auto-deploy.

🤖 Generated with Claude Code

## Problem The post-merge `ui-test` run for #22 failed at the **Set up pnpm** step (before any test ran) with: ``` ENOTEMPTY: directory not empty, rmdir '/home/runner/setup-pnpm/node_modules/.bin/store/v11/files' ``` `pnpm/action-setup@v4` installs pnpm into the shared default `~/setup-pnpm`. On the single host-mode runner `$HOME` is shared across concurrent jobs, so when a post-merge `dev-deploy` (deploy) and `ui-test` (test) — which live in different concurrency groups — overlap, their self-installers race on that directory and one dies with `ENOTEMPTY`. (The identical commit passed `ui-test` twice when it did not overlap a deploy.) ## Fix Point each pnpm step's `dest` at `${{ runner.temp }}/setup-pnpm`, a per-job isolated directory, so concurrent jobs never share the install location. - The action adds `dest` to `PATH`, so `actions/setup-node` (`cache: pnpm`) and later `pnpm` calls are unaffected. - The pnpm **package store** stays shared — that is safe, pnpm locks it; the failure was the action's own self-install dir, not the store. Applied to the three workflows that set up pnpm: `ui-test.yaml`, `dev-deploy.yaml`, `prod-build.yaml`. No serialization / concurrency-group change, so it cannot cancel an auto-deploy. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
developer added 1 commit 2026-05-20 15:27:04 +00:00
ci: install pnpm into a per-job dir to fix the host-runner setup race
Tests · UI / test (push) Waiting to run
Tests · UI / test (pull_request) Successful in 1m56s
b24d53b82f
`pnpm/action-setup@v4` defaults to installing pnpm in the shared
`~/setup-pnpm`. On the single host-mode runner $HOME is shared across
concurrent jobs, so when two pnpm jobs overlap (e.g. a post-merge
`dev-deploy` and `ui-test`, which sit in different concurrency groups)
their self-installers race and one fails with
`ENOTEMPTY ... rmdir '~/setup-pnpm/node_modules/.bin/store/v11/files'`
before the tests even run.

Point each step's `dest` at `${{ runner.temp }}/setup-pnpm` (a per-job
isolated directory) so concurrent jobs never share the install location.
The action still adds `dest` to PATH, so setup-node's pnpm cache and
later `pnpm` calls are unaffected; the pnpm package store stays shared
(safe — pnpm locks it). Applied to the three workflows that set up pnpm:
ui-test, dev-deploy, prod-build.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
developer merged commit 00159ddf7c into development 2026-05-20 15:31:12 +00:00
developer deleted branch feature/ci-pnpm-setup-isolation 2026-05-20 15:31:12 +00:00
Sign in to join this conversation.