Skip to content

fix(package-manager): persist loose-mode minimumReleaseAge picks to the exclude list - #13708

Merged
zkochan merged 4 commits into
mainfrom
fix-13687
Aug 7, 2026
Merged

zkochan merged 4 commits into
mainfrom
fix-13687

Conversation

@zkochan

@zkochan zkochan commented Aug 7, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes #13687.

In the Rust CLI (v12), a fresh resolve that let immature versions through under minimumReleaseAge with minimumReleaseAgeStrict: false (the default) did not record them in minimumReleaseAgeExclude in pnpm-workspace.yaml. The TypeScript CLI has done this since v11.20 (Added N entries to minimumReleaseAgeExclude in pnpm-workspace.yaml (set minimumReleaseAgeStrict to true to gate these updates with a prompt)). Without the persisted entries, the committed lockfile then failed verification on the next frozen install with ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION — the CI failure reported in the issue.

handle_minimum_release_age_violations now has a loose-mode branch that merges the immature picks into minimumReleaseAgeExclude and emits the same notice as the TypeScript CLI. A new Install.persist_policy_excludes flag gates the write, mirroring which TypeScript commands route through the policy handlers (installDeps / recursive / global policy callbacks):

  • true for install (incl. the re-resolving installs triggered by patch-commit / unlink), add, dedupe, and update with --save;
  • false for update --no-save, embedder-driven installs (napi, the pnpr server), and commands that must not touch the workspace manifest (remove, link, import, prune, fetch, deploy, rebuild). Frozen installs never resolve, so the flag is inert there.

Persistence is also skipped under --dry-run, matching the TypeScript gate (opts.save !== false && !opts.dryRun).

Rust-only change: the TypeScript CLI already has this behavior, so nothing needs porting.

Squash Commit Body

A fresh resolve that lets immature versions through under
minimumReleaseAgeStrict: false now appends them to
minimumReleaseAgeExclude in pnpm-workspace.yaml, matching the TypeScript
CLI's loose-mode auto-persist. Without the entries, the committed
lockfile failed verification on the next frozen install with
ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION (e.g. in CI).

The new Install.persist_policy_excludes flag gates the write: it is set
for the user-facing resolving commands (install, add, update with
--save, dedupe) and off for embedder-driven installs (napi, pnpr
server) and commands that must not touch the workspace manifest,
mirroring which TypeScript commands route through the policy handlers.

Closes pnpm/pnpm#13687

Checklist

  • I checked the referenced issue and verified that none of the PRs
    already linked to it solves it.
  • The change is implemented in both the TypeScript CLI and the Rust
    pnpm/ port, or the description notes what still needs porting.
  • Added a changeset (pnpm changeset) if this PR changes any published
    package. Keep it short and written for pnpm users — it becomes a release note.
  • Added or updated tests.

Written by an agent (Claude Code, claude-fable-5).


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • New Features

    • Loose minimum-release-age installs can record immature-version exclusions in the workspace configuration.
    • Subsequent frozen installs can verify and reuse recorded exclusions.
    • Update operations preserve exclusions when saving manifest changes.
  • Bug Fixes

    • Exclusion persistence is limited to supported install flows.
    • Fetch, deploy, link, prune, rebuild, import, and lockfile-only operations do not modify policy settings.
    • Dry runs, frozen installs, and dedupe --check remain non-persistent.

Copilot AI lite review requested due to automatic review settings August 7, 2026 12:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@zkochan, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 2 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 75a8b661-4bf2-4541-885a-f83a3b544f52

📥 Commits

Reviewing files that changed from the base of the PR and between bc3ca08 and d434ac8.

📒 Files selected for processing (1)
  • pnpm/crates/cli/tests/suite/dedupe.rs
📝 Walkthrough

Walkthrough

The install pipeline now carries a persist_policy_excludes option. Loose minimum-release-age installs can write immature-version exclusions to pnpm-workspace.yaml. Auxiliary, frozen, dry-run, and pnpr paths disable persistence. Tests cover both enabled and disabled behavior.

Changes

Minimum release age persistence

Layer / File(s) Summary
Install option propagation
pnpm/crates/package-manager/src/install.rs, pnpm/crates/package-manager/src/install/materialize.rs, pnpm/crates/package-manager/src/install/run.rs, pnpm/crates/package-manager/src/install_with_fresh_lockfile.rs
The new persist_policy_excludes option flows through the installation pipeline. Dry runs do not persist exclusions.
Violation handling
pnpm/crates/package-manager/src/minimum_release_age.rs
Loose-mode violations can persist and report exclusions. Strict-mode approvals use shared persistence logic with dynamic reasons.
Command-specific wiring
pnpm/crates/cli/src/cli_args/*, pnpm/crates/package-manager/src/{add,remove,update}.rs, pnpm/crates/napi/src/install.rs, pnpr/crates/pnpr/src/resolver/resolve.rs
Install and add paths enable persistence. Update paths follow save. Auxiliary, frozen, and pnpr paths disable persistence.
Validation and release metadata
pnpm/crates/package-manager/src/install/tests.rs, pnpm/crates/package-manager/src/minimum_release_age/tests.rs, pnpm/crates/cli/tests/dedupe.rs, .changeset/loose-minimum-release-age-persist.md
Tests cover persistence, non-persistence, and dedupe --check. The changeset documents the behavior.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Assessment against linked issues

Objective Addressed Explanation
Add minimumReleaseAgeExclude entries during a clean, loose-mode install [#13687] ✅

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Install
  participant MinimumReleaseAge
  participant WorkspaceManifest
  User->>Install: run clean loose-mode install
  Install->>MinimumReleaseAge: handle immature package selections
  MinimumReleaseAge->>WorkspaceManifest: persist minimumReleaseAgeExclude entries
  WorkspaceManifest-->>Install: updated workspace configuration
Loading

Possibly related PRs

  • pnpm/pnpm#13653 — Modifies minimum-release-age exclusion persistence across install-related flows.
  • pnpm/pnpm#13172 — Covers non-strict minimumReleaseAge behavior and related install handling.
  • pnpm/pnpm#13062 — Modifies minimum-release-age handling and persistence controls.

Suggested labels: product: pacquet, product: pnpr

Suggested reviewers: copilot

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-13687

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Fix loose-mode minimumReleaseAge to persist excludes in pnpm-workspace.yaml

🐞 Bug fix 🧪 Tests 📝 Documentation 🕐 40+ Minutes

Grey Divider

AI Description

• Persist immature versions selected under loose minimumReleaseAge into minimumReleaseAgeExclude.
• Gate workspace-manifest writes with a new persist_policy_excludes install flag.
• Add regression tests to prevent frozen-install verification failures (pnpm/pnpm#13687).
Diagram

graph TD
  A["Resolving commands"] --> B["Install (Rust)"] --> C["Fresh lockfile resolve"] --> D["Minimum release-age policy"] --> E[("pnpm-workspace.yaml")]
  D --> F["Lockfile verification path"]
  subgraph "Resolving commands"
    A1["install/add/dedupe/update --save"]
    A2["no-save/embedder/other cmds"]
  end
  A1 --> B
  A2 --> B
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Persist bypasses into the lockfile instead of pnpm-workspace.yaml
  • ➕ Keeps policy decisions colocated with the resolved graph being verified
  • ➕ Avoids workspace-manifest churn in repos that prefer not to touch pnpm-workspace.yaml
  • ➖ Diverges from existing TypeScript CLI behavior and user expectations
  • ➖ More invasive format/design change; requires lockfile schema and verifier changes
2. Always persist loose-mode excludes (no gating flag)
  • ➕ Simpler wiring; fewer call sites need to decide policy write behavior
  • ➕ Eliminates risk of missed persist in future call paths
  • ➖ Violates constraints for commands/embedders that must not mutate workspace state
  • ➖ Surprising side effect for operations like fetch/prune/deploy/remove/link
3. Prompt even in loose mode when new excludes would be added
  • ➕ Makes workspace-manifest writes explicit and reduces unexpected diffs
  • ➕ Uniform UX across strict/loose paths
  • ➖ Changes default non-interactive behavior; can break CI/automation expectations
  • ➖ Adds friction for users relying on loose-mode to ‘just work’

Recommendation: Keep the PR’s approach: align with the TypeScript CLI by auto-persisting loose-mode picks, but gate persistence via persist_policy_excludes and dry-run checks to avoid mutating pnpm-workspace.yaml for embedders and non-manifest-touching commands. This provides the correctness fix (frozen verification) with minimal behavioral change surface.

Files changed (21) +322 / -4

Bug fix (18) +70 / -4
dedupe.rsEnable policy-exclude persistence for dedupe +1/-0

Enable policy-exclude persistence for dedupe

• Sets persist_policy_excludes=true when constructing Install options for the dedupe command, allowing loose-mode policy bypasses to be written to the workspace manifest.

pnpm/crates/cli/src/cli_args/dedupe.rs

deploy.rsDisable policy-exclude persistence for deploy +1/-0

Disable policy-exclude persistence for deploy

• Sets persist_policy_excludes=false for deploy, preventing workspace-manifest mutations during deploy operations.

pnpm/crates/cli/src/cli_args/deploy.rs

fetch.rsDisable policy-exclude persistence for fetch +1/-0

Disable policy-exclude persistence for fetch

• Sets persist_policy_excludes=false for fetch, ensuring fetch does not write pnpm-workspace.yaml.

pnpm/crates/cli/src/cli_args/fetch.rs

import.rsDisable policy-exclude persistence for import +1/-0

Disable policy-exclude persistence for import

• Sets persist_policy_excludes=false for import to avoid workspace-manifest writes during import workflows.

pnpm/crates/cli/src/cli_args/import.rs

install.rsSet persistence flag for install and disable for pnpr-driven installs +3/-0

Set persistence flag for install and disable for pnpr-driven installs

• Enables persist_policy_excludes for normal install flows, and explicitly disables it for installs routed through pnpr integration paths that must not touch workspace manifests.

pnpm/crates/cli/src/cli_args/install.rs

link.rsDisable policy-exclude persistence for link +1/-0

Disable policy-exclude persistence for link

• Sets persist_policy_excludes=false for link to prevent modifying pnpm-workspace.yaml as a side effect of linking.

pnpm/crates/cli/src/cli_args/link.rs

prune.rsDisable policy-exclude persistence for prune +1/-0

Disable policy-exclude persistence for prune

• Sets persist_policy_excludes=false for prune, keeping prune free of workspace-manifest writes.

pnpm/crates/cli/src/cli_args/prune.rs

rebuild.rsDisable policy-exclude persistence for rebuild +1/-0

Disable policy-exclude persistence for rebuild

• Sets persist_policy_excludes=false for rebuild to avoid updating pnpm-workspace.yaml during rebuild.

pnpm/crates/cli/src/cli_args/rebuild.rs

install.rsPrevent embedders from persisting workspace policy excludes +1/-0

Prevent embedders from persisting workspace policy excludes

• Sets persist_policy_excludes=false for napi-driven installs so programmatic consumers do not mutate pnpm-workspace.yaml implicitly.

pnpm/crates/napi/src/install.rs

add.rsEnable policy-exclude persistence for add flows +2/-0

Enable policy-exclude persistence for add flows

• Sets persist_policy_excludes=true for add-related installs so loose-mode minimumReleaseAge picks get persisted, matching CLI expectations.

pnpm/crates/package-manager/src/add.rs

install.rsAdd persist_policy_excludes to Install options +8/-0

Add persist_policy_excludes to Install options

• Extends the Install configuration struct with a persist_policy_excludes boolean and documents when it should be enabled or disabled.

pnpm/crates/package-manager/src/install.rs

materialize.rsThread persistence flag through materialization inputs +3/-0

Thread persistence flag through materialization inputs

• Plumbs persist_policy_excludes through MaterializationInputs and into the materialize pipeline so policy handlers can decide whether to write workspace excludes.

pnpm/crates/package-manager/src/install/materialize.rs

run.rsPropagate persistence flag through install runner +2/-0

Propagate persistence flag through install runner

• Passes persist_policy_excludes from Install into the run/materialize layers so fresh-lockfile resolution can persist policy excludes when appropriate.

pnpm/crates/package-manager/src/install/run.rs

install_with_fresh_lockfile.rsGate minimumReleaseAge exclude persistence during fresh resolves +9/-0

Gate minimumReleaseAge exclude persistence during fresh resolves

• Introduces persist_policy_excludes in InstallWithFreshLockfile and passes it into minimumReleaseAge handling. Ensures persistence is also skipped under dry-run.

pnpm/crates/package-manager/src/install_with_fresh_lockfile.rs

minimum_release_age.rsPersist loose-mode immature picks into minimumReleaseAgeExclude +30/-4

Persist loose-mode immature picks into minimumReleaseAgeExclude

• Refactors minimumReleaseAge violation handling to compute immature picks once and, in loose mode, optionally persist them to pnpm-workspace.yaml with the TypeScript CLI’s informational message. Extracts shared persistence+logging into a helper used by both loose-mode and prompt-approved strict mode.

pnpm/crates/package-manager/src/minimum_release_age.rs

remove.rsDisable policy-exclude persistence for remove +2/-0

Disable policy-exclude persistence for remove

• Sets persist_policy_excludes=false for remove to ensure dependency removal does not rewrite pnpm-workspace.yaml.

pnpm/crates/package-manager/src/remove.rs

update.rsPersist policy excludes only for update --save +2/-0

Persist policy excludes only for update --save

• Wires persist_policy_excludes to the update command’s save flag so only saving updates may append to minimumReleaseAgeExclude; no-save updates avoid workspace-manifest mutations.

pnpm/crates/package-manager/src/update.rs

resolve.rsDisable workspace policy persistence for pnpr resolver path +1/-0

Disable workspace policy persistence for pnpr resolver path

• Sets persist_policy_excludes=false for pnpr server-driven resolve/install path to prevent workspace-manifest writes from embedder-driven operations.

pnpr/crates/pnpr/src/resolver/resolve.rs

Tests (2) +247 / -0
tests.rsAdd regression test for loose-mode minimumReleaseAge persistence +163/-0

Add regression test for loose-mode minimumReleaseAge persistence

• Adds a new end-to-end style install test reproducing pnpm/pnpm#13687 to ensure loose-mode resolves append picked immature versions to minimumReleaseAgeExclude. Updates existing test fixtures to include the new Install field.

pnpm/crates/package-manager/src/install/tests.rs

tests.rsAdd tests for loose-mode persistence and non-persistence +84/-0

Add tests for loose-mode persistence and non-persistence

• Extends tests to cover loose mode auto-persisting excludes without prompting when enabled, and leaving the workspace manifest unchanged when persistence is disabled. Updates existing tests for the new function signature.

pnpm/crates/package-manager/src/minimum_release_age/tests.rs

Documentation (1) +5 / -0
loose-minimum-release-age-persist.mdAdd changeset for minimumReleaseAgeExclude persistence fix +5/-0

Add changeset for minimumReleaseAgeExclude persistence fix

• Introduces a changeset documenting that loose-mode minimumReleaseAge picks are recorded into minimumReleaseAgeExclude to keep later frozen installs verifiable.

.changeset/loose-minimum-release-age-persist.md

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 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/src/cli_args/dedupe.rs`:
- Line 110: Update the dedupe options construction around
persist_policy_excludes to disable exclusion persistence when self.check is
enabled, ensuring non-mutating check mode cannot write the workspace manifest.
Add a regression test verifying dedupe --check leaves the workspace manifest
unchanged.
🪄 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: 24c3bb4d-5539-40c8-b5da-de18ba3dd703

📥 Commits

Reviewing files that changed from the base of the PR and between 2ac554b and c19f18f.

📒 Files selected for processing (21)
  • .changeset/loose-minimum-release-age-persist.md
  • pnpm/crates/cli/src/cli_args/dedupe.rs
  • pnpm/crates/cli/src/cli_args/deploy.rs
  • pnpm/crates/cli/src/cli_args/fetch.rs
  • pnpm/crates/cli/src/cli_args/import.rs
  • pnpm/crates/cli/src/cli_args/install.rs
  • pnpm/crates/cli/src/cli_args/link.rs
  • pnpm/crates/cli/src/cli_args/prune.rs
  • pnpm/crates/cli/src/cli_args/rebuild.rs
  • pnpm/crates/napi/src/install.rs
  • pnpm/crates/package-manager/src/add.rs
  • pnpm/crates/package-manager/src/install.rs
  • pnpm/crates/package-manager/src/install/materialize.rs
  • pnpm/crates/package-manager/src/install/run.rs
  • pnpm/crates/package-manager/src/install/tests.rs
  • pnpm/crates/package-manager/src/install_with_fresh_lockfile.rs
  • pnpm/crates/package-manager/src/minimum_release_age.rs
  • pnpm/crates/package-manager/src/minimum_release_age/tests.rs
  • pnpm/crates/package-manager/src/remove.rs
  • pnpm/crates/package-manager/src/update.rs
  • pnpr/crates/pnpr/src/resolver/resolve.rs

Comment thread pnpm/crates/cli/src/cli_args/dedupe.rs Resolved
@greptile-apps

greptile-apps Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Reviews (3): Last reviewed commit: "test(cli): pin the dedupe --check regres..." | Re-trigger Greptile

Comment thread pnpm/crates/cli/src/cli_args/dedupe.rs Resolved
@github-actions

github-actions Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                                            main                                   pr
-----                                            ----                                   --
lockfile/parse_pnpm_lock                         1.00     11.1±0.21ms    33.9 MB/sec    1.14     12.6±0.29ms    29.7 MB/sec
packument/parse                                  1.00     39.7±1.10µs  1670.8 MB/sec    1.02     40.6±0.46µs  1634.5 MB/sec
tarball/download_dependency                      1.00      3.1±0.19ms  1397.4 KB/sec    1.01      3.1±0.22ms  1387.1 KB/sec
tarball_batch/cold_store_many_medium_tarballs    1.06   194.1±12.86ms 82.4 KElem/sec    1.00    182.5±5.30ms 87.7 KElem/sec
workspace_resolution/hoist_heavy                 1.00    263.9±4.58ms        ? ?/sec    1.08    286.2±9.78ms        ? ?/sec

@codecov-commenter

codecov-commenter commented Aug 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.20%. Comparing base (b11fa81) to head (d434ac8).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13708      +/-   ##
==========================================
+ Coverage   88.19%   88.20%   +0.01%     
==========================================
  Files         615      615              
  Lines       99955   100003      +48     
==========================================
+ Hits        88157    88211      +54     
+ Misses      11798    11792       -6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@qodo-code-review

qodo-code-review Bot commented Aug 7, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (1) 📜 Skill insights (0)

Grey Divider


Action required

1. Strict bypass ignores persist flag ✓ Resolved 🐞 Bug ≡ Correctness
Description
handle_minimum_release_age_violations_with persists to pnpm-workspace.yaml after a strict-mode
approval prompt even when persist_excludes is false, violating the new “must not touch the
workspace manifest” contract for some commands. This can unexpectedly dirty a workspace (and create
CI/local diffs) when strict mode is enabled and the user approves the prompt.
Code

pnpm/crates/package-manager/src/minimum_release_age.rs[R151-154]

+    persist_and_report_excludes::<ReporterImpl>(
+        config,
+        workspace_dir,
+        &immature,
Relevance

●●● Strong

Precedent: avoid unintended workspace-manifest writes when save/persist flags are disabled.

PR-#12202
PR-#12449

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The strict-mode branch persists excludes unconditionally after approval, while
persist_policy_excludes is explicitly set to false by commands that must not write to the
workspace manifest and those installs can still be interactive (can_prompt is based on CI/TTY, not
on persist_policy_excludes).

pnpm/crates/package-manager/src/minimum_release_age.rs[124-157]
pnpm/crates/package-manager/src/install.rs[368-375]
pnpm/crates/cli/src/cli_args/import.rs[61-90]
pnpm/crates/package-manager/src/remove.rs[121-143]
pnpm/crates/package-manager/src/install/run.rs[68-70]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`persist_excludes` is only honored in loose mode. In strict mode, once the user approves, the code always writes to `pnpm-workspace.yaml`, even for commands that explicitly set `persist_policy_excludes: false`.

### Issue Context
- `Install.persist_policy_excludes` is documented as `false` for “commands that must not touch the workspace manifest”.
- Some commands (e.g. `import`, `remove`) pass `persist_policy_excludes: false` but can still be interactive (`can_prompt` true), so strict-mode approval will still write.

### Fix Focus Areas
- pnpm/crates/package-manager/src/minimum_release_age.rs[124-157]
- pnpm/crates/package-manager/src/install_with_fresh_lockfile.rs[1007-1013]
- pnpm/crates/package-manager/src/install.rs[368-375]

### Suggested fix
- Ensure strict-mode prompting/persistence is impossible when `persist_excludes` is false. Two viable approaches:
 1) **Preferred (minimal behavioral surface):** pass `can_prompt && persist_policy_excludes && !dry_run` into `handle_minimum_release_age_violations` so strict mode falls back to the non-interactive error path when the command must not write.
 2) Alternatively: in `handle_minimum_release_age_violations_with`, before prompting (or before persisting), explicitly check `persist_excludes`; if false, return `NoMatureMatchingVersion` (or add a dedicated error) instead of prompting/writing.

Add/adjust a test covering strict mode + `persist_excludes=false` ensuring the workspace manifest is unchanged.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Informational

2. Unneeded work when no-op ✓ Resolved 🐞 Bug ➹ Performance
Description
In loose mode when persist_excludes is false, the code still scans violations and
allocates/sorts the immature subset before returning without prompting, logging, or writing. This
adds avoidable CPU/allocation overhead on paths that intentionally disable persistence (e.g.
embedder-driven installs).
Code

pnpm/crates/package-manager/src/minimum_release_age.rs[R119-124]

+    let immature = sorted_immature_violations(violations);
+    if immature.is_empty() {
        return Ok(());
    }

-    let immature = sorted_immature_violations(violations);
-    if immature.is_empty() {
+    if !config.resolved_minimum_release_age_strict() {
Relevance

●● Moderate

Perf micro-optimization; team sometimes accepts but often rejects early-return refactors as
premature.

PR-#13532
PR-#13173
PR-#13482

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The function constructs and sorts the immature subset before checking strictness/persistence, and
callers can pass persist_policy_excludes && !dry_run which is often false for the non-persisting
command set.

pnpm/crates/package-manager/src/minimum_release_age.rs[119-134]
pnpm/crates/package-manager/src/install_with_fresh_lockfile.rs[1007-1013]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`handle_minimum_release_age_violations_with` always builds `immature = sorted_immature_violations(violations)` before it checks whether strict mode is enabled or persistence is requested. When both are off (`!strict && !persist_excludes`), the function is a no-op and can return immediately.

### Issue Context
This work happens even for callers that intentionally set `persist_policy_excludes=false` (e.g. embedder installs). It’s small, but it’s also unnecessary and easy to avoid.

### Fix Focus Areas
- pnpm/crates/package-manager/src/minimum_release_age.rs[119-134]

### Suggested fix
Add an early return at the top of `handle_minimum_release_age_violations_with`:
- If `!config.resolved_minimum_release_age_strict()` **and** `!persist_excludes`, return `Ok(())` before calling `sorted_immature_violations`.

This preserves existing behavior (no prompt, no write) while skipping the scan/sort work.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Changeset missing pnpm entry 📘 Rule violation § Compliance
Description
The new changeset only declares a bump for pacquet and does not include an explicit bump entry for
pnpm, which violates the changeset requirements and can lead to incomplete or incorrect release
automation.
Code

.changeset/loose-minimum-release-age-persist.md[R1-3]

+---
+"pacquet": patch
+---
Relevance

● Weak

Recent PRs rejected adding pnpm bump when changeset only listed pacquet.

PR-#13695
PR-#13459
PR-#12981

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
PR Compliance ID 713436 requires changesets to explicitly declare the pnpm package with a valid
bump type. The added changeset front-matter includes only "pacquet": patch and contains no pnpm
entry.

Rule 713436: Explicitly declare pnpm package and correct bump type in changesets
.changeset/loose-minimum-release-age-persist.md[1-3]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The new changeset front-matter is missing an explicit `pnpm` entry.

## Issue Context
Per the compliance checklist, changeset front-matter must include a `pnpm` package entry with a valid bump type (`patch`/`minor`/`major`).

## Fix Focus Areas
- .changeset/loose-minimum-release-age-persist.md[1-3]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context used
✅ Compliance rules (platform): 34 rules

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

Copilot AI review requested due to automatic review settings August 7, 2026 13:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@zkochan

zkochan commented Aug 7, 2026

Copy link
Copy Markdown
Member Author

Re the Qodo summary findings:

  • Early return when neither strict nor persisting — done in bc3ca08.
  • Changeset missing pnpm entry — intentionally omitted. Per the repo's changeset policy (CLAUDE.md, "Changesets for the Rust products"), a Rust-only change targets pacquet and must not name "pnpm", which always means the TypeScript CLI package. The TypeScript CLI already has this behavior, so nothing on that side is released by this PR.

Written by an agent (Claude Code, claude-fable-5).

zkochan and others added 3 commits August 7, 2026 15:13
…he exclude list

A fresh resolve that lets immature versions through under
minimumReleaseAgeStrict: false now appends them to
minimumReleaseAgeExclude in pnpm-workspace.yaml, matching the TypeScript
CLI's loose-mode auto-persist. Without the entries, the committed
lockfile failed verification on the next frozen install with
ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION (e.g. in CI).

The new Install.persist_policy_excludes flag gates the write: it is set
for the user-facing resolving commands (install, add, update with
--save, dedupe) and off for embedder-driven installs (napi, pnpr
server) and commands that must not touch the workspace manifest,
mirroring which TypeScript commands route through the policy handlers.

Closes #13687

Co-Authored-By: Claude Fable 5 <[email protected]>
The check contract is mutate-nothing: the lockfile guard already restores
pnpm-lock.yaml, so the loose-mode exclude persist must be gated off too.
The TypeScript CLI cannot reach its persist step under dedupe --check (a
poisoned lockfile fails eager verification first, and a lockfile diff
throws before the persist point), so this keeps the stacks identical.

Also shrinks a test doc comment that restated the test body.

Co-Authored-By: Claude Fable 5 <[email protected]>
An interactive strict-mode approval during a non-persisting run
(dedupe --check) proceeded with the install but must not write the
exclude list. Also short-circuits before scanning violations when
neither strict mode nor persistence is active.

Co-Authored-By: Claude Fable 5 <[email protected]>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 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/dedupe.rs`:
- Around line 335-342: Strengthen the `dedupe --check` test by asserting the
canonical `DedupeError::CheckIssues` code or message from the command output,
rather than accepting any non-zero exit status. Keep the existing manifest
immutability assertion, and ensure the test still specifically exercises
loose-mode minimum-release-age handling.
🪄 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: 2105b446-95bb-4df3-8c5c-4483c60f6785

📥 Commits

Reviewing files that changed from the base of the PR and between c19f18f and bc3ca08.

📒 Files selected for processing (5)
  • pnpm/crates/cli/src/cli_args/dedupe.rs
  • pnpm/crates/cli/tests/dedupe.rs
  • pnpm/crates/package-manager/src/install/tests.rs
  • pnpm/crates/package-manager/src/minimum_release_age.rs
  • pnpm/crates/package-manager/src/minimum_release_age/tests.rs
🚧 Files skipped from review as they are similar to previous changes (4)
  • pnpm/crates/package-manager/src/minimum_release_age/tests.rs
  • pnpm/crates/package-manager/src/install/tests.rs
  • pnpm/crates/cli/src/cli_args/dedupe.rs
  • pnpm/crates/package-manager/src/minimum_release_age.rs

Comment thread pnpm/crates/cli/tests/suite/dedupe.rs Resolved
Copilot AI review requested due to automatic review settings August 7, 2026 13:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

…rror

Any earlier failure (registry, config) also exits nonzero and leaves the
workspace manifest untouched, which would pass the assertion without
exercising the loose-mode persistence gate.

Co-Authored-By: Claude Fable 5 <[email protected]>
Copilot AI review requested due to automatic review settings August 7, 2026 13:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Aug 7, 2026
@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit d434ac8

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

/improve is deprecated. Use /agentic_review instead (removal date not yet scheduled).

No code suggestions found for the PR.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: d434ac8cb50d

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.625 ± 0.165 2.397 2.876 1.72 ± 0.21
pacquet@main 2.557 ± 0.158 2.375 2.819 1.67 ± 0.20
pnpr@HEAD 1.625 ± 0.128 1.432 1.775 1.06 ± 0.14
pnpr@main 1.530 ± 0.160 1.373 1.767 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.6250547389200003,
      "stddev": 0.1653637374458853,
      "median": 2.65705860092,
      "user": 1.7758048600000003,
      "system": 1.3910832999999998,
      "min": 2.39695687592,
      "max": 2.87565085792,
      "times": [
        2.70136115592,
        2.61275604592,
        2.87565085792,
        2.7973606159199997,
        2.39695687592,
        2.71511067792,
        2.50044581292,
        2.41725499492,
        2.73653849392,
        2.49711185792
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.5571419451199997,
      "stddev": 0.15782626274190528,
      "median": 2.50147355292,
      "user": 1.7678364600000003,
      "system": 1.3930694999999997,
      "min": 2.37503950792,
      "max": 2.8191671339199997,
      "times": [
        2.57426914892,
        2.37503950792,
        2.73835702692,
        2.49681299492,
        2.5061341109199997,
        2.75163874892,
        2.8191671339199997,
        2.46937075792,
        2.41766649892,
        2.42296352192
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.62533838952,
      "stddev": 0.12753676462147773,
      "median": 1.62985948242,
      "user": 1.21786126,
      "system": 1.3393068000000004,
      "min": 1.4322022429199999,
      "max": 1.77542711892,
      "times": [
        1.5938888009199998,
        1.76420896092,
        1.57973416592,
        1.4322022429199999,
        1.66583016392,
        1.77542711892,
        1.54212226492,
        1.76071156792,
        1.69435134092,
        1.44490726792
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.5298826178199998,
      "stddev": 0.16005272673682355,
      "median": 1.4732663064199998,
      "user": 1.13708576,
      "system": 1.226079,
      "min": 1.3729142589199999,
      "max": 1.76722626092,
      "times": [
        1.40616326692,
        1.76600545292,
        1.50097196492,
        1.76722626092,
        1.55331509592,
        1.40281718792,
        1.3729142589199999,
        1.4455606479199998,
        1.37823496392,
        1.70561707792
      ]
    }
  ]
}

Scenario: Isolated linker: fresh restore, hot cache + hot store

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 285.7 ± 18.8 267.1 318.0 1.04 ± 0.09
pacquet@main 273.4 ± 13.9 252.9 296.6 1.00
pnpr@HEAD 287.6 ± 12.5 275.6 317.5 1.05 ± 0.07
pnpr@main 284.5 ± 8.9 274.2 302.7 1.04 ± 0.06
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.28573399834,
      "stddev": 0.01879777782083539,
      "median": 0.2799830481400001,
      "user": 0.21787035999999999,
      "system": 0.5818703399999999,
      "min": 0.26710400614,
      "max": 0.31796200014000003,
      "times": [
        0.30357417714,
        0.31796200014000003,
        0.30674243014,
        0.28709599714000006,
        0.26710400614,
        0.26933728914000005,
        0.26968508414000003,
        0.26913558014000005,
        0.27287009914000004,
        0.29383332014
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.27343672764000004,
      "stddev": 0.013880867587231928,
      "median": 0.27232384064000004,
      "user": 0.21047925999999997,
      "system": 0.5474851399999999,
      "min": 0.25292466314000006,
      "max": 0.29657381914000003,
      "times": [
        0.27559591014,
        0.26744719114000004,
        0.25292466314000006,
        0.27456258514000004,
        0.25634164614000005,
        0.29301411814000006,
        0.29657381914000003,
        0.27886252914000004,
        0.27008509614000004,
        0.26895971814
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.28760466864000006,
      "stddev": 0.012472685766998755,
      "median": 0.28483509214,
      "user": 0.23558386000000003,
      "system": 0.54221774,
      "min": 0.27561507614,
      "max": 0.31745866214,
      "times": [
        0.31745866214,
        0.29324084514000004,
        0.27709787814000003,
        0.28640997714000005,
        0.29087490214000006,
        0.28326020714000005,
        0.29384761814000004,
        0.27699746814000004,
        0.28124405214000003,
        0.27561507614
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.28448533294,
      "stddev": 0.008929290724226503,
      "median": 0.28276131864000004,
      "user": 0.24901365999999997,
      "system": 0.51888764,
      "min": 0.27419784814000003,
      "max": 0.30265459614000007,
      "times": [
        0.27419784814000003,
        0.28203713514000006,
        0.29583158214000005,
        0.27629056814,
        0.28348550214,
        0.28149441414000004,
        0.28785747114000004,
        0.27684822814000004,
        0.30265459614000007,
        0.28415598414000004
      ]
    }
  ]
}

Scenario: Isolated linker: fresh install, cold cache + cold store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.697 ± 0.072 2.599 2.801 1.69 ± 0.15
pacquet@main 2.681 ± 0.055 2.603 2.757 1.68 ± 0.15
pnpr@HEAD 1.663 ± 0.155 1.488 1.917 1.04 ± 0.13
pnpr@main 1.595 ± 0.137 1.457 1.843 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.69704952182,
      "stddev": 0.07190934001063885,
      "median": 2.68504007852,
      "user": 1.82651434,
      "system": 1.5210524800000003,
      "min": 2.59865200102,
      "max": 2.80104214102,
      "times": [
        2.66603598502,
        2.69482551802,
        2.59865200102,
        2.61527928002,
        2.65269988102,
        2.67962791102,
        2.69045224602,
        2.80104214102,
        2.77428086502,
        2.7975993900200002
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.68090731082,
      "stddev": 0.05545947925172743,
      "median": 2.67206637652,
      "user": 1.8116600400000002,
      "system": 1.46844858,
      "min": 2.60252531302,
      "max": 2.75653499002,
      "times": [
        2.74525130002,
        2.70150008302,
        2.75653499002,
        2.70622765202,
        2.7405947040200003,
        2.63245872902,
        2.6426326700200002,
        2.64134715102,
        2.60252531302,
        2.64000051602
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.6629699854200002,
      "stddev": 0.15507572663948374,
      "median": 1.5930429140200002,
      "user": 1.14467334,
      "system": 1.2239267799999998,
      "min": 1.4880078970200001,
      "max": 1.91685751202,
      "times": [
        1.5970781400200003,
        1.79249647402,
        1.5890076880200001,
        1.77209406902,
        1.91685751202,
        1.8550233250200001,
        1.5557744700200002,
        1.5347603790200002,
        1.4880078970200001,
        1.5285999000200001
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.5946865835200004,
      "stddev": 0.1367093538630116,
      "median": 1.5568864525200001,
      "user": 1.15337024,
      "system": 1.3137380799999998,
      "min": 1.45740878702,
      "max": 1.84279672102,
      "times": [
        1.7887033470200002,
        1.49543066102,
        1.49106477202,
        1.5337814870200002,
        1.5840473730200002,
        1.6995307780200002,
        1.4741104910200002,
        1.57999141802,
        1.45740878702,
        1.84279672102
      ]
    }
  ]
}

Scenario: Isolated linker: fresh install, hot cache + hot store

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 451.3 ± 32.0 414.8 509.6 1.36 ± 0.14
pacquet@main 443.0 ± 22.1 410.2 473.0 1.33 ± 0.12
pnpr@HEAD 336.4 ± 26.7 314.7 396.2 1.01 ± 0.11
pnpr@main 331.9 ± 23.6 305.0 379.7 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.4512807708000001,
      "stddev": 0.03195015294275767,
      "median": 0.43966933970000005,
      "user": 0.5865826999999999,
      "system": 0.71443608,
      "min": 0.41481661970000006,
      "max": 0.5096010737,
      "times": [
        0.42041588170000005,
        0.41481661970000006,
        0.44108431370000006,
        0.5096010737,
        0.5009223537,
        0.45676189170000003,
        0.43615008470000005,
        0.43196127870000006,
        0.43825436570000004,
        0.46283984470000006
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.4430312752000001,
      "stddev": 0.02212167894183725,
      "median": 0.44064193620000003,
      "user": 0.5820220999999999,
      "system": 0.70803328,
      "min": 0.4102223997000001,
      "max": 0.47302982070000005,
      "times": [
        0.44267332570000006,
        0.43556945170000005,
        0.47302982070000005,
        0.41370040770000005,
        0.43183736470000006,
        0.4721868927,
        0.46540565470000006,
        0.44707688770000004,
        0.4102223997000001,
        0.43861054670000005
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.33641237580000005,
      "stddev": 0.026727710937596454,
      "median": 0.32693149020000006,
      "user": 0.23062189999999996,
      "system": 0.5696748800000001,
      "min": 0.31474692470000004,
      "max": 0.39623113770000007,
      "times": [
        0.32885680070000006,
        0.32500617970000006,
        0.3316026697,
        0.31624483470000003,
        0.3188027707,
        0.3687465207,
        0.39623113770000007,
        0.34552716470000006,
        0.3183587547,
        0.31474692470000004
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.33186590930000004,
      "stddev": 0.023569091061182393,
      "median": 0.32269408720000003,
      "user": 0.22325519999999996,
      "system": 0.56023188,
      "min": 0.30504086170000005,
      "max": 0.37970744770000003,
      "times": [
        0.31697165270000005,
        0.30504086170000005,
        0.34080119870000003,
        0.31092269470000006,
        0.31631387470000005,
        0.3274489997,
        0.31793917470000005,
        0.35320891870000004,
        0.37970744770000003,
        0.35030426970000006
      ]
    }
  ]
}

Scenario: Isolated linker: fresh install, cold cache + hot store

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.783 ± 0.031 1.736 1.851 5.45 ± 0.16
pacquet@main 1.737 ± 0.016 1.716 1.760 5.30 ± 0.14
pnpr@HEAD 0.327 ± 0.008 0.315 0.343 1.00
pnpr@main 0.334 ± 0.020 0.309 0.362 1.02 ± 0.06
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.7834352261000004,
      "stddev": 0.03106362860228742,
      "median": 1.7746641686000002,
      "user": 0.8499642199999998,
      "system": 0.8579291399999999,
      "min": 1.7359168726000003,
      "max": 1.8507015216,
      "times": [
        1.7721284296000002,
        1.7741620386,
        1.8146421616000001,
        1.8507015216,
        1.7815051836000002,
        1.7949058336000001,
        1.7751662986,
        1.7698094326000002,
        1.7359168726000003,
        1.7654144886000003
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.7370074177000003,
      "stddev": 0.01570117201824746,
      "median": 1.7332820521,
      "user": 0.77865242,
      "system": 0.78312254,
      "min": 1.7164798076,
      "max": 1.7597629486000002,
      "times": [
        1.7413197746,
        1.7269335496,
        1.7235983796,
        1.7597629486000002,
        1.7556258786,
        1.7164798076,
        1.7396305546000002,
        1.7245479176000003,
        1.7262958186000001,
        1.7558795476000002
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.32745647640000003,
      "stddev": 0.007909453529796065,
      "median": 0.32854904910000005,
      "user": 0.21734922,
      "system": 0.54694884,
      "min": 0.31524991760000004,
      "max": 0.3434403536,
      "times": [
        0.3274635576,
        0.33030034160000005,
        0.3256176566,
        0.33058522960000003,
        0.31885705760000005,
        0.3296345406,
        0.31524991760000004,
        0.32134715560000005,
        0.33206895360000005,
        0.3434403536
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.3339403106000001,
      "stddev": 0.019579003876564603,
      "median": 0.33098042860000004,
      "user": 0.24460342000000002,
      "system": 0.5434968399999999,
      "min": 0.3089937876,
      "max": 0.3623329436,
      "times": [
        0.33021524360000004,
        0.31442256760000004,
        0.31284446860000004,
        0.3089937876,
        0.33746516260000003,
        0.33174561360000004,
        0.3622795736,
        0.3517661796,
        0.3623329436,
        0.32733756560000005
      ]
    }
  ]
}

Scenario: Isolated linker: fresh resolve, hot cache, offline

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 238.5 ± 16.6 212.3 258.4 2.60 ± 0.21
pacquet@main 235.8 ± 13.9 211.9 255.4 2.57 ± 0.19
pnpr@HEAD 95.5 ± 4.9 87.2 106.6 1.04 ± 0.07
pnpr@main 91.8 ± 3.8 85.3 107.0 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.23849362964666668,
      "stddev": 0.016573000379937947,
      "median": 0.24145004848,
      "user": 0.19349283666666664,
      "system": 0.07722048,
      "min": 0.21233520648,
      "max": 0.25838774448,
      "times": [
        0.23338722348000002,
        0.24951287348,
        0.25838774448,
        0.23289395348000003,
        0.21233520648,
        0.25103534948,
        0.25826322947999997,
        0.21643197948,
        0.21966725148000002,
        0.25080042748,
        0.25007337048,
        0.22913494648000002
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.23577474411636362,
      "stddev": 0.013887689050595193,
      "median": 0.23541940848,
      "user": 0.18844119272727272,
      "system": 0.0691705709090909,
      "min": 0.21187539048,
      "max": 0.25538916748,
      "times": [
        0.24589046348000002,
        0.23505949048000002,
        0.23711708648000002,
        0.23005999748000003,
        0.25092346948,
        0.25538916748,
        0.21739701648,
        0.23541940848,
        0.22570431748000003,
        0.21187539048,
        0.24868637748000003
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.09545095444666665,
      "stddev": 0.004907359948904837,
      "median": 0.09482459498000001,
      "user": 0.02335072,
      "system": 0.013443913333333333,
      "min": 0.08724763348,
      "max": 0.10660683248000001,
      "times": [
        0.09521089648000002,
        0.08791621248,
        0.08724763348,
        0.09223157748000001,
        0.09443829348,
        0.09319883748,
        0.08929373548000001,
        0.09744249848000001,
        0.09343688748000001,
        0.10470560448,
        0.10000702648000001,
        0.10660683248000001,
        0.09764138248000001,
        0.10627559048000002,
        0.10125459548000001,
        0.09371021148000001,
        0.09678682448,
        0.09190286748000001,
        0.09019861048000001,
        0.09061315948000001,
        0.09629377548000001,
        0.09588953348000001,
        0.09278977748,
        0.09965697848,
        0.09619623248,
        0.09532661448,
        0.09314626948,
        0.09164821848,
        0.09843546948000001,
        0.09402648648
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.09181945268000001,
      "stddev": 0.0038247046182209405,
      "median": 0.09130754848,
      "user": 0.022922286666666663,
      "system": 0.011690530666666669,
      "min": 0.08529721148000001,
      "max": 0.10697992448000002,
      "times": [
        0.09228996748000001,
        0.09545805248000001,
        0.10697992448000002,
        0.09434475548000001,
        0.09481940948,
        0.09155788848,
        0.09106346948,
        0.09089160448000001,
        0.09346634148,
        0.08884649348000001,
        0.09254943548000001,
        0.09045745848,
        0.09588065748,
        0.09348056948000001,
        0.08968709648,
        0.08913528748,
        0.09023719348,
        0.08682395548,
        0.08872216948,
        0.08978134348000001,
        0.08845285248000001,
        0.08529721148000001,
        0.08966053648000001,
        0.09339319448000001,
        0.08989174148000001,
        0.09183512048,
        0.09333815048,
        0.09008258148,
        0.09460749048000001,
        0.09155162748000001
      ]
    }
  ]
}

Scenario: Isolated linker: peer-heavy resolve, hot cache, offline

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.175 ± 0.378 0.913 2.119 1.00 ± 0.37
pacquet@main 1.172 ± 0.207 0.740 1.435 1.00
pnpm@HEAD 3.911 ± 0.354 3.413 4.362 3.34 ± 0.66
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.1749374888155557,
      "stddev": 0.37771309951214715,
      "median": 1.08507593026,
      "user": 1.1445153311111111,
      "system": 0.2185547,
      "min": 0.9132051562600001,
      "max": 2.11929133026,
      "times": [
        1.08507593026,
        0.9951945082600001,
        1.10894994126,
        1.10158073726,
        2.11929133026,
        0.9714813412600001,
        0.9312007292600001,
        1.3484577252599999,
        0.9132051562600001
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.1716021899266669,
      "stddev": 0.2070718388808955,
      "median": 1.21947010326,
      "user": 1.143475331111111,
      "system": 0.21651647777777777,
      "min": 0.7396902152600001,
      "max": 1.43473220726,
      "times": [
        1.04464847226,
        1.2470547002599999,
        1.3758756292599998,
        1.0428018852599998,
        0.7396902152600001,
        1.43473220726,
        1.22803890626,
        1.21210759026,
        1.21947010326
      ]
    },
    {
      "command": "pnpm@HEAD",
      "mean": 3.9106064274822225,
      "stddev": 0.35420495109912004,
      "median": 4.05293877526,
      "user": 6.002184553333332,
      "system": 0.37694947777777776,
      "min": 3.41279620026,
      "max": 4.361789440260001,
      "times": [
        3.61793847026,
        3.54726517326,
        3.64258188026,
        3.41279620026,
        4.27753383126,
        4.361789440260001,
        4.11429105126,
        4.05293877526,
        4.16832302526
      ]
    }
  ]
}

Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.866 ± 0.180 4.679 5.143 1.33 ± 0.05
pacquet@main 5.250 ± 0.261 4.857 5.669 1.43 ± 0.08
pnpr@HEAD 3.922 ± 0.135 3.746 4.213 1.07 ± 0.04
pnpr@main 3.663 ± 0.062 3.592 3.786 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.865893981280001,
      "stddev": 0.17985874162064658,
      "median": 4.82590106798,
      "user": 2.9596028199999997,
      "system": 2.1505872999999993,
      "min": 4.67944233898,
      "max": 5.14291984198,
      "times": [
        5.11102943598,
        4.93394014698,
        4.68618400198,
        5.03172779598,
        5.14291984198,
        4.7826707419800005,
        4.70191736598,
        4.67944233898,
        4.86913139398,
        4.71997674898
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 5.250209720480001,
      "stddev": 0.2606580554870681,
      "median": 5.272669777480001,
      "user": 3.6474819199999997,
      "system": 2.7351967,
      "min": 4.85749092198,
      "max": 5.66930886798,
      "times": [
        5.19976868898,
        5.66930886798,
        5.44431948798,
        4.96440556898,
        5.29953856198,
        5.4092562629800005,
        4.95305717298,
        5.45915067798,
        5.2458009929800005,
        4.85749092198
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.9218101131800003,
      "stddev": 0.13494648645569968,
      "median": 3.8930396709800004,
      "user": 2.22369432,
      "system": 2.2917575,
      "min": 3.74612733998,
      "max": 4.21307649398,
      "times": [
        4.21307649398,
        3.98237677798,
        3.9633926229800003,
        3.81245422298,
        3.92911238298,
        3.85696695898,
        4.0356656629800005,
        3.8341912329800003,
        3.74612733998,
        3.84473743598
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.6628704941800003,
      "stddev": 0.06182514839661247,
      "median": 3.65890264648,
      "user": 1.85706192,
      "system": 1.7966954999999998,
      "min": 3.5919818659800002,
      "max": 3.78631935298,
      "times": [
        3.6283046149800002,
        3.60112072998,
        3.65836267998,
        3.68012788498,
        3.5919818659800002,
        3.60911948798,
        3.7387524559800003,
        3.65944261298,
        3.67517325598,
        3.78631935298
      ]
    }
  ]
}

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpnpm's project
Branchpr/13708
Testbedpacquet

🚨 1 Alert

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Upper Boundary
(Limit %)
isolated-linker.peer-heavy-resolve.hot-cache.offlineLatency
milliseconds (ms)
📈 plot
🚷 threshold
🚨 alert (🔔)
913.21 ms
(+28.86%)Baseline: 708.66 ms
850.39 ms
(107.39%)

Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
🚷 view threshold
2,598.65 ms
(-2.10%)Baseline: 2,654.41 ms
3,185.29 ms
(81.58%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,735.92 ms
(-1.73%)Baseline: 1,766.54 ms
2,119.85 ms
(81.89%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
414.82 ms
(-4.48%)Baseline: 434.28 ms
521.13 ms
(79.60%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
212.34 ms
(+3.62%)Baseline: 204.92 ms
245.91 ms
(86.35%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,396.96 ms
(-1.48%)Baseline: 2,432.94 ms
2,919.52 ms
(82.10%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,679.44 ms
(+4.38%)Baseline: 4,482.92 ms
5,379.50 ms
(86.99%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
267.10 ms
(-4.53%)Baseline: 279.78 ms
335.74 ms
(79.56%)
isolated-linker.peer-heavy-resolve.hot-cache.offline📈 view plot
🚷 view threshold
🚨 view alert (🔔)
913.21 ms
(+28.86%)Baseline: 708.66 ms
850.39 ms
(107.39%)

🐰 View full continuous benchmarking report in Bencher

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product: pacquet product: pnpr reviewed: coderabbit CodeRabbit submitted an approving review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pnpm v12 clean install doesn't add minimumReleaseAgeExclude in pnpm-workspace.yaml

3 participants