Repository navigation
test(version): cover pnpm version -r --dry-run and pin its preview to the applied plan - #13291
Conversation
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? |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
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 adds Rust and JavaScript regression tests for recursive ChangesRecursive version dry-run
Estimated code review effort: 2 (Simple) | ~10 minutes Assessment against linked issues
Possibly related PRs
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 |
There was a problem hiding this comment.
🧹 Nitpick comments (4)
pnpm/crates/resolving-git-resolver/src/git_resolver/tests.rs (1)
242-243: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winRemove the duplicate test summary.
The comment only repeats the test name and adds no invariant or rationale.
As per coding guidelines, “Do not duplicate test behavior in documentation; comments should explain only non-obvious reasons or invariants.”
🤖 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/resolving-git-resolver/src/git_resolver/tests.rs` around lines 242 - 243, Remove the redundant comment immediately above the affected test in the resolver tests; keep the test itself unchanged and retain only comments that document non-obvious rationale or invariants.Sources: Coding guidelines, Path instructions
.changeset/git-ci-https-fallback.md (1)
7-7: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winKeep the changeset user-facing.
This explains probe and fallback implementation details. Reduce it to the observable installation behavior.
Proposed revision
-Fixed a CI regression where `github:owner/repo` dependencies (and other shorthand Git specifiers) would fail to install with `Permission denied (publickey)` on CI runners that lack SSH keys. Previously, when all access probes failed, the resolver always fell back to `git+ssh://`. Now it falls back to HTTPS for shorthand and HTTPS-style specifiers, and only uses SSH as fallback when the user explicitly provided an SSH URL (e.g. `git+ssh://` or `git@host:...`). Fixes [pnpm/pnpm#13276](https://github.com/pnpm/pnpm/issues/13276). +Fix installations of shorthand and HTTPS Git dependencies on CI runners without SSH keys by falling back to HTTPS unless SSH was explicitly requested. Fixes [pnpm/pnpm#13276](https://github.com/pnpm/pnpm/issues/13276).As per path instructions, changeset text should be concise and user-visible only; implementation rationale belongs in commits.
🤖 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 @.changeset/git-ci-https-fallback.md at line 7, Rewrite the changeset entry to describe only the user-visible installation behavior: shorthand and HTTPS-style Git dependencies now fall back to HTTPS instead of SSH when SSH authentication is unavailable, while explicitly provided SSH URLs continue using SSH. Remove probe details, implementation rationale, and issue-specific explanation while preserving the fix reference if appropriate.Source: Path instructions
pnpm/crates/cli/tests/version.rs (2)
754-759: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winCover the required
--filtercombination.These cases cover ordering and
--no-git-checks, but none passes--filter. Add pending intents for both packages and assert that a filtered dry-run includes only the selected package.As per path instructions, CLI/e2e coverage must include filter and ordering interactions; the linked objective explicitly requires
--filter.🤖 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/version.rs` around lines 754 - 759, Add a pending intent for each package in the version CLI test, then extend the dry-run argument cases to include --filter with the relevant ordering variations. Assert that the filtered dry-run succeeds and includes only the selected package, while preserving coverage for --no-git-checks and existing argument orderings.Source: Path instructions
760-772: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick winExercise the non-destructive dry-run path in both implementations.
The current tests prove option acceptance/output but would not fail if dry-run still mutated files or performed the registry probe.
pnpm/crates/cli/tests/version.rs#L760-L772: snapshotpackage.jsonand change-intent contents before each invocation and assert they remain unchanged afterward.pnpm11/releasing/commands/test/version/index.test.ts#L44-L46: add a focused handler/CLI test that enablesdryRun, verifies release-plan output, and proves the publication checker is not called.As per path instructions, dry-run tests must verify non-destructive behavior and meaningful CLI wiring.
🤖 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/version.rs` around lines 760 - 772, Extend the Rust dry-run test around pacquet_recursive_version in pnpm/crates/cli/tests/version.rs: snapshot package.json and change-intent contents before each invocation, then assert both remain unchanged afterward while retaining the existing success and release-plan assertions. In pnpm11/releasing/commands/test/version/index.test.ts, add a focused handler/CLI test that enables dryRun, verifies release-plan output, and asserts the publication checker is not called.Source: 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.
Nitpick comments:
In @.changeset/git-ci-https-fallback.md:
- Line 7: Rewrite the changeset entry to describe only the user-visible
installation behavior: shorthand and HTTPS-style Git dependencies now fall back
to HTTPS instead of SSH when SSH authentication is unavailable, while explicitly
provided SSH URLs continue using SSH. Remove probe details, implementation
rationale, and issue-specific explanation while preserving the fix reference if
appropriate.
In `@pnpm/crates/cli/tests/version.rs`:
- Around line 754-759: Add a pending intent for each package in the version CLI
test, then extend the dry-run argument cases to include --filter with the
relevant ordering variations. Assert that the filtered dry-run succeeds and
includes only the selected package, while preserving coverage for
--no-git-checks and existing argument orderings.
- Around line 760-772: Extend the Rust dry-run test around
pacquet_recursive_version in pnpm/crates/cli/tests/version.rs: snapshot
package.json and change-intent contents before each invocation, then assert both
remain unchanged afterward while retaining the existing success and release-plan
assertions. In pnpm11/releasing/commands/test/version/index.test.ts, add a
focused handler/CLI test that enables dryRun, verifies release-plan output, and
asserts the publication checker is not called.
In `@pnpm/crates/resolving-git-resolver/src/git_resolver/tests.rs`:
- Around line 242-243: Remove the redundant comment immediately above the
affected test in the resolver tests; keep the test itself unchanged and retain
only comments that document non-obvious rationale or invariants.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 8ce5811c-c29e-406f-a125-00281cf0eeaa
📒 Files selected for processing (11)
.changeset/git-ci-https-fallback.mdpnpm/crates/cli/src/cli_args/version.rspnpm/crates/cli/tests/version.rspnpm/crates/resolving-git-resolver/src/git_resolver/tests.rspnpm/crates/resolving-git-resolver/src/hosted_git.rspnpm/crates/resolving-git-resolver/src/parse_bare_specifier.rspnpm/crates/resolving-git-resolver/src/parse_bare_specifier/tests.rspnpm11/releasing/commands/src/version/index.tspnpm11/releasing/commands/test/version/index.test.tspnpm11/resolving/git-resolver/src/parseBareSpecifier.tspnpm11/resolving/git-resolver/test/index.ts
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains in the changes related to the previously reported first-release dry-run mismatch. Reviews (5): Last reviewed commit: "test(version): make the dry-run filter c..." | Re-trigger Greptile |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13291 +/- ##
=======================================
Coverage 88.13% 88.13%
=======================================
Files 611 611
Lines 99372 99372
=======================================
+ Hits 87580 87582 +2
+ Misses 11792 11790 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.5635146291799997,
"stddev": 0.12869592169463323,
"median": 2.60638175588,
"user": 1.6751463999999998,
"system": 1.2880173799999999,
"min": 2.37264223538,
"max": 2.73843019038,
"times": [
2.61100845638,
2.39829996538,
2.61459845138,
2.37264223538,
2.7155507063799997,
2.73843019038,
2.45881915838,
2.60175505538,
2.64667335538,
2.4773687173799996
]
},
{
"command": "pacquet@main",
"mean": 2.5293684335799997,
"stddev": 0.1746520609974407,
"median": 2.5358768398800002,
"user": 1.7066983,
"system": 1.36491298,
"min": 2.32689309538,
"max": 2.79206401538,
"times": [
2.32689309538,
2.3492688403799997,
2.3561129463799997,
2.6895983763799998,
2.61757524138,
2.68257737738,
2.45417843838,
2.79206401538,
2.37318060038,
2.65223540438
]
},
{
"command": "pnpr@HEAD",
"mean": 1.5447263668800002,
"stddev": 0.16723901739681085,
"median": 1.5186174008800002,
"user": 1.2144831000000003,
"system": 1.2159925800000002,
"min": 1.35350871838,
"max": 1.7785254003800002,
"times": [
1.5349205203800003,
1.4235898123800002,
1.3679991333800001,
1.7785254003800002,
1.3634818533800002,
1.5023142813800001,
1.35350871838,
1.7127530943800002,
1.69560670438,
1.71456415038
]
},
{
"command": "pnpr@main",
"mean": 1.57244059638,
"stddev": 0.1846175437151588,
"median": 1.56436694738,
"user": 1.3779046,
"system": 1.2715107799999998,
"min": 1.36519592738,
"max": 1.7917769863800002,
"times": [
1.38624606438,
1.36519592738,
1.7917769863800002,
1.63589502638,
1.49283886838,
1.72477356038,
1.7652514223800002,
1.41247312638,
1.78074291438,
1.3692120673800001
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.27462450807999994,
"stddev": 0.01653265759917471,
"median": 0.27542549378000003,
"user": 0.21437374,
"system": 0.5481526,
"min": 0.25336613728,
"max": 0.29436918028,
"times": [
0.29149021228,
0.29436918028,
0.29145550927999997,
0.28801551928,
0.28321866528,
0.25688719628,
0.26763232228,
0.25942849528,
0.26038184327999997,
0.25336613728
]
},
{
"command": "pacquet@main",
"mean": 0.25814191078000004,
"stddev": 0.008647916383216006,
"median": 0.25654870778,
"user": 0.20819534,
"system": 0.5130805,
"min": 0.24897011728000001,
"max": 0.27833792728,
"times": [
0.26414795428,
0.25561933727999997,
0.25599822728,
0.27833792728,
0.25086103428,
0.24975374628,
0.24897011728000001,
0.26005626128,
0.26057531427999997,
0.25709918828
]
},
{
"command": "pnpr@HEAD",
"mean": 0.28513560658,
"stddev": 0.00974027242978655,
"median": 0.28288663228,
"user": 0.21723474,
"system": 0.5428685999999999,
"min": 0.27340940728,
"max": 0.29841804728,
"times": [
0.29733992828,
0.27340940728,
0.29841804728,
0.27927036128,
0.29718300828,
0.27483779228,
0.28794991228,
0.27811801828,
0.28650290328,
0.27832668728
]
},
{
"command": "pnpr@main",
"mean": 0.28624580688,
"stddev": 0.012466390820581891,
"median": 0.28512638477999996,
"user": 0.22800573999999996,
"system": 0.5449589999999999,
"min": 0.26563333828,
"max": 0.30100058228,
"times": [
0.29776533128,
0.29903916828,
0.28480259728,
0.26563333828,
0.29864267828,
0.28545017227999997,
0.27883844428,
0.27908088527999997,
0.27220487128,
0.30100058228
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.63200846894,
"stddev": 0.03522315537136041,
"median": 2.62541474974,
"user": 1.85567584,
"system": 1.4696619,
"min": 2.59131924724,
"max": 2.70173915024,
"times": [
2.66095145324,
2.64105216624,
2.70173915024,
2.66164921724,
2.60617373024,
2.59435514724,
2.59131924724,
2.63720670324,
2.61362279624,
2.6120150782400002
]
},
{
"command": "pacquet@main",
"mean": 2.6281478974400003,
"stddev": 0.025711229799312896,
"median": 2.6328154662400003,
"user": 1.8305685400000002,
"system": 1.5126132999999997,
"min": 2.5892571012400003,
"max": 2.6664691452400002,
"times": [
2.5892571012400003,
2.59587844724,
2.6063453672400003,
2.63155737224,
2.6664691452400002,
2.64671989924,
2.65676691924,
2.63407356024,
2.61626381124,
2.63814735124
]
},
{
"command": "pnpr@HEAD",
"mean": 1.6992513944400003,
"stddev": 0.15094025019720825,
"median": 1.73829530774,
"user": 1.4175568399999998,
"system": 1.3821344,
"min": 1.46265682224,
"max": 1.8756799532400001,
"times": [
1.6936405112400001,
1.85133121424,
1.8756799532400001,
1.7829501042400002,
1.5386299602400002,
1.7834005352400002,
1.6579232962400001,
1.46265682224,
1.8341267922400002,
1.5121747552400002
]
},
{
"command": "pnpr@main",
"mean": 1.6403030258400002,
"stddev": 0.1023728432210794,
"median": 1.63255038424,
"user": 1.43345404,
"system": 1.4061692999999997,
"min": 1.5065020982400001,
"max": 1.7540932092400001,
"times": [
1.5920889922400001,
1.6217409172400001,
1.74780419424,
1.51240642824,
1.73729355924,
1.7540932092400001,
1.7521427302400001,
1.5355982782400002,
1.64335985124,
1.5065020982400001
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.4444193341800001,
"stddev": 0.026963791348060196,
"median": 0.43517806908,
"user": 0.6063260599999999,
"system": 0.7717332399999999,
"min": 0.41373111858000006,
"max": 0.49718194558000006,
"times": [
0.45316256358000007,
0.49718194558000006,
0.47655392958000004,
0.4591603435800001,
0.43590769158000003,
0.43358089758000007,
0.43444844658000004,
0.4162266625800001,
0.41373111858000006,
0.42423974258
]
},
{
"command": "pacquet@main",
"mean": 0.42620886968000005,
"stddev": 0.015797444856558814,
"median": 0.42137936158,
"user": 0.58344476,
"system": 0.75695784,
"min": 0.40902793758000006,
"max": 0.4532945895800001,
"times": [
0.4460900285800001,
0.41136326658000005,
0.41741861458000007,
0.42341136158000003,
0.4532945895800001,
0.43696223158,
0.43538332558000004,
0.40902793758000006,
0.41934736158,
0.40978997958
]
},
{
"command": "pnpr@HEAD",
"mean": 0.32495096078,
"stddev": 0.007193361399675422,
"median": 0.32461826108,
"user": 0.21788046,
"system": 0.5606594399999998,
"min": 0.31320385158,
"max": 0.33764425458,
"times": [
0.32391946158000007,
0.33764425458,
0.32531706058000004,
0.32722232658000006,
0.32007006558000006,
0.31320385158,
0.32006438758000005,
0.32918291658000004,
0.31972820858000006,
0.33315707458000005
]
},
{
"command": "pnpr@main",
"mean": 0.3240234718800001,
"stddev": 0.007590844894283932,
"median": 0.32305348458000005,
"user": 0.20343266,
"system": 0.55616464,
"min": 0.31121563858000006,
"max": 0.33476771458000004,
"times": [
0.31934726558000004,
0.33476771458000004,
0.31745550958,
0.33107840558000007,
0.31962153958000006,
0.32879603258000006,
0.31996241658,
0.33184564358,
0.31121563858000006,
0.32614455258
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.76187847504,
"stddev": 0.03295399199794,
"median": 1.76350976934,
"user": 0.8241175999999999,
"system": 0.8159266200000002,
"min": 1.71122045184,
"max": 1.82495941584,
"times": [
1.76742649684,
1.74393961584,
1.78239539684,
1.7595930418399999,
1.73089993584,
1.7360281498399999,
1.71122045184,
1.7749181598400001,
1.78740408584,
1.82495941584
]
},
{
"command": "pacquet@main",
"mean": 1.7829380292400003,
"stddev": 0.020988351575982733,
"median": 1.78499048834,
"user": 0.8614213,
"system": 0.9167845199999999,
"min": 1.74409716084,
"max": 1.81030953484,
"times": [
1.81030953484,
1.78528616184,
1.7817607158400002,
1.74409716084,
1.75778751084,
1.78630611884,
1.77104722084,
1.80084686984,
1.7846948148400001,
1.8072441838400002
]
},
{
"command": "pnpr@HEAD",
"mean": 0.33499913963999994,
"stddev": 0.021451147754835646,
"median": 0.33254859134000003,
"user": 0.2246019,
"system": 0.56139912,
"min": 0.30313991683999997,
"max": 0.37352116584,
"times": [
0.37352116584,
0.35665848484,
0.35468226884,
0.33561761384,
0.33585804184,
0.32947956884,
0.32859813783999997,
0.31819832284,
0.31423787484,
0.30313991683999997
]
},
{
"command": "pnpr@main",
"mean": 0.30303528584,
"stddev": 0.007446512902228189,
"median": 0.30199066434,
"user": 0.19486579999999998,
"system": 0.5096343200000001,
"min": 0.29481695984,
"max": 0.31616489284,
"times": [
0.31616489284,
0.29663948884,
0.30172478384,
0.29481695984,
0.29842511384,
0.30225654484,
0.31501436684,
0.30267250283999997,
0.29656919684,
0.30606900784
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.18120170879250003,
"stddev": 0.005977980155826695,
"median": 0.17922797848000002,
"user": 0.15710052,
"system": 0.09304530500000001,
"min": 0.17469025148000003,
"max": 0.19471911948,
"times": [
0.17558383648000003,
0.17716571748,
0.19471911948,
0.17979189548000002,
0.18413659648000003,
0.19188790948,
0.17866406148000002,
0.18173794648000002,
0.17995121248,
0.17792341048000002,
0.18336083648,
0.17566137148000002,
0.17837558648000001,
0.17469025148000003,
0.18874104148,
0.17683654748000002
]
},
{
"command": "pacquet@main",
"mean": 0.17922767985500002,
"stddev": 0.007871217119187464,
"median": 0.17695464898000002,
"user": 0.16444926999999998,
"system": 0.07744380500000002,
"min": 0.17222778848000003,
"max": 0.20611830248000002,
"times": [
0.17832890848000002,
0.20611830248000002,
0.18333129948000002,
0.17593155448000003,
0.17372417648000002,
0.17613098048000003,
0.17777831748000003,
0.18291940148000002,
0.17222778848000003,
0.18175611948,
0.17507205848000001,
0.17438031648000002,
0.17549499248000003,
0.17968164648,
0.17579964748000002,
0.17896736748000003
]
},
{
"command": "pnpr@HEAD",
"mean": 0.09076580048000002,
"stddev": 0.002964721917511763,
"median": 0.09122290148000001,
"user": 0.020008120000000004,
"system": 0.013517046666666671,
"min": 0.08540330448,
"max": 0.10049329048,
"times": [
0.09335916348000001,
0.09174846948,
0.09254754648,
0.09120269948,
0.08540330448,
0.09182672948,
0.10049329048,
0.08639207248,
0.09156219548,
0.09032287748,
0.08617471148,
0.09088693748,
0.08691556448,
0.09186825948,
0.09021752448,
0.09262507848,
0.09197149148,
0.08652915748,
0.08909053548,
0.09300995448,
0.09370440248,
0.09124310348,
0.08758016648,
0.09269125048,
0.09191026948,
0.08848386648,
0.09043506548,
0.09006727248,
0.09075938048,
0.09195167348
]
},
{
"command": "pnpr@main",
"mean": 0.09022837281333333,
"stddev": 0.003578623513592706,
"median": 0.09023152948,
"user": 0.02339167151515152,
"system": 0.009684320606060606,
"min": 0.08505942748,
"max": 0.09708950748,
"times": [
0.08590775548,
0.08650481148,
0.09700805348,
0.08871463648,
0.08673639148,
0.09624430148,
0.09165518448,
0.08642525848,
0.09126590948,
0.09333242148,
0.08902369648,
0.09412166348,
0.09068085048,
0.09596481848,
0.08903601248,
0.09137711148,
0.08659193648,
0.09375963148,
0.08740461348,
0.08547187348,
0.08762468148,
0.09023152948,
0.09708950748,
0.09310120148,
0.08843430648,
0.09034905448,
0.09130227248,
0.08609862748,
0.08673038948,
0.08505942748,
0.09463491648,
0.08872472848,
0.09092872848
]
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.8724757441622223,
"stddev": 0.1731413811272069,
"median": 0.9394502409400001,
"user": 0.8154459866666666,
"system": 0.21636466666666665,
"min": 0.52682477694,
"max": 1.06634088794,
"times": [
0.95749404794,
0.52682477694,
0.9394502409400001,
0.94850791094,
0.90474528194,
0.64350121194,
0.98037397194,
0.88504336694,
1.06634088794
]
},
{
"command": "pacquet@main",
"mean": 0.8690960147177779,
"stddev": 0.16324337810963482,
"median": 0.87966719394,
"user": 0.8177924311111112,
"system": 0.20670422222222223,
"min": 0.49634357994000006,
"max": 1.11717478094,
"times": [
1.11717478094,
0.93585135594,
0.87966719394,
0.83507707894,
0.87688984494,
0.89348686994,
0.84314279194,
0.94423063594,
0.49634357994000006
]
},
{
"command": "pnpm@HEAD",
"mean": 2.999668569717778,
"stddev": 0.1583607013821128,
"median": 2.9528647299400004,
"user": 4.24416632,
"system": 0.27803011111111103,
"min": 2.8222641839400002,
"max": 3.3075559519400004,
"times": [
2.9721239879400003,
2.9656826249400003,
2.8590341189400004,
2.95247541894,
2.9511239109400003,
3.21389219994,
2.9528647299400004,
2.8222641839400002,
3.3075559519400004
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.528784921140001,
"stddev": 0.11837388666052338,
"median": 4.49050902154,
"user": 1.9813267199999998,
"system": 1.4928592600000001,
"min": 4.42333710704,
"max": 4.77769182904,
"times": [
4.64235330304,
4.433797091040001,
4.42333710704,
4.5271680540400006,
4.429918128040001,
4.43655820604,
4.61024514104,
4.552930363040001,
4.45384998904,
4.77769182904
]
},
{
"command": "pacquet@main",
"mean": 4.5451123969400005,
"stddev": 0.14423188334726605,
"median": 4.46055593204,
"user": 1.9966691199999995,
"system": 1.47956916,
"min": 4.44493099504,
"max": 4.8224600230400005,
"times": [
4.8224600230400005,
4.46288975704,
4.448373404040001,
4.71096302804,
4.457900057040001,
4.44493099504,
4.47763281804,
4.45363101604,
4.45822210704,
4.7141207640400005
]
},
{
"command": "pnpr@HEAD",
"mean": 3.6838962659399996,
"stddev": 0.11732105154472114,
"median": 3.6306043515399997,
"user": 2.00713322,
"system": 1.8233346599999998,
"min": 3.5360202410399997,
"max": 3.87144770504,
"times": [
3.79278387604,
3.6357920520399998,
3.5360202410399997,
3.57906148504,
3.6254166510399997,
3.62155081204,
3.79888684904,
3.79169657904,
3.87144770504,
3.58630640904
]
},
{
"command": "pnpr@main",
"mean": 3.60901388274,
"stddev": 0.10816400410306333,
"median": 3.58420260804,
"user": 1.52711352,
"system": 1.43204486,
"min": 3.48024730304,
"max": 3.74846754904,
"times": [
3.74814294204,
3.63504261604,
3.73946764104,
3.64799095504,
3.5294902160399997,
3.48024730304,
3.74846754904,
3.49695109604,
3.53097590904,
3.53336260004
]
}
]
} |
|
| Project | pnpm's project |
| Branch | pr/13291 |
| 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,462.66 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 303.14 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 313.20 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 85.40 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,353.51 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,536.02 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 273.41 ms |
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? |
65db2f8 to
c4d53b3
Compare
…registry calls during dry-run
`pnpm version -r --dry-run` exists to preview what a real run would do. Skipping the first-release registry probe under --dry-run made the preview diverge from the run it previews: a package whose current version the registry does not have publishes that version verbatim, so a probe-less preview announced a bump that never happens, along with the dependent releases and lane prerelease bases that follow from it. Keep the probe on both paths in both stacks, and cover the invariant: the first-release tests now assert the dry run previews the same debut the apply performs, and the pacquet integration test walks every spelling of the flag reported in pnpm#13271 — including --filter — asserting that no manifest and no change intent is touched and that the applied release is the one previewed. It runs with the assume-published seam so the preview needs no registry round trip. The flag itself needs no registration: `dry-run` has been in the version command's cliOptionsTypes and on the Rust VersionArgs since the release flow landed, and every reported spelling is accepted by the current CLI. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
c4d53b3 to
c3f68d1
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
pnpm version -r --dry-run and pin its preview to the applied plan
Code Review by Qodo
1. Misleading helper naming
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
pnpm11/releasing/commands/test/change/index.test.ts (1)
228-228: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winKeep the dry-run option type-safe.
Line 228 casts the complete handler options object to
anyto adddryRun. This disables compile-time checking for the option name and for every other option in this call. AdddryRuntoVersionHandlerOptionsor typebaseOptswith the parser-to-handler contract, then remove the cast. Confirm which shared type owns this option before merging.As per path instructions, reuse the existing option/config contract instead of bypassing it with
any.🤖 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 `@pnpm11/releasing/commands/test/change/index.test.ts` at line 228, Update the test setup around VersionHandlerOptions and baseOpts to use the existing parser-to-handler options contract, ensuring dryRun is declared on the owning shared type; then remove the any cast from the version.handler call while preserving type checking for all options.Source: 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/cli/tests/version.rs`:
- Around line 862-872: Update the version dry-run coverage around
pacquet_version_assuming_published to include pending intents for both pkg-a and
pkg-b, then assert unfiltered invocations include both packages while the
--filter pkg-a invocation excludes pkg-b. Preserve the existing argument-order
and release-plan assertions so the test verifies filter behavior in addition to
argument acceptance.
- Around line 873-875: Update the dry-run test around the invocation loop to
capture the original bytes of both package manifests and the changeset before
the loop, then compare each file’s complete contents after every invocation.
Replace the field-level version and existence-only assertions near
manifest_version and intent.exists with byte-for-byte unchanged checks, while
retaining the per-invocation validation.
---
Nitpick comments:
In `@pnpm11/releasing/commands/test/change/index.test.ts`:
- Line 228: Update the test setup around VersionHandlerOptions and baseOpts to
use the existing parser-to-handler options contract, ensuring dryRun is declared
on the owning shared type; then remove the any cast from the version.handler
call while preserving type checking for all options.
🪄 Autofix
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: 34af5e46-67e1-4d17-a1f5-0100bf238213
📒 Files selected for processing (4)
pnpm/crates/cli/tests/change.rspnpm/crates/cli/tests/version.rspnpm11/releasing/commands/test/change/index.test.tspnpm11/releasing/commands/test/version/index.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- pnpm11/releasing/commands/test/version/index.test.ts
…ole files The `--filter pkg-a` case passed against an implementation that ignored the filter, because the only pending intent named pkg-a. Give pkg-b an intent of its own and assert it is in every unfiltered plan and absent from the filtered one. The non-mutation checks read one manifest field and the intent path's existence, so a dry run could rewrite anything else and still pass. Compare both manifests and every change intent byte for byte after each invocation instead.
|
Re the Qodo finding on Written by an agent (Claude Code, claude-opus-5). |
|
Code review by qodo was updated up to the latest commit 73d9b49 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Summary
Regression coverage for
pnpm version -r --dry-run(Closes #13271), and the invariant that keeps it honest: a dry run previews exactly the plan a real run applies.The flag itself turned out to need no registration.
'dry-run': Booleanhas been in the version command'scliOptionsTypesand#[clap(long = "dry-run")]has been on the RustVersionArgssince the release flow landed, and the current CLI accepts every spelling reported in the issue — in a scratch workspace and in this repo. TheUnknown option: 'dry-run'text only exists in the TypeScript CLI'sformatError.ts, so the report was almost certainly a stale or delegated binary. What was missing is the integration test that would have said so, which is what this PR adds.An earlier revision of this PR also skipped the first-release registry probe under
--dry-runas an optimization. That is a correctness regression, not an optimization:unpublishedDirsdecidesfirstRelease, and a package whose current version the registry does not have publishes that version verbatim. Without the probe the preview announces a bump that never happens, and with it the dependent releases and lane prerelease bases that follow. It has been dropped; both stacks keep probing on both paths, and the first-release tests now pin the preview to the applied result.This PR previously also carried the hosted-Git HTTPS fallback. Those commits have been dropped — #13290 owns that fix and extends it with probe retries and reordering.
Squash Commit Body
Checklist
already linked to it solves it.
pnpm/port, or the description notes what still needs porting.Written by an agent (Claude Code, claude-opus-5).
Summary by CodeRabbit
Bug Fixes
version --dry-runbehavior for recursive releases and unpublished packages.Tests