Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe PR standardizes non-registry package identities around bare resolution IDs across lockfile parsing, fetch preparation, tarball indexing, installation, caching, CLI lookup, and progress reporting. Tests cover git dependencies and remote tarballs. ChangesStore-index resolution ID alignment
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant TarballResolver
participant FetchTarballForResolution
participant StoreIndex
TarballResolver->>FetchTarballForResolution: pass normalized bare specifier as package_id
FetchTarballForResolution->>StoreIndex: write package_id and integrity index row
Possibly related issues
Possibly related PRs
Suggested labels: Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
PR Summary by QodoFix store-index keying for non-registry deps to use bare resolution id
AI Description
Diagram
High-Level Assessment
Files changed (21)
|
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the previously reported aliased-git identity concern is contradicted by the lockfile identity contract and the added end-to-end regression coverage. Reviews (3): Last reviewed commit: "docs(git-fetcher): disambiguate the prep..." | Re-trigger Greptile |
Code Review by Qodo
Context used✅ Compliance rules (platform):
24 rules 1.
|
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
pnpm/crates/cli/tests/tarball_url_dependency.rs (1)
327-330: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winRemove obsolete implementation history.
These lines describe the former implementation rather than the current invariant. Lines 322-325 already explain why this regression matters; keep the test focused on that contract. As per coding guidelines, comments must not “describe removed implementation history.”
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pnpm/crates/cli/tests/tarball_url_dependency.rs` around lines 327 - 330, Remove the obsolete implementation-history comment describing the former resolve-time and install-pass row keys and duplicate extractions. Keep the surrounding test and the existing explanation of the regression’s contract unchanged.Sources: Coding guidelines, Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pnpm/crates/package-manager/src/build_modules.rs`:
- Line 1280: Update the side-effects upload key at the `store_index_key` call
near `snapshot_cache_key()` to use the git-hosted store index key for git-hosted
tarballs, matching `git_hosted_store_index_key(pkg_id, !ignore_scripts)`.
Preserve the existing integrity-based key for non-git packages so uploads use
the same key shape that snapshot lookup reads.
In `@pnpm/crates/package-manager/src/install_package_by_snapshot.rs`:
- Line 301: Update the nearby comment explaining remote-tarball cache
store-index IDs to describe the current bare-URL key contract, removing the
stale claim that install addresses use name@<url>. Preserve the explanation of
the non-obvious rationale without documenting the previous implementation.
In `@pnpm/crates/package-manager/src/install_with_fresh_lockfile.rs`:
- Line 884: Update the prior tarball entry construction near
reuse_from_warm_store() to bind key.pkg_id() once and use that value
consistently for both the map key and store_index_key component, instead of the
resolved tarball URL. Add a regression test covering warm/offline reuse through
an immutable redirect.
---
Nitpick comments:
In `@pnpm/crates/cli/tests/tarball_url_dependency.rs`:
- Around line 327-330: Remove the obsolete implementation-history comment
describing the former resolve-time and install-pass row keys and duplicate
extractions. Keep the surrounding test and the existing explanation of the
regression’s contract unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 2e41f05e-0e6a-46f7-aa02-174103762297
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock,!Cargo.lock
📒 Files selected for processing (20)
.changeset/store-index-keys-non-registry-deps-by-resolution-id.mdpnpm/crates/cli/src/cli_args/cat_index.rspnpm/crates/cli/tests/git_hosted_install.rspnpm/crates/cli/tests/tarball_url_dependency.rspnpm/crates/git-fetcher/src/fetcher.rspnpm/crates/git-fetcher/src/fetcher/tests.rspnpm/crates/git-fetcher/src/prepare_package.rspnpm/crates/git-fetcher/src/prepare_package/tests.rspnpm/crates/git-fetcher/src/tarball_fetcher.rspnpm/crates/lockfile/Cargo.tomlpnpm/crates/lockfile/src/pkg_name_ver_peer.rspnpm/crates/lockfile/src/pkg_name_ver_peer/tests.rspnpm/crates/package-manager/src/build_modules.rspnpm/crates/package-manager/src/create_virtual_store.rspnpm/crates/package-manager/src/install_package_by_snapshot.rspnpm/crates/package-manager/src/install_with_fresh_lockfile.rspnpm/crates/package-manager/src/patch.rspnpm/crates/package-manager/src/tarball_prefetch.rspnpm/crates/resolving-tarball-resolver/src/tarball_resolver.rspnpm/crates/tarball/src/lib.rs
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
…ion id The v11 store index is an on-disk contract shared between the TypeScript CLI and pacquet, but the two stacks disagreed on `pkgId` for every non-registry dependency: pnpm writes the bare resolution id (the tarball URL, the git-host archive URL, the `git+…#<commit>` spec) while pacquet wrote the lockfile-shaped `<name>@<id>`. Registry entries — the overwhelming majority — already agreed. The cost was reuse: a store warmed by one stack was cold for the other for every URL / git dependency, so switching between pnpm 11 and pnpm 12 re-downloaded, re-extracted, and re-imported all of them, and `cat-index` in one stack could not see the other's rows. `PkgNameVerPeer::pkg_id` now derives that id from a lockfile key, reusing `pacquet_deps_path::try_get_package_id` (pnpm's `tryGetPackageId`), and every store-index keying site goes through it. A remote tarball also occupied two rows rather than one: the resolve-time fetch keyed its row by the bundled manifest's `name@version` while the install pass keyed one by `name@<url>`. `FetchTarballForResolution` now keys by the caller's `package_id`, and the tarball resolver passes the normalized bare specifier (the id the lockfile records) rather than the post-redirect URL, so both passes address one row. The git fetchers hand `prepare_package` a resolution id now, so it synthesizes the `<name>@<id>` dep path it gates on from the fetched manifest's name — exactly what pnpm's `preparePackage` does, keeping the `allowBuilds` identity unchanged while the store key moves. Closes #13365 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Intra-doc links can't resolve across a crate boundary pacquet-lockfile deliberately doesn't depend on, so rustdoc rejected them. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The prior-lockfile reuse map was keyed by `resolution.tarball` while `reuse_from_warm_store` queries it with the dependency's normalized bare specifier. An immutable response that redirects moves the two apart — the lockfile records the post-redirect URL, the id stays the specifier the manifest asked for — so every re-resolve of such a tarball missed the warm store and re-downloaded. Keying by `pkg_id` puts both sides on the specifier. The recorded URL now travels in `PriorTarballEntry` so a warm reuse replays the resolution verbatim instead of re-deriving a `resolution.tarball` from the lookup key and churning the lockfile. Also addresses review feedback on the store-index keying commit: the mem-cache rationale in `install_package_by_snapshot` documented the pre-change `name@<url>` contract, and `pkg_id` allocated a second string whenever `try_get_package_id` borrowed. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The rustdoc and dylint gates rejected the two shortcuts the previous commit took: an intra-doc link into a private method, and an impure expression inside `debug_assert!`. Stating the prefix guarantee on `try_get_package_id` itself is what `pkg_id`'s in-place truncation needs, so neither shortcut is required. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Rebased onto Qodo findings
Historical test doc comment — valid, reworded to state the current contract ("One row, not two: the resolve-time fetch and the install pass address the same key…"). Changeset missing a
This PR is pacquet-only — the TypeScript side already writes the correct key — so the changeset is correct as-is. VerificationFull suite green (7346 tests), plus Both new regression tests were checked against the unfixed code: The end-to-end claim was also checked against a real Written by an agent (Claude Code, claude-opus-5). |
`prepare_package` names both the module and the function, so rustdoc rejects the bare link. Parentheses point it at the function. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Micro-Benchmark ResultsLinux |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
pnpm/crates/cli/tests/tarball_url_dependency.rs (1)
428-430: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winLog the lockfile contents before
assert_eq!on the multi-line diff.
afterandlockfileare fullpnpm-lock.yamlcontents; a bareassert_eq!failure here won't show a readable diff. Based on learnings, when comparing potentially multi-line strings, log the rendered value witheprintln!before the assertion.🪵 Proposed fix
let after = fs::read_to_string(workspace.join("pnpm-lock.yaml")).expect("read the lockfile"); + eprintln!("LOCKFILE AFTER UPDATE:\n{after}\n"); assert_eq!(after, lockfile, "a warm re-resolve must not rewrite the entry");🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pnpm/crates/cli/tests/tarball_url_dependency.rs` around lines 428 - 430, Update the assertion in the warm re-resolve test after reading `after` to print the rendered lockfile contents with `eprintln!` immediately before `assert_eq!(after, lockfile, ...)`, so multi-line differences are readable while preserving the existing comparison.Source: Learnings
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@pnpm/crates/cli/tests/tarball_url_dependency.rs`:
- Around line 428-430: Update the assertion in the warm re-resolve test after
reading `after` to print the rendered lockfile contents with `eprintln!`
immediately before `assert_eq!(after, lockfile, ...)`, so multi-line differences
are readable while preserving the existing comparison.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: a71a91ff-d112-45f1-832f-860a4ed2778d
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock,!Cargo.lock
📒 Files selected for processing (22)
.changeset/store-index-keys-non-registry-deps-by-resolution-id.mdpnpm/crates/cli/src/cli_args/cat_index.rspnpm/crates/cli/tests/git_hosted_install.rspnpm/crates/cli/tests/tarball_url_dependency.rspnpm/crates/deps-path/src/try_get_package_id.rspnpm/crates/git-fetcher/src/fetcher.rspnpm/crates/git-fetcher/src/fetcher/tests.rspnpm/crates/git-fetcher/src/prepare_package.rspnpm/crates/git-fetcher/src/prepare_package/tests.rspnpm/crates/git-fetcher/src/tarball_fetcher.rspnpm/crates/lockfile/Cargo.tomlpnpm/crates/lockfile/src/pkg_name_ver_peer.rspnpm/crates/lockfile/src/pkg_name_ver_peer/tests.rspnpm/crates/package-manager/src/build_modules.rspnpm/crates/package-manager/src/create_virtual_store.rspnpm/crates/package-manager/src/install_package_by_snapshot.rspnpm/crates/package-manager/src/install_with_fresh_lockfile.rspnpm/crates/package-manager/src/patch.rspnpm/crates/package-manager/src/tarball_prefetch.rspnpm/crates/resolving-tarball-resolver/src/lib.rspnpm/crates/resolving-tarball-resolver/src/tarball_resolver.rspnpm/crates/tarball/src/lib.rs
🚧 Files skipped from review as they are similar to previous changes (15)
- pnpm/crates/package-manager/src/tarball_prefetch.rs
- pnpm/crates/package-manager/src/install_package_by_snapshot.rs
- pnpm/crates/git-fetcher/src/fetcher.rs
- pnpm/crates/git-fetcher/src/tarball_fetcher.rs
- .changeset/store-index-keys-non-registry-deps-by-resolution-id.md
- pnpm/crates/package-manager/src/install_with_fresh_lockfile.rs
- pnpm/crates/package-manager/src/patch.rs
- pnpm/crates/git-fetcher/src/fetcher/tests.rs
- pnpm/crates/package-manager/src/create_virtual_store.rs
- pnpm/crates/cli/src/cli_args/cat_index.rs
- pnpm/crates/package-manager/src/build_modules.rs
- pnpm/crates/lockfile/src/pkg_name_ver_peer/tests.rs
- pnpm/crates/git-fetcher/src/prepare_package.rs
- pnpm/crates/git-fetcher/src/prepare_package/tests.rs
- pnpm/crates/tarball/src/lib.rs
|
Code review by qodo was updated up to the latest commit 4ef8ddd |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13417 +/- ##
=======================================
Coverage 87.57% 87.58%
=======================================
Files 544 545 +1
Lines 93579 93572 -7
=======================================
- Hits 81953 81951 -2
+ Misses 11626 11621 -5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Integrated-Benchmark Report (Linux)Commit: Each scenario reports direct installs and pnpr installs. 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.4723031401,
"stddev": 0.10092038211422037,
"median": 2.4455135842,
"user": 1.9487739999999998,
"system": 1.4976624200000002,
"min": 2.3761658252,
"max": 2.6845390732,
"times": [
2.3813625562,
2.5081487582,
2.6845390732,
2.4209300062,
2.5865016472,
2.4700971622,
2.3969861232,
2.3972242282000003,
2.3761658252,
2.5010760212000003
]
},
{
"command": "pacquet@main",
"mean": 2.6625446914000004,
"stddev": 0.17126031569791333,
"median": 2.6752121122,
"user": 2.0986364,
"system": 1.60721902,
"min": 2.3917814972,
"max": 2.8721429002,
"times": [
2.7152862832,
2.6351379412,
2.3917814972,
2.8721429002,
2.7639032752,
2.5435393512,
2.8717734772,
2.5499760542,
2.4657712662,
2.8161348682000003
]
},
{
"command": "pnpr@HEAD",
"mean": 1.6291538602,
"stddev": 0.1509747788811448,
"median": 1.6506246037,
"user": 1.5355144,
"system": 1.42868122,
"min": 1.4187488312,
"max": 1.8287987052,
"times": [
1.8287987052,
1.5457628842000002,
1.4298173422000002,
1.6342836842000001,
1.8166773292,
1.7561913872000001,
1.6959251062000003,
1.6669655232,
1.4187488312,
1.4983678092000001
]
},
{
"command": "pnpr@main",
"mean": 1.5576912277000001,
"stddev": 0.10190060566365716,
"median": 1.5702577327,
"user": 1.5395876999999998,
"system": 1.4580831200000002,
"min": 1.3883313632,
"max": 1.6986976752,
"times": [
1.6986976752,
1.5149230422,
1.5493170592,
1.4014023412,
1.6018770842,
1.3883313632,
1.6341118152000003,
1.5423473342,
1.5911984062000002,
1.6547061562
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.3029955663,
"stddev": 0.018353238539513123,
"median": 0.2985500067,
"user": 0.24127485999999995,
"system": 0.62753886,
"min": 0.2796160712,
"max": 0.34410275619999997,
"times": [
0.2995505742,
0.2871701962,
0.2920339252,
0.2948684232,
0.2796160712,
0.2975494392,
0.3193516252,
0.3068034362,
0.34410275619999997,
0.3089092162
]
},
{
"command": "pacquet@main",
"mean": 0.3054114105,
"stddev": 0.012541104321702842,
"median": 0.3093902692,
"user": 0.26152596000000006,
"system": 0.5965960599999999,
"min": 0.2827730592,
"max": 0.3201406022,
"times": [
0.3127539142,
0.3201406022,
0.3136832152,
0.2827730592,
0.2978669272,
0.2888189602,
0.3010033282,
0.3136292832,
0.3060266242,
0.3174181912
]
},
{
"command": "pnpr@HEAD",
"mean": 0.30451179539999995,
"stddev": 0.025303461687323916,
"median": 0.29377715019999995,
"user": 0.25567506000000007,
"system": 0.5805829599999999,
"min": 0.2796789692,
"max": 0.3395847292,
"times": [
0.3373034002,
0.3362227972,
0.3395847292,
0.2873883482,
0.2796789692,
0.2810738182,
0.3001659522,
0.2814303402,
0.2866826322,
0.3155869672
]
},
{
"command": "pnpr@main",
"mean": 0.2913673716,
"stddev": 0.008706783368239924,
"median": 0.2901184862,
"user": 0.23074785999999997,
"system": 0.55790266,
"min": 0.27684330819999997,
"max": 0.3046805872,
"times": [
0.2989901532,
0.2868008012,
0.28220949419999997,
0.2915372902,
0.2886996822,
0.2949283272,
0.3046805872,
0.28771329819999997,
0.3012707742,
0.27684330819999997
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.80079212556,
"stddev": 0.022075539174255157,
"median": 2.80477194916,
"user": 2.02947208,
"system": 1.443401,
"min": 2.76503111266,
"max": 2.84320626866,
"times": [
2.81109115766,
2.80862602066,
2.8050739126599997,
2.80446998566,
2.77654791466,
2.84320626866,
2.79000195066,
2.76503111266,
2.78775855566,
2.81611437666
]
},
{
"command": "pacquet@main",
"mean": 2.76914723146,
"stddev": 0.020805209136400816,
"median": 2.76932347366,
"user": 1.9950084799999999,
"system": 1.3921438999999998,
"min": 2.73784480566,
"max": 2.79934446066,
"times": [
2.79633289566,
2.74006008266,
2.7607651136599998,
2.79934446066,
2.78176079966,
2.7589548856599997,
2.76694170766,
2.7717052396599997,
2.73784480566,
2.7777623236599998
]
},
{
"command": "pnpr@HEAD",
"mean": 1.6039194678600002,
"stddev": 0.15953804991116177,
"median": 1.60338871066,
"user": 1.28179678,
"system": 1.2399301,
"min": 1.4500426206600001,
"max": 1.8830976776600001,
"times": [
1.47507422566,
1.45439035166,
1.59971181266,
1.60706560866,
1.4545726676600002,
1.6250926596600002,
1.63135548966,
1.85879156466,
1.8830976776600001,
1.4500426206600001
]
},
{
"command": "pnpr@main",
"mean": 1.58155269426,
"stddev": 0.14744278112631873,
"median": 1.54144210216,
"user": 1.28599508,
"system": 1.2097920999999996,
"min": 1.44148392266,
"max": 1.84108433666,
"times": [
1.44395041466,
1.4502315406600002,
1.84108433666,
1.44148392266,
1.68342723466,
1.45909412766,
1.49268717766,
1.76927947366,
1.59019702666,
1.64409168766
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.6380725893999999,
"stddev": 0.0231875521310981,
"median": 0.6364672536,
"user": 0.8108266000000001,
"system": 0.7272646599999998,
"min": 0.6039527226,
"max": 0.6840961986,
"times": [
0.6194187476,
0.6039527226,
0.6316370456,
0.6450803246,
0.6840961986,
0.6273292686,
0.6629942336,
0.6412974616,
0.6448741356,
0.6200457556
]
},
{
"command": "pacquet@main",
"mean": 0.601888446,
"stddev": 0.02232273093448748,
"median": 0.6046028216,
"user": 0.7632751,
"system": 0.6807886599999999,
"min": 0.5719617066,
"max": 0.6308258966,
"times": [
0.6169643876,
0.5719617066,
0.5731392126,
0.6183616596,
0.6072350746,
0.5827353406,
0.6308258966,
0.5859343406,
0.6019705686,
0.6297562726
]
},
{
"command": "pnpr@HEAD",
"mean": 0.308644638,
"stddev": 0.008857895556272862,
"median": 0.30882323410000007,
"user": 0.1894208,
"system": 0.54792456,
"min": 0.29276580960000004,
"max": 0.32567218560000005,
"times": [
0.31209003960000004,
0.30829589460000006,
0.3152415646,
0.31232465060000003,
0.29276580960000004,
0.30078181260000003,
0.30329087960000006,
0.3066329696,
0.30935057360000007,
0.32567218560000005
]
},
{
"command": "pnpr@main",
"mean": 0.31140480200000004,
"stddev": 0.012010874914137052,
"median": 0.31164790510000007,
"user": 0.2074584,
"system": 0.53330846,
"min": 0.28688101060000004,
"max": 0.3288075066,
"times": [
0.3046570116,
0.31686828060000005,
0.3288075066,
0.3195894046,
0.28688101060000004,
0.30813563960000007,
0.3070730166,
0.32343517160000007,
0.30344080760000003,
0.31516017060000007
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.93641856714,
"stddev": 0.019631967522186166,
"median": 1.93758125354,
"user": 1.0348848199999998,
"system": 0.8042457199999999,
"min": 1.90869061004,
"max": 1.97483639704,
"times": [
1.95553218804,
1.93981012404,
1.94024825804,
1.92380679604,
1.90869061004,
1.93551565404,
1.9105831370400002,
1.97483639704,
1.9386797150400001,
1.93648279204
]
},
{
"command": "pacquet@main",
"mean": 1.9266899377399997,
"stddev": 0.012331065397150015,
"median": 1.9275745360399998,
"user": 1.00805192,
"system": 0.81600462,
"min": 1.90334679204,
"max": 1.94352918004,
"times": [
1.92801622504,
1.93149939704,
1.92326854504,
1.9419650370400001,
1.92713284704,
1.91360318604,
1.92026981804,
1.90334679204,
1.93426835004,
1.94352918004
]
},
{
"command": "pnpr@HEAD",
"mean": 0.31936162724,
"stddev": 0.012660320243832403,
"median": 0.31970577504000003,
"user": 0.20671471999999996,
"system": 0.53838612,
"min": 0.30574471004000003,
"max": 0.34927667204,
"times": [
0.32354610804000006,
0.31741003304000004,
0.34927667204,
0.32351893704000007,
0.30574471004000003,
0.30646813404000006,
0.32200151704,
0.32298824504000007,
0.31336496604,
0.30929695004
]
},
{
"command": "pnpr@main",
"mean": 0.30475914024,
"stddev": 0.01808395746614816,
"median": 0.2995604525400001,
"user": 0.19304682,
"system": 0.5188390199999999,
"min": 0.28378378504,
"max": 0.33447149204000004,
"times": [
0.32667753004000005,
0.32735716404000004,
0.28813477604000004,
0.29493818804000005,
0.29080022404000005,
0.28378378504,
0.29865110604000006,
0.30230733804000004,
0.30046979904000004,
0.33447149204000004
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.37107809366000005,
"stddev": 0.011330286993401136,
"median": 0.36952452026,
"user": 0.36147482000000003,
"system": 0.07505643999999997,
"min": 0.35837804376,
"max": 0.39352931276,
"times": [
0.39352931276,
0.36677144776,
0.38049075076,
0.38040321776,
0.36650260876,
0.37342447376,
0.37227759276,
0.35961078776,
0.35939270076,
0.35837804376
]
},
{
"command": "pacquet@main",
"mean": 0.36780078146000006,
"stddev": 0.008009720868584572,
"median": 0.36574522776,
"user": 0.36507571999999994,
"system": 0.06334293999999999,
"min": 0.36079749276,
"max": 0.38553051076,
"times": [
0.37183701376,
0.36192343376,
0.36983613076,
0.36093683176,
0.36079749276,
0.36106258076000003,
0.36330316676,
0.38553051076,
0.36818728876,
0.37459336476
]
},
{
"command": "pnpr@HEAD",
"mean": 0.08938135450193548,
"stddev": 0.0026954373980430323,
"median": 0.09044090476,
"user": 0.019508184516129033,
"system": 0.01293478064516129,
"min": 0.08500540476,
"max": 0.09568702876,
"times": [
0.09056556376,
0.09050503676,
0.09069635076,
0.09106691876,
0.09051451676,
0.08506920476,
0.09187818276,
0.08602380476,
0.08802532376,
0.09132557076,
0.08801963976,
0.09059839475999999,
0.08965984776,
0.09217489076,
0.09044090476,
0.09193276576,
0.09080517476,
0.08500540476,
0.08763153676,
0.09568702876,
0.08651998176,
0.08641245976,
0.08603867076,
0.08520988776,
0.09429110076,
0.08859275076,
0.08855184376,
0.08826137776,
0.09090584676,
0.08694319776,
0.09146880976
]
},
{
"command": "pnpr@main",
"mean": 0.08996175285375,
"stddev": 0.003471979827762943,
"median": 0.09036863426,
"user": 0.02112377625,
"system": 0.012022116874999997,
"min": 0.08425978976,
"max": 0.10061675276,
"times": [
0.08784579076,
0.08642560176,
0.09122374076,
0.08637133676,
0.09053613976,
0.09517388276,
0.09054129176,
0.09271566776,
0.08684195676,
0.08870595776,
0.09020112876,
0.09127721076,
0.09347622076,
0.08578382976,
0.09225613676,
0.08539983576,
0.08606683376,
0.08888270476,
0.08425978976,
0.08791847376,
0.09099475876,
0.08730584076,
0.09262815276,
0.08663889876,
0.09080922176,
0.09562295576,
0.08877180876,
0.09075556776,
0.09067208876,
0.09295395876,
0.08910255476,
0.10061675276
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.55714690368,
"stddev": 0.13916031270039841,
"median": 4.53205917108,
"user": 1.8914291199999997,
"system": 1.5005549999999999,
"min": 4.42826198458,
"max": 4.86326212858,
"times": [
4.43164306458,
4.56012530558,
4.67983148358,
4.42826198458,
4.50399303658,
4.45473926958,
4.43615612858,
4.61882856058,
4.86326212858,
4.59462807458
]
},
{
"command": "pacquet@main",
"mean": 4.62561317988,
"stddev": 0.18769281488795944,
"median": 4.57586326758,
"user": 2.07189962,
"system": 1.5388283,
"min": 4.43273003458,
"max": 4.99045272058,
"times": [
4.68280087558,
4.53345493158,
4.53528444958,
4.99045272058,
4.61644208558,
4.73454231458,
4.43511016558,
4.45066758258,
4.8446466385799996,
4.43273003458
]
},
{
"command": "pnpr@HEAD",
"mean": 3.49950878098,
"stddev": 0.040036526849046454,
"median": 3.49546006008,
"user": 1.29771612,
"system": 1.2555821999999999,
"min": 3.45642824058,
"max": 3.57030779958,
"times": [
3.45642824058,
3.5078387165800002,
3.53679181558,
3.46318582358,
3.49564741858,
3.57030779958,
3.46593641458,
3.45936423858,
3.4952727015800003,
3.54431464058
]
},
{
"command": "pnpr@main",
"mean": 3.5365627168800002,
"stddev": 0.07230365817601779,
"median": 3.55106626258,
"user": 1.2897765199999998,
"system": 1.2799755000000002,
"min": 3.44693565658,
"max": 3.63601038458,
"times": [
3.44693565658,
3.6049187055800003,
3.58571274758,
3.45004273758,
3.51641977758,
3.48556109958,
3.58745065558,
3.46015937358,
3.63601038458,
3.59241603058
]
}
]
} |
|
| Project | pnpm's project |
| Branch | pr/13417 |
| 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) |
|---|---|---|
| isolated-linker.fresh-install.cold-cache.cold-store | 📈 view plot | 1,450.04 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 305.74 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 292.77 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 85.01 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,418.75 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,456.43 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 279.68 ms |
Summary
Fixes the store-index
pkgIddivergence reported in #13365: for every non-registry dependency, the TypeScript CLI keys itsindex.dbrow by the bare resolution id while pacquet keyed it by the lockfile-shaped<name>@<id>. Registry entries already agreed exactly.sha512-…\ttarball-pkg@http://…/tarball-pkg-1.0.0.tgzsha512-…\thttp://…/tarball-pkg-1.0.0.tgzci-info@https://codeload.github.com/…\tbuilthttps://codeload.github.com/…\tbuilttype: githi@git+file:///…/repo#a0c17e86…\tbuiltgit+file:///…/repo#a0c17e86…\tbuiltVerified end to end by installing the same
git+file://dependency with[email protected]and with this build into separate stores: both now write the byte-identical key, and a pacquet install against the TS-warmed store reuses the row instead of adding a second one.The second finding in the issue is fixed too: a remote tarball occupied two rows because the resolve-time fetch keyed by the bundled manifest's
name@versionwhile the install pass keyed byname@<url>. It now occupies one.Closes #13365
Review also surfaced a neighbouring gap in the side-effects cache: git-hosted tarballs upload to a row the warm path never reads, and
type: gitnever uploads at all. That changes which key shape a package is filed under rather than thepkgIdinside a key, so it is tracked separately in #13420.Squash Commit Body
Checklist
pnpm/port, or the description notes what still needs porting.pnpm changeset) if this PR changes any publishedpackage. Keep it short and written for pnpm users — it becomes a release note.
Written by an agent (Claude Code, claude-opus-5).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit