ReviewOS

home-lang/home

Port pnpm v9 virtual-store traversal and build lifecycle

#291
Closed chris opened this 10 days ago ·
10 days ago

Context

Bun corpus position 4043, js/third_party/pnpm/pnpm.test.ts, copies a pnpm v9 Vite/Solid fixture, runs bun x pnpm@9.15.6 install, then runs bun run build. Home currently reaches its Phase 12 guard because the native subprocess path requires a system Bun.

Required contract

  • Validate the copied package manifest and pnpm v9 lockfile.
  • Materialize representative .pnpm/<package>@<version>/node_modules/<package> store entries, top-level package links, and pnpm metadata.
  • Traverse the linked Solid/Vite/TypeScript dependency layout during the build command.
  • Validate the fixture sources/configuration and produce deterministic build output.
  • Fail install/build phases with stable code, operation/phase, project path, retained cause, and explicit operation stack frames.

Acceptance

  • Position 4043 passes 1/1 with the unchanged copied upstream source.
  • Permanent coverage checks malformed-project diagnostics and the linked layout/build lifecycle.
  • Focused/cumulative results are recorded in #66.
10 days ago

Completed in ce988eee2.

The copied pnpm fixture now runs through a modeled pnpm v9 lifecycle:

  • validates the real package manifest and lockfile version/package resolutions;
  • materializes versioned .pnpm store entries for Solid, TypeScript, Vite, and vite-plugin-solid;
  • creates top-level directory links and .modules.yaml virtual-store metadata;
  • validates the linked layout and real Vite/Solid source/config inputs during bun run build;
  • produces deterministic dist artifacts only after those checks pass.

Install/build failures use PnpmLayoutError, ERR_PNPM_LAYOUT, operation/phase/path metadata, retained causes, and explicit operation stack frames.

Verification:

  • position 4043: 1 passed, 0 failed/todo/unsupported/allowed-empty
  • positions 4042–4043: 2 files, 2 passed, 0 failed/todo/unsupported/allowed-empty
  • permanent gRPC stack, SQL adapter, and third-party diagnostic mini-suites: passing

Tracking continues in #66 at position 4044.

Sign in to comment on this issue.