Repository navigation
Conversation
Prepares the workspace for the newer perfectionist revision pinned in a later commit, which adds `arbitrary_source_item_ordering`, `redundant_derive_more_forward_template` and `core_instead_of_std`. Module bodies now lead with their `pub mod` declarations, then their `pub use` re-exports, then private imports and everything else. `derive_more` formatting templates that only restate the forward the derive already performs are gone, and the one `core::` path in a `std` crate is spelled `std::`. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
…rage Brings the route classifier, the registry-graph validators, the storage walks and the publish journal under a cognitive complexity of 10, which the perfectionist revision pinned in a later commit enforces. Each split names one responsibility: a router source's validation, a directory entry's classification, one journaled package's promotion. `redact_parseable_url_candidate` no longer re-serializes a URL's query string when only its userinfo was redacted. The query rewrite ran whenever anything about the URL had changed, not only when a sensitive query key was found. The one `pub(crate) mod tests;` in the workspace moves above the imports of its file, where `arbitrary_source_item_ordering` puts a `pub mod`. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
…d upstream Continues bringing pnpr under a cognitive complexity of 10. The htpasswd parser reads one line at a time, capped and uncapped user registration are separate paths, an OSV range event answers for itself, and the OCI fetch loop delegates credential attachment and redirect resolution. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
The publication path now reads as its phases: resolve the blobs a publication brings, charge the quota, claim the scopes, store, settle. Reclamation, the usage-document mutation and the write-failure test double are split the same way. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
Covers the CLI override folding, the OCI garbage collector's inventory and sweep phases, and the resolver's request validation, which now collects the specs a request could fetch in one place instead of twice. The capped-user insert in the libsql auth backend is repaired: the counter-slot helper it was split into took the cap as a `usize`, which only the `libsql` feature build compiles. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
`handle_npm_resolve` now reads as its stages: refuse, verify the input lockfile, answer from a frozen lockfile or the resolution cache, else stream. The detached resolve task and the temp-workspace writing each moved into their own function. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
The referrers scan is now a page with its own read and response budgets, a filter that answers whether a manifest must be read, and a step per indexed entry. Blob reads, upload appends and token scope checks each moved their branching into a named helper. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
…handlers Token issue now grants scope by scope and action by action. The manifest proxy separates its `HEAD` answer, its bounded read and its digest verification. Blob deletion's two-phase write is one attempt per call, and manifest staging checks its referenced blobs on its own. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
Version immutability is checked field by field, a batch validates its documents and stages them in separate passes, and a publish's already-published check reads on its own. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
Route mounting is separated from state construction, and the registry surface's ecosystems mount together. The registry directory builds one entry at a time, and the PyPI project list gathers the names a caller can see on its own. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
The OCI collector's inventory is a type of its own, whose methods take an exclusive borrow: `rusqlite::Connection` is `Send` but not `Sync`, so a shared borrow held across an await would have made every collector future `!Send`. Also restores the doc comment an inserted helper had separated from `unique_tmp_path`. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
Completes the pnpr side: every function in the registry server is now under a cognitive complexity of 10. Search and the org package map each gather one source at a time, with a named predicate deciding what a caller may see. The upstream search budget charges its own pages and results. The OSV packument filter separates the versions pass from the dist-tag and time passes. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
Covers the files the first pass missed: a crate root whose `pub use` block sat below its private `mod` declarations, two `pub mod` and two test-module declarations written at the bottom of their file, and the `crate::` imports two blocks each that had to merge once they became neighbours. The `login_fake!` test macro is exported at the crate root, so its re-export no longer has to follow the definition. The module is `#[cfg(test)]`, so nothing is added to the crate's published surface. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
Covers env-replace, git-utils, deps-path, modules-yaml and package-is-installable: placeholder scanning, `.git` pointer resolution, suffix sanitizing, stored-layout normalization and platform matching each read as one step now. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
… crates The Cargo resolver registers one package's candidate versions in its own function, the Node resolver separates the four SHASUMS fetch paths from the per-platform asset it builds, and the git fetcher resolves one prepublish script's stage and command on its own. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
…er crates Injected-dep bin removal, lockfile-seeded version weighting, the project graph's index building and per-importer edge resolution, and pack's two identity checks each read on their own now. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
…ator crates Adding a dependency drops it from the other install groups in a named step, the runtime failure policy reads and stamps `engines.runtime` separately, and the install coordinator rolls back through its projections on its own. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
…iting Project discovery separates pattern splitting, parse-checking, the parallel merge and the per-root grouping. The publish-time `workspace:` rewrite shares one helper for the installed directory and one for the specifier a published manifest records. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
Entry resolution is one function per mode: confined to the directory, following links, or plain. A vanished path reads as "skip this entry" in one shared helper instead of at every stat call. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
The bundled-dependency closure decides what it admits in one function, and a package's own file list reads as the three passes it always was: the ignore-filtered walk, the always-included root names, and the force-included `main` / `bin` paths. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
Array and object serialization are separate functions, the reverse dependency index builds on its own, and each lockfile format reads one entry at a time. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
Cache compaction separates picking the surviving records from replacing the file. The verification gate reads the cached verdict and records a new one through named helpers instead of inline `if let` blocks at three call sites. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
One terminal poll answers with what it saw, and a successful poll's token is read in its own function. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
Batch publish groups one packed package at a time and sends one registry's batch in its own function. Single publish separates the endpoint, the authorization header, the provenance attachment and the registry's answer. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
One index file becomes at most one candidate in its own function, wheel metadata reads a line at a time, and a `file:` tarball resolves apart from the directory branch. Local specifier parsing separates the protocol choice from the path it fetches. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
An uploaded blob is decoded and checked in its own function, and one added manifest file's mode, size and integrity are checked apart from the running artifact-size total. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
Scoped-package collection, the shim already on disk, the Windows siblings and the write itself are each their own function. The `sh` shim separates its `NODE_PATH` block, its runtime `exec` block and the MSYS branch that wraps it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
POSIX normalization appends one component at a time, the retry loop sleeps its backoff in a named step, lock acquisition reports what one create attempt settled, and forced symlinking separates creating the parent from clearing an occupant. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
Credential lookup retries without the port in one shared helper instead of four inline blocks. Client construction separates the proxy setting, the redirect policy, one builder and the platform-roots fallback. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
The worker's line dispatch hands a fetcher callback to its own function, which replies through a shared stdin writer. The fetcher adapter decides what resolution the next fetcher sees in one place. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
`cargo_deps.rs` gained `mod checksum_cache;` on main while this branch was sorting the module declarations. Keep it with the other private modules. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
PR Code Suggestions ✨Latest suggestions up to d8f9e48 Warning
Previous suggestionsSuggestions up to commit 6e02b4b
Suggestions up to commit 0f3225e
|
|||||||||||||||||||||||||||||
Extracting the write moved the collision check after it, so a second workspace package rendering the same `--out` path overwrote the first package's SBOM on the way to the error. Compute the path, claim it, then write. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
Splitting the redaction passes gave each its own "changed" flag, so a URL whose credentials are redacted no longer has its query re-encoded when no key in it is sensitive. Pin that, and drop a route comment that only restated the function's name. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
|
Notes on the two review findings that are not code changes. Changeset for The SBOM collision fix does not get one: the bug was introduced and fixed inside this PR, so no release ever carried it. "URL redaction fix is hard to isolate" — fair, and here is the trade-off. The old behavior is not a design choice to preserve; it is one flag doing three jobs, and restoring it would mean deliberately re-encoding a query that carries no secret and rewriting a valueless key. Rather than carry that forward, the new behavior is pinned by Written by an agent (Claude Code, claude-opus-5). |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
| r#"Multiple workspace packages resolve to the same output path "{file_path}". Include %v in the --out pattern to disambiguate."# | ||
| )); | ||
| } | ||
| write_sbom_file(&file_path, &output)?; |
There was a problem hiding this comment.
2. Case-only package names overwrite files 🐞 Bug ≡ Correctness
write_split_sboms records file_path using case-sensitive HashSet<String> equality and then write_sbom_file writes each accepted path directly. On case-insensitive filesystems, workspace manifests named foo and FOO generate distinct set keys but the same --out file, so the second package replaces the first while the command reports both as generated.
Agent Prompt
## Issue description
Split SBOM collision detection compares generated paths as case-sensitive strings. Filesystem aliases such as `foo.json` and `FOO.json` can therefore bypass the check and overwrite one another on case-insensitive filesystems.
## Issue Context
Package names are copied from manifests without case normalization, while the path sanitizers preserve case. The repository already uses a separate lowercased path set when validating portable artifact paths.
## Fix Focus Areas
- pnpm/crates/cli/src/cli_args/sbom.rs[1278-1288]
- pnpm/crates/cli/src/cli_args/sbom.rs[1342-1356]
- pnpm/crates/cli/tests/suite/sbom.rs[768-831]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
Code review by qodo was updated up to the latest commit 6e02b4b |
Micro-Benchmark ResultsLinux |
Codecov Report❌ Patch coverage is Additional details and impacted files☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Splitting `descendant_processes` lifted the `ps` invocation, the wait loop, and the listing parser out of a `#[cfg(unix)]` function without carrying the attribute, so Windows compiled code whose imports it does not have. Gate all three, and the two test helpers that only unix tests reach. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
The repo reads top-down: a caller first, the helpers it uses below it. The functions this branch extracted landed on either side of their callers depending on where the edit was made. Move each one below the item that first uses it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
Integrated-Benchmark Report (Linux)Commit: Regular scenarios report direct and pnpr installs. The peer-heavy resolver scenario compares current Rust, main Rust, and TypeScript pnpm. 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
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.36047022394,
"stddev": 0.12207207224552605,
"median": 2.32707731024,
"user": 1.36242358,
"system": 1.3760350399999999,
"min": 2.22913391574,
"max": 2.57605300674
},
{
"command": "pacquet@main",
"mean": 2.3796138468400003,
"stddev": 0.10455072086626585,
"median": 2.3711328497400004,
"user": 1.37867818,
"system": 1.37104024,
"min": 2.2300278327400003,
"max": 2.56573709274
},
{
"command": "pnpr@HEAD",
"mean": 1.43417142294,
"stddev": 0.14576657420480177,
"median": 1.38111559074,
"user": 1.39621678,
"system": 1.37210454,
"min": 1.28054286974,
"max": 1.6370490287400001
},
{
"command": "pnpr@main",
"mean": 1.38807208984,
"stddev": 0.11976021830918646,
"median": 1.3410383992400001,
"user": 1.31424088,
"system": 1.31516724,
"min": 1.2995472917400002,
"max": 1.6440132007400001
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.20219676145999999,
"stddev": 0.011062085181146495,
"median": 0.20115761036000002,
"user": 0.2074191,
"system": 0.47166245999999995,
"min": 0.19193169436000002,
"max": 0.22944756636
},
{
"command": "pacquet@main",
"mean": 0.20801878176000002,
"stddev": 0.006288140361452805,
"median": 0.20549404686,
"user": 0.20371819999999996,
"system": 0.48209225999999994,
"min": 0.20006386136,
"max": 0.21739577736000001
},
{
"command": "pnpr@HEAD",
"mean": 0.22380896896000002,
"stddev": 0.00965773585755734,
"median": 0.22228197636,
"user": 0.2000756,
"system": 0.48166106,
"min": 0.21508501236,
"max": 0.24719327436000002
},
{
"command": "pnpr@main",
"mean": 0.21372381336,
"stddev": 0.00787910984113062,
"median": 0.21139270636000002,
"user": 0.1899154,
"system": 0.47854215999999994,
"min": 0.20503963536,
"max": 0.22865855036000002
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.008245506950697675,
"stddev": 0.0012865557027103897,
"median": 0.00779545396,
"user": 0.0048490781395348825,
"system": 0.003970042046511625,
"min": 0.0067431259600000005,
"max": 0.012929197960000001
},
{
"command": "pacquet@main",
"mean": 0.008912615477647063,
"stddev": 0.0012302863063040127,
"median": 0.008689417460000001,
"user": 0.004523219999999999,
"system": 0.004980191176470586,
"min": 0.00689310396,
"max": 0.01351124496
},
{
"command": "pnpr@HEAD",
"mean": 0.008232138847573966,
"stddev": 0.0012652072343234493,
"median": 0.0077904954600000005,
"user": 0.004571344260355031,
"system": 0.00421615828402367,
"min": 0.00677188996,
"max": 0.014295472960000001
},
{
"command": "pnpr@main",
"mean": 0.00824755115020172,
"stddev": 0.0012097145228772302,
"median": 0.00782630996,
"user": 0.00491108599423631,
"system": 0.003905675734870318,
"min": 0.00675214996,
"max": 0.01320489596
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.00869412400269663,
"stddev": 0.0014150215156815955,
"median": 0.00827726516,
"user": 0.0049217453932584275,
"system": 0.004332397228464417,
"min": 0.006812830160000001,
"max": 0.01416184316
},
{
"command": "pacquet@main",
"mean": 0.008345943392673269,
"stddev": 0.0013518121350482289,
"median": 0.00787799666,
"user": 0.0046194312871287125,
"system": 0.004265240000000002,
"min": 0.006742656160000001,
"max": 0.01399736616
},
{
"command": "pnpr@HEAD",
"mean": 0.007946924859619772,
"stddev": 0.0012033040334161155,
"median": 0.007555467160000002,
"user": 0.004337318555133082,
"system": 0.00410320608365019,
"min": 0.006764422160000001,
"max": 0.01354547516
},
{
"command": "pnpr@main",
"mean": 0.008465799194246573,
"stddev": 0.0011277408519856772,
"median": 0.00815227566,
"user": 0.004571357739726026,
"system": 0.004425105136986301,
"min": 0.006889897160000001,
"max": 0.014975324160000001
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.4316047961399994,
"stddev": 0.016949455411869617,
"median": 2.4303403273399997,
"user": 1.7566089999999999,
"system": 1.4859240000000002,
"min": 2.40504584384,
"max": 2.46080537184
},
{
"command": "pacquet@main",
"mean": 2.45060998024,
"stddev": 0.017773344381149365,
"median": 2.45344201334,
"user": 1.8442125999999994,
"system": 1.5450488,
"min": 2.42235908884,
"max": 2.47595714584
},
{
"command": "pnpr@HEAD",
"mean": 1.5128556171399998,
"stddev": 0.13691218971429056,
"median": 1.4399346678399998,
"user": 1.2729692,
"system": 1.3499432,
"min": 1.39084822584,
"max": 1.73263445884
},
{
"command": "pnpr@main",
"mean": 1.52552642464,
"stddev": 0.11464597867371988,
"median": 1.5315571058400002,
"user": 1.2155850999999998,
"system": 1.2851332000000002,
"min": 1.37467088684,
"max": 1.66082495784
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.3270529388,
"stddev": 0.007928495257630765,
"median": 0.3253841863,
"user": 0.4445536,
"system": 0.7348663,
"min": 0.3161088613,
"max": 0.3431639913
},
{
"command": "pacquet@main",
"mean": 0.31866813390000004,
"stddev": 0.008975030525073653,
"median": 0.31528769580000005,
"user": 0.42065460000000005,
"system": 0.7281942000000001,
"min": 0.3078834083,
"max": 0.3334790553
},
{
"command": "pnpr@HEAD",
"mean": 0.2464404007,
"stddev": 0.003645828854585635,
"median": 0.2466175893,
"user": 0.1729896,
"system": 0.4328688999999999,
"min": 0.2396907743,
"max": 0.2515115423
},
{
"command": "pnpr@main",
"mean": 0.25713222179999995,
"stddev": 0.006170153399581465,
"median": 0.2584584728,
"user": 0.1737876,
"system": 0.46290489999999995,
"min": 0.2495782123,
"max": 0.2654365003
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.5417518531799999,
"stddev": 0.0159696451089744,
"median": 1.54014215918,
"user": 0.7570333,
"system": 0.9154457399999998,
"min": 1.5231207606800001,
"max": 1.5702773186799999
},
{
"command": "pacquet@main",
"mean": 1.53262383348,
"stddev": 0.017208223734052477,
"median": 1.5259142266799999,
"user": 0.7663169999999999,
"system": 0.8794948399999999,
"min": 1.51358106268,
"max": 1.5601141566799999
},
{
"command": "pnpr@HEAD",
"mean": 0.26737287978,
"stddev": 0.008397424949004733,
"median": 0.26474883868,
"user": 0.1886659,
"system": 0.47464303999999996,
"min": 0.25509889368000005,
"max": 0.28073464068000004
},
{
"command": "pnpr@main",
"mean": 0.26945331148000007,
"stddev": 0.0062025388309090304,
"median": 0.26966444118000005,
"user": 0.1810099,
"system": 0.49401204000000004,
"min": 0.25994826168,
"max": 0.28134360468
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.2173473730338462,
"stddev": 0.015696711575949002,
"median": 0.21246175188,
"user": 0.20148704769230769,
"system": 0.08825258769230769,
"min": 0.19336649088,
"max": 0.25400411288
},
{
"command": "pacquet@main",
"mean": 0.2095410723415385,
"stddev": 0.019441154789222058,
"median": 0.20321204688,
"user": 0.19198227846153845,
"system": 0.08241081846153847,
"min": 0.18984065288000002,
"max": 0.25080732088
},
{
"command": "pnpr@HEAD",
"mean": 0.09747250495142858,
"stddev": 0.003382626983672514,
"median": 0.09679619338,
"user": 0.037601347142857136,
"system": 0.01570380571428571,
"min": 0.09107847488000001,
"max": 0.10591017388000001
},
{
"command": "pnpr@main",
"mean": 0.09921675732827587,
"stddev": 0.004007818374850608,
"median": 0.09816171388000001,
"user": 0.036182291724137935,
"system": 0.018852132413793105,
"min": 0.09402961988000001,
"max": 0.11145214688
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.7246570502066667,
"stddev": 0.07765414746346938,
"median": 0.7195723095400001,
"user": 0.7184833666666667,
"system": 0.20869582000000003,
"min": 0.5915275855400001,
"max": 0.82047522854
},
{
"command": "pacquet@main",
"mean": 0.6900973578733334,
"stddev": 0.08115222401146267,
"median": 0.70065831954,
"user": 0.6857061444444444,
"system": 0.17791470888888888,
"min": 0.55473238554,
"max": 0.79499781554
},
{
"command": "pnpm@HEAD",
"mean": 3.3119758169844444,
"stddev": 0.1441524560876719,
"median": 3.2883068765399996,
"user": 4.751173588888888,
"system": 0.31490859777777774,
"min": 3.15085042754,
"max": 3.57421005354
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.46151328362,
"stddev": 0.14194703160400576,
"median": 4.4070544292200005,
"user": 1.6140946,
"system": 1.6167779600000003,
"min": 4.332931196720001,
"max": 4.77162695972
},
{
"command": "pacquet@main",
"mean": 4.38852729142,
"stddev": 0.144966588788684,
"median": 4.3322889272200005,
"user": 1.6410787999999996,
"system": 1.5879470599999999,
"min": 4.30421957272,
"max": 4.73571899572
},
{
"command": "pnpr@HEAD",
"mean": 3.4507104874200003,
"stddev": 0.08270919027266166,
"median": 3.43982259522,
"user": 1.4950803000000001,
"system": 1.47778266,
"min": 3.35380830672,
"max": 3.66379027772
},
{
"command": "pnpr@main",
"mean": 3.46739487292,
"stddev": 0.10354958140607635,
"median": 3.43331130122,
"user": 1.5402999,
"system": 1.49930586,
"min": 3.3659397687199997,
"max": 3.69503494472
}
]
}Scenario: GVS linker: fresh restore, hot cache + hot storeSame install as the isolated fresh-restore hot/hot scenario, into the shared virtual store — the layout pnpm 12 installs into by default. Comparable to that scenario head-to-head.
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.11877897389809526,
"stddev": 0.002318817917008188,
"median": 0.11906863766,
"user": 0.16017732666666668,
"system": 0.1555779133333333,
"min": 0.11449820866,
"max": 0.12338947466000001
},
{
"command": "pacquet@main",
"mean": 0.12953164839913042,
"stddev": 0.015633627201989235,
"median": 0.12311684366000002,
"user": 0.17659731217391303,
"system": 0.16037153652173913,
"min": 0.11122765266000001,
"max": 0.17668552566
},
{
"command": "pnpr@HEAD",
"mean": 0.1422591219757895,
"stddev": 0.011030518515084896,
"median": 0.13751416866000002,
"user": 0.16252960736842104,
"system": 0.1710214747368421,
"min": 0.13098238066,
"max": 0.16426903366
},
{
"command": "pnpr@main",
"mean": 0.13826540341,
"stddev": 0.011024204070499862,
"median": 0.13441562116,
"user": 0.16969541,
"system": 0.15624193,
"min": 0.12572815166,
"max": 0.16338948866000003
}
]
} |
|
| Project | pnpm's project |
| Branch | pr/14730 |
| Testbed | pnpr |
⚠️ 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-thresholdsflag.
Click to view all benchmark results
| Benchmark | Latency | milliseconds (ms) |
|---|---|---|
| gvs-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 130.98 ms |
| isolated-linker.fresh-install.cold-cache.cold-store | 📈 view plot | 1,390.85 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 255.10 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 239.69 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 91.08 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,280.54 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,353.81 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 215.09 ms |
| isolated-linker.repeat-install.cold-cache.hot-store | 📈 view plot | 6.76 ms |
| isolated-linker.repeat-install.hot-cache.hot-store | 📈 view plot | 6.77 ms |
The entry led with what no longer happens, mixing the old behavior into the sentence describing the new one. Say what pnpr does now, then give the old behavior its own past-tense sentence. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6
|
Two more from the latest pass. Release note mixes old and new behavior — fixed in c224629. The entry led with what no longer happens, which folds the old behavior into the sentence describing the new one.
Case-only package names overwrite files — real, but not from this PR. Written by an agent (Claude Code, claude-opus-5). |
|
Code review by qodo was updated up to the latest commit d8f9e48 |
|
Some registries hide starred packages — not reproducible; the two endpoints have been conflated. The if is_self {
...
if response.status().is_success() {
let body: Value = response.json().await.into_diagnostic()?;
drop(client);
if body.is_array() || body.is_object() {
return Ok(parse_stars_response(&body)); // guard is here
}
} else { drop(client); }
}
// falls through to -/user/<name>/stars
let (client, response) = send_with_retry(http_client, &stars_url, ...)?;
if !response.status().is_success() {
// -/util/ fallback
}
let body: Value = response.json().await.into_diagnostic()?; // no guard here, on main either
Ok(parse_stars_response(&body))The branch keeps both halves as they were. So the described failure ("a registry answers Written by an agent (Claude Code, claude-opus-5). |
|
Code review by qodo was updated up to the latest commit c224629 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Pin the perfectionist dylint library to a revision instead of a tag and enable the four rules that revision adds: arbitrary_source_item_ordering, core_instead_of_std, excessive_cognitive_complexity with a limit of 10, and redundant_derive_more_forward_template. The tree is made to pass them by refactoring rather than by exemptions: no #[expect], no #[allow], and no raised limit. Oversized functions are split into named steps, conditions that carried a meaning are given names, three-way outcomes become enums, repeated parameter lists become types that own the shared values, and the nearly sixty CLI config overrides that repeated the same three shapes are driven from macro tables. cargo-dylint refuses a library built against a newer dylint_linting, so CI moves to cargo-dylint/dylint-link 6.0.4 to match the pinned revision. The 6.0.1 bootstrap failure the previous 6.0.0 pin worked around is fixed there. Related to pnpm#14562. That issue plans seven size-and-shape rules; only excessive_cognitive_complexity has landed upstream so far. It also proposed a per-site #[expect] for every existing violation, which this PR deliberately does not do.
Summary
Pins
dylint.tomlto a perfectionist revision instead of a tag and turns on thefour rules that revision adds. Everything else in the PR is the work of making
the tree pass them.
excessive_cognitive_complexitymax_complexity = 10arbitrary_source_item_orderingcore_instead_of_stdredundant_derive_more_forward_templateThe pin moves from
tag = "0.0.0-rc.22"to a revision so the enabled rule setcannot change under the repository. CI's
cargo-dylintanddylint-linkmovefrom 6.0.0 to 6.0.4, because
cargo-dylintrefuses a library built against anewer
dylint_linting; the 6.0.1 bootstrap failure the old pin worked around isfixed in 6.0.4.
No
#[expect], no#[allow], no raised limit. Every violation isrefactored away, so
cargo dylint --all -- --all-targets --workspaceis clean atmax_complexity = 10across pacquet and pnpr.Related to #14562, which plans seven
size-and-shape rules. Two have landed upstream:
excessive_cognitive_complexity(adopted here) and
too_many_local_bindings(KSXGitHub/perfectionist#403),
which merged one commit past the revision this PR pins. That one gets its own
PR: measured against this branch it is 688 sites at the issue's
max_bindings = 12(332 in production, 356 in tests; 325 of them would stillfire at the upstream default of 15), a campaign of the same order as this one,
and folding it in would roughly double a diff that both review bots already
decline for size. The remaining five rules and the clippy-side changes in
that issue stay open. This PR also settles the issue's open question about
arbitrary_source_item_orderingby fixing the ordering rather than disabling therule.
That issue proposed generating a per-site
#[expect(...)]for every existingviolation as a visible debt marker. This PR does not take that route: a marker
left on 300 functions is a marker nobody clears, and the point of the limit is
the code it produces, not the count of exemptions.
What the refactoring looks like
The commits are one file or one closely related group at a time, each named for
what it separates. The rules are turned on only once the tree already passes
them, so the commit that edits
dylint.tomlis near the end rather than at thestart.
Recurring shapes:
runreads aswhat the command does rather than how each part works —
sbom,self-update,update,version,view,why,stars, and thepythoninstall amongthem.
plan_is_outdated,releases_pending_major,is_dangling_link,is_preserved_key.SubcommandScan,MarkerProbe,PinOutcome.StarsRequest,PythonPrepare,AliasScan,FileSummary.driven from four
macro_rules!tables inconfig_overrides.rs, leaving onlythe overrides with logic of their own written out.
Every extracted helper is declared below the item that first uses it, so a file
still reads caller-first. A separate commit sweeps the ones that landed above
their caller.
Behavior is preserved throughout, with two exceptions worth a reviewer's
attention:
pnpr's URL redaction no longer re-encodes a harmless query. Splittingthe three redaction passes gave each its own
changedflag. The singleshared flag meant that redacting a URL's credentials also re-serialized its
query, rewriting
?options=a%20bas?options=a+band turning a bare?tokeninto?token=— in a query that carries no secret. A test now pinsthe query being left as written.
Extracting the write moved the collision check after it, so the second
package's SBOM replaced the first on the way to
ERR_PNPM_SBOM_OUT_PATH_COLLISION. Caught in review, fixed by claiming thepath before writing, and covered by a regression test — the collision had no
test at all before.
Where a rewrite would otherwise have changed behavior, the original branch is
kept and named: the unreadable-ancestor case in
prefix.rs, theunverifiable-artifact case in
shared_side_effects.rs, and thewith currentresume in the argv boundary scan are the ones worth pointing a reviewer at.
Squash Commit Body
Checklist
already linked to it solves it.
are implemented in every affected version.
Written by an agent (Claude Code, claude-opus-5).
🤖 Generated with Claude Code
https://claude.ai/code/session_019pVwWVfUqvpS6RgUP2nfQ6