Skip to content

Add an opt-in Node.js loader install mode backed by the content-addressable store #64

Closed
pnpm/pnpm
#17318

Description

@zkochan

Goal

Add an experimental, opt-in pnpm v12 install mode that runs Node.js applications directly from the content-addressable store. Packages that can run from store files should not need a materialized package directory or a node_modules tree.

Keep the existing linker modes and defaults unchanged. Configuration should flow through pnpm's normal config layer. Decide the final setting name during integration; a dedicated store-backed linker is a candidate.

Runtime and manifest

  • Use Node's synchronous module hooks for both ESM and CommonJS, including createRequire. Require a Node version that supports these hooks.
  • Emit a versioned project manifest from the installed lockfile graph and the fetcher's existing file-to-CAS mappings. Reuse the package-map dependency graph builder. Do not maintain a separate dependency resolver for installation.
  • Preserve package snapshot identities, including peer contexts, even when their source blobs are identical. Bare imports must follow the issuer's declared dependency edges, including aliases and workspace links.
  • Resolve exports, imports, conditional exports, relative imports, JSON, and package type scopes without creating package directories. Verify blob integrity before loading code.
  • Keep store paths relocatable relative to the generated manifest where possible. Write the manifest atomically only after lockfile verification and successful fetching.

A standalone runtime prototype is being implemented in the esm-loader worktree under pnpm/esm-loader. It consumes a version 1 JSON manifest and runs ESM and CommonJS directly from SHA-512 store blobs. It is not yet connected to pnpm install. Its virtual filesystem is private to resolution; ordinary application fs calls are not redirected.

Installation integration

  • Fetch and verify packages into CAS, retain their file maps, and skip virtual-store materialization for eligible packages on both fresh-resolution and frozen-lockfile paths.
  • Extend the existing dependency-map construction rather than duplicating lockfile edge handling. Account for filtering, optional failures, production-only installs, workspace links, peer variants, patches, and aliases.
  • Disable inappropriate fast paths and early materialization in the new mode. Persist enough state to detect dependency/config/store changes and recover after interrupted installs.
  • Ensure a fresh store-backed install creates no node_modules tree. Mode transitions must not let stale loader manifests or old install state affect execution.
  • Propagate the loader into pnpm run, exec, script shortcuts, lifecycle execution where appropriate, and subprocesses. Document direct node invocation.

Binaries

  • Generate command shims for Node-based bins that preload the loader and execute the package's bin entry in its dependency context. Do not require the bin target to be exported by package.json.
  • Preserve arguments, exit codes, signals, working directories, Windows shim behavior, and the package's declared dependencies.
  • Distinguish Node scripts from native or arbitrary shell executables. Those need a materialized executable or package directory.
  • Decide where shims live so PATH integration does not require creating node_modules merely for .bin.

Builds and side-effects cache

  • Treat materialization as a package capability decision, not simply a devDependency/runtime dependency split. Most ordinary runtime packages should load directly. Development tools may work directly too.
  • A package with lifecycle scripts can still run from CAS when an applicable side-effects cache entry exists. Compose the base file index with the selected side-effects diff, applying deletions and replacements, and expose the resulting files through the loader manifest.
  • Preserve existing build authorization, platform/ABI/engine cache keys, patch identity, and side-effects integrity checks. Never run scripts merely because this mode is enabled.
  • On a permitted build cache miss, materialize a temporary build environment, execute the existing build pipeline, upload its result, and then use the resulting store files when compatible.
  • Selectively retain a materialized directory for native addons, packages reading/writing adjacent files via fs, directory scanning, unsupported symlinks, and other filesystem-dependent behavior. Native addons may also need neighboring shared libraries. A cache hit alone does not eliminate these requirements.
  • Provide explicit per-package materialization overrides. Avoid silently executing arbitrary code twice to discover whether it requires a physical directory.

Acceptance tests

  • Cold and warm installs run an app with transitive ESM/CommonJS dependencies and no node_modules or package directories.
  • Frozen/repeat installs, updates, removals, optional dependencies, aliases, workspaces, cycles, and peer-context separation work.
  • Exports/imports restrictions, custom conditions, JSON attributes, encoded paths, dynamic import, createRequire, and worker startup behave predictably.
  • Node bin shims work without materializing their packages, including on Windows.
  • A cached build output executes from CAS without rebuilding; an authorized cache miss builds and then reuses the result.
  • An incompatible runtime package can be explicitly materialized while compatible packages remain in CAS.
  • Corrupt/missing blobs, invalid manifests, unsupported runtime versions, and mode transitions produce actionable errors without falling back to unrelated node_modules packages.
  • Measure cold/warm install time, startup time, memory, manifest size, and disk usage against isolated and PnP linkers on realistic applications.

Written by an agent (Codex, GPT-6).

Activity

  1. zkochan commented on Oct 1, 2026

    @zkochan
    MemberAuthor

    Opened pnpm/pnpm#16482 as a draft for the standalone runtime foundation. It loads ESM, CommonJS, and JSON directly from verified CAS blobs using an explicit dependency manifest, with separate module identities for peer contexts.

    This covers only the runtime portion of this task. Configurable installation, generated manifests, Node bin shims, side-effects cache selection, and selective materialization remain planned here. The initial loader does not redirect application fs calls or load native addons.


    Written by an agent (Codex, GPT-6).

  2. zkochan commented on Oct 1, 2026

    @zkochan
    MemberAuthor

    The repository compatibility run does not pass yet.

    I built an isolated copy from the installed graph: 1,791 package instances, 37,795 files, 659 MiB of CAS blobs. The loader itself was bundled. A filesystem scan confirmed no node_modules directories and no symlinks outside the isolated tree.

    • Baseline CLI argument-parser suite: 51 tests passed.
    • The same suite with the loader: failed during Jest startup, zero tests executed.
    • TypeScript pnpm CLI suite (withCommand.test.ts) with the loader: also failed during Jest startup.
    • Unbundled TypeScript CLI with current --version and with current help: succeeded. with current prevents switching to the repository's pinned package manager; the unbundled development build reports 0.0.0.

    Jest reports that the preset is missing. Calling its resolver with throwIfNotFound exposes the underlying failure: its native unrs-resolver binding cannot load from a virtual path. Jest also resolves and reads modules independently of Node's hooks, so native-tooling support alone will not make its VM module loader consume CAS files.

    The draft PR will include a reproducible manual harness (node pnpm/esm-loader/scripts/test-repository.mjs) that retains logs and returns nonzero for these failures. The runtime regression tests now also cover a CommonJS native-addon request, which previously bypassed the load hook and produced an unhelpful dlopen error.

    This is evidence that the standalone runtime is not sufficient for the pnpm test suite. Native tooling, resolver integration, and filesystem-dependent modules need to be addressed before claiming that compatibility.


    Written by an agent (Codex, GPT-6).

  3. zkochan commented on Oct 1, 2026

    @zkochan
    MemberAuthor

    Selective materialization works for the CLI argument-parser suite: all 51 tests pass with no node_modules directory or symlinks outside the isolated fixture.

    The experiment materialized 71 of 1,585 registry package instances (656 files, 3.4 MiB). The other 1,514 remain represented by CAS blobs. A second run with a load-hook audit confirmed that 299 modules from 83 package instances actually loaded from CAS during the passing suite.

    The materialized subset includes Jest's VM support and some dependencies of the tested code, including @pnpm/nopt and didyoumean2. This proves the hybrid approach for this suite, but not Jest-only materialization or full-suite compatibility. The 208 workspace projects already have physical sources and compiled outputs.

    The reproducible experiment is node pnpm/esm-loader/scripts/test-selective-repository.mjs <retained-fixture>, using the fixture created by test-repository.mjs. It logs each missing-file failure, copies and verifies only the corresponding package, and records the selected package IDs and final result. This is diagnostic tooling, not automatic installer policy. The draft still needs install-mode integration and broader compatibility work.


    Written by an agent (Codex, GPT-6).

  4. zkochan commented on Oct 1, 2026

    @zkochan
    MemberAuthor

    Tested pinned Vue, Vite, and Svelte repositories on Node 26.10.0 with isolated snapshots and no node_modules directories.

    • Vue reactivity: 445 tests pass (4 existing skips) after materializing three tooling packages: Vitest, Vite, and the platform Rolldown binding. The subset is 154 files / 22.5 MiB, out of 509 registry package instances.
    • Svelte compiler: compiled 100 real repository components for client and server. All 200 generated outputs match the normal installation. No registry packages were materialized; the load audit recorded 297 modules from 15 CAS-backed packages.
    • Vite utility suite: normal baseline passes 131 tests. After materializing two tooling packages, the runner still cannot resolve magic-string, and zero tests execute.
    • Svelte store suite: normal baseline passes 33 tests. After materializing eight tooling packages, the runner still cannot resolve esm-env, and zero tests execute.

    Native Node resolution with the loader successfully resolves both missing packages. The remaining integration problem is the runners' separate package resolution, including Vite's filesystem walk through node_modules directories. The diagnostic uses native config loading and disables result caching so it does not recreate node_modules for cache files.

    The scripts and exact revisions/commands are documented in pnpm/docs/store-loader.md. These remain separate diagnostic tools; no install-time static analyzer or automatic materialization policy was added. Testing also found a package.json BOM parsing defect, fixed with a shared JSON reader and regression test. All 21 loader/patch regression tests pass locally. The PR remains a draft, and the results do not claim complete repository-suite compatibility.


    Written by an agent (Codex, GPT-6).

  5. zkochan commented on Oct 1, 2026

    @zkochan
    MemberAuthor

    Implemented explicit opt-outs into normal GVS installations, including the complete locked dependency tree and ordinary dependency links. The loader delegates resolution inside these packages to Node. There is no project node_modules directory; GVS and the retained staging installation use their normal layouts.

    The standalone diagnostic reuses pnpm lockfile utilities and pnpm install --frozen-lockfile --ignore-scripts. It records installed paths, platform-skipped optional dependencies, and dependencies exposed by the original installation but absent from its locked graph. It retains the staging installation for ordinary GVS usage tracking. No static analyzer or automatic opt-out selection was added.

    Validation:

    • All 23 loader/resolver regression tests pass.
    • Vue: 445 tests pass, 4 existing skips; opting out Vitest installs its 136-package tree.
    • pnpm parser: all 51 tests pass with 12 explicit package-name selections, covering 362 instances in 360 GVS directories.
    • Svelte: the 128-package Vitest tree installs and starts; the suite remains blocked on application dependency esm-env outside that tree.
    • Vite: the diagnostic rejects the local Vite workspace dependency in Vitest's graph. Local file/workspace opt-out graphs remain unsupported by this helper.

    Commands and the new manifest field are documented in pnpm/docs/store-loader.md. This remains a standalone runtime and diagnostic, not automatic pnpm install integration. The PR remains a draft as requested.


    Written by an agent (Codex, GPT-6).

  6. zkochan commented on Oct 5, 2026

    @zkochan
    MemberAuthor

    Repository compatibility evidence

    Supporting evidence for this implementation task, moved from #74. This report does not add acceptance criteria or claim that every tested repository must pass before this task closes.

    Record the loader compatibility experiments for future development of #64 and pnpm/pnpm#16482. These results come from the standalone diagnostic harness, not end-to-end validation of the integrated install mode. Preserve the failures and limited workload coverage when interpreting them.

    These are scoped experiments with the experimental store loader, not full repository test passes. The external projects come from Workspaces in the wild. Results were collected on Linux x64 with Node.js 26.10.0. The latest batch, recorded on October 1, 2026, adds Prisma, Verdaccio, Logto, and Stimulus Components.

    Method

    Each workload first runs against a normal installation. The diagnostic then copies workspace sources and built outputs, snapshots installed registry packages into CAS, and reruns the same workload with the loader. It checks that the copied tree contains no node_modules directory or symlink outside the tree. The original checkout retains its normal installation for the baseline.

    In the all-CAS run, registry packages have only store blobs and manifest entries. Workspace sources remain physical. In the GVS run, explicitly selected packages and their full locked dependency trees have normal GVS installations outside the copied application. GVS and the retained staging installation contain node_modules; the copied application does not. Installation scripts are disabled for these experiments.

    A snapshot's package count describes available dependencies, not test coverage. The audit counts distinct module URLs successfully loaded through Node's hooks and their CAS package instances, including inherited worker preloads. It does not count sources that a runner reads directly into its own VM. A failed startup can load CAS modules without executing any tests.

    Results

    Project and workload Normal baseline All-CAS result GVS opt-out result
    pnpm CLI argument parser 51 passed Jest reads a virtual source path through fs; 0 tests 51 passed with the explicit selections below; 362 package instances mapped to 360 GVS directories
    Vue reactivity 445 passed, 4 skipped Native Rolldown binding required; 0 tests Same baseline result with vitest and its tree: 136 instances
    Vite utilities 131 passed Native Rolldown binding required; 0 tests Diagnostic rejects Vitest's dependency on the local Vite workspace
    Svelte stores 33 passed Vite reads its virtual package.json through fs; 0 tests vitest and its tree: 128 instances; Vite cannot resolve esm-env, 0 tests
    Svelte compiler corpus 200 compilations All generated outputs match; 297 CAS modules from 15 packages Not needed
    Astro HTML plugin, routing generator, and utilities 116 passed in 12 suites 116 passed; 4 CAS modules from 4 packages Not needed
    Nuxt pages, utilities, plugin utilities, and kit utilities 87 passed in 4 files Native Rolldown binding required; 0 tests vitest and its tree: 118 instances; configuration cannot resolve @nuxt/kit, 0 tests
    VueUse shared utilities 318 passed, 1 todo in 58 files Native Rolldown binding required; 0 tests vitest and its tree: 178 instances; all 58 suites fail to resolve msw in setup, 0 tests
    Mermaid parser 294 passed in 11 files Vite reads its virtual package.json through fs; 0 tests vitest and its tree: 153 instances; configuration cannot resolve jison, 0 tests
    SvelteKit utilities 274 passed in 12 files Native Rolldown binding required; 0 tests vitest and its tree: 98 instances; 49 tests pass, 6 suites fail on dependency resolution
    Slidev parser 114 passed in 4 files Native Rolldown binding required; 0 tests vitest and its tree: 52 instances; 3 tests pass, 2 suites cannot resolve @antfu/utils
    NextAuth.js JWT, URL parsing, merge, and environment utilities 57 passed in 4 files Native Rollup binding required; 0 tests vitest, vite, and unplugin-swc trees: 108 instances; 51 tests pass, JWT suite cannot resolve @panva/hkdf
    Rollup plugin-utils 90 passed in 8 files Vite reads its virtual package.json through fs; 0 tests vitest and its tree: 57 instances; 8 suites fail on estree-walker or acorn, 0 tests
    Kysely database-free Mocha units 25 passed in 8 files 25 passed; 656 CAS modules from 87 packages Not needed
    Kysely file migrations 10 passed 5 pass before the .cts case stalls; terminated after three minutes esbuild trees: 4 instances; all 10 pass, 666 CAS modules from 87 packages
    Milkdown context 15 passed in 5 files Native Rolldown binding required; 0 tests vitest and its tree: 89 instances; 3 tests pass, 4 suites cannot resolve the exception workspace
    Milkdown transformer 21 passed in 5 files Native Rolldown binding required; 0 tests Same 89-instance Vitest tree; 5 suites cannot resolve the exception workspace, 0 tests
    Element Plus utilities 107 passed in 20 files Native Rolldown binding required; 0 tests vitest and its tree: 195 instances; all 20 suites fail to resolve test setup dependencies, 0 tests
    Quasar CLI units 57 passed in 7 files Native Rolldown binding required; 0 tests vitest and its tree: 128 instances; 25 tests pass, 4 fail, 3 other suites fail during import
    Quasar SSR error utilities 3 passed in 2 files Native Rolldown binding required; 0 tests Same 128-instance Vitest tree; 1 test passes, 1 suite cannot resolve stack-trace
    Qwik shared utilities, tag nesting, and preload utilities 167 passed in 8 files Native Rolldown binding required; 0 tests vitest, oxc-parser, and oxc-transform trees: 93 instances; all 167 pass, 19 CAS modules from 8 packages
    Turborepo utilities 33 passed and 5 snapshots in 6 files Jest cannot locate the local test-utils preset; 0 tests Diagnostic rejects conflicting Babel GVS contexts before running tests
    Cycle.js run 32 passed Extensionless Mocha executable is unsupported; 0 tests Diagnostic rejects lockfile format 5.3 before installation
    ByteMD editor and viewer 7 passed in 2 files with browser resolution Vite reads its virtual package.json through fs; 0 tests Diagnostic rejects lockfile format 6.0 before installation
    Prisma foundation utilities 169 runtime tests passed in 14 files Native Rolldown binding required; 0 tests Vitest trees: 119 instances; all 14 suites fail to locate a workspace tsconfig
    Prisma Node-based coverage tools 89 passed in 10 suites 89 passed; 160 CAS modules from 12 packages Not needed
    Verdaccio core and URL helpers 166 passed, 1 skipped in 17 files Native Rolldown binding required; 0 tests vitest and its tree: 157 instances; all 17 suites fail to resolve nock in setup
    Logto shared utilities 71 passed in 9 files Native Rollup binding required; 0 tests vitest and shared tsconfig trees: 149 instances; 7 tests pass, 7 suites fail on dependency resolution
    Stimulus Components DOM tests 154 passed in 22 files Vite reads its virtual package.json through fs; 0 tests vitest and its tree: 96 instances; all 22 suites fail to resolve @hotwired/stimulus

    What the passing runs establish

    Astro's selected tests exercise compiled workspace code with Node's test runner and no materialized registry packages. Only four registry modules were observed through the CAS hooks. The snapshot contains 1,951 registry package instances and 565 workspace roots, so this is deliberately narrow coverage of that graph.

    The Svelte comparison compiles 100 real repository components for both client and server. Hashes of generated JavaScript, CSS, source maps, and warnings match the baseline. This bypasses Vitest and does not establish that Svelte's test runner works with all-CAS dependencies.

    Kysely's Mocha run exercises query IDs, logging, object utilities, JSON-result parsing, immediate values, plugin composition, and async disposal. The tests use dummy drivers, not live databases. Its 656 observed CAS modules include Mocha, assertion and mocking libraries, and database-client imports from shared test setup. No registry packages are materialized. The snapshot contains 1,592 registry instances and four workspace roots; this is not coverage of every dependency or of database integration.

    Kysely's separate file-migration suite passes all ten tests with only the two esbuild versions and their platform binaries in GVS (four instances). Mocha and the remaining dependencies stay in CAS. The all-CAS run stalls while loading a .cts migration through the TypeScript tooling after five passing cases. Selecting esbuild resolves that stall; the passing run observes 666 CAS modules from 87 packages.

    Prisma's separate Node-runner workload exercises its coverage report, upgrade-coverage gate, and workflow checks. All 89 tests pass with no registry materialization, loading 160 CAS modules from 12 package instances, including schema validation and Markdown frontmatter dependencies. Tests that create temporary Git repositories and launch child processes also pass. This does not cover Prisma database access or its Vitest suites.

    Qwik's eight selected files pass all 167 tests after opting out Vitest and both installed versions of oxc-parser and oxc-transform. Vitest alone materializes 76 instances but fails on the parser's native binding; adding the parser reaches the transformer's native binding. The final 93-instance selection loads 19 modules from eight CAS package instances. This exercises built workspace code and source tests, not the full framework or browser suite.

    Vue's reactivity suite and pnpm's parser suite pass with GVS fallback. Vue's audited GVS rerun observed no CAS module loads: its passing workload uses physical workspaces and materialized tooling. The pnpm parser needs test setup and application dependencies in addition to Jest's own tree. These passes do not establish that opting out only the test runner suffices in other projects.

    Remaining failures

    • Nuxt: configuration imports @nuxt/test-utils, whose exsolve lookup cannot locate the local @nuxt/kit workspace without filesystem dependency links. Node resolution with the loader finds packages/kit/src/index.ts. The failed configuration run still loads 36 CAS modules from 20 packages.
    • VueUse: Vite's resolver cannot find msw or msw/node from packages/.test/mockServer.ts. The selected Vitest tree already materializes msw in GVS. Node resolution with the loader finds it there, but Vite's own resolver does not consult that mapping. The failed run loads 28 CAS modules from 12 packages.
    • Mermaid: Vite's config runner cannot resolve jison imported by .build/jisonTransformer.ts. Node resolution with the loader finds its CAS module. No CAS modules are observed before the config-runner failure in the GVS attempt.
    • Svelte and Vite: Node resolution with the loader finds esm-env and magic-string. Their test runners' independent resolution paths still fail. Vite's magic-string failure was observed in the earlier individual-package experiment; the GVS helper stops sooner because its opt-out graph contains a workspace link.
    • SvelteKit: six utility suites fail on Vite resolution of magic-string, esm-env, or valibot; six other suites pass. Node resolution with the loader finds all three dependencies, including magic-string already in GVS. The failed run loads 554 CAS modules from 15 packages, primarily through configuration tooling. A diagnostic config moves the Svelte plugin's Vite cache outside node_modules; without it, the original config also fails the isolation check despite --no-cache.
    • Slidev: the parser fixture suite and parser utility suite cannot resolve @antfu/utils. Two time-parser suites pass three tests. Node resolution with the loader finds the missing dependency. No CAS module loads are observed in the GVS attempt.
    • NextAuth.js: opting out only Vitest installs 91 instances but leaves a second Vite context in CAS; configuration reads that context's virtual package.json. Selecting vitest, vite, and unplugin-swc gets through configuration and passes three suites. The JWT suite still fails in Vite's resolver on @panva/hkdf. Node with the loader imports that package from CAS and successfully derives a key. The partial test run loads 406 CAS modules from 38 packages. A separate attempt including @preact/preset-vite was rejected by the diagnostic because one original Babel package instance mapped to conflicting GVS roots; that attempt executed no tests.
    • Rollup plugins: the compiled plugin-utils package imports estree-walker, and its scope tests import acorn. Vite cannot resolve either, though Node with the loader finds both and acorn is already in GVS. No CAS modules are observed in the GVS attempt.
    • Milkdown: both probes fail in Vite's resolver on @milkdown/exception, a physical workspace package. ESM resolution with the loader finds its TypeScript entry, but importing that entry directly through Node then fails on its extensionless relative imports; it still needs the project's TypeScript tooling. The three passing context tests do not load CAS modules. No CAS module loads are observed in either GVS probe.
    • Element Plus: all utility suites fail in setup because Vite cannot resolve @vue/test-utils. Node resolution with the loader finds it in CAS. Configuration startup loads 310 CAS modules from 44 packages before the suites fail.
    • Quasar: Vite cannot resolve ci-info, cross-spawn, or stack-trace in the selected suites, though Node with the loader resolves them. The CLI also has four assertion failures: a resolved path no longer contains the package name kolorist, reading that package's virtual package.json through fs returns no data, and two subprocess tests cannot discover newly created local CLI packages through require.resolve(..., { paths }). Those temporary installations are outside the manifest. The CLI probe observes 28 CAS modules from 16 packages; the SSR utility probe observes none.
    • Turborepo: Jest's preset lookup cannot locate the physical @turbo/test-utils workspace; the all-CAS attempt loads 61 modules from 47 packages before configuration fails. The first attempt also exposed a loader defect: CommonJS require('..') was rejected even when the target stayed inside the stored package. The loader now accepts require('.') and require('..') within that boundary, with regression coverage that still rejects escape from the package root. The preset failure is the result after that fix. Opting out Jest is rejected because one original @babel/core instance maps to conflicting GVS roots; no tests run in that attempt.
    • Cycle.js: the normal Mocha 6 suite passes after installing the existing lockfile with pnpm 6.35.1 under Node.js 18.20.8. Baseline tests and loader probes both use Node.js 26.10.0. The loader rejects Mocha's extensionless bin/mocha before any CAS modules load. Opting out Mocha and ts-node cannot be tested with the GVS helper because the installed lockfile uses format 5.3.
    • ByteMD: seven tests pass after a diagnostic config selects Svelte's browser condition. Without it, three tests fail because mount hooks resolve to server-side behavior. The all-CAS run loads 91 modules from 40 packages before Vite's direct package.json read fails. The GVS helper rejects the installed format-6.0 lockfile. This is a diagnostic limitation, not evidence that a correctly materialized Vitest tree would fail.
    • Prisma: the selected foundation package extends @repo/tsconfig/base. Vite's Oxc transform cannot locate that tsconfig without dependency links, so all 14 suites fail before running tests. Node resolution with the loader finds the existing physical packages/0-config/tsconfig/base.json workspace file. The Vitest selection includes both installed runner versions (5.0.0-rc.2 and 4.1.10), totaling 119 instances; no CAS modules are observed in this GVS attempt. This checkout is the Prisma 8 development branch, not a released Prisma 7 workload. Type-only tests are excluded from this runtime probe.
    • Verdaccio: every selected suite fails while importing nock from the root test setup. Node resolution with the loader finds its CAS entry. The setup disables external network connections, so it is kept intact. No CAS module loads are observed in the GVS attempt.
    • Logto: Vitest's 145-instance tree initially reaches an fs read of the shared tsconfig's virtual JSON file. Selecting @silverhand/ts-config as well materializes four more instances and gets past that read. Seven tests in two suites then pass; seven other suites cannot resolve nanoid, libphonenumber-js, ua-parser-js, or @silverhand/essentials. Node resolution with the loader finds all four, and the tsconfig resolves to a physical GVS JSON file. No CAS modules are observed in either GVS attempt. The selected baseline also passes on Node.js 26.10.0 despite the package declaring Node.js 22.
    • Stimulus Components: all 22 suites fail in Vite's import analysis on @hotwired/stimulus. Node resolution with the loader finds its CAS entry. No tests or CAS module loads are observed in the GVS attempt.

    The GVS fallback addresses physical-file requirements within an installed dependency tree. It does not make a separate resolver understand application dependencies in the loader manifest. The custom-resolver failures need resolver integration or additional physical application links, not just more copies of package files.

    The pnpm CLI compatibility probe also reached registry setup, which requires the external pnpr-prepare binary. Its full CLI suite has not passed in this setup. Unbundled CLI startup with with current --version and with current help succeeded.

    Pinned checkouts

    Project Revision Pinned pnpm Test runner
    Vue 4ab865a848a1da3d10fb674f857e5fff13094644 12.4.2 Vitest 4.1.11
    Vite 10033218d239c927cdc375970b5741cce408e81b 12.6.0 Vitest 5.0.2
    Svelte 020242d6bef059df9ae8c13dc8dbff4c9b31e0ff 10.33.4 Vitest 4.1.7
    Astro 64e40396dc7e955986fd6d7bbd195f72556933d5 11.27.0 Node test runner
    Nuxt 3fde4d625cc353e83ac10f6b75db8ca480167be4 12.6.0 Vitest 5.0.2
    VueUse efdd69a1481205051e85d9c815eaa5840237f2d1 11.25.0 Vitest 4.1.11
    Mermaid 47fffa05c044f460f8b9645c7a24429ed200a084 10.30.3 Vitest 3.2.7
    SvelteKit 582f1015e83dc208780c57682a37dc0f7c6c9203 12.5.0 Vitest 5.0.1
    Slidev 30a0a54c8739b4b395d9b336a6304cc8ebcc3947 12.4.2 Vitest 5.0.1
    NextAuth.js a1a16a5a7780488c7449feece410033f445d0b31 9.2.0 Vitest 3.2.6
    Rollup plugins 639f45638234c1c3fabfb13615c78bebaef89ef2 9.5.0 Vitest 4.0.2
    Kysely 996eae17fe325968da56e5aa4d9d3a216adb120d 11.21.0 Mocha 12.0.1
    Milkdown bbb8bcbbb8ce0aa16f92567c23f6236747be9b3b 12.5.1 Vitest 5.0.1
    Element Plus 53936e70ef37cd03c2925e812b342c6adcb3f118 12.8.1 Vitest 5.0.2
    Quasar 0fd7ce30e7dd04c6be23e7bd47547800697ee128 12.3.4 Vitest 5.0.1
    Qwik 83a98c261d9d0977fe3a862e828d16c965b72b1e 11.22.0 Vitest 5.0.0
    Turborepo 8cc3cce30705a88ac9020d1adc2bf06f391fdf2d 12.0.0 Jest 30.3.0
    Cycle.js 5ece2a48c3659538208da3dc8d43a142bc0d91a7 6.35.1 (diagnostic selection) Mocha 6.2.0
    ByteMD 2a3046a510ba6e5b9d8cce63a38e8258ce6e5430 8.15.9 Vitest 0.29.8
    Prisma 84b3bb693c395ec21ccf2de97d5db4787c805d03 10.27.0 Vitest 5.0.0-rc.2 and Node test runner
    Verdaccio 83eb46cd8104bec30f8fd379f5138f0da10df5c4 12.3.4 Vitest 4.1.11
    Logto c814034401b0e13a6f461e0b0835ad3bbb84c9c2 10.30.3 (diagnostic selection) Vitest 4.1.11
    Stimulus Components 0ec0b24e911438fee4d036ac2443f934a62d05c7 10.30.3 Vitest 4.1.11

    The pnpm GVS run used this feature branch at 5d922b13566dbbc4142af415149ff73714ec8619. The external probes use installed dependency graphs, including existing build outputs. They do not test a fresh install directly into CAS.

    Reproduction

    Use Node.js 26.10.0 for the diagnostic process; the scripts reuse that executable for both baseline and loader runs. Install each pinned checkout with pnpm install --frozen-lockfile --ignore-scripts. From the external checkout, prepare the workloads that require generated files:

    # Vite
    pnpm --filter vite run build-bundle
    
    # Astro
    pnpm -C packages/astro run build:ci
    pnpm --filter @astrojs/internal-helpers run build:ci
    
    # Mermaid
    pnpm --filter @mermaid-js/parser langium:generate
    
    # NextAuth.js
    pnpm --filter @auth/core build
    
    # Rollup plugins
    pnpm --filter @rollup/pluginutils build
    
    # Kysely
    pnpm build
    pnpm test:node:build
    
    # Qwik
    pnpm build.core.dev
    
    # Verdaccio
    pnpm --filter @verdaccio/core... --filter @verdaccio/url... build

    Kysely and Element Plus needed --config.@pnpm:registry=https://registry.npmjs.org/ on their install command to override the test machine's scoped registry mirror. The mirror omitted timestamps required by Kysely's trust policy and served an Element Plus dependency tarball whose integrity did not match the lockfile. The official registry passed the original frozen-lockfile, integrity, and policy checks. No package versions or trust policies were changed.

    For Mermaid, add a diagnostic-only compatibility.workspace.json containing ["./vite.config.ts"]. This selects the existing root configuration without loading the unrelated documentation configuration. The latter uses __dirname, which fails under the config runner. Mermaid needs --configLoader runner because its configuration imports TypeScript sources through .js specifiers. No upstream test sources were changed.

    For SvelteKit, add packages/kit/compatibility.config.js to redirect the cache while preserving its existing test configuration:

    import config from './vitest.kit.config.js';
    export default { ...config, cacheDir: '.cache/loader-compatibility' };

    The snapshot excludes .cache, so the loader run does not reuse the baseline's generated dependency cache. The NextAuth.js probe disables coverage for both baseline and loader runs. Its core build supplies the generated jwt.js imported by the existing JWT tests. The Rollup plugin-utils tests likewise require built outputs. The diagnostic supports Vitest, Mocha, Jest, and Node's test runner. Package runners are located from the selected working directory using their declared binary entry, including older Mocha releases. The diagnostic's --cwd option runs package-specific configurations from the same relative directory in the baseline and copied checkout; it still snapshots the whole workspace.

    For ByteMD, keep both the checkout and retained fixture outside any .cache directory. Vitest 0.29.8's default exclusion otherwise matches their absolute paths and reports no tests. Set TMPDIR=/tmp for its diagnostic and add compatibility.config.mjs:

    import config from './vitest.config.mjs'
    export default { ...config, resolve: { ...config.resolve, conditions: ['browser'] } }

    This changes browser/server resolution for both baseline and loader runs without modifying test assertions. Cycle.js has no package-manager pin; use pnpm 6.35.1 with Node.js 18.20.8 for its frozen installation, then add "packageManager": "[email protected]" to the diagnostic checkout's root manifest so workspace discovery uses the matching CLI. Its lockfile and dependency versions remain unchanged. Running pnpm 6's installer on the test machine's newer Node version fails its HTTP requests with ERR_INVALID_THIS.

    Prisma's Node-runner probe sets GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=tag.gpgSign GIT_CONFIG_VALUE_0=false for the test process. The tests create temporary Git tags; inheriting the machine's signed-tag setting otherwise opens an editor. This does not change global Git configuration. The test sources and assertions are unchanged.

    Logto does not pin pnpm in its manifest; its CI selects pnpm 10. The diagnostic uses pnpm with 10.30.3 install --frozen-lockfile --ignore-scripts. Prisma's foundation probe disables Vitest's type-only tests explicitly; the reported 169 tests check runtime behavior.

    Run the following from the pnpm repository, with its workspace utilities installed and compiled:

    node pnpm/esm-loader/scripts/test-ecosystem.mjs /path/to/vue run --project unit packages/reactivity/__tests__ --maxWorkers=2 --configLoader native --no-cache
    node pnpm/esm-loader/scripts/test-ecosystem.mjs /path/to/vite run packages/vite/src/node/__tests__/utils.spec.ts --maxWorkers=2 --configLoader native --no-cache
    node pnpm/esm-loader/scripts/test-ecosystem.mjs /path/to/svelte run packages/svelte/tests/store/test.ts --maxWorkers=2 --configLoader native --no-cache
    node pnpm/esm-loader/scripts/test-ecosystem.mjs --node /path/to/astro --test --test-concurrency=2 'packages/astro/test/units/vite-plugin-html/*.test.ts' packages/astro/test/units/routing/generator.test.ts 'packages/astro/test/units/util/*.test.ts'
    node pnpm/esm-loader/scripts/test-ecosystem.mjs /path/to/nuxt run --project unit packages/nuxt/test/pages.test.ts packages/nuxt/test/utils.test.ts packages/nuxt/test/plugin-utils.test.ts packages/kit/test/utils.test.ts --maxWorkers=2 --configLoader native --no-cache
    node pnpm/esm-loader/scripts/test-ecosystem.mjs /path/to/vueuse run --project unit packages/shared --maxWorkers=2 --configLoader native --no-cache
    node pnpm/esm-loader/scripts/test-ecosystem.mjs /path/to/mermaid run packages/parser/tests --workspace compatibility.workspace.json --maxWorkers=2 --configLoader runner --no-cache
    node pnpm/esm-loader/scripts/test-ecosystem.mjs --cwd packages/kit /path/to/sveltekit run --config compatibility.config.js --project kit-server-dev src/utils --maxWorkers=2 --configLoader native --no-cache
    node pnpm/esm-loader/scripts/test-ecosystem.mjs /path/to/slidev run packages/parser test/parser.test.ts --maxWorkers=2 --configLoader native --no-cache
    node pnpm/esm-loader/scripts/test-ecosystem.mjs --cwd packages/core /path/to/nextauth run --config ../utils/vitest.config.ts test/jwt.test.ts test/url-parsing.test.ts test/merge.test.ts test/env.test.ts --coverage.enabled=false --maxWorkers=2 --configLoader native --no-cache
    node pnpm/esm-loader/scripts/test-ecosystem.mjs --cwd packages/pluginutils /path/to/rollup-plugins run --config ../../.config/vitest.config.mts --maxWorkers=2 --configLoader native --no-cache
    node pnpm/esm-loader/scripts/test-ecosystem.mjs --mocha /path/to/kysely --timeout 15000 test/node/dist/query-id.test.js test/node/dist/log-once.test.js test/node/dist/object-util.test.js test/node/dist/parse-json-results-plugin.test.js test/node/dist/immediate-value-plugin.test.js test/node/dist/plugin-composition.test.js test/node/dist/async-dispose.test.js test/node/dist/logging.test.js
    node pnpm/esm-loader/scripts/test-ecosystem.mjs --mocha /path/to/kysely --timeout 15000 test/node/dist/file-migration-provider.test.js
    node pnpm/esm-loader/scripts/test-ecosystem.mjs --cwd packages/ctx /path/to/milkdown run --maxWorkers=2 --configLoader native --no-cache
    node pnpm/esm-loader/scripts/test-ecosystem.mjs --cwd packages/transformer /path/to/milkdown run --maxWorkers=2 --configLoader native --no-cache
    node pnpm/esm-loader/scripts/test-ecosystem.mjs /path/to/element-plus run packages/utils/__tests__ --maxWorkers=2 --configLoader native --no-cache
    node pnpm/esm-loader/scripts/test-ecosystem.mjs --cwd cli /path/to/quasar run --maxWorkers=2 --configLoader native --no-cache
    node pnpm/esm-loader/scripts/test-ecosystem.mjs --cwd utils/render-ssr-error /path/to/quasar run --maxWorkers=2 --configLoader native --no-cache
    node pnpm/esm-loader/scripts/test-ecosystem.mjs /path/to/qwik run packages/qwik/src/core/shared/utils packages/qwik/src/server/tag-nesting.unit.ts packages/qwik/src/server/preload-utils.unit.ts --maxWorkers=2 --configLoader native --no-cache
    node pnpm/esm-loader/scripts/test-ecosystem.mjs --jest --cwd packages/turbo-utils /path/to/turborepo --runInBand --no-cache --runTestsByPath __tests__/convert-case.test.ts __tests__/search-up.test.ts __tests__/is-folder-empty.test.ts __tests__/validate-directory.test.ts __tests__/get-turbo-root.test.ts __tests__/get-turbo-configs.test.ts
    node pnpm/esm-loader/scripts/test-ecosystem.mjs --mocha --cwd run /path/to/cyclejs 'test/*.ts' --require ts-node/register --exit
    TMPDIR=/tmp node pnpm/esm-loader/scripts/test-ecosystem.mjs /path/outside-cache/bytemd run --threads=false --config compatibility.config.mjs
    node pnpm/esm-loader/scripts/test-ecosystem.mjs --cwd packages/1-framework/0-foundation/utils /path/to/prisma run --typecheck.enabled=false --maxWorkers=2 --configLoader native --no-cache
    GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=tag.gpgSign GIT_CONFIG_VALUE_0=false node pnpm/esm-loader/scripts/test-ecosystem.mjs --node /path/to/prisma --test --test-concurrency=2 scripts/check-upgrade-coverage.test.mjs scripts/upgrade-coverage-workflows.test.mjs scripts/coverage-report.test.mjs
    node pnpm/esm-loader/scripts/test-ecosystem.mjs /path/to/verdaccio run packages/core/core/test packages/core/url/test --maxWorkers=2 --configLoader native --no-cache
    node pnpm/esm-loader/scripts/test-ecosystem.mjs --cwd packages/shared /path/to/logto run src --maxWorkers=2 --configLoader native --no-cache
    node pnpm/esm-loader/scripts/test-ecosystem.mjs /path/to/stimulus-components run components --maxWorkers=2 --configLoader native --no-cache

    Each command retains a fixture and exits unsuccessfully if the loader run fails. Use its printed directory for the GVS attempt or the Svelte compiler comparison:

    node pnpm/esm-loader/scripts/test-gvs-repository.mjs /retained-fixture vitest
    node pnpm/esm-loader/scripts/test-gvs-repository.mjs /nextauth-fixture vitest vite unplugin-swc
    node pnpm/esm-loader/scripts/test-gvs-repository.mjs /kysely-migration-fixture esbuild
    node pnpm/esm-loader/scripts/test-gvs-repository.mjs /qwik-fixture vitest oxc-parser oxc-transform
    node pnpm/esm-loader/scripts/test-gvs-repository.mjs /turborepo-fixture jest
    node pnpm/esm-loader/scripts/test-gvs-repository.mjs /cyclejs-fixture mocha ts-node
    node pnpm/esm-loader/scripts/test-gvs-repository.mjs /logto-fixture vitest @silverhand/ts-config
    node pnpm/esm-loader/scripts/test-svelte-compiler.mjs /svelte-fixture

    Before the Kysely migration GVS retry, remove the test-created repo/test/node/dist/cts-migrations directory inside that retained fixture. The timeout prevents its cleanup hook from running; leaving it in place makes the next setup fail with EEXIST.

    For pnpm, create the fixture with test-repository.mjs, then use these explicit opt-outs:

    node pnpm/esm-loader/scripts/test-repository.mjs
    node pnpm/esm-loader/scripts/test-gvs-repository.mjs /pnpm-fixture jest @rushstack/worker-pool ts-jest-resolver @pnpm/nopt didyoumean2 is-windows p-limit bole split2 tempy empathic read-yaml-file

    The GVS diagnostic needs an installed pnpm v12 CLI and a format-9 installed lockfile. It explicitly checks the supported format before mapping package contexts; it does not upgrade older lockfiles or re-resolve their dependency graphs. It preserves both workspace configuration and legacy package.json pnpm settings when installing the frozen selected graph. Patch entries absent from that graph are omitted from both staging configuration and lockfile. NextAuth.js's unrelated release-tool patch otherwise fails the frozen install because its pnpm 9 hash differs from the current patch hash format. Patches used by the selected graph remain intact; the pnpm parser regression still passes with its patched dependencies.

    Retained evidence

    Every fixture retains ecosystem-results.json with the revision, command arguments, runtime, snapshot counts, and exit statuses, plus baseline.stdout, baseline.stderr, cas.stdout, and cas.stderr. GVS attempts that reach test execution write gvs-results.json, gvs.stdout, and gvs.stderr; the result includes every mapped package root and the retained staging installation path. The pnpm-specific fixture uses its own scenario report.

    The diagnostic also retains partial output on timeout, with a null exit status, the termination signal, and the spawn error in the result. The all-CAS run has a three-minute limit; the GVS run has a two-minute limit. A terminated process may not flush its exit-time module audit, so timeout audit counts can be incomplete.

    New runs also write CAS load audits as JSON lines, one URL array per exiting process or worker: cas-loads.jsonl for the all-CAS attempt and suite-cas-loads.jsonl for the latest GVS/selective attempt. Compiler comparisons write compiler-results.json and compiler-cas-loads.jsonl. The diagnostics retain failures as well as passes.

    Earlier individual-package experiment

    Before the complete GVS fallback, a diagnostic copied individual package files without creating dependency trees. It passed pnpm's 51 parser tests with 71 materialized instances (656 files, 3.4 MiB), and Vue's reactivity suite with 3 tooling packages (154 files, 22.5 MiB). Vite stopped at magic-string after materializing 2 tooling packages; Svelte stopped at esm-env after 8 packages. These counts are not comparable to the full GVS dependency closures above. The commands and limitations remain documented in the reproduction notes below.

    Repository compatibility check

    From a checkout with dependencies installed and compiled, run:

    node pnpm/esm-loader/scripts/test-repository.mjs

    This manual compatibility check first runs the existing CLI argument parser test suite as a baseline. It then snapshots the installed dependency graph into a temporary CAS, copies the compiled workspaces without node_modules, bundles the loader so its own dependencies require no package directories, and attempts the parser suite, a pnpm CLI suite, and unbundled CLI startup. It verifies that the temporary tree contains no node_modules directories or symlinks outside the tree. The original checkout is not modified. The fixture and logs are retained at the printed path.

    This tests runtime compatibility against the installed packages. It does not test fetching, automatic installation, or generation of a manifest from a lockfile. Missing optional/platform dependencies from the installed graph are recorded in missing-dependencies.json.

    The repository patch for unrs-resolver enables Node resolution with UNRS_RESOLVER_NODE_RESOLUTION=1. The compatibility check sets this automatically. It delegates to createRequire().resolve() and forwards conditional exports through a temporary synchronous hook. This mode uses Node semantics; unrs-specific aliases, TypeScript configuration, and custom extension searches are not implemented. Normal runs retain the native resolver.

    The patched run indexed 1,793 packages and 37,807 files. The parser baseline passed 51 tests. Without node_modules, Jest resolved its configuration and started the parser suite, then failed when its VM runtime read source-map-support.js directly through fs. Zero tests executed. The CLI suite reached registry setup and required the external pnpr-prepare test binary. The unbundled CLI's with current --version and with current help commands succeeded; with current prevents switching to the repository's pinned package manager. The unbundled development build reports version 0.0.0.

    These results do not establish compatibility with pnpm's test suite. The command exits unsuccessfully while any scenario fails. Running Jest requires additional filesystem integration and native-tooling support or materialization. See the install-mode plan.

    The resolver patch has a separate regression test that runs from CAS without a native binding or node_modules:

    node --test pnpm/esm-loader/scripts/test-unrs-resolver.mjs

    Selective materialization experiment

    To try materializing only packages that the parser suite reads directly, pass the retained fixture directory to:

    node pnpm/esm-loader/scripts/test-selective-repository.mjs /path/to/retained-fixture

    This diagnostic retries the parser suite after each missing store-backed filesystem read. It verifies and copies that package's files into materialized/<package-instance-hash>, then maps the package to a physical root in a separate manifest. It preserves the original CAS manifest and records each attempt and the selected packages in selective-results.json. It stops on success or on a failure that materialization cannot address. This is an experiment, not an automatic installer policy.

    The parser suite passed all 51 tests after materializing 71 of the 1,585 stored package instances: 656 files, 3.4 MiB. The other 1,514 package instances remained in CAS, and the fixture contained no node_modules directory or external symlink. The 208 workspace projects already had physical sources and compiled outputs.

    The selected packages include Jest internals and dependencies of the code under test, such as @pnpm/nopt and didyoumean2. Jest's VM reads those sources too. This demonstrates that selective materialization works for this suite, but does not establish that materializing Jest alone is sufficient or that all remaining CAS packages were exercised.

    External repository checks

    The standalone diagnostic scripts also accept installed pnpm workspaces. These checks ran on Linux with Node.js 26.10.0. They snapshot workspace files and dependency blobs, then verify that the snapshot contains neither node_modules directories nor symlinks outside it. They do not add an install-time analyzer or change the repositories' source code.

    Repository revision Workload Normal installation Store-backed result
    Vue 4ab865a Reactivity suite 445 passed, 4 skipped Same result after materializing 3 tooling packages; all-CAS startup needs a native Rolldown binding
    Vite 1003321 Utility suite 131 passed No tests executed; after materializing 2 tooling packages, Vitest's runner cannot resolve magic-string
    Svelte 020242d Store suite 33 passed No tests executed; after materializing 8 tooling packages, Vite's runner cannot resolve esm-env
    Same Svelte revision Compile 100 repository components for client and server 200 compilations succeeded All 200 outputs match, with no registry packages materialized; 297 modules from 15 packages loaded from CAS

    Vue's snapshot contains 509 registry package instances and 18 workspace projects. Its materialized subset is vitest, vite, and @rolldown/binding-linux-x64-gnu: 154 files, 22.5 MiB. Vite's snapshot contains 1,150 registry package instances and 285 workspace projects. Svelte's contains 410 registry package instances and 3 workspace projects. Workspace sources and built outputs remain physical in every scenario.

    Both magic-string and esm-env resolve successfully through native Node resolution with the loader. The remaining failures are in the test runners' resolution paths. These are compatibility probes, not full-repository test passes. The Svelte compiler comparison exercises the compiler directly and does not replace its Vitest suite.

    After installing the pinned dependencies in each checkout, run these from the pnpm repository:

    node pnpm/esm-loader/scripts/test-ecosystem.mjs /path/to/vue run --project unit packages/reactivity/__tests__ --maxWorkers=2 --configLoader native --no-cache
    node pnpm/esm-loader/scripts/test-ecosystem.mjs /path/to/vite run packages/vite/src/node/__tests__/utils.spec.ts --maxWorkers=2 --configLoader native --no-cache
    node pnpm/esm-loader/scripts/test-ecosystem.mjs /path/to/svelte run packages/svelte/tests/store/test.ts --maxWorkers=2 --configLoader native --no-cache

    Vite's checkout needs pnpm --filter vite run build-bundle first. Each command runs the normal baseline, prints the retained snapshot directory, and exits nonzero if the all-CAS run fails. --configLoader native avoids bundling the test configuration with a separate resolver. --no-cache prevents Vitest from creating node_modules/.vite for its result cache.

    Use the corresponding snapshot directory for the follow-up experiments:

    node pnpm/esm-loader/scripts/test-selective-repository.mjs /vue-snapshot @rolldown/binding-linux-x64-gnu vite vitest
    node pnpm/esm-loader/scripts/test-selective-repository.mjs /vite-snapshot @rolldown/binding-linux-x64-gnu vitest
    node pnpm/esm-loader/scripts/test-selective-repository.mjs /svelte-snapshot vite vitest esbuild @esbuild/linux-x64
    node pnpm/esm-loader/scripts/test-svelte-compiler.mjs /svelte-snapshot

    The selective experiment accepts explicit package names and can additionally materialize packages identified by missing-file or unsupported-native-addon errors. It does not infer dependencies through static analysis. Its loader preload is inherited through NODE_OPTIONS so worker processes can resolve CAS packages too. Reports preserve package counts, exit statuses, and individual attempt logs. The compiler check uses the original all-CAS manifest and compares hashes of generated JavaScript, CSS, source maps, and warnings.

    GVS opt-out experiment

    Create a fresh fixture with test-repository.mjs or test-ecosystem.mjs, then select packages explicitly:

    node pnpm/esm-loader/scripts/test-gvs-repository.mjs /vue-snapshot vitest

    The diagnostic reads the original installation's current lockfile and maps the selected package instances to their locked contexts. It reuses pnpm's lockfile pruning and serialization utilities to prepare a separate installation, then runs pnpm install --frozen-lockfile --ignore-scripts with the global virtual store enabled. It does not re-resolve versions or run project hooks; the snapshots already include hook results. The installed graph includes required dependencies and the optional dependencies applicable to the target platform.

    The generated .pnpm-gvs.json points the installed closure at normal GVS entries with native resolution. gvs-results.json records the selection, physical roots, skipped optional dependencies, dependencies exposed by the source installation but absent from its locked graph, and the suite's exit status. The copied application tree is checked for node_modules before and after execution. GVS and the retained staging installation are outside that tree and do contain node_modules.

    This repository-only diagnostic requires compiled pnpm workspace utilities and an installed pnpm v12 CLI. It currently rejects opt-out trees containing local file or workspace links. In particular, Vite's Vitest depends on the local Vite workspace, so that probe cannot use this diagnostic yet. Lifecycle scripts are disabled in the experiment; packages requiring uncached build outputs need a separately authorized normal build.

    On the pinned repositories above, opting out vitest installed 136 package instances for Vue; all 445 reactivity tests passed with 4 existing skips. Svelte's opt-out installed 128 package instances, but its suite still stopped at the application dependency esm-env, outside Vitest's tree.

    The pnpm parser suite passed all 51 tests with these explicit selections:

    node pnpm/esm-loader/scripts/test-gvs-repository.mjs /pnpm-snapshot jest @rushstack/worker-pool ts-jest-resolver @pnpm/nopt didyoumean2 is-windows p-limit bole split2 tempy empathic read-yaml-file

    Those names select 18 installed instances and map their closures to 360 distinct GVS directories for 362 manifest instances. Jest alone still failed on direct filesystem reads of test setup dependencies. These are scoped compatibility checks, not full repository-suite passes.


    Written by an agent (Codex, GPT-6).

  7. zkochan commented on Oct 5, 2026

    @zkochan
    MemberAuthor

    Additional compatibility finding from review of pnpm/pnpm#16482: patch-package requires application node_modules paths. Its package-details parser constructs node_modules/package (and nested node_modules paths), and the patch application checks that physical path. This is a source inspection, not a successful executable probe.

    Evidence: https://github.com/pnpm/patch-package/blob/c97a62eab19011781304d612a77159393f489d0f/src/PackageDetails.ts and https://github.com/pnpm/patch-package/blob/c97a62eab19011781304d612a77159393f489d0f/src/applyPatches.ts.

    Materializing patch-package itself or its target in the global virtual store does not supply those application paths. The current experimental loader does not emulate application fs calls. pnpm's existing patchedDependencies flow is included in the installer integration and materializes patched package trees automatically.

    For this task's compatibility evaluation, keep patch-package classified as requiring integration. A future probe should cover patch creation, application, and reinstall behavior through the loaded manifest, and ensure it does not mutate shared GVS entries in place. Do not treat the current PR as proving compatibility with this tool.


    Written by an agent (Codex, GPT-6).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions