Skip to content

fix(pacquet): prompt for strict minimum release age approval - #13062

Merged
zkochan merged 2 commits into
pnpm:mainfrom
ychampion:fix/pacquet-minimum-release-age-prompt
Jul 16, 2026
Merged

zkochan merged 2 commits into
pnpm:mainfrom
ychampion:fix/pacquet-minimum-release-age-prompt

Conversation

@ychampion

@ychampion ychampion commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Port the strict minimumReleaseAge approval flow to pacquet and persist approved versions to minimumReleaseAgeExclude.
  • Run terminal input off the async worker and buffer reporter output while the prompt owns the terminal.
  • Reject pacquet update --no-save before resolution when strict approval would require persistence.

Closes #13047.

Validation

  • cargo test --locked -p pacquet-package-manager minimum_release_age
  • cargo test --locked -p pacquet-reporter
  • cargo test --locked -p pacquet-default-reporter
  • cargo clippy --all-targets --workspace -- -D warnings
  • RUSTDOCFLAGS='-D warnings' cargo doc --no-deps --workspace --all-features
  • Repository pre-push TypeScript compile, lint, spellcheck, and metadata checks

The earlier complete package-manager suite passed 715 of 716 tests. The remaining permission-fixture test also fails unchanged on main when run as root because its mode-000 file remains readable. The follow-up's deterministic fresh-install regression and all 10 release-age tests pass.

Squash Commit Body

Strict minimumReleaseAge resolution already collects every immature pick, but pacquet could only abort. Add the interactive approval path used by the TypeScript CLI, persist approved exclusions before install writes begin, and keep noninteractive installs fail-closed with the complete violation list.

Run the blocking confirmation off the async worker and bracket it with pnpm:prompt events. The default reporter holds append-only lines or the latest live frame while the question is active, then replays that output when prompting ends. Reject update --no-save up front because approval requires a durable workspace exclusion.

Closes pnpm/pnpm#13047.

Checklist

  • The TypeScript CLI already implements this policy and reporter behavior; this PR ports the missing Rust behavior.
  • Added a changeset for pacquet.
  • Added or updated tests.

Written by an agent (OpenAI Codex, GPT-5.5).

@ychampion
ychampion requested a review from zkochan as a code owner July 15, 2026 23:35
Copilot AI review requested due to automatic review settings July 15, 2026 23:35
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

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 Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Pacquet adds strict minimumReleaseAge approval prompts, persists approved exclusions, prevents progress redraws during prompts, and integrates typed handling into fresh-lockfile installs and updates.

Changes

Strict minimum release age approval

Layer / File(s) Summary
Prompt event and reporter pause
pnpm/crates/reporter/src/*, pnpm/crates/default-reporter/src/*
Adds pnpm:prompt lifecycle events and pauses default-reporter redraws during interactive prompts, resetting diff state before rendering resumes.
Strict policy approval and persistence
pnpm/crates/package-manager/src/minimum_release_age.rs, pnpm/crates/package-manager/src/minimum_release_age/tests.rs, pnpm/crates/package-manager/Cargo.toml, Cargo.toml, .changeset/*
Adds strict-mode validation, interactive approval, deterministic violation messages, canonicalized minimumReleaseAgeExclude persistence, prompt lifecycle logging, and coverage for approval, denial, and prompt failures.
Install and update enforcement
pnpm/crates/package-manager/src/install.rs, pnpm/crates/package-manager/src/install_with_fresh_lockfile.rs, pnpm/crates/package-manager/src/install/tests.rs, pnpm/crates/package-manager/src/update.rs, pnpm/crates/package-manager/src/lib.rs
Determines prompt eligibility, runs violation handling after workspace resolution, exposes typed errors, validates save requirements, and tests failure before lockfile or modules-directory creation.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Install
  participant MinimumReleaseAge
  participant DialoguerPrompt
  participant DefaultReporter
  participant Sink
  participant WorkspaceManifest
  Install->>MinimumReleaseAge: process policy violations
  MinimumReleaseAge->>DefaultReporter: emit Prompt(Start)
  DefaultReporter->>Sink: activate prompt pause
  MinimumReleaseAge->>DialoguerPrompt: request approval
  DialoguerPrompt-->>MinimumReleaseAge: return approval
  MinimumReleaseAge->>WorkspaceManifest: persist minimumReleaseAgeExclude
  MinimumReleaseAge->>DefaultReporter: emit Prompt(End)
  DefaultReporter->>Sink: reset and resume redraws
Loading

Assessment against linked issues

Objective Addressed Explanation
Implement TTY/non-CI strict approval, persist approved exclusions, reject --no-save, and abort with violations in CI/non-TTY [#13047] ✅
Pause default-reporter redraws while the approval prompt owns the terminal [#13047] ✅

Suggested labels: product: pacquet

Suggested reviewers: zkochan, copilot, zkochan

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@greptile-apps

greptile-apps Bot commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The change is well-contained and all mutations to pnpm-workspace.yaml happen after user confirmation; denials and I/O errors leave the file untouched.

The implementation correctly addresses the async-blocking concern by wrapping dialoguer in spawn_blocking, uses RAII to guarantee reporter cleanup, gates persistence behind user approval, and verifies the no-write invariant with an integration test. No correctness issues were found.

No files require special attention.

Reviews (3): Last reviewed commit: "fix(pacquet): keep approval prompts nonb..." | Re-trigger Greptile

@codecov-commenter

codecov-commenter commented Jul 15, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.12460% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.61%. Comparing base (e114fcb) to head (7290ddf).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
.../crates/package-manager/src/minimum_release_age.rs 97.76% 6 Missing ⚠️
pnpm/crates/default-reporter/src/lib.rs 93.33% 2 Missing ⚠️
pnpm/crates/default-reporter/src/state.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13062      +/-   ##
==========================================
+ Coverage   85.55%   85.61%   +0.05%     
==========================================
  Files         498      499       +1     
  Lines       79648    79957     +309     
==========================================
+ Hits        68142    68452     +310     
+ Misses      11506    11505       -1     

☔ 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.

Strict minimumReleaseAge installs collect every immature pick but cannot approve and persist them
in a TTY. Mirror the TypeScript policy path by bracketing a default-no confirmation with reporter
pause events, persisting approved exclusions, and refusing update --no-save before resolution.

Closes pnpm#13047.

Constraint: Keep noninteractive installs fail-closed with the complete violation list.
Rejected: Infer prompt ownership from stdin TTY state | It cannot identify the prompt window.
Confidence: high
Scope-risk: moderate
Directive: Bracket future interactive prompts with pnpm:prompt start and end events.
Tested: Targeted suites, 715 package-manager tests, Clippy, rustdoc, rustfmt, diff checks.
Not-tested: Real TTY input; one permission test fails unchanged on base when run as root.
@ychampion
ychampion force-pushed the fix/pacquet-minimum-release-age-prompt branch from 4395796 to 7290ddf Compare July 15, 2026 23:47
Copilot AI review requested due to automatic review settings July 15, 2026 23:47

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 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: 2

🧹 Nitpick comments (1)
pnpm/crates/package-manager/src/minimum_release_age.rs (1)

221-443: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Move these unit tests to an external tests.rs module.

Keeping the test module inline violates the pacquet source layout. Move it beside the implementation using the repository’s existing external unit-test-module pattern.

As per path instructions, “Put unit tests in external tests.rs modules (no inline tests in production files).”

🤖 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/package-manager/src/minimum_release_age.rs` around lines 221 -
443, Move the inline #[cfg(test)] mod tests block containing violation,
FakePrompt, RecordingReporter, and the related test functions into a sibling
external tests.rs module. Remove the inline test module from the production file
and wire the external module using the repository’s established external
unit-test pattern, preserving the existing imports and test behavior.

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/default-reporter/src/lib.rs`:
- Around line 168-171: Update DefaultReporter::write_to so output received while
prompt_active is buffered rather than discarded, preserving pending lines and
the latest frame state. On PromptAction::End, flush the buffered append-only
output or re-render the buffered frame state, while preserving existing reporter
output and pnpm-observable behavior.

In `@pnpm/crates/package-manager/src/install/tests.rs`:
- Around line 270-272: Make the test’s noninteractive path deterministic by
injecting the terminal/CI decision used by the install runner, or by executing
it with piped stdin so stdin is explicitly non-TTY. Update the test around the
SilentReporter run to prove immature picks are denied without prompting,
preserving the existing strict-install assertion.

---

Nitpick comments:
In `@pnpm/crates/package-manager/src/minimum_release_age.rs`:
- Around line 221-443: Move the inline #[cfg(test)] mod tests block containing
violation, FakePrompt, RecordingReporter, and the related test functions into a
sibling external tests.rs module. Remove the inline test module from the
production file and wire the external module using the repository’s established
external unit-test pattern, preserving the existing imports and test behavior.
🪄 Autofix (Beta)

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: 3635ba3d-9cb3-4f2f-be94-87e0f347759f

📥 Commits

Reviewing files that changed from the base of the PR and between fb4639f and 7290ddf.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock, !Cargo.lock
📒 Files selected for processing (14)
  • .changeset/pacquet-strict-age-prompt.md
  • Cargo.toml
  • pnpm/crates/default-reporter/src/diff.rs
  • pnpm/crates/default-reporter/src/lib.rs
  • pnpm/crates/default-reporter/src/state.rs
  • pnpm/crates/default-reporter/src/tests.rs
  • pnpm/crates/package-manager/Cargo.toml
  • pnpm/crates/package-manager/src/install/tests.rs
  • pnpm/crates/package-manager/src/install_with_fresh_lockfile.rs
  • pnpm/crates/package-manager/src/lib.rs
  • pnpm/crates/package-manager/src/minimum_release_age.rs
  • pnpm/crates/package-manager/src/update.rs
  • pnpm/crates/reporter/src/lib.rs
  • pnpm/crates/reporter/src/tests.rs

Comment thread pnpm/crates/default-reporter/src/lib.rs Resolved
@github-actions

github-actions Bot commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: 85df92c7c036

Each scenario reports direct installs and pnpr installs. Bencher consumes pacquet@HEAD and pnpr@HEAD.

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.746 ± 0.157 2.465 2.929 1.83 ± 0.15
pacquet@main 2.687 ± 0.113 2.539 2.880 1.79 ± 0.13
pnpr@HEAD 1.502 ± 0.088 1.414 1.711 1.00
pnpr@main 1.569 ± 0.094 1.453 1.694 1.04 ± 0.09
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.7461454892400003,
      "stddev": 0.15685107936739065,
      "median": 2.81615399664,
      "user": 2.47792994,
      "system": 1.8439882399999998,
      "min": 2.46525960164,
      "max": 2.9292566366400004,
      "times": [
        2.9292566366400004,
        2.70401166164,
        2.85125703964,
        2.82692618164,
        2.46525960164,
        2.84145482564,
        2.8445023386400003,
        2.8053818116400002,
        2.49013973664,
        2.70326505864
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.6870326059400003,
      "stddev": 0.11294914229632626,
      "median": 2.6811524996400005,
      "user": 2.86038574,
      "system": 2.09703104,
      "min": 2.53945826264,
      "max": 2.88003730364,
      "times": [
        2.68765883064,
        2.55099851364,
        2.6746461686400003,
        2.53945826264,
        2.88003730364,
        2.83100910964,
        2.76980809764,
        2.6266834926400002,
        2.61110434364,
        2.69892193664
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.5024618999400001,
      "stddev": 0.08758808358622619,
      "median": 1.47327362814,
      "user": 1.86159404,
      "system": 1.71976284,
      "min": 1.41362801264,
      "max": 1.71098840164,
      "times": [
        1.46132747564,
        1.58331220464,
        1.48441854564,
        1.71098840164,
        1.4937873386400002,
        1.43958216564,
        1.46212871064,
        1.5266176316400002,
        1.44882851264,
        1.41362801264
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.56905762924,
      "stddev": 0.09379914029842944,
      "median": 1.53441527064,
      "user": 1.78583134,
      "system": 1.6394897399999997,
      "min": 1.4531816056400002,
      "max": 1.69372593764,
      "times": [
        1.69372593764,
        1.48069926364,
        1.68694485864,
        1.51724141464,
        1.67987159564,
        1.4925152456400002,
        1.5066728346400002,
        1.6281344096400001,
        1.4531816056400002,
        1.5515891266400001
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 348.1 ± 35.2 300.0 400.3 1.00
pacquet@main 355.6 ± 43.3 293.6 441.8 1.02 ± 0.16
pnpr@HEAD 376.1 ± 25.1 344.0 427.3 1.08 ± 0.13
pnpr@main 388.5 ± 53.2 350.6 536.6 1.12 ± 0.19
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.34807157718,
      "stddev": 0.03518278956369392,
      "median": 0.33614880848,
      "user": 0.32580832000000004,
      "system": 0.8343199799999999,
      "min": 0.29998269148,
      "max": 0.40033692848,
      "times": [
        0.32109965648,
        0.35839018448,
        0.38389669048,
        0.34108960948,
        0.40033692848,
        0.39727118148,
        0.33120800748,
        0.31929515148,
        0.29998269148,
        0.32814567048
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.35555878587999995,
      "stddev": 0.043261297806915656,
      "median": 0.34185160498,
      "user": 0.35164902000000003,
      "system": 0.85442798,
      "min": 0.29361587248,
      "max": 0.44178350848000003,
      "times": [
        0.33978630348,
        0.29361587248,
        0.34973516748,
        0.37946732848000003,
        0.34391690648,
        0.41002470448,
        0.44178350848000003,
        0.33460016448,
        0.33022796648,
        0.33242993648
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.37605519498000006,
      "stddev": 0.025107446070660618,
      "median": 0.37158679298,
      "user": 0.36465082000000004,
      "system": 0.83152418,
      "min": 0.34402813548,
      "max": 0.42730470848,
      "times": [
        0.36779414348,
        0.35759317148,
        0.42730470848,
        0.40614836348,
        0.37896706148000003,
        0.37116334748,
        0.38390374448000003,
        0.35163903548000003,
        0.34402813548,
        0.37201023848000003
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.38846200068000003,
      "stddev": 0.053151292659798295,
      "median": 0.37537731498,
      "user": 0.3624576199999999,
      "system": 0.8903311800000001,
      "min": 0.35057417148000003,
      "max": 0.5366159034800001,
      "times": [
        0.35057417148000003,
        0.36152635548,
        0.38032071748,
        0.38376338848,
        0.36579309248,
        0.5366159034800001,
        0.38563514348,
        0.37736505148,
        0.37338957848,
        0.36963660448
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 3.243 ± 0.077 3.131 3.385 1.85 ± 0.24
pacquet@main 3.221 ± 0.075 3.096 3.324 1.84 ± 0.23
pnpr@HEAD 1.806 ± 0.141 1.597 1.963 1.03 ± 0.15
pnpr@main 1.750 ± 0.219 1.528 2.077 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 3.2428385870599996,
      "stddev": 0.07687734335661925,
      "median": 3.2632807466600005,
      "user": 3.1919590999999996,
      "system": 2.1173548,
      "min": 3.13106927366,
      "max": 3.3853691346600003,
      "times": [
        3.26575085866,
        3.26731734966,
        3.28844216266,
        3.2608106346600003,
        3.26682057066,
        3.14680547066,
        3.25612511766,
        3.3853691346600003,
        3.13106927366,
        3.15987529766
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 3.2207122921599995,
      "stddev": 0.07512375374524306,
      "median": 3.2164015791600002,
      "user": 3.0702339999999997,
      "system": 2.176916,
      "min": 3.0955984456600003,
      "max": 3.32383523266,
      "times": [
        3.18834407866,
        3.16988448766,
        3.29903730866,
        3.21314488266,
        3.13651340366,
        3.0955984456600003,
        3.26591324966,
        3.21965827566,
        3.29519355666,
        3.32383523266
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.8064734177600001,
      "stddev": 0.1408850069413148,
      "median": 1.86564006266,
      "user": 1.9353799999999999,
      "system": 1.8439628,
      "min": 1.59736390066,
      "max": 1.9628360486600003,
      "times": [
        1.8948413616600002,
        1.9628360486600003,
        1.9539971546600001,
        1.69770168666,
        1.86384481866,
        1.86743530666,
        1.9203326146600002,
        1.6855542306600002,
        1.59736390066,
        1.62082705466
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.7496063132600004,
      "stddev": 0.21929376584841462,
      "median": 1.67579824066,
      "user": 1.8945828000000002,
      "system": 1.8446304999999996,
      "min": 1.5281346526600001,
      "max": 2.07716984966,
      "times": [
        1.5587092996600003,
        1.6016233936600002,
        1.73821376266,
        1.61338271866,
        1.97890748466,
        1.8132457846600003,
        2.05694671966,
        1.52972946666,
        2.07716984966,
        1.5281346526600001
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 825.1 ± 89.0 725.3 967.3 2.53 ± 0.34
pacquet@main 750.9 ± 57.2 680.0 858.0 2.30 ± 0.26
pnpr@HEAD 332.0 ± 24.3 289.4 375.6 1.02 ± 0.11
pnpr@main 326.0 ± 26.8 285.5 370.8 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.8250710564600002,
      "stddev": 0.08901665228649068,
      "median": 0.81472589516,
      "user": 1.0571329999999999,
      "system": 0.94278794,
      "min": 0.7253265271600001,
      "max": 0.96726552616,
      "times": [
        0.9371654351600001,
        0.96726552616,
        0.8172300381600001,
        0.7253265271600001,
        0.8122217521600001,
        0.9054828411600001,
        0.8587829211600001,
        0.7411644261600001,
        0.73178413616,
        0.75428696116
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.75092038596,
      "stddev": 0.05716036753972251,
      "median": 0.7401816746600001,
      "user": 0.9661504000000001,
      "system": 0.9106826399999998,
      "min": 0.6800014791600001,
      "max": 0.8579981011600001,
      "times": [
        0.75978379516,
        0.8135007611600001,
        0.74852886916,
        0.73029568716,
        0.7071620871600001,
        0.6800014791600001,
        0.68541754316,
        0.7318344801600001,
        0.7946810561600001,
        0.8579981011600001
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.33195512286000006,
      "stddev": 0.02434132356702023,
      "median": 0.32774645816000003,
      "user": 0.288941,
      "system": 0.6947967399999999,
      "min": 0.28942984016,
      "max": 0.37556438616,
      "times": [
        0.28942984016,
        0.32847707516,
        0.34713623316000003,
        0.34496653916000003,
        0.32701584116,
        0.32288205816,
        0.32138574316,
        0.37556438616,
        0.30908351416,
        0.35360999816
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.32595714986,
      "stddev": 0.02678208852027229,
      "median": 0.31885669015999996,
      "user": 0.26649,
      "system": 0.6974310399999999,
      "min": 0.28549171916,
      "max": 0.37079740516,
      "times": [
        0.34261301116,
        0.37079740516,
        0.36689975116,
        0.32029509516,
        0.31741828516,
        0.32546436716,
        0.30968006816,
        0.30923655616,
        0.31167524016,
        0.28549171916
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.986 ± 0.032 1.946 2.044 7.97 ± 0.27
pacquet@main 2.009 ± 0.153 1.838 2.287 8.06 ± 0.66
pnpr@HEAD 0.249 ± 0.007 0.237 0.257 1.00
pnpr@main 0.256 ± 0.020 0.231 0.291 1.03 ± 0.08
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.9861099264400004,
      "stddev": 0.03195204980562622,
      "median": 1.9798912786400003,
      "user": 1.2012265000000002,
      "system": 0.9381840199999999,
      "min": 1.9456872471400002,
      "max": 2.04367522314,
      "times": [
        2.04367522314,
        2.00365305714,
        1.9834457051400003,
        1.9763368521400002,
        2.03215042514,
        1.9865476881400002,
        1.9603668951400002,
        1.97248736914,
        1.9567488021400001,
        1.9456872471400002
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.00901786464,
      "stddev": 0.1529582026743124,
      "median": 1.9677823081400003,
      "user": 1.2756986999999997,
      "system": 0.9765437199999999,
      "min": 1.8375247001400001,
      "max": 2.2866340001400003,
      "times": [
        1.9705177551400002,
        1.9645583001400002,
        1.9650468611400003,
        2.06140438814,
        2.2387171281400002,
        2.2866340001400003,
        2.03749391214,
        1.8782335141400002,
        1.8375247001400001,
        1.8500480871400002
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.24912835824000004,
      "stddev": 0.007483141667998933,
      "median": 0.25218747814000003,
      "user": 0.1869085,
      "system": 0.5123829199999999,
      "min": 0.23655275114000002,
      "max": 0.25728404914,
      "times": [
        0.25130350314000005,
        0.24347925614000002,
        0.23655275114000002,
        0.25728404914,
        0.25519524014000006,
        0.25325724514000003,
        0.24625838514,
        0.23851512814,
        0.25636657114000005,
        0.25307145314
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.25596413824,
      "stddev": 0.01962351794457911,
      "median": 0.24890491314000002,
      "user": 0.1856913,
      "system": 0.52907202,
      "min": 0.23116602414,
      "max": 0.29067556714000004,
      "times": [
        0.24366151214,
        0.23116602414,
        0.25846635514000005,
        0.24073089314,
        0.25008538514000006,
        0.24208273614,
        0.24772444114,
        0.28148805514,
        0.27356041314,
        0.29067556714000004
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 331.7 ± 6.5 323.2 341.6 4.03 ± 0.15
pacquet@main 332.6 ± 5.1 324.3 340.5 4.04 ± 0.14
pnpr@HEAD 82.3 ± 2.5 79.5 90.7 1.00
pnpr@main 82.5 ± 2.7 78.4 90.3 1.00 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.33168080718000004,
      "stddev": 0.006533571865923249,
      "median": 0.33187018178000005,
      "user": 0.329164,
      "system": 0.059926940000000005,
      "min": 0.32317921778,
      "max": 0.34155484078000004,
      "times": [
        0.33339880278,
        0.32914772478000004,
        0.32317921778,
        0.33034156078000004,
        0.34155484078000004,
        0.33686666978,
        0.33389237978,
        0.32372386678000004,
        0.33967462178,
        0.32502838678
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.33263949538000004,
      "stddev": 0.005052150474462894,
      "median": 0.33334553028,
      "user": 0.32095409999999996,
      "system": 0.06747534,
      "min": 0.32429943278,
      "max": 0.34054446378000003,
      "times": [
        0.34054446378000003,
        0.33436301878,
        0.32429943278,
        0.32687224378,
        0.33906085078000003,
        0.33361589778,
        0.33466782478,
        0.33307516278000004,
        0.32946737678000004,
        0.33042868178
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.08227511552285716,
      "stddev": 0.0025243544438254767,
      "median": 0.08174357378,
      "user": 0.018466428571428564,
      "system": 0.007632945142857144,
      "min": 0.07951647578,
      "max": 0.09066425478,
      "times": [
        0.07951647578,
        0.08746886578,
        0.08045257977999999,
        0.08079942978,
        0.08201803978,
        0.08195397278,
        0.08157403478,
        0.08200752178,
        0.08150956978,
        0.08056368477999999,
        0.08189482778,
        0.08532130178,
        0.08058410578,
        0.08138066678,
        0.08037093278,
        0.08078763778,
        0.08803778978,
        0.08004605678,
        0.08616662477999999,
        0.08130175978,
        0.08177729778,
        0.08073626678,
        0.08093789078,
        0.08007628477999999,
        0.08261838178,
        0.09066425478,
        0.08576085878,
        0.08215079777999999,
        0.08179711578,
        0.08238734278,
        0.08174357378,
        0.08052034878,
        0.08230928778,
        0.08038795778,
        0.08200550478
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.08252039534250001,
      "stddev": 0.0026875522409034384,
      "median": 0.08175549278,
      "user": 0.018036131249999997,
      "system": 0.00808238,
      "min": 0.07838680278,
      "max": 0.09032151078,
      "times": [
        0.08718655278,
        0.08094061378,
        0.08670576978,
        0.08289347178,
        0.07995554378,
        0.08274005878,
        0.07930895178,
        0.08157542178,
        0.08592852078,
        0.08413447878,
        0.07897644378,
        0.08147997078,
        0.08468131178,
        0.07838680278,
        0.08223340878,
        0.08162179178,
        0.08073912678,
        0.08188729378,
        0.08164375977999999,
        0.09032151078,
        0.08233377578,
        0.08126011878,
        0.08147004378,
        0.08197144478,
        0.08186722578,
        0.08033510478,
        0.08734695678,
        0.08152563378,
        0.08549916878,
        0.08236178678,
        0.08097471078,
        0.08036587578
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.572 ± 0.153 4.435 4.921 1.24 ± 0.05
pacquet@main 4.700 ± 0.153 4.572 5.080 1.28 ± 0.05
pnpr@HEAD 3.680 ± 0.093 3.587 3.913 1.00
pnpr@main 3.689 ± 0.124 3.541 3.933 1.00 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.572211837980001,
      "stddev": 0.1533734982735743,
      "median": 4.51143962628,
      "user": 2.08707018,
      "system": 1.5385303199999996,
      "min": 4.43548824478,
      "max": 4.92138990478,
      "times": [
        4.46159321678,
        4.60131462178,
        4.56855878878,
        4.4716453517799994,
        4.43548824478,
        4.4855521417799995,
        4.92138990478,
        4.50651246878,
        4.51636678378,
        4.7536968567799995
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.700374717679999,
      "stddev": 0.1534553533512838,
      "median": 4.65353064228,
      "user": 2.7938813799999997,
      "system": 2.0958783199999997,
      "min": 4.57234365978,
      "max": 5.079577513779999,
      "times": [
        4.82074944678,
        4.57521354778,
        4.57234365978,
        5.079577513779999,
        4.64452133178,
        4.6074902377799996,
        4.725431545779999,
        4.70369445678,
        4.6625399527799996,
        4.612185483779999
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.6804805632799997,
      "stddev": 0.09252177633336796,
      "median": 3.66642562328,
      "user": 1.98367108,
      "system": 1.8288053199999994,
      "min": 3.5866573757799998,
      "max": 3.9125712997799997,
      "times": [
        3.69691332878,
        3.9125712997799997,
        3.68851016578,
        3.72674663878,
        3.60958902478,
        3.5866573757799998,
        3.67225206578,
        3.61205642978,
        3.6389101227799996,
        3.66059918078
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.689150475480001,
      "stddev": 0.12433664063710975,
      "median": 3.66866042178,
      "user": 1.9500607799999998,
      "system": 1.8230606200000001,
      "min": 3.5409068757799997,
      "max": 3.93262686778,
      "times": [
        3.61051988278,
        3.61431001978,
        3.5443512987799997,
        3.7870632017799997,
        3.77814130778,
        3.93262686778,
        3.7462644567799996,
        3.62670296578,
        3.71061787778,
        3.5409068757799997
      ]
    }
  ]
}

@github-actions

github-actions Bot commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13062
Testbedpacquet
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
3,242.84 ms
(-14.54%)Baseline: 3,794.41 ms
4,553.29 ms
(71.22%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,986.11 ms
(-25.92%)Baseline: 2,681.07 ms
3,217.28 ms
(61.73%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
825.07 ms
(-27.74%)Baseline: 1,141.75 ms
1,370.10 ms
(60.22%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
331.68 ms
(-39.78%)Baseline: 550.80 ms
660.95 ms
(50.18%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,746.15 ms
(-20.22%)Baseline: 3,442.32 ms
4,130.79 ms
(66.48%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,572.21 ms
(-27.35%)Baseline: 6,293.71 ms
7,552.45 ms
(60.54%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
348.07 ms
(-33.37%)Baseline: 522.41 ms
626.89 ms
(55.52%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13062
Testbedpnpr

⚠️ 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-thresholds flag.

Click to view all benchmark results
BenchmarkLatencymilliseconds (ms)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,806.47 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
249.13 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
331.96 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
82.28 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,502.46 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,680.48 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
376.06 ms
🐰 View full continuous benchmarking report in Bencher

Preserve reporter output while a prompt owns the terminal and run the blocking dialog read
off the async worker. Prompt eligibility is explicit for deterministic install coverage, and all
fallible exclusion formatting now completes before the workspace manifest is written.

Constraint: Keep noninteractive installs fail-closed with the complete violation list.

Rejected: Drop prompt-time events | It loses logs and can strand the latest live frame.

Confidence: high

Scope-risk: narrow

Directive: Keep future interactive prompts inside pnpm:prompt start and end events.

Tested: release-age/reporter/install tests; affected-crate Clippy; rustfmt; diff checks.

Not-tested: Real TTY input.
Copilot AI review requested due to automatic review settings July 16, 2026 00:44

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.

@ychampion

Copy link
Copy Markdown
Contributor Author

Also moved the minimum-release-age unit tests into minimum_release_age/tests.rs in 85df92c, matching the package manager's external test-module layout.


Written by an agent (OpenAI Codex, GPT-5.5).

@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/package-manager/src/minimum_release_age.rs`:
- Line 227: Add the #[cfg(test)] conditional compilation attribute to the tests
module declaration mod tests; in minimum_release_age.rs, ensuring the module is
compiled only during test builds while leaving production code unchanged.
🪄 Autofix (Beta)

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: b4b7c4b8-c137-4c6e-8bc2-1ba304549720

📥 Commits

Reviewing files that changed from the base of the PR and between 7290ddf and 85df92c.

📒 Files selected for processing (7)
  • pnpm/crates/default-reporter/src/lib.rs
  • pnpm/crates/default-reporter/src/tests.rs
  • pnpm/crates/package-manager/src/install.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
🚧 Files skipped from review as they are similar to previous changes (3)
  • pnpm/crates/package-manager/src/install_with_fresh_lockfile.rs
  • pnpm/crates/default-reporter/src/lib.rs
  • pnpm/crates/package-manager/src/install/tests.rs

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Jul 16, 2026
@zkochan
zkochan merged commit 1f5a097 into pnpm:main Jul 16, 2026
39 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product: pacquet reviewed: coderabbit CodeRabbit submitted an approving review state: automerge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pacquet: port the strict minimumReleaseAge approval prompt (with default-reporter pause)

4 participants