Skip to content

Add strict completed pnpm dependency cache modes - #13

Merged
Harold Hunt (huntharo) merged 2 commits into
mainfrom
feat/completed-pnpm-cache
Oct 4, 2026
Merged

Harold Hunt (huntharo) merged 2 commits into
mainfrom
feat/completed-pnpm-cache

Conversation

@huntharo

@huntharo Harold Hunt (huntharo) commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

p-map-iterable needs one producer to populate a completed pnpm dependency tree and consumers to restore it without installing dependencies or running lifecycle scripts. v1.5.0 caches the pnpm download store and intentionally installs on ordinary cache hits. Native pnpm 12 also ignores the existing npm_config_store_dir spelling during store discovery.

This adds opt-in dependency-cache: node-modules with explicit cache-mode: populate and cache-mode: restore. A warm producer probes only; a cold producer performs a frozen install, verifies unchanged lock bytes and installation inputs, writes Node major/ABI metadata, and saves inline. A post-save exact probe prevents cache-service warnings from allowing a producer to succeed without an entry. Strict consumers fail on exact misses or incompatible metadata and never install, repair, or save dependencies.

The new cache-key output uses the same deterministic key for producers and consumers. Completed trees have a distinct format namespace; compatibility includes Node major, exact pnpm pin, OS/architecture, stable ImageOS, normalized directory, full installation-input hashes, action source revision, and caller policy. ImageVersion and operational role are excluded. cache-inputs accepts additional installation files. Both pnpm store environment spellings are exported and actual discovery is checked against the selected workspace store. Subdirectory keys include inherited repository policy, and cold populations discard materialized trees before installing. The default pnpm store contract remains intact; completed mode currently requires an exact pnpm pin.

Validation Evidence
Unit and action-script tests 108 passed locally, including executed strict guards and failed/changed-lock population
Workflow schema actionlint passed
Native pnpm 12 store discovery/install Node 24.21.0/pnpm 12.7.0 on macOS used the workspace .pnpm-store/v11; allowed esbuild lifecycle completed
Hosted default fixtures Passed all 12 Linux/macOS/Windows npm, Yarn, pnpm 10.33.0 and pnpm 12.7.0 jobs
Hosted completed-tree fixtures Passed 6 producer jobs and 6 fresh-job consumer jobs across Linux/macOS/Windows; pnpm 12 negative paths, native esbuild, and release manifest mutation passed

The new pnpm 12 fixture uses portable import settings and permitted esbuild tooling; pnpm 10.33.0 and its default-store regression remain covered. README documents the supported contract and producer/consumer API, including the caller requirement to disable pnpm verification before later consumer scripts.

This PR changes only configure-nodejs. p-map-iterable's direct-call migration and combined CI remain separate acceptance work. The intended release is v1.6.0 after this change is reviewed and validated.

Validated immutable commit: e829954c87c2c195ee071a8edeaf270efeffcc0e. GitHub CI run 37236616750 passed all 31 jobs, including 108 unit/action-script tests on each supported runner OS. Compatible consumers may pin this tested SHA after upstream review; this run does not validate p-map-iterable’s pending direct-call workflows.

@huntharo
Harold Hunt (huntharo) marked this pull request as ready for review October 4, 2026 21:37
@huntharo
Harold Hunt (huntharo) merged commit 8876dbf into main Oct 4, 2026
31 checks passed
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.

1 participant