Repository navigation
fix(deploy): keep runtime edges in the deploy importer when their group is excluded - #15710
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Repository: pnpm/pnpm/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: pnpm/pnpm/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (7)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughProduction deploy now retains ChangesProduction deploy runtime handling
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix · Severity of issue fixed: Medium Assessment against linked issues
Suggested labels: Merge Risk: ⚪ Minimal · up to The production deploy fix appears ready to merge after normal checks. No actionable merge-blocking risk is established by the supplied evidence. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change keeps runtime references needed for production deploys without installing the excluded runtime. The reviewed deploy paths show no demonstrated expansion of build or patch authority, but failure and retry behavior is not fully exercised. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
✨ 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 |
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.
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; the linked-workspace scenario compares 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.4652084946999997,
"stddev": 0.1502345261720814,
"median": 2.4314485185,
"user": 1.6067866599999998,
"system": 1.5239923599999998,
"min": 2.3022357374999998,
"max": 2.7582055805
},
{
"command": "pacquet@main",
"mean": 2.4348673118,
"stddev": 0.16477488306617866,
"median": 2.3516680389999998,
"user": 1.4019211599999999,
"system": 1.4675878599999999,
"min": 2.2786158784999997,
"max": 2.7286979055
},
{
"command": "pnpr@HEAD",
"mean": 1.4634129823,
"stddev": 0.14909754789008245,
"median": 1.3895540290000001,
"user": 1.3116571600000002,
"system": 1.37317956,
"min": 1.2961184405000001,
"max": 1.6968974365000002
},
{
"command": "pnpr@main",
"mean": 1.4867811249,
"stddev": 0.13661161257581128,
"median": 1.464683473,
"user": 1.3440569599999999,
"system": 1.35829356,
"min": 1.3057752755,
"max": 1.7157734105
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.26580607196,
"stddev": 0.01099398366860501,
"median": 0.26871820066,
"user": 0.2923784400000001,
"system": 0.62731312,
"min": 0.24544139466000003,
"max": 0.28459512766
},
{
"command": "pacquet@main",
"mean": 0.29164240986,
"stddev": 0.023040152387984736,
"median": 0.29121160065999996,
"user": 0.33921574000000004,
"system": 0.64639102,
"min": 0.26292037866,
"max": 0.32449111666
},
{
"command": "pnpr@HEAD",
"mean": 0.27424486886,
"stddev": 0.02666767457609994,
"median": 0.27466862216,
"user": 0.27648984000000004,
"system": 0.59903992,
"min": 0.23788180166000003,
"max": 0.31492192466
},
{
"command": "pnpr@main",
"mean": 0.31107391935999995,
"stddev": 0.056570489897632095,
"median": 0.30289238716,
"user": 0.32487674,
"system": 0.6516144199999999,
"min": 0.24474347766000001,
"max": 0.40723943166
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.01158346100583333,
"stddev": 0.0014614711365273662,
"median": 0.01141769296,
"user": 0.0068812166666666645,
"system": 0.005362860833333333,
"min": 0.00853741446,
"max": 0.01726867846
},
{
"command": "pacquet@main",
"mean": 0.01024780109868613,
"stddev": 0.001173130712447101,
"median": 0.010134539460000001,
"user": 0.005928362043795623,
"system": 0.004925043065693431,
"min": 0.007527319460000001,
"max": 0.01521571346
},
{
"command": "pnpr@HEAD",
"mean": 0.010120864045937506,
"stddev": 0.0015607988384887747,
"median": 0.00988355246,
"user": 0.00592799375,
"system": 0.004767740625000001,
"min": 0.00733639046,
"max": 0.014804049460000001
},
{
"command": "pnpr@main",
"mean": 0.009879814530866135,
"stddev": 0.0010560356032165766,
"median": 0.00983575696,
"user": 0.005919281889763784,
"system": 0.004542242519685038,
"min": 0.008093514460000001,
"max": 0.01449896546
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.01169276309301587,
"stddev": 0.0015445552809955072,
"median": 0.011361746220000002,
"user": 0.006040832804232801,
"system": 0.0064702410582010575,
"min": 0.00869106822,
"max": 0.01718031622
},
{
"command": "pacquet@main",
"mean": 0.010749583345000003,
"stddev": 0.0011521373434620376,
"median": 0.01067353922,
"user": 0.005676533035714281,
"system": 0.005849585446428574,
"min": 0.008679399220000002,
"max": 0.016295553219999998
},
{
"command": "pnpr@HEAD",
"mean": 0.01018045965718593,
"stddev": 0.0009568818359577079,
"median": 0.010152022220000001,
"user": 0.005789564824120606,
"system": 0.005124345025125629,
"min": 0.008087336220000001,
"max": 0.013291333220000002
},
{
"command": "pnpr@main",
"mean": 0.01096143152327869,
"stddev": 0.0016864662810051785,
"median": 0.010596765220000002,
"user": 0.006365214754098356,
"system": 0.005354581475409834,
"min": 0.008398189220000001,
"max": 0.01970126322
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.7350341099,
"stddev": 0.048331745266210785,
"median": 2.7261279952,
"user": 2.5875090399999996,
"system": 2.1948568799999997,
"min": 2.6575960532000003,
"max": 2.8328004662
},
{
"command": "pacquet@main",
"mean": 2.8085428813,
"stddev": 0.04896815981532342,
"median": 2.8083604992,
"user": 2.7804626399999997,
"system": 2.3520034799999996,
"min": 2.7294479152,
"max": 2.8773150442000004
},
{
"command": "pnpr@HEAD",
"mean": 1.60709153,
"stddev": 0.1800050208052752,
"median": 1.5550392927,
"user": 1.52707764,
"system": 1.7228924799999998,
"min": 1.4508761012,
"max": 1.9492219052000002
},
{
"command": "pnpr@main",
"mean": 1.6080624209,
"stddev": 0.15033879341075915,
"median": 1.5861851587,
"user": 1.50741294,
"system": 1.7819567800000002,
"min": 1.4496017852,
"max": 1.8231485232
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.4332376548,
"stddev": 0.03109510133589587,
"median": 0.4207756642,
"user": 0.6219786600000001,
"system": 0.7026663999999999,
"min": 0.4033438787,
"max": 0.4955102087
},
{
"command": "pacquet@main",
"mean": 0.42999226840000004,
"stddev": 0.009085535972012808,
"median": 0.4314449562,
"user": 0.6291119599999999,
"system": 0.7106446,
"min": 0.4145523597,
"max": 0.4439989627
},
{
"command": "pnpr@HEAD",
"mean": 0.2851167167,
"stddev": 0.022062976581742774,
"median": 0.2806757712,
"user": 0.23512286,
"system": 0.5162274,
"min": 0.2557509357,
"max": 0.3201572627
},
{
"command": "pnpr@main",
"mean": 0.2757879242,
"stddev": 0.01171851887090761,
"median": 0.2768497727,
"user": 0.22600195999999997,
"system": 0.512799,
"min": 0.2577990537,
"max": 0.2926793877
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.7965247361199999,
"stddev": 0.05227523702686021,
"median": 1.80042802972,
"user": 1.20738044,
"system": 1.15071374,
"min": 1.71602961272,
"max": 1.8721434617200001
},
{
"command": "pacquet@main",
"mean": 1.7537665099199997,
"stddev": 0.02419179162058506,
"median": 1.75329656722,
"user": 1.15176434,
"system": 1.07496944,
"min": 1.71739063972,
"max": 1.7919629277200002
},
{
"command": "pnpr@HEAD",
"mean": 0.38305490232000006,
"stddev": 0.017613106366109698,
"median": 0.38278593672000005,
"user": 0.33214953999999997,
"system": 0.8143196400000001,
"min": 0.35343033572000004,
"max": 0.41119444072000005
},
{
"command": "pnpr@main",
"mean": 0.3789141653200001,
"stddev": 0.014599351061132712,
"median": 0.37340271922,
"user": 0.32598444,
"system": 0.8109175399999999,
"min": 0.36453786872000005,
"max": 0.41181283072
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.2769874919254545,
"stddev": 0.03688702855855902,
"median": 0.26282165538,
"user": 0.2908625163636364,
"system": 0.10281470363636362,
"min": 0.24290704038,
"max": 0.33376184238
},
{
"command": "pacquet@main",
"mean": 0.25683219154666664,
"stddev": 0.017134811417827335,
"median": 0.25074466438,
"user": 0.27907187999999994,
"system": 0.08226417333333334,
"min": 0.23882040838000002,
"max": 0.28903872338000003
},
{
"command": "pnpr@HEAD",
"mean": 0.11141844800068966,
"stddev": 0.006298059614265125,
"median": 0.11151608538000002,
"user": 0.04872274206896551,
"system": 0.020948983448275865,
"min": 0.09794710838000001,
"max": 0.12636429338
},
{
"command": "pnpr@main",
"mean": 0.10658415715777778,
"stddev": 0.004219960107871787,
"median": 0.10635649138000002,
"user": 0.04652576888888889,
"system": 0.01812808074074074,
"min": 0.09815320438000001,
"max": 0.11862593938000002
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.8790462363244446,
"stddev": 0.11502337593228751,
"median": 0.90267998488,
"user": 0.9160276911111109,
"system": 0.19919290888888888,
"min": 0.6169110278800001,
"max": 1.0121326458800002
},
{
"command": "pacquet@main",
"mean": 0.9821969983244446,
"stddev": 0.12981183399441715,
"median": 0.9498907268800001,
"user": 1.010743691111111,
"system": 0.2266901311111111,
"min": 0.84163595288,
"max": 1.25883778488
},
{
"command": "pnpm@HEAD",
"mean": 4.788569529102222,
"stddev": 0.3919978719430146,
"median": 4.81187004888,
"user": 7.63381446888889,
"system": 0.36577057555555553,
"min": 4.22209840888,
"max": 5.3318526338800005
}
]
}Scenario: Isolated linker: linked-workspace resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.19936430545142855,
"stddev": 0.004375799129727749,
"median": 0.19860493038,
"user": 0.15287198285714285,
"system": 0.08321796,
"min": 0.19385151588000002,
"max": 0.20870806888000001
},
{
"command": "pacquet@main",
"mean": 0.20894353852285713,
"stddev": 0.009771436672742018,
"median": 0.20742924388,
"user": 0.16789234,
"system": 0.08337360285714286,
"min": 0.19634557788,
"max": 0.23104240088
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.599347033999999,
"stddev": 0.17333425031632832,
"median": 4.5068149385,
"user": 1.80325814,
"system": 2.0731382799999998,
"min": 4.439391592,
"max": 4.859070564
},
{
"command": "pacquet@main",
"mean": 4.5804873851000005,
"stddev": 0.1433966386816243,
"median": 4.5260611514999995,
"user": 1.99378054,
"system": 1.99562468,
"min": 4.4297294009999995,
"max": 4.854243858999999
},
{
"command": "pnpr@HEAD",
"mean": 3.5933766877,
"stddev": 0.1033537658927039,
"median": 3.59376814,
"user": 1.7988645399999998,
"system": 1.87372428,
"min": 3.465646499,
"max": 3.8105101300000004
},
{
"command": "pnpr@main",
"mean": 3.5285414976,
"stddev": 0.044583676775793654,
"median": 3.520248548,
"user": 1.8810012399999998,
"system": 1.9310665799999995,
"min": 3.483339444,
"max": 3.616806973
}
]
}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.16630221465250003,
"stddev": 0.01923228417328356,
"median": 0.16091277934000003,
"user": 0.208961165,
"system": 0.2138258875,
"min": 0.13613535384000003,
"max": 0.19709601084000003
},
{
"command": "pacquet@main",
"mean": 0.18583130937333336,
"stddev": 0.021619744110598648,
"median": 0.18201286684,
"user": 0.22484217333333328,
"system": 0.23323019999999997,
"min": 0.15742652584000003,
"max": 0.22385340884000002
},
{
"command": "pnpr@HEAD",
"mean": 0.20340017747636366,
"stddev": 0.03235719753708907,
"median": 0.21849176884000002,
"user": 0.24057713090909097,
"system": 0.21707074545454547,
"min": 0.15151356384,
"max": 0.24524410584000003
},
{
"command": "pnpr@main",
"mean": 0.19185200907529412,
"stddev": 0.028528263809141332,
"median": 0.17642527484,
"user": 0.22400868705882346,
"system": 0.20507349411764708,
"min": 0.15174316884000003,
"max": 0.23458135984000003
}
]
} |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15710 +/- ##
=======================================
Coverage 91.95% 91.95%
=======================================
Files 1463 1463
Lines 197226 197242 +16
=======================================
+ Hits 181353 181375 +22
+ Misses 15873 15867 -6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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? |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved review issues remain.
Review effort: Lite
Findings: None
What changed in this PR
Fixes pnpm deploy --prod failures involving downloadable runtime engines by preserving runtime edges in generated deploy importers.
Changes:
- Preserve excluded
runtime:dependencies in TypeScript and Rust deploy generation. - Add regression tests for both implementations.
- Add release metadata.
| File | Description |
|---|---|
pnpm11/releasing/commands/test/deploy/deploy.test.ts |
Adds TypeScript regression coverage. |
pnpm11/releasing/commands/src/deploy/createDeployFiles.ts |
Preserves excluded runtime edges. |
pnpm/crates/cli/tests/suite/deploy_specifiers.rs |
Adds Rust regression coverage. |
pnpm/crates/cli/src/cli_args/deploy/workspace_manifest.rs |
Hosts shared workspace settings logic. |
pnpm/crates/cli/src/cli_args/deploy/lockfile.rs |
Preserves runtime edges in Rust lockfile generation. |
pnpm/crates/cli/src/cli_args/deploy.rs |
Updates the workspace settings import. |
.changeset/prod-deploy-devengines-runtime.md |
Records the user-visible fix and releases. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…up is excluded A devEngines.runtime with onFail: download is reified into a node: runtime:<version> dependency every time the manifest is read. deploy --prod dropped that edge from the generated deploy lockfile importer while the generated deploy manifest kept the devEngines field, so the install inside the deploy directory re-derived the edge and failed its frozen-lockfile check with ERR_PNPM_OUTDATED_LOCKFILE. The deploy file generators now keep runtime references in the importer when their dependency group is excluded, like they already keep peer-only dependencies. The deploy install still skips them with the rest of the excluded group, so the runtime stays out of the deployed node_modules. Fixes pnpm#15703
…e manifest `deploy_workspace_settings` builds the deploy's `pnpm-workspace.yaml` and the matching install settings, so it belongs with `deploy_workspace_manifest` rather than in the lockfile module. This also keeps `lockfile.rs` within the 400-line limit enforced by `perfectionist::overly_long_file`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
`perfectionist::macro_trailing_comma` requires a trailing comma in multi-line macro invocations. Co-Authored-By: Claude Opus 5.5 <[email protected]>
c03a140 to
21d812e
Compare
Code Review by Qodo
1. Both release lines share one changeset
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
The lingering and stubborn fixtures wrote their pid with a plain
writeFileSync, which creates the file before it writes the contents.
A test that polled for the file could read it empty and fail with
ParseIntError { kind: Empty }, as seen on the macOS Rust CI runner.
Write to a temporary file and rename it into place.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Code review by qodo was updated up to the latest commit 1a1b012 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Congrats on merging your first pull request! 🎉🎉🎉 |
Closes #15703
The bug
pnpm deploy --prodfails withERR_PNPM_OUTDATED_LOCKFILEwhen the deployed project declares adevEngines.runtimewithonFail: download:pnpm install --frozen-lockfile --prodon the same project succeeds, and so doespnpm deploywithout--prod.Root cause
A
devEngines.runtime(orengines.runtime) withonFail: downloadis reified into a synthetic<name>: runtime:<version>dependency every time the manifest is read (devEnginesmaps todevDependencies,enginestodependencies).The deploy file generators drop an excluded dependency group's direct dependencies from both the generated deploy manifest and the generated deploy lockfile importer. But the generated deploy manifest keeps the
devEnginesfield, so when the install inside the deploy directory re-reads that manifest, the runtime edge is re-derived, and the frozen-lockfile freshness check finds a specifier in the manifest that the pruned importer does not carry.The fix
Keep runtime references in the generated deploy importer when their dependency group is excluded, the same way peer-only dependencies are already kept. The engines field regenerates them on every manifest read, so the importer must carry them to stay satisfiable. The deploy install still skips them with the rest of the excluded group, so
--proddeploys without the runtime innode_modules, matching whatpnpm deploywithout--prodand a plainpnpm install --prodproduce.Fixed in both stacks, as the bug is present in both: TypeScript
createDeployFilesand Rustfill_target_dependencies.Testing
prod deploy skips the devEngines runtime without failing the frozen lockfile checkinpnpm11/releasing/commands/test/deploy/deploy.test.tsprod_deploy_skips_a_devengines_runtime_without_failing_the_frozen_lockfile_checkinpnpm/crates/cli/tests/suite/deploy_specifiers.rsdeploy --prodsucceeds, the prod dependencies land indist/node_modules, the runtime does not, and the deploy lockfile importer keeps thenode@runtime:dev edge.Test fix carried along
interrupt::a_process_the_script_left_behind_survives_the_exit_of_pnpmfailed on the macOS Rust CI runner withParseIntError { kind: Empty }. Its fixture wrote the pid with a plainwriteFileSync, so the test could see the file before its contents. The lingering and stubborn fixtures now write the pid to a temporary file and rename it into place.Written by an agent (ZCode, GLM-5.3).
Test fix section added by an agent (Claude Code, claude-opus-5-5).
Summary by CodeRabbit
ERR_PNPM_OUTDATED_LOCKFILEwhen a project declared a downloadabledevEngines.runtime.node_modules.