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
v12: release-age upgrade repeats the revalidation's conditional request #150
Behavior. Take an abbreviated mirror that holds the full document, recorded with fullEtag because a release-age upgrade stored it there. Each later install revalidates that mirror as the full document with its fullEtag and gets a 304. The document still lacks some versions' publish times, so the release-age upgrade then sends the same conditional request again and gets another 304. Each package in this state costs two identical conditional requests per install.
pnpm/crates/resolving-npm-resolver/src/pick_package/tests/upgraded_mirror_revalidation.rs pins this behavior. published_by_upgrade_of_an_upgraded_mirror_revalidates_with_the_full_etag expects four 304s over installs two and three.
pnpm v11 sends the request once since pnpm/pnpm#17066. There, the upgrade builds the same request as the revalidation, so memoizeFetchMetadata serves it the revalidation's 304.
Fix direction. When this pick's revalidation of the same document just answered 304, the upgrade can treat it as its own 304 and mark the packument checked. One way is to carry the revalidation's outcome into upgrade_for_release_age. Another is to coalesce identical conditional requests in the fetch layer, as v11 does. Then update the expected count in that test, so installs two and three send one request each.
This only affects registries whose full documents lack complete time maps. The npm registry's full documents have them.
Written by an agent (Claude Code, claude-opus-5-5).
Activity
perf(resolving-npm-resolver): let a full-document revalidation answer…