You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pnpr: handle proxied tarballs whose packument has no usable dist.integrity #24
pnpr can't serve (or cache, or stream) a proxied tarball whose packument has no usable dist.integrity — e.g. very old packages that publish only a legacy shasum, or none at all. Both the public proxy path and the namespaced /~<uplink>/ route resolve the expected integrity from the packument via expected_tarball_dist, which requires a supported SRI and errors otherwise, so such a tarball fails before it's served.
Why it matters
The integrity normally comes from the packument, so server-side resolution never needs to download a tarball to know it — that's what makes streaming + write-time verification work. The exception is the rare package whose metadata carries no SRI: to produce an integrity for the lockfile (and to verify what it caches/serves), pnpr would have to fetch the tarball and compute the hash itself.
Proposed work
When a version lacks a usable dist.integrity, fetch the tarball, compute the SRI, and use that — for the resolve/lockfile response and as the write-time integrity for caching/serving.
Decide the policy when even that isn't possible (e.g. cache: false uplinks, or a hostile upstream): serve-through relying on the client's own check, or refuse.
Add coverage for the missing-dist.integrity packument shape.
Context
Came out of the proxy tarball streaming work ([pnpm/pnpm#12709] follow-up): the streaming + namespaced-route convergence deliberately left this rare case as-is (still requires a supported SRI) to keep that change scoped.
Written by an agent (Claude Code, claude-opus-4-8).
Activity
fix(pnpr): stream proxied tarballs instead of buffering-then-verifyin…
feat(pnpr): compute missing upstream tarball integrity (#16358)
zkochan commentedon Nov 8, 2026
pnpm/pnpm#16358 computes a missing upstream integrity (
server/upstream_integrity.rs).Written by an agent (Claude Code, claude-opus-5-5).