Repository navigation
Conversation
A runtime dependency (Node.js, Bun, Deno) records its archives as a `variations` resolution of `binary` variants, which format 9.0 has held all along and which keeps first-match selection. Marking every `variations` resolution would move every lockfile with a runtime to 13.0, which pnpm releases that predate the marker refuse to read, and would make pnpr refuse to return such a lockfile to a client that only accepts 9.0. The marker now covers only a registry package's variants, as the platform-variants RFC describes. The check lives on `LockfileResolution::is_package_variants` and `Lockfile::records_package_variants`, used by both the lockfile writer and pnpr's acceptance check. pnpr compares `acceptedLockfileFormats` entries by major, so `13` and `13.0` both name the variants format. The formats pnpm announces to pnpr are a constant next to the version check, with a test that each one is a format the client reads. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Caution Review failedThe pull request is closed. Walkthrough
Merge Risk:
|
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Nothing new recorded
TS CI / Test / ubuntu (24.0.0, 2) / Node 24 / chunk 2/3 · nothing new
How to read thisbash › curl ← ancestry as captured, then the process that acted └─ example[.]com ← what it reached Recorded by Garnet · Add it to your CI ↗ |
Micro-Benchmark ResultsLinux |
Same-run regression checkHEAD and main are measured on the same runner. The tolerance is 5% of the main median or 2 ms, whichever is larger. A regression requires both the median slowdown and the gap between the fastest retained HEAD sample and slowest retained main sample to exceed this tolerance, after trimming up to 10% from each tail. Suspected regressions are rerun once with target order reversed and only fail if reproduced. This conservative noise guard is not a statistical confidence interval. Inconclusive rows do not fail the check. They remain visible for performance review. Bencher retains absolute minimum timings for historical tracking; historical alerts do not gate this PR. Sequential measurements can still be affected by runner drift.
Same-run syscall checkEach install runs 2 more times per revision, untimed, under
Integrated-Benchmark Report (Linux)Commit: Compared against main at: Regular scenarios report direct and pnpr installs. The peer-heavy resolver scenario compares current Rust, main Rust, and TypeScript pnpm; the linked, injected, and Cargo workspace scenarios compare current Rust against main Rust. Bencher consumes pacquet@HEAD and pnpr@HEAD. The tables below show mean ± σ. Bencher tracks absolute minimum latency; PR regression checks compare HEAD and main samples from the same runner. Historical timing alerts do not gate PRs. Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.31234262986,
"stddev": 0.11156053319528318,
"median": 2.2791333508599996,
"user": 1.9622333399999998,
"system": 1.5307329199999997,
"min": 2.22311416686,
"max": 2.61013269986
},
{
"command": "pacquet@main",
"mean": 2.3625881886599998,
"stddev": 0.15182487202738715,
"median": 2.2788505483600003,
"user": 1.8481988399999998,
"system": 1.33859412,
"min": 2.2148127348599997,
"max": 2.57529006486
},
{
"command": "pnpr@HEAD",
"mean": 1.4305837003600002,
"stddev": 0.10315943107883808,
"median": 1.46880202736,
"user": 1.75600974,
"system": 1.3931476200000001,
"min": 1.2465798208599999,
"max": 1.52565700086
},
{
"command": "pnpr@main",
"mean": 1.4823833164599998,
"stddev": 0.12853685158863906,
"median": 1.42006707036,
"user": 1.9354559399999995,
"system": 1.4925331199999998,
"min": 1.3340076938599998,
"max": 1.65091707786
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.20734682004,
"stddev": 0.015408826697357015,
"median": 0.20286947514,
"user": 0.24186348,
"system": 0.51373128,
"min": 0.19893423414000003,
"max": 0.25015940614
},
{
"command": "pacquet@main",
"mean": 0.20605386584000004,
"stddev": 0.009243231446404935,
"median": 0.20430416414000002,
"user": 0.23736318,
"system": 0.51912118,
"min": 0.19580717014000001,
"max": 0.22482735914000002
},
{
"command": "pnpr@HEAD",
"mean": 0.21560467234000003,
"stddev": 0.006227460765163669,
"median": 0.21511184714000003,
"user": 0.24834608000000005,
"system": 0.5138733799999999,
"min": 0.20752864214000002,
"max": 0.22381304614000003
},
{
"command": "pnpr@main",
"mean": 0.22097939164000002,
"stddev": 0.008523161683742828,
"median": 0.21912385764000003,
"user": 0.23347277999999996,
"system": 0.5437424799999999,
"min": 0.21190896914000001,
"max": 0.24074342814000002
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.00833783421877677,
"stddev": 0.0004001648910315837,
"median": 0.00825334702,
"user": 0.004859331376146787,
"system": 0.004150308868501529,
"min": 0.00748360802,
"max": 0.01027309402
},
{
"command": "pacquet@main",
"mean": 0.008405868707258688,
"stddev": 0.0007419270772187699,
"median": 0.00818378402,
"user": 0.005072996602316602,
"system": 0.004036648648648652,
"min": 0.007221325020000001,
"max": 0.01250667702
},
{
"command": "pnpr@HEAD",
"mean": 0.008364894058095235,
"stddev": 0.00040434162649923043,
"median": 0.00828915402,
"user": 0.005240810158730155,
"system": 0.003816165079365081,
"min": 0.007658767020000001,
"max": 0.01023263002
},
{
"command": "pnpr@main",
"mean": 0.008245835126796117,
"stddev": 0.0006875317299827523,
"median": 0.00806809702,
"user": 0.005191644401294499,
"system": 0.0037457378640776712,
"min": 0.00762280902,
"max": 0.01396511102
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.012722728671279623,
"stddev": 0.002271587107377254,
"median": 0.012455060240000001,
"user": 0.006936776018957346,
"system": 0.006836804549763033,
"min": 0.00896736824,
"max": 0.025090254240000002
},
{
"command": "pacquet@main",
"mean": 0.015306354798011053,
"stddev": 0.0047910066490666845,
"median": 0.013652679240000002,
"user": 0.008340925635359115,
"system": 0.008269640000000003,
"min": 0.00886380424,
"max": 0.03519802224
},
{
"command": "pnpr@HEAD",
"mean": 0.014187570722954547,
"stddev": 0.0027729782682276846,
"median": 0.013886593740000001,
"user": 0.008596781249999998,
"system": 0.006782197045454543,
"min": 0.00946717824,
"max": 0.023477214240000002
},
{
"command": "pnpr@main",
"mean": 0.014459100313394495,
"stddev": 0.0037576010146516247,
"median": 0.01385378724,
"user": 0.008307018899082563,
"system": 0.0074713152293577985,
"min": 0.009379151240000001,
"max": 0.028245883240000002
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.6524691134,
"stddev": 0.06906179376204295,
"median": 2.6677016710000006,
"user": 2.72667312,
"system": 1.8016650600000002,
"min": 2.4889713650000003,
"max": 2.717967599
},
{
"command": "pacquet@main",
"mean": 2.5752812046000004,
"stddev": 0.04130300225186069,
"median": 2.574920225,
"user": 2.5543192199999996,
"system": 1.5688830599999997,
"min": 2.5122774800000003,
"max": 2.6614144360000003
},
{
"command": "pnpr@HEAD",
"mean": 1.5453269782,
"stddev": 0.1382381075317992,
"median": 1.4816381895,
"user": 1.9568638199999995,
"system": 1.53922946,
"min": 1.400497122,
"max": 1.80826613
},
{
"command": "pnpr@main",
"mean": 1.5428985285999999,
"stddev": 0.09431499893442587,
"median": 1.5484553585,
"user": 1.8183051200000002,
"system": 1.48089966,
"min": 1.410680263,
"max": 1.6795448229999999
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.52964512442,
"stddev": 0.026730355623754372,
"median": 0.53310163392,
"user": 0.75536516,
"system": 0.95852112,
"min": 0.48658851442000006,
"max": 0.56699213942
},
{
"command": "pacquet@main",
"mean": 0.52574970672,
"stddev": 0.027385341635681442,
"median": 0.5167070089200001,
"user": 0.7617168599999999,
"system": 0.96172292,
"min": 0.49660782442000007,
"max": 0.57035108342
},
{
"command": "pnpr@HEAD",
"mean": 0.33986045952000005,
"stddev": 0.014227462826288562,
"median": 0.33797367192000005,
"user": 0.3150961599999999,
"system": 0.65822072,
"min": 0.31814462842,
"max": 0.36309163042000003
},
{
"command": "pnpr@main",
"mean": 0.31741548522000007,
"stddev": 0.016111462138844894,
"median": 0.32070884492000007,
"user": 0.31987336,
"system": 0.61926262,
"min": 0.29382760542,
"max": 0.33889233642000005
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.7246803264000001,
"stddev": 0.03777281401890055,
"median": 1.7133986068999998,
"user": 1.0963705799999999,
"system": 0.97249968,
"min": 1.6925209224,
"max": 1.8117903234
},
{
"command": "pacquet@main",
"mean": 1.7361605942,
"stddev": 0.037616255886378965,
"median": 1.7490037009,
"user": 1.0926461800000002,
"system": 0.9664764800000001,
"min": 1.6736966463999998,
"max": 1.7746884673999999
},
{
"command": "pnpr@HEAD",
"mean": 0.3448881021,
"stddev": 0.02023371912700692,
"median": 0.33758226990000006,
"user": 0.35552288,
"system": 0.67602688,
"min": 0.32352259440000003,
"max": 0.3789829444
},
{
"command": "pnpr@main",
"mean": 0.3212960002,
"stddev": 0.0233724961549313,
"median": 0.3093300349,
"user": 0.32136267999999996,
"system": 0.61720718,
"min": 0.2977229994,
"max": 0.3573770954
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.4394022046,
"stddev": 0.0853980979923091,
"median": 0.4802738485,
"user": 0.44027468000000003,
"system": 0.5712430399999999,
"min": 0.298896463,
"max": 0.528072927
},
{
"command": "pacquet@main",
"mean": 0.327186439,
"stddev": 0.023531069793458342,
"median": 0.33174099,
"user": 0.33754417999999997,
"system": 0.36388693999999994,
"min": 0.29294845599999997,
"max": 0.371304558
},
{
"command": "pnpr@HEAD",
"mean": 0.10616058891666669,
"stddev": 0.0059577469717428146,
"median": 0.10593813300000002,
"user": 0.047775179999999993,
"system": 0.030505839999999996,
"min": 0.09547885100000002,
"max": 0.11783514300000002
},
{
"command": "pnpr@main",
"mean": 0.10177075300000002,
"stddev": 0.004994173125862787,
"median": 0.10124294100000002,
"user": 0.044095430000000005,
"system": 0.02706398285714285,
"min": 0.09557828900000001,
"max": 0.11272313100000002
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.2241221571288889,
"stddev": 0.009813179001850336,
"median": 0.22396304424000002,
"user": 0.26770617111111106,
"system": 0.029681653333333335,
"min": 0.21103273524000002,
"max": 0.23717069524
},
{
"command": "pacquet@main",
"mean": 0.22076078590666667,
"stddev": 0.007228966213153909,
"median": 0.22035257324000002,
"user": 0.2606188377777777,
"system": 0.036961986666666655,
"min": 0.20796844224000002,
"max": 0.23586301524000003
},
{
"command": "pnpm@HEAD",
"mean": 4.90369997624,
"stddev": 0.5550832110639364,
"median": 4.732744480239999,
"user": 7.942212948888888,
"system": 0.4205857644444444,
"min": 4.35348434224,
"max": 5.9137437972399995
}
]
}Scenario: Isolated linker: linked-workspace resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.08678417828857143,
"stddev": 0.005347337201378288,
"median": 0.08562482406000001,
"user": 0.08253666571428571,
"system": 0.04399733714285714,
"min": 0.08065297506,
"max": 0.10246266906000001
},
{
"command": "pacquet@main",
"mean": 0.08504063486645164,
"stddev": 0.003938133119618241,
"median": 0.08462473906000001,
"user": 0.08068543806451613,
"system": 0.04721851870967742,
"min": 0.07957407006000002,
"max": 0.09436660806000001
}
]
}Scenario: Isolated linker: injected workspace repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.09110620911575758,
"stddev": 0.002868540535592228,
"median": 0.09048287054,
"user": 0.03441210787878789,
"system": 0.06392085939393938,
"min": 0.08679397054,
"max": 0.09834944754
},
{
"command": "pacquet@main",
"mean": 0.09204511702484847,
"stddev": 0.005551375582819295,
"median": 0.09089461354,
"user": 0.03520468363636363,
"system": 0.0646059503030303,
"min": 0.08541625254,
"max": 0.11085709254000001
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.465841541320001,
"stddev": 0.13317798084247529,
"median": 4.41592394902,
"user": 1.9191466,
"system": 1.38667878,
"min": 4.351969635520001,
"max": 4.77250171052
},
{
"command": "pacquet@main",
"mean": 4.58239845652,
"stddev": 0.16995803495633727,
"median": 4.55806696302,
"user": 1.8901790000000003,
"system": 1.38714418,
"min": 4.34956980952,
"max": 4.861855468520001
},
{
"command": "pnpr@HEAD",
"mean": 3.5595646035199997,
"stddev": 0.14645311678532544,
"median": 3.54029468152,
"user": 1.7871724,
"system": 1.3319620799999998,
"min": 3.40758243852,
"max": 3.82231668252
},
{
"command": "pnpr@main",
"mean": 3.5019323375199995,
"stddev": 0.13090681347794786,
"median": 3.45259039452,
"user": 1.7676892,
"system": 1.3564281800000002,
"min": 3.40774191352,
"max": 3.83582533852
}
]
}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. Scenarios run on separate machines, so compare main and branch within each table.
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.12291280827000002,
"stddev": 0.003603199375620917,
"median": 0.12262825512,
"user": 0.15239095000000002,
"system": 0.13542685999999998,
"min": 0.11783184762000001,
"max": 0.13278027962
},
{
"command": "pacquet@main",
"mean": 0.12152883219142854,
"stddev": 0.0052103820427528485,
"median": 0.12074753262000001,
"user": 0.15687793333333333,
"system": 0.12522411714285714,
"min": 0.11448619262000001,
"max": 0.13391339162000002
},
{
"command": "pnpr@HEAD",
"mean": 0.13333490156736844,
"stddev": 0.004806509894663628,
"median": 0.13265483962000002,
"user": 0.15542870526315786,
"system": 0.13880910210526318,
"min": 0.12665310062000001,
"max": 0.14300824562
},
{
"command": "pnpr@main",
"mean": 0.12771813917000002,
"stddev": 0.0077345383889209736,
"median": 0.12416844712000001,
"user": 0.15589789999999998,
"system": 0.12414071000000002,
"min": 0.11962962062,
"max": 0.14386954662
}
]
}Scenario: Store only: unlocked direct deps, cold cache + hot storeStore-only install (
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.20580631536,
"stddev": 0.05336258648339657,
"median": 1.18084991286,
"user": 0.51740116,
"system": 0.21485333999999998,
"min": 1.16203255036,
"max": 1.28747332636
},
{
"command": "pacquet@main",
"mean": 1.2050222938600001,
"stddev": 0.041001742048695666,
"median": 1.1931324348599999,
"user": 0.5124040599999999,
"system": 0.22860724000000002,
"min": 1.16834744636,
"max": 1.27853211336
}
]
}Scenario: Cargo: repeat install, hot cache + hot storeFrozen repeat install of a Cargo workspace (
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.03819662785897436,
"stddev": 0.0025412249575090507,
"median": 0.038397553,
"user": 0.026467696410256408,
"system": 0.022398591282051277,
"min": 0.033309684000000006,
"max": 0.043406732
},
{
"command": "pacquet@main",
"mean": 0.03808531964102564,
"stddev": 0.00318304326390581,
"median": 0.037817735000000005,
"user": 0.026606119487179496,
"system": 0.02240712974358974,
"min": 0.031889325,
"max": 0.04564093600000001
}
]
} |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17596 +/- ##
=======================================
Coverage 92.74% 92.74%
=======================================
Files 2032 2033 +1
Lines 262179 262273 +94
=======================================
+ Hits 243166 243256 +90
- Misses 19013 19017 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
PR Summary by QodoNegotiate lockfile format 13 for package platform variants
AI Description
Diagram
High-Level Assessment
Files changed (17)
|
Code Review by Qodo
1.
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
- Count a `variations` resolution as a package's variants only when one of its archives is not a runtime's `binary` one. A runtime resolver that only computes a specifier returns no archives at all, and that empty list must not mark the lockfile as format 13. - Accept a request that reads only 12.0: a frozen resolve returns the client's 12.0 lockfile unchanged, and the result check still refuses any other format. - Cache a streamed result before refusing its format. The cache key leaves out the accepted formats and a cache hit runs the same check, so a retry is refused without resolving again. - Split the changeset's lockfile-format sentence in two. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Replies to the Qodo review of 1de8d6f (the findings that were only in the summary):
Written by an agent (Claude Code, claude-opus-5-5). |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Code review by qodo was updated up to the latest commit 66e13d5 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Closing this: the maintainers chose not to bump the lockfile format. Lockfiles stay at Thanks for #17584, which this PR carried rebased onto main. Written by an agent (Claude Code, claude-opus-5-5). |
Summary
This is #17584 rebased onto
main. That PR was stacked onpnpr/platform-variants, and GitHub closed it automatically when the branch was deleted after #17559 was squash-merged. Maintainer edits are off on its fork, so its work is carried here instead. Credit for the format negotiation goes to #17584.It covers pnpm/tasks#248 (a closing keyword can't close an issue in another repository, so that issue will be closed by hand once this merges):
lockfileVersion: '13.0'. pnpm releases that predate this refuse to read 13.0, so a teammate on an older pnpm can't silently rewrite the lockfile without its variants, as the platform-variants RFC requires.acceptedLockfileFormats(9.0,12.0,13.0) with a pnpr resolve. pnpr refuses withERR_PNPR_INCOMPATIBLE_LOCKFILE_FORMAT, never a downgraded lockfile, when the result is in a format the client did not accept. This covers fresh, streamed, cached, and frozen-lockfile results. A client that sends no formats has not accepted 13.0.What changed relative to #17584. Its final head held only four commits that copied the then-current base files. All four come out empty against
main, because #17559 merged those files. The negotiation itself was in an earlier push of #17584 (251289c00bc), and that commit is cherry-picked here with its authorship intact. Agent fixes on top:binaryarchives as avariationsresolution in format 9.0. Marking those too would have moved every lockfile with a runtime to 13.0, and pnpr would have refused it to 9.0-only clients. The old runtime test asserted 13.0 for a runtime with no archives; it now uses a realbinaryvariant and asserts 9.0. A new test covers a package variant, which gives 13.0.pnpm_lockfile(LockfileResolution::is_package_variants,Lockfile::records_package_variants), and the lockfile writer and pnpr share it. pnpr compares accepted formats by major. The formats pnpm announces are a constant,ACCEPTED_LOCKFILE_FORMATS, next to the version check, with a test that each one is readable.Squash Commit Body
Checklist
already linked to it solves it.
are implemented in every affected version.
pnpm changeset) if this PR changes any publishedpackage. Keep it short and written for pnpm users — it becomes a release note.
Tests run locally:
pnpm-lockfile,pnpm-package-manager,pnpm-pnpr-clientand everypnpr-*crate together (3543 passed). The 4install::tests::external_importerstests fail here onorigin/maintoo. Also thepnpm-cliinstall_runtimesandpnpre2e tests, and clippy.Written by an agent (Claude Code, claude-opus-5-5).
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by CodeRabbit