NEC-108: The pnpm store cache has never restored anything #180

Merged
nectenda-agent merged 2 commits from worktree-nec-108-the-pnpm-store-cache-has-never-restored into main 2026-09-26 07:15:27 +01:00
Collaborator

Task: NEC-108 — https://projectron.nerchure.com/tasks/108

CI's pnpm cache has restored a directory pnpm never reads since pnpm 12: on the runner the workspace is its own volume, so pnpm puts its store in node_modules/.pnpm-store (pnpm CHANGELOG, 12.0.0) while the cache restored ~/.local/share/pnpm/store — a reported hit, reused 0, 726 packages downloaded every run. A new composite action, .forgejo/actions/pnpm-install, asks 'pnpm store path' where the store is, caches that under a new key (prefix pnpm-store-, plus the store layout dir), installs, and then fails if node_modules/.modules.yaml records a different store than the one cached (scripts/pnpm-store-check.mjs, unit-tested and mutation-checked). It replaces the three copies in ci.yml, obsidian-e2e and checkpoint-soak (the card said four; there were three). Proof that the cache now restores needs a second run: build and e2e run in parallel, so the first run can only save.

Spec: docs/changes/NEC-108-pnpm-store-cache/spec.md

Changelog

NONE

Task: NEC-108 — https://projectron.nerchure.com/tasks/108 CI's pnpm cache has restored a directory pnpm never reads since pnpm 12: on the runner the workspace is its own volume, so pnpm puts its store in node_modules/.pnpm-store (pnpm CHANGELOG, 12.0.0) while the cache restored ~/.local/share/pnpm/store — a reported hit, reused 0, 726 packages downloaded every run. A new composite action, .forgejo/actions/pnpm-install, asks 'pnpm store path' where the store is, caches that under a new key (prefix pnpm-store-, plus the store layout dir), installs, and then fails if node_modules/.modules.yaml records a different store than the one cached (scripts/pnpm-store-check.mjs, unit-tested and mutation-checked). It replaces the three copies in ci.yml, obsidian-e2e and checkpoint-soak (the card said four; there were three). Proof that the cache now restores needs a second run: build and e2e run in parallel, so the first run can only save. Spec: `docs/changes/NEC-108-pnpm-store-cache/spec.md` ## Changelog NONE
Since pnpm 12, a project whose directory cannot hard-link to the home store
gets its store in node_modules/.pnpm-store. The runner's workspace is its own
volume, so every install went through that store while the cache restored
~/.local/share/pnpm/store: a reported hit, reused 0, every package downloaded.

One composite action now asks `pnpm store path` where the store is, caches
that under a new key prefix that also names the store layout, installs, and
fails if node_modules/.modules.yaml records a different store. It replaces
the three copies in ci.yml, obsidian-e2e and checkpoint-soak.

Task: NEC-108

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Y4mHPEQ29DHbyhjGHHF9g
Say how the cache fix is proved, and run the nightly when the action changes
All checks were successful
Release note / release-note (pull_request) Successful in 15s
CI / build (pull_request) Successful in 4m52s
e2e / multi (push) Successful in 4m53s
CI / e2e (pull_request) Successful in 5m39s
CI / promote (pull_request) Has been skipped
418450595d
The first run cannot show a restore: build and e2e run in parallel and both
miss the new key. The guard passes whether or not anything was saved, so the
spec now names the log lines that are the evidence. The nightly's path filter
gains the new action, which is now part of its setup.

Task: NEC-108

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Y4mHPEQ29DHbyhjGHHF9g
cruelacid force-pushed worktree-nec-108-the-pnpm-store-cache-has-never-restored from 418450595d
All checks were successful
Release note / release-note (pull_request) Successful in 15s
CI / build (pull_request) Successful in 4m52s
e2e / multi (push) Successful in 4m53s
CI / e2e (pull_request) Successful in 5m39s
CI / promote (pull_request) Has been skipped
to 2632c0313a
All checks were successful
Release note / release-note (pull_request) Successful in 13s
CI / build (pull_request) Successful in 4m37s
CI / e2e (pull_request) Successful in 5m14s
CI / promote (pull_request) Has been skipped
e2e / multi (push) Successful in 4m39s
CI / build (push) Successful in 5m10s
CI / e2e (push) Successful in 5m26s
CI / promote (push) Successful in 30s
2026-09-26 07:09:27 +01:00
Compare
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Nectenda/nectenda!180
No description provided.