Skip to content

fix(python): leave out an index file pnpm cannot read - #14946

Merged
zkochan merged 2 commits into
mainfrom
skip-unusable-python-files
Sep 16, 2026
Merged

zkochan merged 2 commits into
mainfrom
skip-unusable-python-files

Conversation

@zkochan

@zkochan zkochan commented Sep 16, 2026 •

Copy link
Copy Markdown
Member

Summary

Follow-up to #14920, which stopped an unparsable Requires-Python from aborting Python resolution. The same shape of failure is still reachable through four other readings of an index page. Reading a distribution's candidates fails the whole page when any single file it lists cannot be read:

File in the page Error today
demo-4.0.0-py3-none.whl (filename with too few parts) invalid Python wheel filename: demo-4.0.0-py3-none.whl
a file whose hashes carry no SHA-256 Python wheel demo-2.0.0-py3-none-any.whl has no SHA-256 digest
a file served from a non-HTTP(S) URL Python artifacts require HTTP(S) URLs without embedded credentials
a wheel belonging to another distribution Python index for demo contains a wheel for other

A Simple API page lists every release a distribution ever published, so one such file puts the distribution out of reach at every version, including the versions the project can install. The releases are immutable, so nothing the project does corrects them.

Each of these files is now left out, with a debug log naming the file and the reason, the way a wheel built for another interpreter already is. Refusing the file is still refusing it: none of them was installable, and pnpm never fetches an unverified or non-HTTP(S) artifact.

This is what uv does. In crates/uv-client/src/registry_client.rs it drops the file and keeps the page:

let filename = match DistFilename::try_from_filename_with_reason(&file.filename, package_name) {
    Ok(filename) => filename,
    Err(err) => { debug!("Skipping file for {package_name}: {:?} ({err})", file.filename); continue; }
};

What a lockfile pins keeps its hard errors. LockedWheel::check_installable and Lockfile::seed still refuse a pinned wheel pnpm cannot read, so a tampered or corrupt pylock.toml fails loudly instead of resolving to something else.

Not included: a version whose Requires-Dist cannot be parsed still aborts the resolution instead of marking that version unavailable. It is the same principle, but it also covers requirements pnpm deliberately rejects, such as the direct-URL form, where a clear error beats silently resolving an older version. Worth its own change.

Squash Commit Body

Reading a distribution's candidates failed the whole page when one file
it lists could not be read: an unreadable wheel filename, a file with no
SHA-256 digest, a URL that is not HTTP(S), or a wheel belonging to
another distribution. A page lists every release a distribution ever
published, so one such file put the distribution out of reach at every
version, including the versions a project can install.

Such a file is now left out, with a debug log naming it and the reason,
the way a wheel built for another interpreter already is. uv skips a file
it cannot read the same way. What a lockfile pins keeps its hard errors:
a pinned wheel pnpm cannot read is still refused rather than skipped.

Follows up pnpm/pnpm#14920.

Checklist

  • I checked the referenced issue and verified that none of the PRs
    already linked to it solves it.
  • New features are implemented only in the Rust pnpm v12 CLI. Bug fixes
    are implemented in every affected version.
  • Added a changeset (pnpm changeset) if this PR changes any published
    package. Keep it short and written for pnpm users — it becomes a release note.
  • Added or updated tests.

Written by an agent (Claude Code, claude-opus-5).


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Bug Fixes

    • pnpm install no longer fails when a Python package index contains unusable files, such as releases without SHA-256 checksums, invalid filenames, unsupported URLs, or mismatched package names.
    • Unusable files are skipped while valid releases continue through dependency resolution.
  • Tests

    • Added coverage confirming that invalid package files are ignored without affecting valid release selection.

Reading a distribution's candidates failed the whole page when one file
it lists could not be read: an unreadable wheel filename, a file with no
SHA-256 digest, a URL that is not HTTP(S), or a wheel belonging to
another distribution. A page lists every release a distribution ever
published, so one such file put the distribution out of reach at every
version, including the versions a project can install.

Such a file is now left out, with a debug log naming it and the reason,
the way a wheel built for another interpreter already is. uv skips a file
it cannot read the same way. What a lockfile pins keeps its hard errors:
a pinned wheel pnpm cannot read is still refused rather than skipped.
@coderabbitai

coderabbitai Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: fbeed0d3-8b02-4d39-9d42-b678b445fa3d

📥 Commits

Reviewing files that changed from the base of the PR and between 611531a and 4097034.

📒 Files selected for processing (3)
  • .changeset/skip-unusable-python-index-files.md
  • pnpm/crates/python-resolver/src/candidates.rs
  • pnpm/crates/python-resolver/src/tests.rs

Included review availability: Your plan provides up to 10 included reviews per hour; 4 remain after this review.


📝 Walkthrough

Walkthrough

The Python resolver now skips unusable index files instead of failing candidate collection. It logs skip reasons, retains valid wheels, adds test coverage, and records patch releases for pacquet and @pnpm/pnpr.

Changes

Python index candidate filtering

Layer / File(s) Summary
Candidate filtering
pnpm/crates/python-resolver/src/candidates.rs
installable_candidate now returns Option. Package mismatches, invalid URLs, integrity failures, and other unusable files are logged and skipped.
Filtering validation and release metadata
pnpm/crates/python-resolver/src/tests.rs, .changeset/skip-unusable-python-index-files.md
Tests verify that unusable files are excluded while valid wheels remain. The changeset records patch releases for pacquet and @pnpm/pnpr.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Sequence Diagram(s)

sequenceDiagram
  participant candidates_from_page
  participant installable_candidate
  participant unusable
  candidates_from_page->>installable_candidate: Evaluate each IndexFile
  installable_candidate->>unusable: Log invalid file and return None
  unusable-->>candidates_from_page: Skip file
  installable_candidate-->>candidates_from_page: Return valid Candidate
Loading

Suggested labels: product: pacquet

Merge Risk: ⚪ Minimal · up to 40970

No actionable merge-blocking risk was established from the available evidence.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch skip-unusable-python-files

Warning

Git: CodeRabbit could not clone the repository, so clone-backed analysis was skipped and this review may be incomplete. Verify repository clone access, such as SSH credentials, before requesting another full review. If clone access is intentionally unavailable, use path_filters to narrow the review scope.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Skip unusable files when resolving Python index candidates

🐞 Bug fix 🧪 Tests 📝 Documentation 🕐 20-40 Minutes

Grey Divider

AI Description

• Skip unreadable Python index files instead of failing the entire candidate page.
• Log skipped filenames and reasons while retaining valid releases for resolution.
• Cover malformed wheels, missing SHA-256 hashes, invalid URLs, and mismatched distributions.
Diagram

graph TD
  A["Simple API page"] --> B["Candidate reader"] --> C{"Usability checks"}
  C -- "usable" --> D["Wheel ranking"] --> E["Candidate map"]
  C -- "unusable" --> F["Debug skip"]
  F -- "next file" --> B
  E -- "next file" --> B
Loading
High-Level Assessment

Per-file filtering during index ingestion is the appropriate approach and matches established resolver behavior such as uv. It preserves URL and integrity validation while limiting recovery to unpinned index candidates; retaining page-level failures would block valid releases, while relaxing the validators globally could weaken strict lockfile handling.

Files changed (3) +77 / -15

Bug fix (1) +36 / -15
candidates.rsSkip unusable files during candidate extraction +36/-15

Skip unusable files during candidate extraction

• Changes per-file candidate extraction to return no candidate when wheel parsing, distribution identity, URL validation, or integrity checks fail. Adds shared helpers that emit debug diagnostics before skipping the file, while page-level parsing remains fallible.

pnpm/crates/python-resolver/src/candidates.rs

Tests (1) +35 / -0
tests.rsTest mixed valid and unusable index files +35/-0

Test mixed valid and unusable index files

• Adds regression coverage proving a valid candidate survives alongside files with missing SHA-256 hashes, non-HTTP URLs, malformed wheel names, or mismatched distribution names.

pnpm/crates/python-resolver/src/tests.rs

Documentation (1) +6 / -0
skip-unusable-python-index-files.mdDocument resilient Python index resolution +6/-0

Document resilient Python index resolution

• Adds patch release notes for 'pacquet' and '@pnpm/pnpr'. Explains that unusable index files are omitted while resolution continues with remaining releases.

.changeset/skip-unusable-python-index-files.md

@qodo-code-review

qodo-code-review Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (3) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. One helper comment repeats its body 📘 Rule violation ⚙ Maintainability
Description
The unusable doc comment says the helper leaves a file out and records why, directly mirroring its
debug! call and None return. Because it supplies no rationale or constraint, a later logging or
return change can leave the comment stale without helping a maintainer understand the helper's
intent.
Code

pnpm/crates/python-resolver/src/candidates.rs[143]

+/// Leave one index file out, recording why it cannot be used.
Relevance

●●● Strong

Recent accepted Rust review feedback removes private comments that merely narrate adjacent code.

PR-#14920
PR-#14909

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Compliance rule 713467 rejects comments that only restate identifiers or directly inferable
operations. The comment above unusable paraphrases the immediately following debug log and None
return.

Rule 713467: Avoid redundant comments that restate the code
pnpm/crates/python-resolver/src/candidates.rs[143-146]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The new `unusable` doc comment merely narrates the helper's obvious logging and return operations without adding rationale, constraints, or an invariant.

## Fix Focus Areas
- pnpm/crates/python-resolver/src/candidates.rs[143-146]

## Recommended Fix
Remove the one-line doc comment. Keep the surrounding `usable` documentation, which already explains why unreadable index files are skipped.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Release note obscures who skips files 📘 Rule violation ⚙ Maintainability
Description
That file is left out uses passive voice even though pnpm install is the actor responsible for
skipping unusable index entries. In generated release notes, the actor is therefore implicit at the
exact point where the new resolution behavior is explained.
Code

.changeset/skip-unusable-python-index-files.md[6]

+`pnpm install` no longer fails when a Python index lists a file pnpm cannot use, such as a release with no SHA-256 digest or an unreadable wheel filename. That file is left out and the project resolves against the remaining releases.
Relevance

●●● Strong

Recent accepted changeset feedback favors explicit active actors when explaining observable
behavior.

PR-#14847
PR-#14920

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Compliance rule 3058332 requires an explicit subject and active voice when the actor matters. The
changed text says the file is left out, although the observable behavior belongs to pnpm.

Rule 3058332: Use plain, direct, and quantifiable language in changeset entries
.changeset/skip-unusable-python-index-files.md[6-6]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The changeset uses passive voice for the file-skipping behavior and omits the command responsible for that action.

## Fix Focus Areas
- .changeset/skip-unusable-python-index-files.md[6-6]

## Recommended Fix
Rewrite the second sentence in active voice with `pnpm` as the explicit subject, or combine it into a concise active sentence stating that `pnpm install` leaves out unusable files and resolves the remaining releases.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Release note blends old and new behavior 📘 Rule violation ⚙ Maintainability
Description
The changeset's first sentence uses no longer fails to embed the previous failure in the same
sentence that announces the corrected behavior. Because this is the bug-fix release entry, the
historical symptom reaches generated release notes without its own past-tense sentence.
Code

.changeset/skip-unusable-python-index-files.md[6]

+`pnpm install` no longer fails when a Python index lists a file pnpm cannot use, such as a release with no SHA-256 digest or an unreadable wheel filename. That file is left out and the project resolves against the remaining releases.
Relevance

●●● Strong

Recent accepted changeset feedback explicitly requires separating prior failures into past-tense
sentences.

PR-#14847
PR-#14909

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Compliance rule 3058498 requires previous buggy behavior to appear in a separate past-tense sentence
when it is mentioned. The changed release entry instead incorporates the previous failure through
no longer fails.

Rule 3058498: Describe previous buggy behavior in a separate past-tense sentence
.changeset/skip-unusable-python-index-files.md[6-6]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The bug-fix changeset combines the former failure with the corrected behavior through `no longer fails`, rather than describing only current behavior or placing history in a separate past-tense sentence.

## Fix Focus Areas
- .changeset/skip-unusable-python-index-files.md[6-6]

## Recommended Fix
Rewrite the entry positively and in current terms, for example: `pnpm install` now leaves out unusable Python index files and resolves against the remaining releases.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View medium (1)
4. Bad indexes flood debug logs 🐞 Bug ➹ Performance
Description
unusable emits a separate debug event for every rejected index file while candidate processing
continues through the page. When debug logging is enabled, a registry can fill the permitted 64 MiB
response with unusable entries, causing hundreds of thousands of events and substantial CPU and log
output during resolution.
Code

pnpm/crates/python-resolver/src/candidates.rs[145]

+    tracing::debug!("skipping Python file {filename}: {reason}");
Relevance

●● Moderate

Potential log amplification is plausible, but no closely matching accepted or rejected precedent was
found.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The candidate loop continues after each rejected file, and every error routed through usable
reaches the new debug event. Index processing permits responses up to 64 MiB, while the regression
test confirms multiple unusable entries are processed independently rather than stopping at the
first one.

pnpm/crates/python-resolver/src/candidates.rs[75-89]
pnpm/crates/python-resolver/src/candidates.rs[136-146]
pnpm/crates/python-installer/src/registry.rs[16-17]
pnpm/crates/python-installer/src/registry.rs[53-57]
pnpm/crates/python-resolver/src/tests.rs[150-172]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Candidate processing now emits one debug event for every unusable file, allowing a large index page to amplify CPU use and debug-log volume.

## Fix Focus Areas
- pnpm/crates/python-resolver/src/candidates.rs[76-89]
- pnpm/crates/python-resolver/src/candidates.rs[136-146]

## Recommended Fix
Bound detailed skipped-file logging per page, then emit one summary containing the total skipped count and aggregated reasons. Preserve enough sampled filenames for diagnosis without generating an event for every registry entry.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
✅ Compliance rules (platform): 37 rules
✅ Cross-repo context — repo relationships
Review mode: ⚖️ Balanced: This changes Python package resolution and artifact-validation error handling across several cases, with security and correctness implications, but the logic is localized enough for a single careful review.

Grey Divider

Tip of the day
💡 Did you know, you can group findings by type and pick your Finding display, from Minimal to Full

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

@greptile-apps

greptile-apps Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; unusable index files remain rejected without preventing valid files on the same page from resolving.

Reviews (1) · Last reviewed commit: "style(python-resolver): name the index-f..."

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Sep 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                                            main                                   pr
-----                                            ----                                   --
lockfile/parse_pnpm_lock                         1.00     11.3±0.07ms    33.0 MB/sec    1.06     12.0±0.45ms    31.1 MB/sec
packument/parse                                  1.00     37.4±0.38µs  1774.8 MB/sec    1.08     40.3±0.15µs  1646.5 MB/sec
tarball/download_dependency                      1.04      3.8±0.14ms  1127.7 KB/sec    1.00      3.7±0.13ms  1167.8 KB/sec
tarball_batch/cold_store_many_medium_tarballs    1.05   190.6±10.93ms 83.9 KElem/sec    1.00    180.8±2.87ms 88.5 KElem/sec
workspace_resolution/hoist_heavy                 1.00    234.0±1.40ms        ? ?/sec    1.16   271.5±19.54ms        ? ?/sec
workspace_sort/chained_projects                  1.00     14.1±0.64ms        ? ?/sec    1.01     14.3±3.26ms        ? ?/sec

@github-actions

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: 4097034adc66

Regular scenarios report direct and pnpr installs. The peer-heavy resolver scenario compares current Rust, main Rust, and TypeScript pnpm; the linked-workspace scenario compares current Rust against main Rust. Bencher consumes pacquet@HEAD and pnpr@HEAD.

The tables below show mean ± σ; Bencher thresholds on the minimum latency, which is far less perturbed by shared-runner contention (noise only adds time).

Scenario: Isolated linker: fresh restore, cold cache + cold store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.354 ± 0.146 2.239 2.613 1.68 ± 0.17
pacquet@main 2.334 ± 0.107 2.236 2.500 1.67 ± 0.15
pnpr@HEAD 1.401 ± 0.112 1.281 1.616 1.00
pnpr@main 1.414 ± 0.066 1.311 1.481 1.01 ± 0.09
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.35384506626,
      "stddev": 0.14574171376537637,
      "median": 2.2769185515599997,
      "user": 1.20967672,
      "system": 1.3740681,
      "min": 2.2385152540599997,
      "max": 2.61301898406
    },
    {
      "command": "pacquet@main",
      "mean": 2.33390853926,
      "stddev": 0.10662477818026872,
      "median": 2.28915980806,
      "user": 1.23362812,
      "system": 1.3692109000000001,
      "min": 2.23619255206,
      "max": 2.4998394620599997
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.4012176451599998,
      "stddev": 0.11187188650869895,
      "median": 1.3520111370599999,
      "user": 1.14893222,
      "system": 1.2635067,
      "min": 1.2805388840599998,
      "max": 1.61620896206
    },
    {
      "command": "pnpr@main",
      "mean": 1.41356804986,
      "stddev": 0.06580446474779686,
      "median": 1.43678261406,
      "user": 1.15286362,
      "system": 1.3447482,
      "min": 1.31120868406,
      "max": 1.48093435706
    }
  ]
}

Scenario: Isolated linker: fresh restore, hot cache + hot store

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 221.5 ± 15.3 194.8 251.0 1.00
pacquet@main 316.3 ± 43.4 229.6 395.5 1.43 ± 0.22
pnpr@HEAD 233.8 ± 17.6 209.9 257.9 1.06 ± 0.11
pnpr@main 229.5 ± 6.9 215.8 240.1 1.04 ± 0.08
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.22151669476000002,
      "stddev": 0.015310327031669142,
      "median": 0.22193413986000002,
      "user": 0.22687687999999998,
      "system": 0.5543466199999999,
      "min": 0.19476247236000002,
      "max": 0.25097641836
    },
    {
      "command": "pacquet@main",
      "mean": 0.31627265146,
      "stddev": 0.04338473018095578,
      "median": 0.31228747885999997,
      "user": 0.3492404799999999,
      "system": 0.7174591199999998,
      "min": 0.22961691936000003,
      "max": 0.39547993536000003
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.23377156226,
      "stddev": 0.017634069578823543,
      "median": 0.23568985836000003,
      "user": 0.23069107999999994,
      "system": 0.53018912,
      "min": 0.20989307236000002,
      "max": 0.25785427236
    },
    {
      "command": "pnpr@main",
      "mean": 0.22947453975999998,
      "stddev": 0.006915084147470453,
      "median": 0.22962349336000004,
      "user": 0.22757188,
      "system": 0.5449507199999999,
      "min": 0.21577964436000002,
      "max": 0.24005803036000004
    }
  ]
}

Scenario: Isolated linker: repeat install, hot cache + hot store

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 7.0 ± 1.2 5.5 14.2 1.20 ± 0.22
pacquet@main 6.1 ± 0.5 5.3 9.1 1.06 ± 0.10
pnpr@HEAD 5.9 ± 0.4 5.3 8.0 1.03 ± 0.08
pnpr@main 5.8 ± 0.2 5.2 7.1 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.00697073875185929,
      "stddev": 0.0012334068207023436,
      "median": 0.00669895838,
      "user": 0.004393161306532664,
      "system": 0.003012196180904523,
      "min": 0.00548972038,
      "max": 0.014159178380000002
    },
    {
      "command": "pacquet@main",
      "mean": 0.006106265677619047,
      "stddev": 0.0004953219970157015,
      "median": 0.00601628788,
      "user": 0.003979861904761905,
      "system": 0.00253780838095238,
      "min": 0.00529344138,
      "max": 0.009084855380000001
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.0059467556956626436,
      "stddev": 0.00039650083519659595,
      "median": 0.00588515138,
      "user": 0.003949244578313256,
      "system": 0.002390271325301205,
      "min": 0.00525039138,
      "max": 0.008036709380000001
    },
    {
      "command": "pnpr@main",
      "mean": 0.005785284494143923,
      "stddev": 0.00024278074447538415,
      "median": 0.00578702738,
      "user": 0.003384282133995038,
      "system": 0.0027586578660049638,
      "min": 0.0052268463800000005,
      "max": 0.0070896123800000006
    }
  ]
}

Scenario: Isolated linker: repeat install, cold cache + hot store

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 9.1 ± 1.1 6.9 13.9 1.14 ± 0.17
pacquet@main 8.0 ± 0.7 6.7 11.7 1.00 ± 0.12
pnpr@HEAD 8.0 ± 0.7 6.8 10.7 1.00
pnpr@main 8.0 ± 0.6 6.8 10.9 1.01 ± 0.11
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.00909216483416058,
      "stddev": 0.001134055251352377,
      "median": 0.008937655440000001,
      "user": 0.005162771532846712,
      "system": 0.004578770145985402,
      "min": 0.00690846944,
      "max": 0.01386289344
    },
    {
      "command": "pacquet@main",
      "mean": 0.008009300736428573,
      "stddev": 0.0006635922523543273,
      "median": 0.00791296144,
      "user": 0.004433321428571431,
      "system": 0.004185561285714284,
      "min": 0.00668949044,
      "max": 0.01168597844
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.007991691556363626,
      "stddev": 0.0006778240133311582,
      "median": 0.00783494744,
      "user": 0.004783709090909092,
      "system": 0.003793042690909091,
      "min": 0.0067610794400000005,
      "max": 0.01071747044
    },
    {
      "command": "pnpr@main",
      "mean": 0.008040586432125985,
      "stddev": 0.0006095210699703839,
      "median": 0.00794133144,
      "user": 0.004740151181102355,
      "system": 0.0038482943307086618,
      "min": 0.00681602944,
      "max": 0.01085711044
    }
  ]
}

Scenario: Isolated linker: fresh install, cold cache + cold store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.615 ± 0.142 2.523 2.926 1.69 ± 0.16
pacquet@main 2.548 ± 0.013 2.531 2.562 1.65 ± 0.12
pnpr@HEAD 1.552 ± 0.133 1.419 1.790 1.01 ± 0.11
pnpr@main 1.543 ± 0.116 1.437 1.782 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.61466514232,
      "stddev": 0.14200942573450417,
      "median": 2.54788771422,
      "user": 2.18323102,
      "system": 2.2998181200000003,
      "min": 2.52341944272,
      "max": 2.9261749037199998
    },
    {
      "command": "pacquet@main",
      "mean": 2.5481054290199996,
      "stddev": 0.012693757057074088,
      "median": 2.55188935522,
      "user": 2.10793952,
      "system": 1.99233792,
      "min": 2.5309472077199997,
      "max": 2.5620962177199997
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.5521964401200001,
      "stddev": 0.13315565277171468,
      "median": 1.54234277772,
      "user": 1.3117562200000001,
      "system": 1.65167182,
      "min": 1.4193066917200001,
      "max": 1.7904518117200001
    },
    {
      "command": "pnpr@main",
      "mean": 1.54288337302,
      "stddev": 0.11588419899264185,
      "median": 1.49635141172,
      "user": 1.31007952,
      "system": 1.7296781200000002,
      "min": 1.43679022272,
      "max": 1.78187074372
    }
  ]
}

Scenario: Isolated linker: fresh install, hot cache + hot store

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 361.5 ± 19.3 317.4 395.8 1.42 ± 0.09
pacquet@main 333.9 ± 16.2 314.5 375.9 1.31 ± 0.08
pnpr@HEAD 254.4 ± 7.8 243.1 266.3 1.00
pnpr@main 265.3 ± 14.6 244.7 297.2 1.04 ± 0.07
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.36145543706000005,
      "stddev": 0.019292692856947367,
      "median": 0.36190064056,
      "user": 0.5951976999999998,
      "system": 0.7670828999999999,
      "min": 0.31739233556,
      "max": 0.39583966156
    },
    {
      "command": "pacquet@main",
      "mean": 0.33389808386,
      "stddev": 0.016152578057027245,
      "median": 0.33043534856,
      "user": 0.526206,
      "system": 0.7555927,
      "min": 0.31452925255999997,
      "max": 0.37585861756
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.25436591325999997,
      "stddev": 0.0078413410240586,
      "median": 0.25466824256,
      "user": 0.1874127,
      "system": 0.49453629999999993,
      "min": 0.24311805456000002,
      "max": 0.26630999156
    },
    {
      "command": "pnpr@main",
      "mean": 0.26525628206,
      "stddev": 0.01457677489096961,
      "median": 0.26514319156,
      "user": 0.21719150000000004,
      "system": 0.4917962,
      "min": 0.24473363856000002,
      "max": 0.29721968556
    }
  ]
}

Scenario: Isolated linker: fresh install, cold cache + hot store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.544 ± 0.019 1.501 1.562 5.58 ± 0.17
pacquet@main 1.539 ± 0.009 1.527 1.551 5.56 ± 0.16
pnpr@HEAD 0.277 ± 0.014 0.257 0.305 1.00 ± 0.06
pnpr@main 0.277 ± 0.008 0.263 0.289 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.5443372083800002,
      "stddev": 0.019062244549484332,
      "median": 1.54721309938,
      "user": 0.8018442400000001,
      "system": 0.8743916800000001,
      "min": 1.5010516923800001,
      "max": 1.56209793538
    },
    {
      "command": "pacquet@main",
      "mean": 1.5385453320800002,
      "stddev": 0.009046726688920924,
      "median": 1.53510272088,
      "user": 0.80985224,
      "system": 0.88630228,
      "min": 1.5274449993800001,
      "max": 1.5511872473800001
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.27686596298,
      "stddev": 0.013962108575495008,
      "median": 0.27886337038000003,
      "user": 0.22100413999999996,
      "system": 0.5208761799999999,
      "min": 0.25728030038000005,
      "max": 0.30477118538000003
    },
    {
      "command": "pnpr@main",
      "mean": 0.2768426541800001,
      "stddev": 0.007956728595069639,
      "median": 0.27660809988,
      "user": 0.22012424,
      "system": 0.5274343800000001,
      "min": 0.26262061038,
      "max": 0.28930211138
    }
  ]
}

Scenario: Isolated linker: fresh resolve, hot cache, offline

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 239.3 ± 14.8 218.9 276.6 2.51 ± 0.17
pacquet@main 225.8 ± 8.4 211.7 239.3 2.37 ± 0.12
pnpr@HEAD 95.2 ± 3.0 90.3 101.7 1.00
pnpr@main 96.7 ± 2.3 93.8 102.8 1.02 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.23931375801,
      "stddev": 0.01477815290023244,
      "median": 0.23908393926,
      "user": 0.24013179000000004,
      "system": 0.10094777999999999,
      "min": 0.21893973526000002,
      "max": 0.27663177526
    },
    {
      "command": "pacquet@main",
      "mean": 0.22580296934333333,
      "stddev": 0.00840906523958919,
      "median": 0.22882645176,
      "user": 0.2411377066666667,
      "system": 0.08812503,
      "min": 0.21170841526,
      "max": 0.23928621926000002
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.09515653611714285,
      "stddev": 0.002987778933335582,
      "median": 0.09499656276,
      "user": 0.038687789999999986,
      "system": 0.01705420857142857,
      "min": 0.09032305026,
      "max": 0.10172118926
    },
    {
      "command": "pnpr@main",
      "mean": 0.09674083043857142,
      "stddev": 0.0023290606715109193,
      "median": 0.09586237976,
      "user": 0.03812328999999999,
      "system": 0.017471109285714288,
      "min": 0.09377315126,
      "max": 0.10284746626
    }
  ]
}

Scenario: Isolated linker: peer-heavy resolve, hot cache, offline

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 667.0 ± 87.3 566.1 810.9 1.00
pacquet@main 707.0 ± 41.4 639.1 771.0 1.06 ± 0.15
pnpm@HEAD 3002.4 ± 83.3 2836.4 3159.1 4.50 ± 0.60
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.6670051338133334,
      "stddev": 0.08730686767485069,
      "median": 0.64673522748,
      "user": 0.6998341688888888,
      "system": 0.14945659777777773,
      "min": 0.56609063548,
      "max": 0.81085963248
    },
    {
      "command": "pacquet@main",
      "mean": 0.70703638948,
      "stddev": 0.04138533163881658,
      "median": 0.7048736844800001,
      "user": 0.7309051688888888,
      "system": 0.14738648666666665,
      "min": 0.6390679344800001,
      "max": 0.7709857104800001
    },
    {
      "command": "pnpm@HEAD",
      "mean": 3.0024325533688887,
      "stddev": 0.08331070039451476,
      "median": 2.99962268248,
      "user": 4.643733391111111,
      "system": 0.22880770888888888,
      "min": 2.83640195948,
      "max": 3.15910991148
    }
  ]
}

Scenario: Isolated linker: linked-workspace resolve, hot cache, offline

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 193.8 ± 6.2 188.1 205.0 1.00
pacquet@main 196.6 ± 7.2 185.9 205.0 1.01 ± 0.05
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.19384208293333335,
      "stddev": 0.006157241701039373,
      "median": 0.1907373724,
      "user": 0.14516441333333335,
      "system": 0.10527160666666667,
      "min": 0.1881003884,
      "max": 0.2050187224
    },
    {
      "command": "pacquet@main",
      "mean": 0.1966357879333333,
      "stddev": 0.00717372384057069,
      "median": 0.1987943794,
      "user": 0.14938401333333334,
      "system": 0.10480694,
      "min": 0.1858687244,
      "max": 0.2049712134
    }
  ]
}

Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.582 ± 0.193 4.375 4.963 1.32 ± 0.06
pacquet@main 4.437 ± 0.086 4.337 4.633 1.28 ± 0.04
pnpr@HEAD 3.507 ± 0.067 3.406 3.620 1.01 ± 0.03
pnpr@main 3.478 ± 0.086 3.389 3.611 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.58207770762,
      "stddev": 0.1934302450407947,
      "median": 4.539383061420001,
      "user": 1.6440190599999998,
      "system": 2.1656740599999997,
      "min": 4.37466801492,
      "max": 4.96340607992
    },
    {
      "command": "pacquet@main",
      "mean": 4.4371451660200005,
      "stddev": 0.08603487701836943,
      "median": 4.42600428392,
      "user": 1.60184356,
      "system": 2.0022871600000003,
      "min": 4.33654775992,
      "max": 4.6332391499200005
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.50681134372,
      "stddev": 0.06678336062836927,
      "median": 3.48567905342,
      "user": 1.59767306,
      "system": 1.9508375599999996,
      "min": 3.40600627292,
      "max": 3.61951020392
    },
    {
      "command": "pnpr@main",
      "mean": 3.4782026097200003,
      "stddev": 0.0859276403866639,
      "median": 3.44122869992,
      "user": 1.4888647599999998,
      "system": 1.9283730600000002,
      "min": 3.38905612892,
      "max": 3.61090026392
    }
  ]
}

Scenario: GVS linker: fresh restore, hot cache + hot store

Same install as the isolated fresh-restore hot/hot scenario, into the shared virtual store, the layout pnpm 12 installs into by default. Scenarios run on separate machines, so compare main and branch within each table.

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 101.5 ± 7.8 89.8 120.8 1.00
pacquet@main 105.4 ± 6.5 96.9 121.7 1.04 ± 0.10
pnpr@HEAD 117.2 ± 5.7 109.3 129.8 1.15 ± 0.10
pnpr@main 124.0 ± 8.8 114.5 146.2 1.22 ± 0.13
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.10154617191565216,
      "stddev": 0.007755543361711471,
      "median": 0.10099123922000001,
      "user": 0.12623158869565218,
      "system": 0.12816898695652174,
      "min": 0.08976983022000001,
      "max": 0.12083536322000002
    },
    {
      "command": "pacquet@main",
      "mean": 0.10544557784500003,
      "stddev": 0.006481642346715709,
      "median": 0.10423804172000001,
      "user": 0.12903922999999998,
      "system": 0.1390986916666667,
      "min": 0.09685576722000001,
      "max": 0.12168495622000002
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.11717595791565216,
      "stddev": 0.00573146471834433,
      "median": 0.11523824822,
      "user": 0.13918763217391303,
      "system": 0.1293606391304348,
      "min": 0.10925998822,
      "max": 0.12979569322
    },
    {
      "command": "pnpr@main",
      "mean": 0.12396773683904765,
      "stddev": 0.008757398749738285,
      "median": 0.12216756422000001,
      "user": 0.14754426571428575,
      "system": 0.12993428095238096,
      "min": 0.11454700522000001,
      "max": 0.14620868222000002
    }
  ]
}

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/14946
Testbedpacquet
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
gvs-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
89.77 ms
(-21.41%)Baseline: 114.23 ms
137.08 ms
(65.49%)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
🚷 view threshold
2,523.42 ms
(+2.04%)Baseline: 2,472.94 ms
2,967.52 ms
(85.03%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,501.05 ms
(-4.54%)Baseline: 1,572.37 ms
1,886.84 ms
(79.55%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
317.39 ms
(-18.42%)Baseline: 389.04 ms
466.85 ms
(67.99%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
218.94 ms
(+10.37%)Baseline: 198.37 ms
238.04 ms
(91.98%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,238.52 ms
(-1.52%)Baseline: 2,272.96 ms
2,727.55 ms
(82.07%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,374.67 ms
(+0.74%)Baseline: 4,342.45 ms
5,210.93 ms
(83.95%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
194.76 ms
(-11.82%)Baseline: 220.86 ms
265.03 ms
(73.49%)
isolated-linker.linked-workspace-resolve.hot-cache.offline📈 view plot
🚷 view threshold
188.10 ms
(+7.78%)Baseline: 174.52 ms
209.42 ms
(89.82%)
isolated-linker.peer-heavy-resolve.hot-cache.offline📈 view plot
🚷 view threshold
566.09 ms
(+2.22%)Baseline: 553.82 ms
664.58 ms
(85.18%)
isolated-linker.repeat-install.cold-cache.hot-store📈 view plot
🚷 view threshold
6.91 ms
(+5.31%)Baseline: 6.56 ms
7.87 ms
(87.76%)
isolated-linker.repeat-install.hot-cache.hot-store📈 view plot
🚷 view threshold
5.49 ms
(-21.52%)Baseline: 7.00 ms
8.39 ms
(65.40%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/14946
Testbedpnpr

⚠️ WARNING: No Threshold found!

Without a Threshold, no Alerts will ever be generated.

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds flag.

Click to view all benchmark results
BenchmarkLatencymilliseconds (ms)
gvs-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
109.26 ms
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,419.31 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
257.28 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
243.12 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
90.32 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,280.54 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,406.01 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
209.89 ms
isolated-linker.repeat-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
6.76 ms
isolated-linker.repeat-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
5.25 ms
🐰 View full continuous benchmarking report in Bencher

@zkochan
zkochan merged commit 8dc2ba4 into main Sep 16, 2026
54 of 55 checks passed
@zkochan
zkochan deleted the skip-unusable-python-files branch September 16, 2026 08:32
zkochan added a commit that referenced this pull request Sep 16, 2026
)

A wheel whose `Requires-Dist` pnpm cannot parse failed the whole
resolution, so one broken release took its distribution down at every
version the project could otherwise install. The release is immutable, so
nothing the project does corrects it.

Such a release is now unavailable to the solver, which backtracks to one
whose requirements pnpm can read, and reports the unreadable requirement
when no release works. uv marks a version with unreadable metadata
unavailable the same way.

The direct-URL form keeps its error. `read_requirement` tells a line pnpm
cannot parse apart from one it parses and does not support: every release
declaring a URL requirement names the same unsupported feature, so
quietly installing an older release would hide what the project has to
change. `parse_requirement`, which reads what a project itself declares,
is unchanged.

Follows up #14946.
u9g pushed a commit to u9g/pnpm that referenced this pull request Sep 25, 2026
Reading a distribution's candidates failed the whole page when one file
it lists could not be read: an unreadable wheel filename, a file with no
SHA-256 digest, a URL that is not HTTP(S), or a wheel belonging to
another distribution. A page lists every release a distribution ever
published, so one such file put the distribution out of reach at every
version, including the versions a project can install.

Such a file is now left out, with a debug log naming it and the reason,
the way a wheel built for another interpreter already is. uv skips a file
it cannot read the same way. What a lockfile pins keeps its hard errors:
a pinned wheel pnpm cannot read is still refused rather than skipped.

Follows up pnpm#14920.
u9g pushed a commit to u9g/pnpm that referenced this pull request Sep 25, 2026
…m#14948)

A wheel whose `Requires-Dist` pnpm cannot parse failed the whole
resolution, so one broken release took its distribution down at every
version the project could otherwise install. The release is immutable, so
nothing the project does corrects it.

Such a release is now unavailable to the solver, which backtracks to one
whose requirements pnpm can read, and reports the unreadable requirement
when no release works. uv marks a version with unreadable metadata
unavailable the same way.

The direct-URL form keeps its error. `read_requirement` tells a line pnpm
cannot parse apart from one it parses and does not support: every release
declaring a URL requirement names the same unsupported feature, so
quietly installing an older release would hide what the project has to
change. `parse_requirement`, which reads what a project itself declares,
is unchanged.

Follows up pnpm#14946.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product: pacquet reviewed: coderabbit CodeRabbit submitted an approving review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant