Skip to content

feat(cli): support recursive install family with dedicated lockfiles - #13208

Merged
zkochan merged 1 commit into
mainfrom
recursive-install-family-dedicated-lockfiles
Jul 22, 2026
Merged

zkochan merged 1 commit into
mainfrom
recursive-install-family-dedicated-lockfiles

Conversation

@zkochan

@zkochan zkochan commented Jul 21, 2026 •

Copy link
Copy Markdown
Member

Summary

Finishes the install / add / update / remove row of the recursive-command-parity tracker (Related to #13201).

These commands already accepted the global -r / --filter flags in a workspace, but pacquet's common install-family selector rejected every recursive or filtered invocation when sharedWorkspaceLockfile: false, failing with ERR_PNPM_RECURSIVE_SHARED_LOCKFILE_UNSUPPORTED. The TypeScript CLI already supports both shared and per-project lockfiles here, so this brings pacquet up to that behavior.

The selection now resolves into a three-way InstallFamilyPlan:

  • Single — not recursive: the existing active-project path (and the existing dedicated-lockfile whole-workspace install loop).
  • Shared — recursive/filtered over one shared pnpm-lock.yaml (unchanged).
  • PerProject — recursive/filtered with sharedWorkspaceLockfile: false: run one independent single-project install/add/update/remove for each selected project against its own pnpm-lock.yaml, node_modules, and virtual store, mirroring pnpm's per-project loop in its recursive dispatch (installing/commands/src/recursive.ts).

The per-project loop reuses the same config re-anchoring (anchor_dedicated_project_config) that the non-recursive dedicated-lockfile install already uses, factored into a shared init_dedicated_project_state helper.

Notes for reviewers:

  • This is a pacquet-only change — it makes pacquet match behavior the TypeScript CLI already has, so no TypeScript-side commit is needed.
  • Per-project installs run sequentially (pnpm uses a pLimit(workspaceConcurrency)); each dedicated lockfile is independent, so the final state is identical and this matches pacquet's existing non-recursive dedicated-lockfile install. The dirs are sorted, matching pnpm's Object.keys(selectedProjectsGraph).sort().
  • update's changeset generation stays a pipeline-level concern (captured before, generated after the loop), unchanged for the per-project case.

Squash Commit Body

`pnpm install`, `pnpm add`, `pnpm update`, and `pnpm remove` accepted the
global `-r` / `--filter` flags in a workspace, but the shared install-family
selector rejected every recursive or filtered invocation when
`sharedWorkspaceLockfile: false` with
`ERR_PNPM_RECURSIVE_SHARED_LOCKFILE_UNSUPPORTED`.

Resolve the selection into a three-way `InstallFamilyPlan` (single, shared,
per-project). For the per-project (dedicated-lockfile) case, run one
independent single-project install/add/update/remove for each selected
project against its own `pnpm-lock.yaml`, `node_modules`, and virtual store,
mirroring pnpm's per-project loop in its recursive dispatch. Both stacks now
match for `sharedWorkspaceLockfile=true` and `false`.

Related to pnpm/pnpm#13201.

Checklist

  • The change is implemented in both the TypeScript CLI and the Rust
    pnpm/ port, or the description notes what still needs porting. — pacquet-only;
    matches existing TypeScript CLI behavior (noted above).
  • Added a changeset (pnpm changeset) if this PR changes any published
    package.
  • Added or updated tests. — install/add/update/remove dedicated-lockfile
    cases in crates/cli/tests/install_filters.rs; replaced the test that asserted
    the old rejection.
  • Updated the documentation if needed. — no doc change; matches documented pnpm behavior.

Written by an agent (Claude Code, claude-opus-4-8).


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

Summary by CodeRabbit

  • New Features

    • Added recursive (-r) and filtered (--filter) support for install, add, update, and remove commands in workspaces using dedicated lockfiles.
    • Selected projects are processed independently with their own lockfiles and installation state.
    • Recursive operations now create and update per-project lockfiles without generating a shared workspace lockfile.
  • Bug Fixes

    • Removed failures when running supported recursive or filtered commands with dedicated workspace lockfiles.

`pnpm install`, `pnpm add`, `pnpm update`, and `pnpm remove` accepted the
global `-r` / `--filter` flags in a workspace, but the shared install-family
selector rejected every recursive or filtered invocation when
`sharedWorkspaceLockfile: false` with
`ERR_PNPM_RECURSIVE_SHARED_LOCKFILE_UNSUPPORTED`.

Resolve the selection into a three-way `InstallFamilyPlan` (single, shared,
per-project). For the per-project (dedicated-lockfile) case, run one
independent single-project install/add/update/remove for each selected
project against its own `pnpm-lock.yaml`, `node_modules`, and virtual store,
mirroring pnpm's per-project loop in its recursive dispatch. Both stacks now
match for `sharedWorkspaceLockfile=true` and `false`.

Refs #13201.
Copilot AI review requested due to automatic review settings July 21, 2026 23:35

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 21, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 7d36b131-47de-457b-b2a1-757d18fc21ec

📥 Commits

Reviewing files that changed from the base of the PR and between ff81510 and 73ba1e5.

📒 Files selected for processing (6)
  • .changeset/recursive-install-family-dedicated-lockfiles.md
  • pnpm/crates/cli/src/cli_args/add.rs
  • pnpm/crates/cli/src/cli_args/pipelines.rs
  • pnpm/crates/cli/src/cli_args/remove.rs
  • pnpm/crates/cli/src/cli_args/update.rs
  • pnpm/crates/cli/tests/install_filters.rs

📝 Walkthrough

Walkthrough

Recursive and filtered install, add, update, and remove now support workspaces using dedicated lockfiles. Pipelines select shared, single-project, or per-project execution plans, with tests covering lockfile and filesystem behavior.

Changes

Dedicated lockfile install-family support

Layer / File(s) Summary
Install-family planning and state initialization
pnpm/crates/cli/src/cli_args/pipelines.rs
Introduces InstallFamilyPlan, supports per-project selection with deterministic ordering, and centralizes project-specific state initialization.
Install-family pipeline dispatch
pnpm/crates/cli/src/cli_args/pipelines.rs, pnpm/crates/cli/src/cli_args/{add,remove,update}.rs
Updates install, add, update, and remove execution for single, shared, and dedicated per-project plans; command arguments now derive Clone.
Dedicated lockfile behavior coverage
pnpm/crates/cli/tests/install_filters.rs, .changeset/recursive-install-family-dedicated-lockfiles.md
Adds filtered and recursive install-family tests, lockfile-only mutation coverage, root exclusion checks, and release documentation.

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

Possibly related issues

Possibly related PRs

  • pnpm/pnpm#13030 — Shares install-family selection and dedicated per-project lockfile test coverage.
  • pnpm/pnpm#13171 — Modifies related install-family selection and dispatch plumbing.

Suggested labels: product: pacquet

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 recursive-install-family-dedicated-lockfiles

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

cli: support recursive install-family with per-project (dedicated) lockfiles

✨ Enhancement 🧪 Tests 📝 Documentation 🕐 40+ Minutes

Grey Divider

AI Description

• Allow install/add/update/remove with -r/--filter when sharedWorkspaceLockfile: false.
• Dispatch via InstallFamilyPlan (single vs shared lockfile vs per-project loop).
• Add dedicated-lockfile recursive/filter coverage for install/add/update/remove.
Diagram

graph TD
  cmd["Install-family cmd"] --> sel["select_install_family_plan"] --> plan{"Dispatch plan"}
  plan --> single["Single run"] --> exec["State::init + execute"]
  plan --> shared["Shared run_selected"] --> sharedLock[("workspace pnpm-lock.yaml")]
  plan --> perProj["Per-project loop"] --> projLock[("project pnpm-lock.yaml")]

  subgraph Legend
    direction LR
    _proc["Process"] ~~~ _dec{"Decision"} ~~~ _db[("Lockfile")]
  end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Parallel per-project execution (workspaceConcurrency)
  • ➕ Significantly faster for large workspaces when projects are independent
  • ➕ Closer to pnpm's pLimit(workspaceConcurrency) behavior
  • ➖ Introduces concurrency hazards around shared caches/logging/reporter output ordering
  • ➖ Increases complexity and failure semantics (partial failures, cancellation)
2. Keep selection logic returning an Option plus a separate boolean for per-project mode
  • ➕ Smaller surface change vs introducing a new enum
  • ➕ Less churn in call sites if only one pipeline needed per-project handling
  • ➖ Harder to reason about (multiple correlated flags)
  • ➖ Easier to introduce invalid states vs an enum that encodes exclusivity

Recommendation: The InstallFamilyPlan enum is the right abstraction: it makes the three mutually-exclusive dispatch modes explicit and keeps pipeline logic readable. Sequential per-project execution is a reasonable first step for correctness and determinism; consider optional concurrency later if performance becomes a concern.

Files changed (6) +377 / -114

Enhancement (1) +205 / -99
pipelines.rsIntroduce InstallFamilyPlan and per-project dispatch for dedicated lockfiles +205/-99

Introduce InstallFamilyPlan and per-project dispatch for dedicated lockfiles

• Replaces the prior recursive selection return type with a three-way 'InstallFamilyPlan' (Single/Shared/PerProject). Implements a per-project loop for recursive/filtered commands when 'sharedWorkspaceLockfile: false', factoring out 'init_dedicated_project_state' to reuse the existing dedicated-lockfile anchoring/state init logic across install/add/update/remove.

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

Refactor (3) +6 / -6
add.rsMake add CLI args/options clonable +2/-2

Make add CLI args/options clonable

• Derives 'Clone' for 'AddDependencyOptions' and 'AddArgs' so the pipeline can re-run 'add' across multiple selected projects in per-project mode.

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

remove.rsMake remove CLI args/options clonable +2/-2

Make remove CLI args/options clonable

• Derives 'Clone' for 'RemoveDependencyOptions' and 'RemoveArgs' to support per-project looping in dedicated-lockfile recursive/filter mode.

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

update.rsMake update CLI args/options clonable +2/-2

Make update CLI args/options clonable

• Derives 'Clone' for 'UpdateDependencyOptions' and 'UpdateArgs', enabling the update pipeline to be invoked repeatedly for per-project dedicated-lockfile dispatch.

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

Tests (1) +161 / -9
install_filters.rsAdd tests for recursive/filter install-family with dedicated lockfiles +161/-9

Add tests for recursive/filter install-family with dedicated lockfiles

• Replaces the previous expectation that filtered install fails under dedicated lockfiles with new positive-coverage tests. Verifies install/add/update/remove behavior for '--filter' and '--recursive' in 'sharedWorkspaceLockfile: false' workspaces, ensuring only selected projects mutate and no shared workspace lockfile is written.

pnpm/crates/cli/tests/install_filters.rs

Documentation (1) +5 / -0
recursive-install-family-dedicated-lockfiles.mdDocument per-project lockfile support for recursive/filter install-family +5/-0

Document per-project lockfile support for recursive/filter install-family

• Adds a patch changeset noting that recursive ('-r') and filtered ('--filter') install/add/update/remove now work when 'sharedWorkspaceLockfile: false', by installing each selected project independently with its own lockfile and stores.

.changeset/recursive-install-family-dedicated-lockfiles.md

@greptile-apps

greptile-apps Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 4/5

The empty per-project selection path needs a fix before merging.

  • Filters that match no projects return success without doing any work.
  • This differs from the TypeScript per-project dispatcher and breaks CLI parity.
  • The populated-selection loops otherwise preserve project-specific lockfile and modules state.

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

Reviews (1): Last reviewed commit: "feat(cli): support recursive install fam..." | Re-trigger Greptile

@github-actions

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                          main                                   pr
-----                          ----                                   --
lockfile/parse_pnpm_lock       1.00     11.3±0.21ms    33.2 MB/sec    1.11     12.5±0.71ms    29.9 MB/sec
packument/parse                1.00     38.9±0.78µs  1705.9 MB/sec    1.01     39.3±1.84µs  1686.4 MB/sec
tarball/download_dependency    1.04      2.4±0.26ms  1777.1 KB/sec    1.00      2.4±0.21ms  1839.8 KB/sec

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Remediation recommended

1. PerProject loop is sequential 📘 Rule violation ➹ Performance
Description
The new InstallFamilyPlan::PerProject dispatch runs installs/updates/adds/removes in a serial
for loop, hard-coding workspace concurrency to 1 and potentially causing large slowdowns for big
workspaces. This violates the performance guidance to parallelize independent work with bounded
concurrency.
Code

pnpm/crates/cli/src/cli_args/pipelines.rs[R187-194]

+        let plan = select_install_family_plan(cfg, &prefix, &manifest_path, recursive_sort, false)?;
+        match plan {
+            InstallFamilyPlan::PerProject(project_dirs) => {
+                let cfg: &Config = cfg;
+                for project_dir in project_dirs {
+                    let state = init_dedicated_project_state(cfg, &project_dir, require_lockfile)?;
+                    Box::pin(args.clone().run::<Reporter>(state)).await?;
+                }
Evidence
PR Compliance ID 11 requires parallelizing independent async work when possible. The added
per-project branches iterate project_dirs and await each run one-by-one, which serializes
otherwise independent work and introduces a likely performance regression for recursive operations.

AGENTS.md: Async/loops: prefer async fs and async/await; parallelize independent work; hoist invariants out of loops
pnpm/crates/cli/src/cli_args/pipelines.rs[187-194]
pnpm/crates/cli/src/cli_args/pipelines.rs[278-281]
pnpm/crates/cli/src/cli_args/pipelines.rs[576-579]

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

## Issue description
`InstallFamilyPlan::PerProject` executes per-project operations sequentially (`for` + `await`), even though each selected project is installed independently.

## Issue Context
This PR introduces a per-project recursive/filtered loop for dedicated lockfiles; these operations are independent and can often be run concurrently with a bounded limit.

## Fix Focus Areas
- pnpm/crates/cli/src/cli_args/pipelines.rs[187-195]
- pnpm/crates/cli/src/cli_args/pipelines.rs[273-283]
- pnpm/crates/cli/src/cli_args/pipelines.rs[385-392]
- pnpm/crates/cli/src/cli_args/pipelines.rs[447-457]
- pnpm/crates/cli/src/cli_args/pipelines.rs[576-580]

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


2. Leaked configs retain tokens 🐞 Bug ⛨ Security
Description
init_dedicated_project_state clones and Config::leaks one full config per selected project,
which now applies to recursive/filtered install/add/update/remove in dedicated-lockfile
workspaces. Because Config contains auth headers and raw auth tokens, this retains credential
material (and other config allocations) until process exit and can cause avoidable memory growth in
large workspaces.
Code

pnpm/crates/cli/src/cli_args/pipelines.rs[R134-143]

+fn init_dedicated_project_state(
+    cfg: &Config,
+    project_dir: &Path,
+    require_lockfile: bool,
+) -> miette::Result<State> {
+    let mut project_config = cfg.clone();
+    anchor_dedicated_project_config(&mut project_config, project_dir);
+    let project_config = Config::leak(project_config);
+    State::init(project_dir.join("package.json"), project_config, require_lockfile)
+        .wrap_err_with(|| format!("initialize the state for {}", project_dir.display()))
Evidence
The helper explicitly clones+leaks config per project; Config::leak boxes and leaks; and the
Config struct includes auth headers and raw auth tokens, so each leaked clone can retain
credentials until process exit.

pnpm/crates/cli/src/cli_args/pipelines.rs[128-144]
pnpm/crates/config/src/lib.rs[2526-2529]
pnpm/crates/config/src/lib.rs[1677-1692]

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

## Issue description
`init_dedicated_project_state` leaks a cloned `Config` for every selected project to satisfy `State::init`'s `&'static Config` requirement. This expands the existing bounded leak pattern to recursive/filtered `add`/`update`/`remove`/`install` in dedicated-lockfile workspaces, keeping auth tokens/headers resident until process exit and growing memory linearly with selected projects.

## Issue Context
- `Config` contains auth material (auth headers + raw tokens).
- `Config::leak` permanently allocates until process termination.
- Per-project dispatch calls this once per selected project.

## Fix Focus Areas
- pnpm/crates/cli/src/cli_args/pipelines.rs[134-143]
- pnpm/crates/cli/src/state.rs[16-33]
- pnpm/crates/cli/src/state.rs[65-104]
- pnpm/crates/config/src/lib.rs[1677-1692]
- pnpm/crates/config/src/lib.rs[2526-2529]

## Suggested fix approach
1. Refactor `State` to avoid requiring `&'static Config`:
  - Change `State.config` from `&'static Config` to `Arc<Config>` (or an owned `Config`).
  - Update `State::init` to accept `Arc<Config>`.
2. Update all call sites to pass `Arc<Config>` (cloned cheaply) instead of leaking.
3. Remove `Config::leak` usage from `init_dedicated_project_state` and any other per-project loops.

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


3. State rebuilt each project 🐞 Bug ➹ Performance
Description
The new PerProject dispatch initializes a fresh State per project, which rebuilds a new HTTP
client and a new in-memory tarball cache each iteration, adding repeated setup overhead and losing
cross-project in-process reuse opportunities. This can noticeably slow large recursive/filtered runs
(especially with overlapping dependencies), and the per-iteration args.clone() also scales cost
with both number of projects and size of CLI argument vectors.
Code

pnpm/crates/cli/src/cli_args/pipelines.rs[R189-194]

+            InstallFamilyPlan::PerProject(project_dirs) => {
+                let cfg: &Config = cfg;
+                for project_dir in project_dirs {
+                    let state = init_dedicated_project_state(cfg, &project_dir, require_lockfile)?;
+                    Box::pin(args.clone().run::<Reporter>(state)).await?;
+                }
Evidence
The per-project loop calls init_dedicated_project_state for each selected project; State::init
constructs a new ThrottledClient and MemCache every time, guaranteeing repeated initialization
and preventing reuse of those in-memory/process-local resources across projects.

pnpm/crates/cli/src/cli_args/pipelines.rs[187-195]
pnpm/crates/cli/src/state.rs[83-103]
pnpm/crates/cli/src/cli_args/add.rs[82-90]

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

## Issue description
Per-project install-family dispatch creates a new `State` for each project, and `State::init` constructs a new `ThrottledClient` and a new `MemCache` every time. This repeats initialization work and prevents reuse of in-memory tarball caching and HTTP connection pools across projects within the same CLI invocation.

## Issue Context
- Dedicated-lockfile mode intentionally isolates lockfiles/virtual stores per project, but HTTP client + in-memory tarball caching can still be shared safely across projects in the same process.
- Current loop also clones full CLI args per iteration.

## Fix Focus Areas
- pnpm/crates/cli/src/cli_args/pipelines.rs[187-205]
- pnpm/crates/cli/src/cli_args/pipelines.rs[273-283]
- pnpm/crates/cli/src/cli_args/pipelines.rs[385-405]
- pnpm/crates/cli/src/cli_args/pipelines.rs[446-457]
- pnpm/crates/cli/src/state.rs[65-104]

## Suggested fix approach
1. Introduce a way to reuse shared components across states:
  - e.g., add `State::init_with_shared(...)` that accepts `Arc<ThrottledClient>` and `Arc<MemCache>` (and reuses them instead of creating new ones).
  - Or split `State` into `SharedState { http_client, tarball_mem_cache }` + `ProjectState { config, manifest, lockfile, resolved_packages }`.
2. In `InstallFamilyPlan::PerProject` loops, construct the shared client/cache once and pass clones into each project state.
3. (Optional) reduce per-iteration argument cloning by changing command `run` methods to take `&self` (or wrapping args in `Arc`) where feasible.

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



Informational

4. Redundant PerProject comments 📘 Rule violation ⚙ Maintainability
Description
New inline comments in InstallFamilyPlan::PerProject match arms restate what the code already
expresses, duplicating the nearby plan-level documentation and adding noise. This reduces
readability and violates the guidance to keep comments focused on non-obvious rationale/contracts.
Code

pnpm/crates/cli/src/cli_args/pipelines.rs[R274-276]

+            InstallFamilyPlan::PerProject(project_dirs) => {
+                // Dedicated per-project lockfiles: add the packages to each
+                // selected project independently.
Evidence
PR Compliance ID 5 prohibits adding comments that merely restate what the code already says. The
added PerProject arm comments describe exactly what the arm already does (loop each selected
project), without adding additional rationale/invariants beyond the already-present enum
documentation.

AGENTS.md: Do not add comments that restate code; comments must document non-obvious rationale or contract
pnpm/crates/cli/src/cli_args/pipelines.rs[274-276]
pnpm/crates/cli/src/cli_args/pipelines.rs[448-450]

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

## Issue description
Inline comments restate obvious control-flow (`PerProject` means per-project behavior) rather than documenting non-obvious rationale or contract.

## Issue Context
The `InstallFamilyPlan` enum is already documented above, so repeating the same statement at each match arm adds duplication.

## Fix Focus Areas
- pnpm/crates/cli/src/cli_args/pipelines.rs[274-276]
- pnpm/crates/cli/src/cli_args/pipelines.rs[448-451]

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


Grey Divider

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.

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Jul 21, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.23188% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.89%. Comparing base (fca6565) to head (73ba1e5).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pnpm/crates/cli/src/cli_args/pipelines.rs 86.23% 19 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13208      +/-   ##
==========================================
+ Coverage   86.73%   86.89%   +0.15%     
==========================================
  Files         526      526              
  Lines       89777    89826      +49     
==========================================
+ Hits        77866    78050     +184     
+ Misses      11911    11776     -135     

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

@github-actions

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: 73ba1e50ed62

Each scenario reports direct installs and pnpr installs. 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.651 ± 0.243 2.416 3.254 1.74 ± 0.24
pacquet@main 2.550 ± 0.113 2.407 2.785 1.67 ± 0.19
pnpr@HEAD 1.528 ± 0.137 1.357 1.806 1.00 ± 0.14
pnpr@main 1.526 ± 0.162 1.364 1.829 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.6507933263200005,
      "stddev": 0.2426554589359579,
      "median": 2.5719830683200002,
      "user": 2.0425539799999997,
      "system": 1.68819984,
      "min": 2.4160837758200002,
      "max": 3.2540263398200002,
      "times": [
        2.4160837758200002,
        2.7486624818200003,
        2.48821156782,
        2.61185663482,
        2.56103345682,
        2.50667854782,
        2.5290119138200002,
        2.80943586482,
        2.5829326798200003,
        3.2540263398200002
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.5495344806200007,
      "stddev": 0.11299883797940798,
      "median": 2.52458051282,
      "user": 1.7440149799999998,
      "system": 1.43779364,
      "min": 2.40702366082,
      "max": 2.78549591882,
      "times": [
        2.6101089398200004,
        2.67308470082,
        2.52115002182,
        2.52801100382,
        2.5029339898200003,
        2.78549591882,
        2.40702366082,
        2.5367314538200003,
        2.4319603778200003,
        2.4988447388200004
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.52806463302,
      "stddev": 0.13671197554113673,
      "median": 1.49258954482,
      "user": 1.14457418,
      "system": 1.21673324,
      "min": 1.35703459782,
      "max": 1.80630033682,
      "times": [
        1.3903723508199999,
        1.80630033682,
        1.48450519682,
        1.5006738928199999,
        1.56293353782,
        1.48358766482,
        1.35703459782,
        1.70072121782,
        1.44707950582,
        1.54743802882
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.52586871012,
      "stddev": 0.16195691573639512,
      "median": 1.4836220458199998,
      "user": 1.12379208,
      "system": 1.2134681399999998,
      "min": 1.3640964118199999,
      "max": 1.82937473082,
      "times": [
        1.82937473082,
        1.53046304082,
        1.3640964118199999,
        1.37694927382,
        1.60776540382,
        1.72851946482,
        1.42720706982,
        1.59213091082,
        1.3653997438199998,
        1.4367810508199998
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 295.4 ± 31.3 265.6 341.5 1.12 ± 0.12
pacquet@main 264.8 ± 5.1 258.6 275.5 1.00
pnpr@HEAD 290.5 ± 19.0 272.8 323.7 1.10 ± 0.07
pnpr@main 301.3 ± 9.0 287.5 314.6 1.14 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.29535375056,
      "stddev": 0.03129506603676292,
      "median": 0.27805989276000004,
      "user": 0.24607519999999994,
      "system": 0.58670874,
      "min": 0.26563345476,
      "max": 0.34151557176,
      "times": [
        0.34151557176,
        0.32352096276000003,
        0.32296593976000004,
        0.33522440276000004,
        0.26677784676,
        0.28088752376000004,
        0.27456577676,
        0.27523226176000004,
        0.26721376476,
        0.26563345476
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.26480499796,
      "stddev": 0.005147630616567881,
      "median": 0.26341614776,
      "user": 0.2088994,
      "system": 0.53964334,
      "min": 0.25855342876000004,
      "max": 0.27546289876,
      "times": [
        0.26812909076,
        0.26239035076,
        0.26183681976,
        0.26846092076,
        0.25891456476,
        0.26267493076000004,
        0.26746960976,
        0.27546289876,
        0.26415736476,
        0.25855342876000004
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.29050121596,
      "stddev": 0.01896274242922766,
      "median": 0.28065045976,
      "user": 0.25086579999999997,
      "system": 0.55212934,
      "min": 0.27279537676000004,
      "max": 0.32368781976,
      "times": [
        0.31586290876,
        0.32368781976,
        0.27464536776000004,
        0.27525722976,
        0.27932500876,
        0.27635425176,
        0.30080066476,
        0.27279537676000004,
        0.28197591076,
        0.30430762076
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.30131390956,
      "stddev": 0.009021470210542075,
      "median": 0.30088779526,
      "user": 0.24096479999999998,
      "system": 0.56471834,
      "min": 0.28752791576000003,
      "max": 0.31463123176,
      "times": [
        0.29735806076000004,
        0.31337077976,
        0.28752791576000003,
        0.30153510876,
        0.30024048176,
        0.28837196776,
        0.30483270676,
        0.31463123176,
        0.29951364176,
        0.30575720076
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.982 ± 0.097 2.833 3.098 1.80 ± 0.19
pacquet@main 3.010 ± 0.165 2.886 3.351 1.82 ± 0.21
pnpr@HEAD 1.732 ± 0.171 1.479 1.987 1.05 ± 0.15
pnpr@main 1.657 ± 0.170 1.466 1.988 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.9815650691799997,
      "stddev": 0.09686880682810899,
      "median": 2.97754374698,
      "user": 2.2717109199999994,
      "system": 1.6470412200000002,
      "min": 2.83263231148,
      "max": 3.0981908624799996,
      "times": [
        2.83263231148,
        3.0981908624799996,
        3.0145855784799998,
        2.94050191548,
        2.91444689848,
        2.8797754794799997,
        3.06263778048,
        3.0954354834799997,
        2.9132724094799998,
        3.06417197248
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 3.0099917206799995,
      "stddev": 0.16490122712840266,
      "median": 2.94658640148,
      "user": 2.2732317199999996,
      "system": 1.61117992,
      "min": 2.8861357494799997,
      "max": 3.35094964248,
      "times": [
        2.9574255414799997,
        2.93574726148,
        2.98913184348,
        2.8861357494799997,
        2.99659281148,
        2.9059839474799998,
        2.91579829348,
        2.8881343134799997,
        3.35094964248,
        3.27401780248
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.7319326490800002,
      "stddev": 0.1707780461709144,
      "median": 1.6939387689800003,
      "user": 1.45079092,
      "system": 1.5341984199999998,
      "min": 1.4791625624800002,
      "max": 1.98744479748,
      "times": [
        1.62967935948,
        1.98744479748,
        1.8873894044800001,
        1.4791625624800002,
        1.73774577548,
        1.9068508074800001,
        1.6501317624800003,
        1.86707625548,
        1.5640803974800002,
        1.60976536848
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.6569232421800002,
      "stddev": 0.17037968397992156,
      "median": 1.64454878348,
      "user": 1.4216993199999999,
      "system": 1.5898299200000001,
      "min": 1.4664458984800002,
      "max": 1.9880284454800001,
      "times": [
        1.63120592648,
        1.7411267404800002,
        1.6578916404800002,
        1.9880284454800001,
        1.70922164248,
        1.49394718148,
        1.53228500748,
        1.4982637624800001,
        1.8508161764800002,
        1.4664458984800002
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 649.9 ± 31.0 621.6 719.6 2.06 ± 0.11
pacquet@main 612.6 ± 22.2 571.7 640.8 1.94 ± 0.08
pnpr@HEAD 316.2 ± 6.7 302.0 325.3 1.00
pnpr@main 322.5 ± 13.7 301.5 343.1 1.02 ± 0.05
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.64994164732,
      "stddev": 0.030960255767711664,
      "median": 0.64519337982,
      "user": 0.80930868,
      "system": 0.73437402,
      "min": 0.6216277373200001,
      "max": 0.7196178513200001,
      "times": [
        0.7196178513200001,
        0.6753451413200001,
        0.65505128832,
        0.6353354713200001,
        0.6218837143200001,
        0.6216277373200001,
        0.62179748032,
        0.6314942833200001,
        0.65590073932,
        0.6613627663200001
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.6125754588200001,
      "stddev": 0.022206584023968835,
      "median": 0.6164961843200001,
      "user": 0.76546658,
      "system": 0.68528472,
      "min": 0.57166608232,
      "max": 0.6407683133200001,
      "times": [
        0.58505744532,
        0.61510638232,
        0.57166608232,
        0.6178859863200001,
        0.60899597532,
        0.6323975073200001,
        0.6298041243200001,
        0.62744408632,
        0.5966286853200001,
        0.6407683133200001
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.31620532232,
      "stddev": 0.006687320528525182,
      "median": 0.31680359632,
      "user": 0.21062838000000003,
      "system": 0.5424782199999999,
      "min": 0.30203071432,
      "max": 0.32534333732000004,
      "times": [
        0.32332430532,
        0.31241551332,
        0.31990533732000004,
        0.31626185332,
        0.31734533932000003,
        0.31159994532,
        0.32534333732000004,
        0.31410171332000003,
        0.30203071432,
        0.31972516432000003
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.32254087272,
      "stddev": 0.013658112212761291,
      "median": 0.32189506832000003,
      "user": 0.21795888,
      "system": 0.5498785199999999,
      "min": 0.30150395532,
      "max": 0.34305164432,
      "times": [
        0.31552030532,
        0.31044929132,
        0.31199500532,
        0.31597071032,
        0.32781942632,
        0.34150082032,
        0.32856436932,
        0.30150395532,
        0.32903319932,
        0.34305164432
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.950 ± 0.014 1.931 1.972 6.22 ± 0.27
pacquet@main 1.940 ± 0.021 1.902 1.985 6.19 ± 0.27
pnpr@HEAD 0.316 ± 0.007 0.303 0.324 1.01 ± 0.05
pnpr@main 0.313 ± 0.013 0.297 0.334 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.9495401717000003,
      "stddev": 0.014260826992067668,
      "median": 1.9453831002000002,
      "user": 1.03848026,
      "system": 0.7634903,
      "min": 1.9313628487,
      "max": 1.9722058197,
      "times": [
        1.9468739547000002,
        1.9438922457,
        1.9385171447000002,
        1.9722058197,
        1.9621948097,
        1.9554521437,
        1.9313628487,
        1.9379159547,
        1.9687283807000002,
        1.9382584147000002
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.9400847074,
      "stddev": 0.02126220941943351,
      "median": 1.9386463572000001,
      "user": 1.00398806,
      "system": 0.7784509,
      "min": 1.9021691447,
      "max": 1.9852707957000002,
      "times": [
        1.9852707957000002,
        1.9442453147,
        1.9368210727000001,
        1.9216251997,
        1.9366779507,
        1.9021691447,
        1.9447396807000001,
        1.9357600737000002,
        1.9530661997,
        1.9404716417
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.31621297579999996,
      "stddev": 0.006621939471483052,
      "median": 0.31731851619999996,
      "user": 0.21723686,
      "system": 0.5534120999999999,
      "min": 0.3025210137,
      "max": 0.3239564447,
      "times": [
        0.31100544269999997,
        0.3221428827,
        0.3223520387,
        0.3025210137,
        0.3122028787,
        0.3189223367,
        0.3157146957,
        0.3200609317,
        0.3239564447,
        0.3132510927
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.3134410995,
      "stddev": 0.01346087662873804,
      "median": 0.3114832717,
      "user": 0.21903356000000002,
      "system": 0.5227970999999999,
      "min": 0.2972938507,
      "max": 0.33436869269999997,
      "times": [
        0.3047910907,
        0.3220977467,
        0.2994087427,
        0.2998234387,
        0.2972938507,
        0.3244378967,
        0.3148214747,
        0.33436869269999997,
        0.3292229927,
        0.30814506869999997
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 378.6 ± 14.3 359.6 405.1 4.36 ± 0.17
pacquet@main 368.0 ± 4.3 363.6 376.5 4.23 ± 0.07
pnpr@HEAD 87.5 ± 1.4 84.0 92.0 1.01 ± 0.02
pnpr@main 86.9 ± 1.1 83.5 89.1 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.37857713726,
      "stddev": 0.014270939896907652,
      "median": 0.38044848515999996,
      "user": 0.38130585999999994,
      "system": 0.04504763999999999,
      "min": 0.35957578816,
      "max": 0.40510749816,
      "times": [
        0.36604061416,
        0.38336551616,
        0.38192261516,
        0.39286428616,
        0.40510749816,
        0.37897435516,
        0.38591778716,
        0.35957578816,
        0.36706915216,
        0.36493376016
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.36802117445999993,
      "stddev": 0.0043201116024117634,
      "median": 0.36634280816,
      "user": 0.36064546000000003,
      "system": 0.055436639999999995,
      "min": 0.36363794716,
      "max": 0.37653498116,
      "times": [
        0.36618277316,
        0.36632670516,
        0.36393633216,
        0.37105056716,
        0.36366681216,
        0.36363794716,
        0.37039920416,
        0.37653498116,
        0.36635891116,
        0.37211751116
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.08749104984750002,
      "stddev": 0.0014067639618405264,
      "median": 0.08730398516000001,
      "user": 0.020506597499999998,
      "system": 0.009750563750000003,
      "min": 0.08401913916,
      "max": 0.09195081616,
      "times": [
        0.08801387216,
        0.08737103716000001,
        0.08806374716000001,
        0.08868400916000001,
        0.08799680016000001,
        0.08770760416000001,
        0.08621500016000001,
        0.08683419216,
        0.08700790116000001,
        0.08794975216,
        0.08666888916000001,
        0.08740285716000001,
        0.08616171916000001,
        0.08800768116,
        0.08765971316000001,
        0.08619533416000001,
        0.08723693316000002,
        0.08668271516,
        0.08694360016000001,
        0.08751743416,
        0.08695079216000001,
        0.08852436716,
        0.09195081616,
        0.08706089016000002,
        0.09127411716000002,
        0.08834967716000001,
        0.08401913916,
        0.08688668116,
        0.08706349516,
        0.08807252316000001,
        0.08637558416,
        0.08686472016
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.08690630643272727,
      "stddev": 0.001099440868321491,
      "median": 0.08698572916000001,
      "user": 0.020201781212121208,
      "system": 0.00958205696969697,
      "min": 0.08350053816000001,
      "max": 0.08908366516,
      "times": [
        0.08563322016000001,
        0.08694983016,
        0.08610723816000002,
        0.08681650916000001,
        0.08715562016000002,
        0.08751250416,
        0.08673831016000001,
        0.08826714216,
        0.08587691216000001,
        0.08908366516,
        0.08594901716000002,
        0.08709383216000001,
        0.08350053816000001,
        0.08695427916000001,
        0.08723376716000002,
        0.08668567116,
        0.08752688216000001,
        0.08698572916000001,
        0.08830490216,
        0.08813811716000002,
        0.08711145716000002,
        0.08592004316000001,
        0.08737211916000001,
        0.08758857816000001,
        0.08580308116000002,
        0.08741356816000001,
        0.08638820816000001,
        0.08873889316000001,
        0.08508176816000002,
        0.08712786716000001,
        0.08667491116,
        0.08793311016000001,
        0.08624082016000001
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.531 ± 0.140 4.433 4.891 1.27 ± 0.06
pacquet@main 4.576 ± 0.184 4.441 4.959 1.28 ± 0.07
pnpr@HEAD 3.571 ± 0.125 3.457 3.881 1.00
pnpr@main 3.605 ± 0.080 3.474 3.733 1.01 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.530708323380001,
      "stddev": 0.14027783512433412,
      "median": 4.46342218868,
      "user": 1.8176850999999996,
      "system": 1.41760706,
      "min": 4.43329526618,
      "max": 4.89077551918,
      "times": [
        4.43329526618,
        4.46773992818,
        4.60203444318,
        4.44873266618,
        4.58538378918,
        4.45910444918,
        4.44957973418,
        4.89077551918,
        4.5261682611800005,
        4.44426917718
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.57628009028,
      "stddev": 0.18404720596895371,
      "median": 4.49177636468,
      "user": 1.8559358999999997,
      "system": 1.4261875599999998,
      "min": 4.44148604018,
      "max": 4.95929302118,
      "times": [
        4.44148604018,
        4.44174999218,
        4.52270400718,
        4.47536460818,
        4.95929302118,
        4.50590344118,
        4.63543514618,
        4.47764928818,
        4.85074409818,
        4.45247126018
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.57108267888,
      "stddev": 0.1251738274183992,
      "median": 3.52302218818,
      "user": 1.3661472,
      "system": 1.3150792599999999,
      "min": 3.45731524218,
      "max": 3.88112341818,
      "times": [
        3.51294950218,
        3.53309487418,
        3.49142301318,
        3.66342584518,
        3.49424239418,
        3.50840726718,
        3.45731524218,
        3.55229718018,
        3.88112341818,
        3.61654805218
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.60510004068,
      "stddev": 0.07996379235117361,
      "median": 3.60564532468,
      "user": 1.6116074999999999,
      "system": 1.5680252599999995,
      "min": 3.47391844418,
      "max": 3.73310350218,
      "times": [
        3.47391844418,
        3.63151320218,
        3.66216018718,
        3.69791967418,
        3.73310350218,
        3.62949779218,
        3.58179285718,
        3.55175713418,
        3.55165331618,
        3.53768429718
      ]
    }
  ]
}

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13208
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
2,832.63 ms
(+1.85%)Baseline: 2,781.18 ms
3,337.42 ms
(84.87%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,931.36 ms
(-0.73%)Baseline: 1,945.57 ms
2,334.69 ms
(82.72%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
621.63 ms
(-0.74%)Baseline: 626.28 ms
751.54 ms
(82.71%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
359.58 ms
(-3.66%)Baseline: 373.22 ms
447.86 ms
(80.29%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,416.08 ms
(+0.29%)Baseline: 2,409.16 ms
2,891.00 ms
(83.57%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,433.30 ms
(-0.82%)Baseline: 4,469.99 ms
5,363.99 ms
(82.65%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
265.63 ms
(-0.76%)Baseline: 267.67 ms
321.21 ms
(82.70%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13208
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,479.16 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
302.52 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
302.03 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
84.02 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,357.03 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,457.32 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
272.80 ms
🐰 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 reviewed: coderabbit CodeRabbit submitted an approving review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants