Skip to content

fix(pm): fail pinned bun and pnpm 12+ installs when the registry omits dist.integrity - #3555

Closed
voidzero-bot[bot] wants to merge 1 commit into
mainfrom
triagebot/fix-3554
Closed

voidzero-bot[bot] wants to merge 1 commit into
mainfrom
triagebot/fix-3554

Conversation

@voidzero-bot

@voidzero-bot voidzero-bot Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

For Bun and pnpm ≥ 12, the packageManager hash covers only the main npm tarball; the executable comes from a platform package (@oven/bun-*, @pnpm/exe.*) whose only integrity check is the registry's dist.integrity. When the platform version document omitted that field, vp downloaded the platform executable without any check, published it into the keyed .verified-v1 directory, and later runs reused it with zero registry requests — even if the registry then served an integrity that would not match. This broke the namespace's documented invariant that only a download verified against its pin creates an entry there.

A pinned install now fails with a dedicated, actionable error (PackageManagerIntegrityUnavailable) when the registry serves no integrity for the platform package, before the platform tarball is downloaded. Unpinned installs keep the existing fallback so mirrors without dist.integrity continue to work, matching the rule already applied to the 404 case for pinned installs.

Closes #3554

Automated triage bot fix (AI-assisted).

@cloudflare-workers-and-pages

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://triagebot-fix-3554-viteplus-dev.voidzero-docs.workers.dev (commit b2f1344)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://27ae75d1-viteplus-dev.voidzero-docs.workers.dev b2f1344 2026-11-23T11:59:32.305Z Visit the dashboard ↗

@github-actions

Copy link
Copy Markdown
Contributor

CLI artifact sizes (b2f1344)

Final release artifacts built by the canonical build-upstream and build-windows-cli actions.
The dist rows use the Linux build. The core total excludes .node files to match the release artifact.

Artifact Format Base PR Change
packages/cli/dist Directory total 2.38 MiB 2.38 MiB 0 B (0.00%)
packages/core/dist Directory total 4.11 MiB 4.11 MiB 0 B (0.00%)
Combined package dist Directory total 6.49 MiB 6.49 MiB 0 B (0.00%)
vp (Linux x64) Binary 8.56 MiB 8.56 MiB -4.00 KiB (-0.05%)
vp (Linux x64) gzip -9 3.92 MiB 3.92 MiB -134 B (-0.00%)
NAPI (Linux x64) Binary 37.28 MiB 37.29 MiB +8.00 KiB (+0.02%)
NAPI (Linux x64) gzip -9 14.90 MiB 14.90 MiB +5.00 KiB (+0.03%)
vp (macOS ARM64) Binary 5.61 MiB 5.61 MiB 0 B (0.00%)
vp (macOS ARM64) gzip -9 3.34 MiB 3.35 MiB +1.11 KiB (+0.03%)
NAPI (macOS ARM64) Binary 43.81 MiB 43.81 MiB 0 B (0.00%)
NAPI (macOS ARM64) gzip -9 19.03 MiB 19.03 MiB -745 B (-0.00%)
vp (Windows x64) Binary 6.64 MiB 6.64 MiB -1.50 KiB (-0.02%)
vp (Windows x64) gzip -9 3.03 MiB 3.03 MiB +826 B (+0.03%)
NAPI (Windows x64) Binary 33.23 MiB 33.24 MiB +6.00 KiB (+0.02%)
NAPI (Windows x64) gzip -9 13.63 MiB 13.63 MiB +1.99 KiB (+0.01%)
Trampoline (Windows x64) Binary 13.50 KiB 13.50 KiB 0 B (0.00%)
Trampoline (Windows x64) gzip -9 7.09 KiB 7.09 KiB 0 B (0.00%)
Installer (Windows x64) Binary 4.69 MiB 4.69 MiB 0 B (0.00%)
Installer (Windows x64) gzip -9 2.25 MiB 2.25 MiB +591 B (+0.03%)

@fengmk2

fengmk2 commented Nov 23, 2026

Copy link
Copy Markdown
Member

Superseded by #3553. #3553 requires dist.integrity for every package-manager download that no packageManager pin covers, including the Bun and pnpm 12+ platform package with a pin. It reads the package document when the version document is missing or omits the field, and fails before the download when neither gives it, so it also closes #3554. This PR keeps the fallback for unpinned installs and suggests removing the hash, which no longer matches that rule.

@fengmk2 fengmk2 closed this Nov 23, 2026
@voidzero-bot
voidzero-bot Bot deleted the triagebot/fix-3554 branch November 23, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pinned Bun and pnpm 12+ installs cache an unchecked executable when the registry omits dist.integrity

1 participant