Skip to content

fix(cli): instance tarball pins lose their integrity, breaking tier 2 init on pnpm 11 and every command on pnpm 12 #459

Closed

Description

@allisonmahmood

patchy init --tier 2 fails under pnpm 11.5.2 (the repo's own pinned pnpm) with Dependency installation failed; the previous project set is preserved. Tier 1 init works.

Cause

The patchy pin is the instance's tarball URL. pnpm 11 writes its lockfile entry as resolution: {tarball: …} with no integrity. Tier 2 init then adds the workerd pin and installs a second time, and pnpm refuses its own lockfile:

ERR_PNPM_MISSING_TARBALL_INTEGRITY  Cannot install package "patchy@http://…/sdk/patchy-0.0.1-<digest>.tgz": its lockfile entry has no "integrity" field

The same entry breaks every later command under pnpm 12.8.1: pnpm 12 verifies the lockfile before running scripts, so pnpm patchy dev|refresh|publish fails in any repo whose lockfile pnpm 11 wrote. A repo can't move between people on different pnpm majors.

Repro: a package.json pinning the instance tarball, pnpm install with pnpm 11.5.2, add workerd, pnpm install again.

Notes

  • The CLI already knows the tarball's SHA-512 from GET /api/release. Writing it into the lockfile entry (or installing in a way that records it) would make both pnpm majors accept the repo.
  • Project.install discards pnpm's stderr, so the user only sees the generic message. Relaying pnpm's first error line would have made this a two-minute diagnosis.
  • Recovery that worked on an affected repo: insert the old tarball's integrity into the entry, then run patchy refresh with pnpm 12.

Activity

  1. added
    bug
    area:cli
    on Oct 1, 2026
  2. added a commit that references this issue on Oct 1, 2026
    509d441
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

    area:clibug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions