Repository navigation
fix(package-manager): enforce engines on fresh installs - #12994
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 (3)
📝 WalkthroughWalkthroughFresh isolated installs now apply required dependency engine checks when strict mode is enabled. The installability gating was unified, and end-to-end tests cover strict, non-strict, and frozen isolated-install behavior. ChangesStrict engine compatibility
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested labels: Suggested reviewers: ✨ Finishing Touches🧪 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12994 +/- ##
=======================================
Coverage 85.55% 85.55%
=======================================
Files 498 498
Lines 79648 79639 -9
=======================================
- Hits 68142 68135 -7
+ Misses 11506 11504 -2 ☔ 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. Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.65595384842,
"stddev": 0.1659272132510161,
"median": 2.63448799042,
"user": 2.3527877999999998,
"system": 1.8881443399999998,
"min": 2.45663128092,
"max": 2.97129605692,
"times": [
2.50461514092,
2.45663128092,
2.87452762292,
2.70991657692,
2.97129605692,
2.55650204192,
2.66624519092,
2.70261262692,
2.60273078992,
2.51446115592
]
},
{
"command": "pacquet@main",
"mean": 2.71854139522,
"stddev": 0.1282232334721758,
"median": 2.72077639342,
"user": 2.160858,
"system": 1.70145734,
"min": 2.50766685292,
"max": 2.86644479392,
"times": [
2.50766685292,
2.54890182192,
2.67370603692,
2.82822677292,
2.66605517492,
2.76784674992,
2.86644479392,
2.84970944692,
2.82682150192,
2.65003479992
]
},
{
"command": "pnpr@HEAD",
"mean": 1.5379583925200002,
"stddev": 0.16899647997065778,
"median": 1.4664503089200003,
"user": 1.2611778,
"system": 1.3639711399999999,
"min": 1.39229377092,
"max": 1.8341174339200002,
"times": [
1.3946241889200002,
1.3993678709200001,
1.6822740279200001,
1.7683121999200002,
1.3925619849200002,
1.4894770299200002,
1.4434235879200001,
1.39229377092,
1.5831318299200001,
1.8341174339200002
]
},
{
"command": "pnpr@main",
"mean": 1.5086322593200001,
"stddev": 0.13237881934478293,
"median": 1.45477338592,
"user": 1.2404233,
"system": 1.31204414,
"min": 1.3630778249200002,
"max": 1.73983475392,
"times": [
1.39020783292,
1.48152364092,
1.4241703539200001,
1.3630778249200002,
1.6692055119200002,
1.41774739992,
1.5207375759200001,
1.42802313092,
1.6517945679200001,
1.73983475392
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.26510438054,
"stddev": 0.028174582088792095,
"median": 0.26172989824000004,
"user": 0.26644776,
"system": 0.65992,
"min": 0.21312587524,
"max": 0.31348643224,
"times": [
0.21312587524,
0.24834494724,
0.26426471924,
0.25582814324,
0.25919507724,
0.27119396424000003,
0.31348643224,
0.28175854824,
0.29733653824,
0.24650956024
]
},
{
"command": "pacquet@main",
"mean": 0.25738679564000005,
"stddev": 0.040758272917090305,
"median": 0.24322663924000001,
"user": 0.25980746,
"system": 0.619966,
"min": 0.22293590224,
"max": 0.35879116724,
"times": [
0.24571054924,
0.24289053324,
0.24589551724,
0.24197451124,
0.22293590224,
0.24356274524000002,
0.23924490424,
0.29869192324,
0.35879116724,
0.23417020324
]
},
{
"command": "pnpr@HEAD",
"mean": 0.27811691524,
"stddev": 0.01818869459189389,
"median": 0.27640196224,
"user": 0.26465086,
"system": 0.6539235,
"min": 0.24697376224,
"max": 0.31278881224,
"times": [
0.24697376224,
0.27537336524,
0.26669614624,
0.26952205424000003,
0.28075373124,
0.27743055924,
0.29911183324,
0.31278881224,
0.28458042824,
0.26793846024
]
},
{
"command": "pnpr@main",
"mean": 0.26528131004,
"stddev": 0.014387605313296982,
"median": 0.26308806924,
"user": 0.26043996,
"system": 0.6334367,
"min": 0.24228625724,
"max": 0.29466716524000003,
"times": [
0.29466716524000003,
0.27059333624,
0.26850075624,
0.26487538624,
0.25858515124000003,
0.25352049924000003,
0.26130075224,
0.27928201624,
0.24228625724,
0.25920178024
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.8581101056600002,
"stddev": 0.09767197494006706,
"median": 2.85139346396,
"user": 1.9783603199999997,
"system": 1.46532442,
"min": 2.6923641559600004,
"max": 3.03893650896,
"times": [
2.8053480209600004,
2.6923641559600004,
2.86823153596,
2.81359953196,
2.87579998096,
2.86399232296,
2.79767486896,
2.98635952496,
3.03893650896,
2.8387946049600004
]
},
{
"command": "pacquet@main",
"mean": 2.8235547104600007,
"stddev": 0.027134931732745636,
"median": 2.8333124349600003,
"user": 1.9270671200000002,
"system": 1.45253102,
"min": 2.77362760296,
"max": 2.85091683396,
"times": [
2.8490498369600004,
2.79592445996,
2.79559920896,
2.84143446396,
2.83108767096,
2.85091683396,
2.81454241696,
2.77362760296,
2.8478274109600004,
2.8355371989600004
]
},
{
"command": "pnpr@HEAD",
"mean": 1.56156668876,
"stddev": 0.13923813729464052,
"median": 1.5089355709599999,
"user": 1.17001832,
"system": 1.3065411200000001,
"min": 1.40250072996,
"max": 1.7694255619600001,
"times": [
1.70053271096,
1.48535783896,
1.44227804796,
1.69753270696,
1.40474433296,
1.40250072996,
1.50218625496,
1.51568488696,
1.7694255619600001,
1.6954238159600001
]
},
{
"command": "pnpr@main",
"mean": 1.6321172347599997,
"stddev": 0.13012961103511478,
"median": 1.62521748696,
"user": 1.1918567199999999,
"system": 1.30061702,
"min": 1.46034759496,
"max": 1.81308740696,
"times": [
1.50186784696,
1.72944071396,
1.47985921096,
1.81308740696,
1.78614704796,
1.57297289396,
1.72701465796,
1.67107154796,
1.57936342596,
1.46034759496
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.6363426943,
"stddev": 0.02507832129010915,
"median": 0.636563284,
"user": 0.76922558,
"system": 0.74490562,
"min": 0.5933507335,
"max": 0.6692528015,
"times": [
0.6351184815,
0.6513320025,
0.6692528015,
0.6529578965,
0.6368356055,
0.6656245065,
0.6362909625000001,
0.5933507335,
0.6036530845,
0.6190108685
]
},
{
"command": "pacquet@main",
"mean": 0.6976924707,
"stddev": 0.07068935414664282,
"median": 0.693587125,
"user": 0.9047776799999999,
"system": 0.7192801200000001,
"min": 0.6198119025,
"max": 0.8465177015,
"times": [
0.7096081255,
0.8465177015,
0.7628188125,
0.6321663455000001,
0.7145324725,
0.7271026715,
0.6775661245,
0.6256163745,
0.6198119025,
0.6611841765
]
},
{
"command": "pnpr@HEAD",
"mean": 0.29123106010000005,
"stddev": 0.016557833889510164,
"median": 0.29382873500000006,
"user": 0.22493717999999996,
"system": 0.62247332,
"min": 0.26187682450000005,
"max": 0.31029178550000003,
"times": [
0.26187682450000005,
0.26916742750000006,
0.28262289850000005,
0.28598143550000005,
0.28909813050000005,
0.3096561615,
0.2985593395,
0.31029178550000003,
0.30324203450000004,
0.3018145635
]
},
{
"command": "pnpr@main",
"mean": 0.2741232237000001,
"stddev": 0.01351816068499652,
"median": 0.27332480000000003,
"user": 0.22620547999999996,
"system": 0.5629247199999999,
"min": 0.24941028050000003,
"max": 0.29981986650000003,
"times": [
0.29981986650000003,
0.26219741650000006,
0.24941028050000003,
0.26789092950000004,
0.28241724250000005,
0.27675396550000003,
0.27255906750000003,
0.27409053250000004,
0.2715807995,
0.28451213650000007
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.9954431557000003,
"stddev": 0.045111590672366475,
"median": 1.9959941537,
"user": 1.1294914999999999,
"system": 0.83474678,
"min": 1.9319734622000002,
"max": 2.0841236311999998,
"times": [
1.9319734622000002,
1.9629274842000002,
1.9869530642000002,
2.0050352432,
1.9811766852000001,
1.9416151092,
2.0159971992,
2.0331286931999997,
2.0841236311999998,
2.0115009852
]
},
{
"command": "pacquet@main",
"mean": 1.9958200055,
"stddev": 0.02378201622162838,
"median": 2.0009404072,
"user": 1.1723352999999999,
"system": 0.8183662799999999,
"min": 1.9576053592000002,
"max": 2.0321965622,
"times": [
1.9576053592000002,
1.9810847432,
1.9997337562000002,
2.0044273612,
2.0321965622,
2.0185117922,
2.0160704872,
1.9706825482000003,
1.9757403872000001,
2.0021470582
]
},
{
"command": "pnpr@HEAD",
"mean": 0.31443506360000006,
"stddev": 0.025756318708924704,
"median": 0.3098853267,
"user": 0.24809520000000002,
"system": 0.62467328,
"min": 0.2792352812,
"max": 0.37278101020000004,
"times": [
0.3013078442,
0.3136414762,
0.2895384402,
0.3254971012,
0.3055569932,
0.3061291772,
0.2792352812,
0.37278101020000004,
0.32167284020000003,
0.3289904722
]
},
{
"command": "pnpr@main",
"mean": 0.3202286599,
"stddev": 0.03903029006119838,
"median": 0.3171792107,
"user": 0.2583663,
"system": 0.62145688,
"min": 0.2790704412,
"max": 0.4092399202,
"times": [
0.3424642952,
0.2790704412,
0.2860374652,
0.2876195562,
0.2929512302,
0.3088700962,
0.32548832520000004,
0.4092399202,
0.33782919120000005,
0.33271607820000004
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.41771133141999994,
"stddev": 0.03710042801698048,
"median": 0.41010550522,
"user": 0.41266235999999995,
"system": 0.06676647999999999,
"min": 0.37073058872000003,
"max": 0.49523445672000005,
"times": [
0.40668440972000003,
0.41331505272,
0.40689595772000003,
0.44095256572,
0.49523445672000005,
0.37827599872,
0.43885699972000003,
0.37073058872000003,
0.43884977672000003,
0.38731750772
]
},
{
"command": "pacquet@main",
"mean": 0.42577273162000007,
"stddev": 0.033851149559828826,
"median": 0.41703478722,
"user": 0.40581486,
"system": 0.08141017999999998,
"min": 0.39156537572,
"max": 0.49653926772,
"times": [
0.39156537572,
0.39263388372,
0.40871702672000004,
0.41659958972,
0.41746998472,
0.41770027672000004,
0.41090541772,
0.47336443472,
0.49653926772,
0.43223205872000003
]
},
{
"command": "pnpr@HEAD",
"mean": 0.08490204404258064,
"stddev": 0.003832836842534551,
"median": 0.08402386172,
"user": 0.01691907612903226,
"system": 0.010605220000000002,
"min": 0.08003468072,
"max": 0.09622548572,
"times": [
0.09036879772,
0.08840888672,
0.08503666372,
0.08928995172,
0.08983934272,
0.08618511072,
0.08112495772,
0.08402386172,
0.08437579172,
0.08241335772,
0.08183312672,
0.08315513972000001,
0.08375403472,
0.08481836372,
0.08039857372,
0.08081000672,
0.08147490472,
0.08280909072,
0.08003468072,
0.08317831372,
0.08095328472,
0.08799514872,
0.08192857672000001,
0.08219474672,
0.08189326072,
0.09169440672,
0.08769357272,
0.08709507972,
0.08523667872,
0.08572016672,
0.09622548572
]
},
{
"command": "pnpr@main",
"mean": 0.08756253440750002,
"stddev": 0.0026370003030558443,
"median": 0.08740552222,
"user": 0.019792716249999998,
"system": 0.010567387499999999,
"min": 0.08257478072,
"max": 0.09252453572,
"times": [
0.08805249672,
0.08654984572,
0.08931579872,
0.08924112972,
0.08888225572,
0.08734688172,
0.09212990472,
0.09252453572,
0.09136416572,
0.08746416272,
0.08420948072,
0.08498068872,
0.08786676872,
0.08883304272,
0.09096896472,
0.09179778072,
0.09082891172,
0.08651384772,
0.08658375972,
0.08899326372000001,
0.08590888172,
0.08696644772,
0.08519874772,
0.08599202772,
0.08846497272,
0.08524541572,
0.08457650872,
0.08569226572,
0.08471663372,
0.08329777772,
0.08257478072,
0.08891895472
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.6403188232999995,
"stddev": 0.11852123026973505,
"median": 4.5917714368,
"user": 2.3156459,
"system": 1.66453822,
"min": 4.537239693799999,
"max": 4.8805109508,
"times": [
4.537239693799999,
4.579392266799999,
4.5914568648,
4.6328482738,
4.5604179698,
4.8250605138,
4.5920860088,
4.5464579548,
4.8805109508,
4.6577177357999995
]
},
{
"command": "pacquet@main",
"mean": 4.8023387397,
"stddev": 0.12766330769649015,
"median": 4.7886198518,
"user": 2.7872095000000003,
"system": 2.03313452,
"min": 4.6662846738,
"max": 5.1235421618,
"times": [
4.7336578307999995,
4.789781833799999,
4.7705276678,
5.1235421618,
4.800568430799999,
4.7874578698,
4.8741240677999995,
4.7918261138,
4.6856167468,
4.6662846738
]
},
{
"command": "pnpr@HEAD",
"mean": 3.5702070398000005,
"stddev": 0.11691309109066521,
"median": 3.5432432803000005,
"user": 1.3568843000000002,
"system": 1.35149072,
"min": 3.4434506638,
"max": 3.8113563628000002,
"times": [
3.6532438178000004,
3.6255493318000003,
3.5249891028,
3.4955662098,
3.4733525828,
3.5614974578000003,
3.4531074868,
3.4434506638,
3.6599573818000004,
3.8113563628000002
]
},
{
"command": "pnpr@main",
"mean": 3.6070302211000005,
"stddev": 0.12169023438040028,
"median": 3.6164990518,
"user": 1.3018812,
"system": 1.4320307199999998,
"min": 3.4534286008,
"max": 3.8749420118000004,
"times": [
3.5928579038,
3.8749420118000004,
3.5079091418000004,
3.6622461198000003,
3.4875173298,
3.6401401998000003,
3.4534286008,
3.6627329438,
3.6491431448,
3.5393848148
]
}
]
} |
|
| Branch | pr/12994 |
| 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,561.57 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 314.44 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 291.23 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 84.90 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,537.96 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,570.21 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 278.12 ms |
18c5c78 to
99d7278
Compare
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
Confidence Score: 5/5Safe to merge. The change is narrowly scoped to the fresh-lockfile install path, correctly wires the enforcement gate that was already present in The logic change is straightforward: the enforcement mechanism in No files require special attention. The Reviews (1): Last reviewed commit: "test(cli): use raw strings for diagnosti..." | Re-trigger Greptile |
Summary
Important
This branch must incorporate #13066 before this PR can merge. The intended sequence is to merge #13066 into
main, then rebase or update this branch onto the latestmainso the zizmor security check runs with the shared fix.Fresh isolated pacquet installs only constructed an installability host when optional dependencies needed platform checks. As a result, a required dependency with an incompatible
engines.noderange was installed successfully even whenengineStrictwas enabled.--forceand constraint-free fast paths.The TypeScript CLI already rejects this case, so this is a pacquet parity fix and needs no TypeScript-side change.
Verified with:
cargo test --locked -p pacquet-cli --test install required_incompatible_engine(3 passed)cargo test --locked -p pacquet-cli --test install(36 passed, 1 ignored)cargo test --locked -p pacquet-package-manager(717 passed)cargo check --locked -p pacquet-package-manager -p pacquet-cli --all-targetscargo clippy --locked -p pacquet-package-manager -p pacquet-cli --all-targets -- --deny warningsSquash 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 (Codex, GPT-5).
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by CodeRabbit
Bug Fixes
Tests