Skip to content

test(pacquet): port the current-lockfile and pendingBuilds suites - #13150

Merged
zkochan merged 13 commits into
mainfrom
stage-3
Jul 19, 2026
Merged

zkochan merged 13 commits into
mainfrom
stage-3

Conversation

@zkochan

@zkochan zkochan commented Jul 19, 2026 •

Copy link
Copy Markdown
Member

Summary

Stage 3 of #13146 — the current lockfile (node_modules/.pnpm/lock.yaml) and pendingBuilds. Related to #13146.

Porting the tests turned up two behavior gaps, both fixed here:

  • pendingBuilds was never written. --ignore-scripts suppressed every dependency build and the project's own install scripts without leaving a trace, so pnpm rebuild --pending had nothing to drain (its own --help text said as much). BuildModules::run now returns a BuildModulesOutput carrying the requires_build snapshots whose scripts were deferred alongside the allowBuilds-blocked ones it already reported; the install tail adds the workspace projects whose install scripts were skipped and carries forward the previous file's entries that still resolve against the current lockfile. A build stays owed until something runs it — only pnpm rebuild clears the record.

  • A withdrawn allowBuilds approval was not re-evaluated. Removing an allowBuilds: true entry left the frozen no-op fast path untouched: the lockfile and layout were unchanged and the package was absent from ignoredBuilds (its build had succeeded), so a strictDepBuilds install exited 0 on a package the user had just un-approved. .modules.yaml now records the allowBuilds policy the install ran under, as pnpm's does, and the fast path steps aside when an approval it recorded is gone. Upstream fails that install (strictDepBuilds and allowBuilds checks are bypassed when package side-effects are cached in the store #11035) — a build already cached in the store is an optimization, never an approval.

Ported tests (16 TEST_PORTING.md items, 221 → 205 unchecked):

Upstream Rust
deps-restorer/test/index.ts:54, :165, :189 current_lockfile.rs
deps-installer/test/lockfile.ts:368, :547, :614, :1007, :1324 current_lockfile.rs, lifecycle_scripts.rs
deps-installer/test/install/lifecycleScripts.ts:547 current_lockfile.rs
deps-installer/test/packageImportMethods.ts:31 current_lockfile.rs
deps-installer/test/install/globalVirtualStore.ts:21 (current-lockfile half) current_lockfile.rs
deps-restorer/test/index.ts:362 (ignoreScripts tail) lifecycle_scripts.rs
pnpm/test/install/lifecycleScripts.ts:245, :303 lifecycle_scripts.rs

A follow-up commit fixes what the automated reviewers caught in the first round: pendingBuilds was recorded but never drained, so pnpm rebuild --pending reselected the same work forever and the project entries it wrote were unreachable (rebuild gates project lifecycle scripts on is_full_install). RebuildOptions now carries the importer ids to run, and the install drops the entries the rebuild settled.

Every port was checked against a deliberately broken implementation and confirmed to fail for the expected reason before being reverted with git restore.

Two items stay unchecked, with the reason recorded in TEST_PORTING.md:

  • lockfile.ts:1351 (a broken private lockfile is ignored) — a known_failures stub. pacquet raises ERR_PNPM_BROKEN_LOCKFILE on an unparseable current lockfile; upstream warns and continues with an empty one. Demoting that error to a warning plus a reporter emission is a behavior change worth its own PR.
  • deps-restorer/test/index.ts:213 (installing only dev package…) — the on-disk half is covered by headless_install_include_filtering_excludes_production_group; the current-lockfile assertion is unreachable because a dev-only importer reads as empty to Lockfile::is_empty, exactly as it does to upstream's isEmptyLockfile, so the file is deleted rather than written.

Rebased onto main after #13152 (stage 2) landed, which ported multipleImporters.ts:208, :730 and deps-restorer/test/index.ts:789 in crates/cli/tests/multiple_importers.rs. Those entries now defer to stage 2's ports and the duplicate install_filters.rs test this PR had added for :730 is dropped.

One observation not acted on: a_repeat_install_without_a_current_lockfile_keeps_node_modules shows that deleting node_modules/.pnpm/lock.yaml in a workspace lets the freshness fast path report "up to date" without rewriting the file (current_lockfile_unusable_with_non_empty_wanted returns early for workspace installs). Upstream only asserts that node_modules survives, so the port does too — but the carve-out looks incidental rather than intended and may deserve a follow-up.

Squash Commit Body

Stage 3 of the TEST_PORTING.md plan: the current lockfile
(node_modules/.pnpm/lock.yaml) and pendingBuilds.

Two gaps surfaced while porting.

`--ignore-scripts` recorded nothing about the builds it skipped, so
.modules.yaml's pendingBuilds was always empty and `pnpm rebuild
--pending` had nothing to drain. BuildModules::run now returns a
BuildModulesOutput carrying the requires_build snapshots whose scripts
were deferred alongside the allowBuilds-blocked ones it already
reported. The install tail adds the workspace projects whose own install
scripts were skipped and carries forward the previous file's entries
that still resolve against the current lockfile, which is what makes an
install that removes packages shrink the list. A build stays owed until
something runs it, so a later install that defers nothing does not clear
the record.

Withdrawing an allowBuilds: true entry left the frozen no-op fast path
untouched: the lockfile and layout were unchanged and the package was
absent from ignoredBuilds (its build had succeeded), so a strictDepBuilds
install exited 0 on a package the user had just un-approved. .modules.yaml
now records the allowBuilds policy the install ran under, as pnpm's does,
and the fast path steps aside when an approval it recorded is gone. The
full install then re-evaluates each package through BuildModules, whose
allow-policy gate runs ahead of the side-effects is_built short-circuit —
a cached build is an optimization, never an approval.

Ports 14 TEST_PORTING.md items across crates/cli/tests/current_lockfile.rs
(new) and lifecycle_scripts.rs. Two items stay unchecked with their
reasons recorded in the plan: a broken current lockfile is fatal in
pacquet where upstream warns and continues, and the dev-only filtered
current lockfile is unreachable because a dev-only importer reads as
empty to Lockfile::is_empty, exactly as it does to upstream's
isEmptyLockfile.

Related to pnpm/pnpm#13146. Fixes pnpm/pnpm#11035 for the Rust CLI.

Checklist

  • 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.
  • Updated the documentation if needed.

Both behaviors already exist in the TypeScript CLI (installing/deps-installer writes pendingBuilds and runs a revokedBuilds scan), so nothing needs porting the other way — pacquet was the side that diverged. rebuild --pending's help text no longer says the flag has no effect.


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

Summary by CodeRabbit

  • New Features

    • pnpm install --ignore-scripts now records deferred dependency and workspace builds.
    • Added pnpm rebuild --pending support to run recorded builds and clear completed entries.
    • Pending build records are updated when packages are removed or builds are completed.
  • Bug Fixes

    • Revoked build approvals are now detected during installation, including when cached artifacts exist.
    • Current lockfile and deferred-build state are handled more reliably across repeated and frozen installs.
  • Tests

    • Added coverage for pending builds, approval revocation, lockfile recovery, and deferred lifecycle scripts.

Copilot AI review requested due to automatic review settings July 19, 2026 16:25

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

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds deferred build persistence in .modules.yaml, supports rebuild --pending for dependency and workspace entries, re-evaluates revoked build approvals, and expands current-lockfile and lifecycle regression coverage.

Changes

Lifecycle build bookkeeping

Layer / File(s) Summary
Build output contract
pnpm/crates/package-manager/src/build_modules.rs, pnpm/crates/package-manager/src/build_modules/tests.rs, pnpm/crates/package-manager/src/install/tests.rs
Build execution now returns ignored and deferred build collections, with updated consumers and tests.
Install-state persistence
pnpm/crates/package-manager/src/install*.rs
Install flows merge and persist pendingBuilds, preserve valid entries, remove obsolete entries, and detect revoked approvals.
Pending rebuild selection
pnpm/crates/cli/src/cli_args/rebuild.rs, pnpm/crates/cli/src/cli_args/dispatch_install.rs, pnpm/crates/cli/src/cli_args/global.rs, pnpm/crates/napi/src/install.rs
Rebuild selection separates dependency names from pending workspace projects and passes both through execution.
Lifecycle regression coverage
pnpm/crates/cli/tests/lifecycle_scripts.rs, .changeset/*, pnpm/plans/TEST_PORTING.md
Tests and release notes cover pending-build recording, draining, pruning, approval revocation, and cached side effects.

Current lockfile validation

Layer / File(s) Summary
Current-lockfile install scenarios
pnpm/crates/cli/tests/current_lockfile.rs, pnpm/plans/TEST_PORTING.md
Coverage validates current-lockfile writes, failures, filtering, repair, regeneration, lockfile errors, and global virtual-store installs.

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

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant RebuildCommand
  participant ModulesYaml
  participant InstallPipeline
  participant BuildModules
  User->>RebuildCommand: run rebuild --pending
  RebuildCommand->>ModulesYaml: read pendingBuilds
  RebuildCommand->>InstallPipeline: pass dependency names and pending projects
  InstallPipeline->>BuildModules: execute selected pending builds
  InstallPipeline->>ModulesYaml: persist settled pendingBuilds
Loading

Assessment against linked issues

Objective Addressed Explanation
Ensure revoked allowBuilds approvals are re-evaluated under strictDepBuilds, including cached side effects [#11035] ✅
Report ignored builds and fail the strict gate when cached build artifacts exist without approval [#11035] ✅

Possibly related issues

  • pnpm/pnpm#13146: Covers the pending-build persistence and rebuild --pending work implemented here.

Possibly related PRs

  • pnpm/pnpm#12436: Overlaps in run_build_phase and .modules.yaml build-state persistence.
  • pnpm/pnpm#12572: Overlaps in rebuild selection and allowBuilds wiring.
  • pnpm/pnpm#13145: Updates the same test-porting plan areas for pending builds and current-lockfile coverage.

Suggested labels: product: pacquet

Suggested reviewers: copilot

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch stage-3

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

Record pendingBuilds + allowBuilds policy in .modules.yaml (and port suites)

✨ Enhancement 🐞 Bug fix 🧪 Tests 🕐 40+ Minutes

Grey Divider

AI Description

• Persist --ignore-scripts deferred builds into .modules.yaml.pendingBuilds for `rebuild
 --pending`.
• Record allowBuilds policy in .modules.yaml and invalidate fast-path on revoked approvals.
• Port upstream current-lockfile and lifecycle/pendingBuilds test suites to Rust CLI tests.
Diagram

graph TD
P["workspace config (allowBuilds/ignoreScripts)"] --> A["pnpm install"] --> B["BuildModules"] --> D["node_modules/.modules.yaml"]
A --> E["node_modules/.pnpm/lock.yaml"]
F["pnpm rebuild --pending"] --> D --> B
T["CLI test suites"] --> A
T --> F
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Derive pending builds by scanning node_modules/store metadata
  • ➕ Avoids persisting pendingBuilds state in .modules.yaml
  • ➕ Could self-heal if .modules.yaml is missing/corrupt
  • ➖ More expensive and complex (needs reliable build-intent inference)
  • ➖ Harder to keep behavior aligned with pnpm semantics (pending until rebuild)
2. Clear pendingBuilds on any successful install
  • ➕ Simpler mental model: ‘install succeeded => nothing pending’
  • ➖ Incorrect for pnpm parity: installs that defer scripts must keep debt
  • ➖ Would make rebuild --pending unreliable after a later no-op install
3. Store pendingBuilds as allowBuild-style name@version keys only
  • ➕ Matches ignoredBuilds key style and avoids dep-path parsing
  • ➖ Loses slot identity (peers/variants) which rebuild needs to target correctly
  • ➖ Requires extra mapping to find the correct materialized locations

Recommendation: Keep the PR’s approach: recording deferred builds as dep-paths and preserving them across installs matches pnpm’s contract (‘owed until rebuild’), enables rebuild --pending without expensive inference, and fixes the revoked-approval fast-path gap by persisting the evaluated allowBuilds policy.

Files changed (14) +1076 / -113

Enhancement (5) +148 / -81
rebuild.rsEnable 'rebuild --pending' semantics by relying on populated pendingBuilds +1/-7

Enable 'rebuild --pending' semantics by relying on populated pendingBuilds

• Updates CLI help text to remove the previous caveat that '--pending' had no effect. Keeps selection logic based on '.modules.yaml.pendingBuilds'.

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

build_modules.rsReturn deferred builds from BuildModules for pendingBuilds recording +49/-8

Return deferred builds from BuildModules for pendingBuilds recording

• Replaces 'BuildModules::run' return type with 'BuildModulesOutput' containing both 'ignored_builds' (allowBuilds-blocked) and 'deferred_builds' (requiresBuild snapshots deferred by '--ignore-scripts'). Implements stable sorting and ensures deferred builds persist until explicitly rebuilt.

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

install_frozen_lockfile.rsPropagate deferred_builds through frozen install build phase +36/-30

Propagate deferred_builds through frozen install build phase

• Changes 'run_build_phase' to return 'BuildModulesOutput' and threads 'deferred_builds' into 'InstallFrozenLockfileOutput', while keeping existing ignored-build logging and strictDepBuilds behavior intact.

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

install_with_fresh_lockfile.rsPropagate deferred_builds through fresh-resolve install path +40/-31

Propagate deferred_builds through fresh-resolve install path

• Extends fresh-install result types to include 'deferred_builds', returns empty sets on lockfile-only installs, and plumbs build output from the shared build phase helper.

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

lib.rsDetect workspace install-time scripts for pendingBuilds project entries +22/-5

Detect workspace install-time scripts for pendingBuilds project entries

• Adds 'PackageManifest::declares_install_scripts()' to detect root/workspace install hooks (including prepare/prepublish) and factors dependency build detection through a shared 'declares_any_script' helper.

pnpm/crates/package-manifest/src/lib.rs

Bug fix (1) +98 / -3
install.rsWrite pendingBuilds and allowBuilds into .modules.yaml; detect revoked approvals +98/-3

Write pendingBuilds and allowBuilds into .modules.yaml; detect revoked approvals

• Threads 'deferred_builds' through both frozen and fresh install paths and merges them with deferred workspace projects (based on install-time scripts) to produce '.modules.yaml.pendingBuilds', retaining prior entries that still resolve against the current lockfile. Records the evaluated 'allowBuilds' policy into '.modules.yaml' and adds 'has_revoked_allowed_builds' to invalidate the frozen no-op fast path when approvals are withdrawn.

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

Tests (5) +799 / -9
current_lockfile.rsAdd current-lockfile CLI test suite ports +432/-0

Add current-lockfile CLI test suite ports

• Introduces a new Rust test module porting upstream coverage for 'node_modules/.pnpm/lock.yaml': frozen install writes it, failed builds don’t, wanted/current divergence updates subdeps, missing current lockfile doesn’t rewrite, regeneration from current lockfile, duplicate-key wanted lockfile fails, group filtering, stale state repair, and GVS behavior. Includes a known-failure stub for ‘broken current lockfile is ignored’ parity.

pnpm/crates/cli/tests/current_lockfile.rs

install_filters.rsTest that current lockfile includes only materialized importers in workspace +37/-0

Test that current lockfile includes only materialized importers in workspace

• Adds a workspace/filter scenario asserting that projects only resolved (not materialized) do not contribute packages to the current lockfile, even when the wanted lockfile spans the workspace.

pnpm/crates/cli/tests/install_filters.rs

lifecycle_scripts.rsPort lifecycle script suites for ignoredBuilds, strictDepBuilds, pendingBuilds +311/-0

Port lifecycle script suites for ignoredBuilds, strictDepBuilds, pendingBuilds

• Adds tests ensuring ignored builds persist across repeat installs, revoking an allowBuilds approval triggers strictDepBuilds failure even with cached side effects, and '--ignore-scripts' populates '.modules.yaml.pendingBuilds' correctly (including project entries, shrinking on removals, and carry-forward across later installs).

pnpm/crates/cli/tests/lifecycle_scripts.rs

tests.rsAdapt BuildModules unit tests to new output type +17/-9

Adapt BuildModules unit tests to new output type

• Updates existing tests to read '.ignored_builds' from the new 'BuildModulesOutput' return value and adjusts helper signatures accordingly.

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

tests.rsUpdate modules manifest tests for pendingBuilds parameter +2/-0

Update modules manifest tests for pendingBuilds parameter

• Adjusts 'build_modules_manifest_*' tests to pass the new 'pending_builds' argument when constructing a 'Modules' manifest in unit tests.

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

Documentation (3) +31 / -20
record-pending-builds.mdDocument pendingBuilds behavior for ignore-scripts installs +5/-0

Document pendingBuilds behavior for ignore-scripts installs

• Adds a minor changeset describing that 'pnpm install --ignore-scripts' now records deferred builds in '.modules.yaml.pendingBuilds', enabling 'pnpm rebuild --pending'. Notes both dependency builds and workspace project scripts and shrinking on removals.

.changeset/record-pending-builds.md

revoked-build-approval-is-re-evaluated.mdDocument strictDepBuilds failure when allowBuilds approval is removed +5/-0

Document strictDepBuilds failure when allowBuilds approval is removed

• Adds a patch changeset clarifying that removing an 'allowBuilds' approval is re-evaluated on the next install under 'strictDepBuilds', even if side effects are cached.

.changeset/revoked-build-approval-is-re-evaluated.md

TEST_PORTING.mdMark current-lockfile and pendingBuilds ports as complete +21/-20

Mark current-lockfile and pendingBuilds ports as complete

• Updates the porting checklist to mark newly added Rust tests as ported and documents remaining known divergences (notably broken current lockfile handling and workspace subset behavior).

pnpm/plans/TEST_PORTING.md

@github-actions

github-actions Bot commented Jul 19, 2026 •

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                          main                                   pr
-----                          ----                                   --
lockfile/parse_pnpm_lock       1.05     11.2±0.02ms    33.5 MB/sec    1.00     10.7±0.03ms    35.1 MB/sec
packument/parse                1.00     36.8±0.11µs  1801.1 MB/sec    1.03     38.0±0.09µs  1745.5 MB/sec
tarball/download_dependency    1.00      2.3±0.07ms  1922.7 KB/sec    1.00      2.3±0.07ms  1927.0 KB/sec

@qodo-code-review

qodo-code-review Bot commented Jul 19, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (6) 📘 Rule violations (3) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Pending debt cleared early ✓ Resolved 🐞 Bug ⛨ Security
Description
merge_pending_builds drops dependency entries from .modules.yaml.pendingBuilds whenever
rebuild.settles_dependency(entry) is true, but BuildModules can still skip running the selected
dependency’s scripts when allowBuilds returns None/false. This lets pnpm rebuild --pending
erase deferred dependency-build debt without actually executing the scripts, so subsequent `rebuild
--pending` runs report nothing to do even though work is still owed (or still unapproved).
Code

pnpm/crates/package-manager/src/install.rs[R2999-3006]

+    let settled = |entry: &str| {
+        let Some(rebuild) = rebuild else { return false };
+        !current.is_some_and(|current| current.importers.contains_key(entry))
+            && rebuild.settles_dependency(entry)
+    };
+    let retained = previous.iter().filter(|entry| {
+        current.is_some_and(|current| current_contains_dep_path(current, entry)) && !settled(entry)
+    });
Evidence
merge_pending_builds treats any selected dependency as settled and removes it from pendingBuilds,
but BuildModules can skip running the dependency’s scripts when allowBuilds returns None
(unapproved) or Some(false) (denied). Because settlement is based on selection rather than actual
script execution, rebuild can clear pending entries even when no build happened.

pnpm/crates/package-manager/src/install.rs[2982-3006]
pnpm/crates/package-manager/src/build_modules.rs[381-392]
pnpm/crates/package-manager/src/build_modules.rs[862-888]
pnpm/crates/cli/src/cli_args/rebuild.rs[68-92]

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

### Issue description
`merge_pending_builds()` currently considers a dependency "settled" based only on rebuild selection (`rebuild.settles_dependency(entry)`), not on whether the rebuild actually executed that dependency’s scripts. Because `BuildModules::build_one_snapshot` still applies `allowBuilds` (and may set `should_run_scripts = false` for `None`/`false`), a `pnpm rebuild --pending` can rewrite `.modules.yaml.pendingBuilds` and drop entries for dependencies whose scripts were skipped.

This breaks the pendingBuilds contract ("build stays owed until something runs it") and can hide unapproved/denied pending work.

### Issue Context
- Rebuild selection is derived from `.modules.yaml.pendingBuilds` entries.
- During rebuild, `BuildModules` still enforces `allowBuilds` and can skip scripts for unapproved/denied entries.
- Pending entries are removed anyway because settlement is inferred from selection, not execution.

### Fix Focus Areas
- pnpm/crates/package-manager/src/install.rs[2982-3009]
- pnpm/crates/package-manager/src/build_modules.rs[365-392]
- pnpm/crates/package-manager/src/build_modules.rs[862-899]

### Suggested approach
1. Change the settlement logic for dependency entries to depend on *actual build execution*.
  - Option A (preferred): extend `BuildModulesOutput` to include a `built_dep_paths` (or similar) list of dep paths whose scripts actually ran successfully during this invocation; then have `merge_pending_builds` drop only those entries.
  - Option B (smaller): pass the rebuild’s `ignored_builds` (and/or explicit-deny info) into `merge_pending_builds` and **do not** settle entries that were skipped by the allowBuilds gate.
2. Add/adjust a test that covers: `install --ignore-scripts` records a dep in pendingBuilds; `rebuild --pending` with that dep still unapproved does **not** clear the entry.

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


2. pacquet add output unchecked ✓ Resolved 📘 Rule violation ☼ Reliability
Description
The new test calls pacquet ... add ... and only expects spawn success, never asserting the
command exited successfully. This can hide real failures and make the test suite less trustworthy,
violating the requirement to not ignore/silently skip failures.
Code

pnpm/crates/cli/tests/lifecycle_scripts.rs[R824-832]

+        pacquet
+            .with_args([
+                "add",
+                "@pnpm.e2e/[email protected]",
+                "@pnpm.e2e/[email protected]",
+                "--config.optimistic-repeat-install=false",
+            ])
+            .output()
+            .expect("run pacquet add");
Evidence
PR Compliance ID 2 requires that failures are not ignored/suppressed. The added test code executes
pacquet add and does not assert the exit status, so a failing add can be missed or produce
misleading downstream assertions.

CLAUDE.md: Do not ignore or silently skip failing tests
pnpm/crates/cli/tests/lifecycle_scripts.rs[824-832]

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

## Issue description
In `ignored_builds_are_preserved_after_a_repeat_install`, the test runs `pacquet add ...` via `.output().expect(...)` but never checks `output.status.success()`. This can allow the test to proceed past a failing command, weakening the guarantee that failures are surfaced.

## Issue Context
Compliance requires that failing tests are not ignored or silently skipped; tests should assert subprocess success (or assert the expected failure) so failures are detected immediately.

## Fix Focus Areas
- pnpm/crates/cli/tests/lifecycle_scripts.rs[824-832]

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


3. Pending cleared before scripts ✓ Resolved 🐞 Bug ☼ Reliability
Description
pnpm rebuild --pending can rewrite .modules.yaml.pendingBuilds as “settled” (via
merge_pending_builds + RebuildOptions::settles) before deferred *project* lifecycle scripts run.
If a project lifecycle script then fails, the command returns an error but the pending record is
already cleared, so subsequent rebuild --pending won’t retry the deferred work.
Code

pnpm/crates/package-manager/src/install.rs[R2051-2070]

+        // The projects whose own install scripts `--ignore-scripts`
+        // skipped are owed a build just like the dependencies the build
+        // phase deferred, and are recorded by importer id.
+        let deferred_projects = config.ignore_scripts.then(|| {
+            materialized_project_manifests
+                .iter()
+                .filter(|(_, manifest)| manifest.declares_install_scripts())
+                .map(|(project_dir, _)| {
+                    pacquet_workspace::importer_id_from_root_dir(&workspace_root, project_dir)
+                })
+                .collect::<Vec<_>>()
+        });
+        let previous_pending_builds =
+            prior_modules.map_or(&[][..], |modules| modules.pending_builds.as_slice());
+        let pending_builds = merge_pending_builds(
+            previous_pending_builds,
+            deferred_projects.into_iter().flatten().chain(deferred_builds),
+            materialized_current_lockfile.as_ref(),
+            rebuild.as_ref(),
+        );
Evidence
The install tail computes and writes pending_builds before invoking
run_projects_lifecycle_scripts, and RebuildOptions::settles treats importer IDs in
pending_projects as settled. That ordering means pending entries can be cleared even if project
scripts later error.

pnpm/crates/package-manager/src/install.rs[2051-2097]
pnpm/crates/package-manager/src/install.rs[2159-2183]
pnpm/crates/package-manager/src/build_modules.rs[372-388]

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

### Issue description
`merge_pending_builds()` drops pending entries when `rebuild.settles(entry)` is true. For `pnpm rebuild --pending`, importer IDs are considered settled immediately (because they are in `RebuildOptions::pending_projects`), and the updated list is written to `.modules.yaml` *before* `run_projects_lifecycle_scripts()` runs. If any project script fails, the rebuild exits non-zero but the persistent retry state has already been removed.

### Issue Context
- `.modules.yaml` is written before project scripts run.
- `RebuildOptions::settles()` returns true for importer IDs listed in `pending_projects`.

### Fix Focus Areas
- pnpm/crates/package-manager/src/install.rs[2045-2183]
- pnpm/crates/package-manager/src/install.rs[2753-2768]
- pnpm/crates/package-manager/src/build_modules.rs[372-388]

### Implementation direction (one acceptable approach)
1. When `rebuild.is_some()` and `rebuild.pending_projects` is non-empty:
  - Do **not** remove importer-id pending entries during the first `merge_pending_builds()` computation.
  - Run `run_projects_lifecycle_scripts()`.
  - Only after **successful** completion, recompute `pending_builds` with those importer IDs removed (and de-duped) and rewrite `.modules.yaml` (or write once at the end for rebuild mode).
2. Ensure that on any lifecycle script error, pending project entries remain in `.modules.yaml.pendingBuilds` so the next `pnpm rebuild --pending` retries.

### Acceptance criteria
- If a deferred project lifecycle script fails during `pnpm rebuild --pending`, the project’s importer ID remains in `.modules.yaml.pendingBuilds`.
- If it succeeds, the importer ID is removed and the list converges to empty.

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


View more (5)
4. Missed pending project scripts ✓ Resolved 🐞 Bug ≡ Correctness
Description
PackageManifest::declares_install_scripts() omits project lifecycle hooks that pnpm actually runs
(preprepare/postprepare) and includes prepublish, so pnpm install --ignore-scripts can fail
to record some deferred workspace projects in .modules.yaml.pendingBuilds and `pnpm rebuild
--pending` won’t run them.
Code

pnpm/crates/package-manifest/src/lib.rs[R449-461]

+    /// Whether this workspace project has an install-time script of its
+    /// own, which `--ignore-scripts` leaves owed.
+    ///
+    /// Wider than [`manifest_requires_build`], which answers the same
+    /// question for a *dependency*: a project also runs `prepublish`
+    /// and `prepare` during install.
+    #[must_use]
+    pub fn declares_install_scripts(&self) -> bool {
+        declares_any_script(
+            &self.value,
+            &["preinstall", "prepublish", "install", "postinstall", "prepare"],
+        )
+    }
Evidence
The code that decides whether a project is recorded as pending uses declares_install_scripts(),
but the actual lifecycle runner executes a different stage set; this mismatch can prevent pending
projects from being recorded and later rebuilt.

pnpm/crates/package-manifest/src/lib.rs[449-461]
pnpm/crates/executor/src/lifecycle.rs[121-149]
pnpm/crates/package-manager/src/install.rs[2027-2037]

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

### Issue description
`PackageManifest::declares_install_scripts()` is used to decide whether a workspace project should be recorded into `.modules.yaml.pendingBuilds` when `--ignore-scripts` is set. The current hook list does not match the actual project lifecycle stages executed by `run_project_lifecycle_scripts`, so some projects with deferred scripts won’t be recorded (and therefore can’t be drained by `pnpm rebuild --pending`).

### Issue Context
Project lifecycle stages are defined in `pacquet_executor::lifecycle` as `PROJECT_LIFECYCLE_STAGES` and include `preprepare`/`postprepare` (not `prepublish`). Install records deferred projects via `manifest.declares_install_scripts()`.

### Fix Focus Areas
- pnpm/crates/package-manifest/src/lib.rs[449-461]
- pnpm/crates/executor/src/lifecycle.rs[121-149]
- pnpm/crates/package-manager/src/install.rs[2027-2037]

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


5. Pending entry misclassified ✓ Resolved 🐞 Bug ☼ Reliability
Description
rebuild --pending distinguishes dependency vs project pending entries by whether the string parses
as PackageKey, but workspace importer IDs are just relative paths and can overlap that grammar
(e.g. a directory named foo@bar), causing project entries to be treated as dependencies and then
cleared as “settled” without running project scripts.
Code

pnpm/crates/cli/src/cli_args/rebuild.rs[R70-71]

+    let (dep_paths, projects): (Vec<&String>, Vec<&String>) =
+        modules.pending_builds.iter().partition(|entry| entry.parse::<PackageKey>().is_ok());
Evidence
Importer IDs are arbitrary relative paths; lockfile keys explicitly allow opaque non-semver version
strings, so some importer IDs can parse as PackageKey. The rebuild pipeline uses that parse both
to classify pending entries and to decide whether to drop them as settled.

pnpm/crates/cli/src/cli_args/rebuild.rs[48-80]
pnpm/crates/workspace/src/importer_id.rs[9-29]
pnpm/crates/lockfile/src/pkg_ver_peer.rs[6-21]
pnpm/crates/package-manager/src/build_modules.rs[372-388]

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

### Issue description
`resolve_selection()` partitions `.modules.yaml.pendingBuilds` entries by `entry.parse::<PackageKey>().is_ok()`. Workspace importer IDs are derived from relative filesystem paths and are not constrained to avoid `PackageKey`-parseable shapes, so a project pending entry can be misrouted into `names` instead of `projects`. This prevents project lifecycle scripts from running during `rebuild --pending` and can also cause the entry to be dropped because `RebuildOptions::settles()` will treat it as a dependency entry.

### Issue Context
- Importer IDs come from `importer_id_from_root_dir()` (relative paths, unvalidated).
- Lockfile package keys support non-semver versions (so `name@<opaque>` shapes are valid keys).
- `RebuildOptions::settles()` also parses `pending_entry` as `PackageKey`, which can incorrectly mark a misclassified project entry as settled.

### Fix Focus Areas
- pnpm/crates/cli/src/cli_args/rebuild.rs[48-80]
- pnpm/crates/package-manager/src/build_modules.rs[372-388]
- pnpm/crates/workspace/src/importer_id.rs[9-29]
- pnpm/crates/lockfile/src/pkg_ver_peer.rs[6-21]

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


6. pendingBuilds never drained ✓ Resolved 🐞 Bug ≡ Correctness
Description
merge_pending_builds always carries forward prior .modules.yaml.pendingBuilds entries as long as
they still exist in the current lockfile, so a pnpm rebuild --pending run won’t clear the pending
list and can repeatedly select the same work forever. This breaks the intended semantics that a
build stays owed until pnpm rebuild runs it and clears the record.
Code

pnpm/crates/package-manager/src/install.rs[R2694-2719]

+/// The `pendingBuilds` list for this install: the builds still owed,
+/// carried-over entries first, then the ones this install deferred.
+///
+/// A build stays owed until something runs it — only `pnpm rebuild`
+/// drains the list — so a previous entry is dropped only when its
+/// subject is gone from the current lockfile, which is what makes an
+/// install that removes packages shrink the list.
+fn merge_pending_builds<Deferred>(
+    previous: &[String],
+    deferred: Deferred,
+    current: Option<&Lockfile>,
+) -> Vec<String>
+where
+    Deferred: IntoIterator<Item = String>,
+{
+    let retained = previous
+        .iter()
+        .filter(|entry| current.is_some_and(|current| current_contains_dep_path(current, entry)));
+    let mut pending: Vec<String> = Vec::new();
+    for entry in retained.cloned().chain(deferred) {
+        if !pending.contains(&entry) {
+            pending.push(entry);
+        }
+    }
+    pending
+}
Evidence
The merge retains previous pending entries solely based on presence in the current lockfile; it has
no rebuild-mode branch. Also, BuildModulesOutput::deferred_builds is empty unless ignore_scripts
is true, so a rebuild run (ignore_scripts=false) won’t produce deferred entries that would
replace/clear the prior list.

pnpm/crates/package-manager/src/install.rs[2694-2719]
pnpm/crates/package-manager/src/build_modules.rs[732-752]

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

## Issue description
`merge_pending_builds` retains all prior `pendingBuilds` entries that still resolve in the current lockfile. During `pnpm rebuild --pending`, builds may run successfully, but the pending list is written back unchanged (since `ignore_scripts` is false, no new deferred entries are produced), so `--pending` can loop indefinitely.

## Issue Context
- `pendingBuilds` is intended as a debt queue; the PR description says only `pnpm rebuild` clears the record.
- Current logic only removes entries when the package/importer disappears from the current lockfile.

## Fix Focus Areas
- pnpm/crates/package-manager/src/install.rs[2039-2043]
- pnpm/crates/package-manager/src/install.rs[2694-2719]

## Suggested fix
- Make pending-build merging aware of rebuild mode:
 - If this run is an explicit rebuild (`rebuild.is_some()` in `run_inner`), do **not** carry forward `previous` pending entries; instead write `pendingBuilds` as empty (or subtract the rebuilt subset if partial rebuilds must preserve remaining debt).
 - Add/extend a CLI-level regression test that does `install --ignore-scripts`, then `rebuild --pending`, and asserts `pendingBuilds` is empty afterward.

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


7. Project pending scripts undrainable ✓ Resolved 🐞 Bug ≡ Correctness
Description
The install tail now records workspace project importer IDs (e.g. ".") into pendingBuilds when
--ignore-scripts is used, but the rebuild pipeline runs with is_full_install=false and the
install only runs project lifecycle scripts when is_full_install is true. As a result, `pnpm
rebuild --pending` cannot execute (and thus cannot properly clear) the project entries it records.
Code

pnpm/crates/package-manager/src/install.rs[R2027-2038]

+        // The projects whose own install scripts `--ignore-scripts`
+        // skipped are owed a build just like the dependencies the build
+        // phase deferred, and are recorded by importer id.
+        let deferred_projects = config.ignore_scripts.then(|| {
+            materialized_project_manifests
+                .iter()
+                .filter(|(_, manifest)| manifest.declares_install_scripts())
+                .map(|(project_dir, _)| {
+                    pacquet_workspace::importer_id_from_root_dir(&workspace_root, project_dir)
+                })
+                .collect::<Vec<_>>()
+        });
Evidence
The new code records project importer IDs into pendingBuilds when ignore_scripts is true. But
the rebuild command runs installs with is_full_install=false, and project lifecycle scripts only
run when is_full_install && !ignore_scripts, so the rebuild path cannot execute those recorded
project entries.

pnpm/crates/package-manager/src/install.rs[2027-2038]
pnpm/crates/package-manager/src/cli_args/rebuild.rs[75-116]
pnpm/crates/package-manager/src/install.rs[2113-2133]

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

## Issue description
`pendingBuilds` now includes importer IDs for workspace projects whose own install-time scripts were skipped under `--ignore-scripts`. However, `pnpm rebuild` drives the install pipeline with `is_full_install: false`, and project lifecycle scripts are gated on `is_full_install`, so those pending project entries are not runnable via `rebuild --pending`.

## Issue Context
- The PR’s user-facing changeset claims `pnpm rebuild --pending` runs deferred workspace project scripts too.
- Current rebuild path explicitly opts out of project lifecycle scripts.

## Fix Focus Areas
- pnpm/crates/package-manager/src/install.rs[2027-2038]
- pnpm/crates/package-manager/src/install.rs[2113-2133]
- pnpm/crates/cli/src/cli_args/rebuild.rs[90-116]

## Suggested fix
Choose one consistent behavior and encode it end-to-end:
1) **Support draining project entries**: Teach `pnpm rebuild --pending` to run project lifecycle scripts for importer IDs present in `pendingBuilds` (e.g., by running `run_projects_lifecycle_scripts` in rebuild mode for those importers, or by allowing `is_full_install=true` in rebuild when pending contains project IDs).
2) **Or** stop recording project importer IDs in `pendingBuilds` until rebuild can execute them, and adjust docs/tests accordingly.

Add a regression test that asserts project entries are either executed+removed, or never recorded.

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


8. allow_known_failure! skips lockfile test ✗ Dismissed 📘 Rule violation ≡ Correctness
Description
The new test a_broken_current_lockfile_is_ignored_with_a_warning is stubbed via
allow_known_failure!, so the missing behavior is effectively skipped rather than fixed. This
violates the requirement to not ignore or dismiss failing tests.
Code

pnpm/crates/cli/tests/current_lockfile.rs[R426-431]

+    /// TS: `a broken private lockfile is ignored`
+    /// (`deps-installer/test/lockfile.ts:1351`).
+    #[test]
+    fn a_broken_current_lockfile_is_ignored_with_a_warning() {
+        allow_known_failure!(current_lockfile_parse_failure_is_fatal());
+    }
Evidence
PR Compliance ID 2 forbids skipping/dismissing failing tests. The added test calls
allow_known_failure!, which exits early instead of asserting the intended behavior.

AGENTS.md: Do not ignore or dismiss test failures
pnpm/crates/cli/tests/current_lockfile.rs[426-431]

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

## Issue description
A newly added test is being short-circuited using `allow_known_failure!`, which effectively treats the failing behavior as acceptable rather than addressing it.

## Issue Context
The test `a_broken_current_lockfile_is_ignored_with_a_warning` currently exits early via `allow_known_failure!(...)`. The compliance requirement here is that test failures should not be skipped/dismissed.

## Fix Focus Areas
- pnpm/crates/cli/tests/current_lockfile.rs[426-431]

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



Remediation recommended

9. Pending base dir wrong 🐞 Bug ≡ Correctness ⭐ New
Description
resolve_selection() classifies pendingBuilds workspace importer-ids by resolving them relative
to config.modules_dir.parent(), but importer ids are defined relative to the lockfile directory;
with a custom modulesDir, project entries will be misclassified and pnpm rebuild --pending won’t
run (or clear) those projects’ deferred lifecycle scripts.
Code

pnpm/crates/cli/src/cli_args/rebuild.rs[R72-81]

+    // `.modules.yaml` sits in the root `node_modules`, so its importer
+    // ids are relative to that directory's parent.
+    let lockfile_dir = config.modules_dir.parent().unwrap_or(&config.modules_dir);
+    // An importer id is always a relative path; a dep path can be
+    // absolute-looking (`/[email protected]`), and Rust's `Path::join`
+    // replaces the base on an absolute component, so probe only for
+    // relative entries — an absolute one is a dependency by construction.
+    let is_project = |entry: &String| {
+        !Path::new(entry).is_absolute() && lockfile_dir.join(entry).join("package.json").is_file()
+    };
Evidence
The CLI uses config.modules_dir.parent() as the base directory for importer-id resolution, but
importer ids are defined relative to the lockfile directory and install writes pending project
entries using importer_id_from_root_dir(&workspace_root, ...). Since modules_dir is
configurable, these bases can diverge, breaking --pending project selection.

pnpm/crates/cli/src/cli_args/rebuild.rs[72-81]
pnpm/crates/workspace/src/importer_id.rs[1-29]
pnpm/crates/package-manager/src/install.rs[2155-2166]
pnpm/crates/config/src/lib.rs[574-583]

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

### Issue description
`pnpm rebuild --pending` needs to distinguish dependency dep-path entries from workspace importer-id entries in `.modules.yaml.pendingBuilds`. The current implementation assumes importer ids are relative to `config.modules_dir.parent()`, which is only correct when `modulesDir` is the default `<lockfileDir>/node_modules`.

With a configured `modulesDir` (installed somewhere other than `node_modules`), `modules_dir.parent()` may not equal the lockfile directory, so importer ids like `.` or `packages/foo` won’t resolve correctly. This causes pending project entries to be misclassified and prevents their deferred scripts from being selected/drained.

### Issue Context
- Importer ids are defined as paths relative to the lockfile directory.
- Install records pending projects using `importer_id_from_root_dir(&workspace_root, project_dir)`.
- `Config.modules_dir` is explicitly configurable (“instead of `node_modules`”).

### Fix Focus Areas
- pnpm/crates/cli/src/cli_args/rebuild.rs[61-93]

### Suggested fix
- Change `resolve_selection(...)` to accept an explicit `lockfile_dir: &Path` (or derive it from `State::lockfile_path().parent()` in `RebuildArgs::run`).
- Use that `lockfile_dir` for resolving importer ids instead of `config.modules_dir.parent()`.
- Update the comment accordingly (importer ids are relative to the lockfile dir, not the modules dir’s parent).

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


10. Extra modules.yaml rewrite 🐞 Bug ➹ Performance
Description
drain_settled_projects re-reads and re-writes the full node_modules/.modules.yaml after project
scripts run, even though it only needs to remove a few pendingBuilds entries. On large hoisted
workspaces this adds avoidable CPU/memory and I/O on pnpm rebuild --pending runs that include
deferred projects (when settled is non-empty and entries are actually removed).
Code

pnpm/crates/package-manager/src/install.rs[R2942-2970]

+/// Drop `settled` from the `pendingBuilds` the install just wrote, now
+/// that the projects' scripts have run.
+///
+/// A project's debt outlives the `.modules.yaml` write — its scripts run
+/// after it — so clearing the record there would forget the debt when a
+/// script fails. Re-reading rather than reusing the in-memory value
+/// keeps every other field exactly as it was written.
+fn drain_settled_projects<Sys>(modules_dir: &Path, settled: &[String]) -> Result<(), InstallError>
+where
+    Sys: pacquet_modules_yaml::FsReadToString
+        + pacquet_modules_yaml::Clock
+        + pacquet_modules_yaml::FsCreateDirAll
+        + pacquet_modules_yaml::FsWrite,
+{
+    if settled.is_empty() {
+        return Ok(());
+    }
+    let Some(mut modules) = pacquet_modules_yaml::read_modules_manifest::<Sys>(modules_dir)
+        .map_err(InstallError::ReadModules)?
+    else {
+        return Ok(());
+    };
+    let before = modules.pending_builds.len();
+    modules.pending_builds.retain(|entry| !settled.contains(entry));
+    if modules.pending_builds.len() == before {
+        return Ok(());
+    }
+    write_modules_manifest::<Sys>(modules_dir, modules).map_err(InstallError::WriteModules)
+}
Evidence
The new drain_settled_projects helper performs a second full manifest read/parse and
write/serialize to clear project pending entries. The underlying modules-yaml APIs explicitly
deserialize the full Modules struct (which includes large hoist maps) and serialize the entire
manifest to a pretty JSON/YAML document, so this scales with total manifest size, not with the
number of drained entries.

pnpm/crates/package-manager/src/install.rs[2942-2970]
pnpm/crates/modules-yaml/src/lib.rs[380-415]
pnpm/crates/modules-yaml/src/lib.rs[464-499]
pnpm/crates/modules-yaml/src/lib.rs[128-212]

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

### Issue description
`drain_settled_projects` clears settled project importer IDs from `.modules.yaml.pendingBuilds` by calling `read_modules_manifest` (full manifest) and then `write_modules_manifest` (full serialization) after lifecycle scripts succeed. This introduces a second full parse + full pretty-serialization + full file write on the `rebuild --pending` path, proportional to the size of `.modules.yaml` (which can include very large `hoistedDependencies`/`hoistedLocations` maps).

### Issue Context
The post-script update exists for correctness: project scripts run after the initial `.modules.yaml` write, so entries must only be removed once scripts have actually succeeded.

### Fix Focus Areas
- pnpm/crates/package-manager/src/install.rs[2942-2970]
- pnpm/crates/modules-yaml/src/lib.rs[380-415]
- pnpm/crates/modules-yaml/src/lib.rs[464-499]

### Suggested fix approach
Pick one (in order of lowest risk):
1. **Avoid the re-read:** carry forward the already-built `Modules` value (or a normalized-for-write copy of it) so the post-success drain can update `pending_builds` and call `write_modules_manifest` without reparsing the full manifest from disk.
2. **Add a targeted update API:** add a `pacquet_modules_yaml` helper like `update_pending_builds(modules_dir, f)` that updates only `pendingBuilds` while preserving other fields, implemented in a way that avoids allocating/deserializing large hoist maps (e.g., deserializing into a lightweight struct + preserving the raw document for untouched sections, if feasible).

Either way, keep the current semantics: dependency entries can be cleared before project scripts, but project importer entries must only be cleared after those scripts succeed.

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


11. Duplicate append_workspace_yaml_key helper 📘 Rule violation ⚙ Maintainability
Description
append_workspace_yaml_key was reimplemented in lifecycle_scripts.rs even though an equivalent
helper already exists in tests/_utils/mod.rs. This duplicates logic and increases maintenance
cost/risk of drift across test suites.
Code

pnpm/crates/cli/tests/lifecycle_scripts.rs[R26-41]

+    /// Append a top-level `key: value` line. Only valid for keys the
+    /// harness never writes; the assert fails loudly if that changes.
+    pub fn append_workspace_yaml_key(workspace: &Path, key: &str, value: impl std::fmt::Display) {
+        let yaml_path = workspace.join("pnpm-workspace.yaml");
+        let mut yaml = fs::read_to_string(&yaml_path).unwrap_or_default();
+        let key_prefix = format!("{key}:");
+        assert!(
+            !yaml.lines().any(|line| line.starts_with(&key_prefix)),
+            "pnpm-workspace.yaml already has a `{key}:` key",
+        );
+        if !yaml.is_empty() && !yaml.ends_with('\n') {
+            yaml.push('\n');
+        }
+        writeln!(yaml, "{key}: {value}").expect("format workspace key");
+        fs::write(&yaml_path, yaml).expect("write pnpm-workspace.yaml");
+    }
Evidence
PR Compliance ID 3 requires reusing existing repo utilities instead of duplicating logic. The PR
adds a new append_workspace_yaml_key implementation in lifecycle_scripts.rs, while the same
helper already exists in the shared test utilities module, creating unnecessary duplication.

CLAUDE.md: Avoid duplicating logic: reuse existing repo utilities and established dependencies
pnpm/crates/cli/tests/lifecycle_scripts.rs[26-41]
pnpm/crates/cli/tests/_utils/mod.rs[68-85]

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

## Issue description
A new `append_workspace_yaml_key` helper was added in `pnpm/crates/cli/tests/lifecycle_scripts.rs`, duplicating an existing helper with the same purpose in `pnpm/crates/cli/tests/_utils/mod.rs`. This violates the repo guidance to avoid duplicating non-trivial logic and instead reuse shared utilities.

## Issue Context
The duplicated helper edits `pnpm-workspace.yaml` in-place and includes a guard against duplicate top-level keys—behavior that already exists in the shared test utilities module.

## Fix Focus Areas
- pnpm/crates/cli/tests/lifecycle_scripts.rs[26-41]
- pnpm/crates/cli/tests/_utils/mod.rs[68-85]

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


View more (8)
12. drain_settled_projects uses linear contains 📘 Rule violation ➹ Performance
Description
drain_settled_projects filters pending_builds by calling settled.contains(entry) inside a
retain, making the drain step O(|pending_builds| * |settled|) and adding avoidable overhead on the
hot pnpm rebuild --pending path in large workspaces. Converting settled to a set (e.g.,
HashSet) would make membership checks O(1) average and keep this tail step linear.
Code

pnpm/crates/package-manager/src/install.rs[R2764-2766]

+    let before = modules.pending_builds.len();
+    modules.pending_builds.retain(|entry| !settled.contains(entry));
+    if modules.pending_builds.len() == before {
Evidence
PR Compliance ID 12 calls for avoiding unnecessary repeated work inside loops; here, the
implementation uses Vec::contains (settled.contains(entry)) inside retain, which performs a
linear scan of settled for each element of pending_builds. That nested linear search yields
quadratic behavior as the lists grow, and can be reduced to overall linear time by precomputing a
membership set once and using constant-average-time lookups during retain.

CLAUDE.md, AGENTS.md: Prefer async/await and Parallelize Independent Work in Loops
pnpm/crates/package-manager/src/install.rs[2764-2766]
pnpm/crates/package-manager/src/install.rs[2756-2766]

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

## Issue description
`drain_settled_projects` retains `pending_builds` by calling `settled.contains(entry)` for every element, which results in O(n*m) behavior as both `pending_builds` and `settled` grow.

## Issue Context
This runs on the `rebuild --pending` path (after project lifecycle scripts), so the quadratic tail step is user-visible latency for large workspaces with many pending project entries. PR Compliance ID 12 also requires avoiding unnecessary repeated work inside loops.

## Fix Focus Areas
- pnpm/crates/package-manager/src/install.rs[2756-2770]

### Suggested fix
Build a membership set from `settled` once (e.g., `HashSet<&str>` or `HashSet<String>`) and then use `contains` on the set inside `retain` to make lookups O(1) average and keep the drain step linear.

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


13. Pending debt cleared wrongly 🐞 Bug ≡ Correctness
Description
drain_settled_projects removes pendingBuilds entries by raw string equality with settled importer
ids, so a dependency dep-path that happens to equal an importer id can be dropped even though no
dependency rebuild occurred. This can permanently lose deferred dependency build debt for `pnpm
rebuild --pending` in the (rare but supported) case where importer ids and dep paths overlap as
plain strings.
Code

pnpm/crates/package-manager/src/install.rs[R2764-2766]

+    let before = modules.pending_builds.len();
+    modules.pending_builds.retain(|entry| !settled.contains(entry));
+    if modules.pending_builds.len() == before {
Evidence
The codebase documents that pendingBuilds is a mixed string list (deps + importer ids). Deferred
dependency entries are produced from PackageKey::to_string(), and the new drain logic drops
entries by raw string equality against settled project ids with no type check, so collisions can
clear the wrong kind of entry.

pnpm/crates/cli/src/cli_args/rebuild.rs[46-56]
pnpm/crates/package-manager/src/build_modules.rs[769-788]
pnpm/crates/package-manager/src/install.rs[2742-2770]

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

### Issue description
`drain_settled_projects` removes any `.modules.yaml.pendingBuilds` entry that string-matches a settled importer id. Because pendingBuilds is explicitly a mixed list of *dependency dep paths* and *workspace importer ids* (both stored as plain strings), a collision can cause a dependency entry to be cleared when only project scripts were run.

### Issue Context
- `pendingBuilds` intentionally stores both dep paths and importer ids as strings.
- `drain_settled_projects` is only meant to clear *project* entries after scripts succeed, but it currently cannot distinguish an importer id from a dependency dep path.

### Fix Focus Areas
- pnpm/crates/package-manager/src/install.rs[2742-2770]

### Suggested fix
Change the drain step to remove **only entries that are known to be importer ids**.

Concretely:
1. Pass enough context into `drain_settled_projects` to classify entries (e.g., `current: Option<&Lockfile>` or an `&HashSet<String>` of current importer ids).
2. When filtering, only remove `entry` if:
  - `settled_set.contains(entry)` **and**
  - `current.importers.contains_key(entry)` (or equivalent importer-id check), **and**
  - (fail-safe) if `entry` is also a dependency dep-path in the current lockfile, prefer *not* draining it to avoid losing dependency debt.

This keeps the drain operation scoped to workspace projects and avoids clearing dependency pending entries on collisions.

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


14. Repeated pendingBuilds rationale comment 📘 Rule violation ⚙ Maintainability
Description
The rationale about pendingBuilds entries being ambiguous (e.g., a workspace directory named
[email protected]) is duplicated across multiple files, which risks drift and makes maintenance harder.
This violates the guideline to avoid comment/documentation duplication and to centralize shared
rationale.
Code

pnpm/crates/cli/src/cli_args/rebuild.rs[R46-56]

+/// Resolve the rebuild's selection. Explicit `packages` win; otherwise
+/// `--pending` selects what `.modules.yaml` recorded as not-yet-built;
+/// otherwise every build-needing package.
+///
+/// A `pendingBuilds` record is a dep path for a dependency and an
+/// importer id for a workspace project, and both are plain strings on
+/// disk. They are told apart by whether the entry resolves to a
+/// directory with a manifest, which is what an importer id means —
+/// asking the string's shape instead would misread a workspace
+/// directory named `[email protected]` as a dependency and then drop its debt
+/// without running anything.
Evidence
PR Compliance ID 3 prohibits duplicating the same rationale across call sites/modules. The PR adds
essentially the same explanation about ambiguous pendingBuilds entries in at least rebuild.rs
and build_modules.rs (and similarly in install.rs), indicating duplication rather than a single
centralized contract comment.

CLAUDE.md: No Comment or Documentation Duplication; Comments Must Describe Contract or Non-Obvious Rationale
pnpm/crates/cli/src/cli_args/rebuild.rs[46-56]
pnpm/crates/package-manager/src/build_modules.rs[381-387]
pnpm/crates/package-manager/src/install.rs[2768-2770]

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 same non-obvious rationale about `pendingBuilds` entries (importer id vs dep path ambiguity, `[email protected]` example) is repeated in multiple places.

## Issue Context
Rule requires avoiding duplicated comments; shared rationale should be documented once and referenced elsewhere to prevent drift.

## Fix Focus Areas
- pnpm/crates/cli/src/cli_args/rebuild.rs[46-56]
- pnpm/crates/package-manager/src/build_modules.rs[381-387]
- pnpm/crates/package-manager/src/install.rs[2768-2770]

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


15. Pending path filesystem probe ✓ Resolved 🐞 Bug ⛨ Security
Description
rebuild --pending classifies .modules.yaml.pendingBuilds entries via
lockfile_dir.join(entry)...is_file() on attacker-controlled strings, allowing absolute/.. paths
to trigger filesystem probes outside the intended workspace root and potentially misclassify
entries. This is a limited file-existence oracle + unnecessary I/O surface on a command that runs in
untrusted repos.
Code

pnpm/crates/cli/src/cli_args/rebuild.rs[R68-78]

+    let Some(modules) = read_modules_manifest::<Host>(&config.modules_dir).into_diagnostic()?
+    else {
+        return Ok(RebuildSelection { names: Some(Vec::new()), projects: Vec::new() });
+    };
+    // `.modules.yaml` sits in the root `node_modules`, so its importer
+    // ids are relative to that directory's parent.
+    let lockfile_dir = config.modules_dir.parent().unwrap_or(&config.modules_dir);
+    let (projects, dep_paths): (Vec<&String>, Vec<&String>) = modules
+        .pending_builds
+        .iter()
+        .partition(|entry| lockfile_dir.join(entry).join("package.json").is_file());
Evidence
The repo’s review guide explicitly treats paths/state as attacker-controlled, and the new
resolve_selection() logic uses .modules.yaml.pendingBuilds entries directly in a filesystem
probe via Path::join(...).is_file(). That enables probing outside the workspace (absolute paths
override the prefix; .. escapes).

REVIEW_GUIDE.md[30-55]
pnpm/crates/cli/src/cli_args/rebuild.rs[61-88]

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

### Issue description
`resolve_selection()` uses `.modules.yaml.pendingBuilds` entries as path components and calls `is_file()` to distinguish workspace importer IDs from dependency dep-paths. Because `pendingBuilds` is on-disk state and should be treated as attacker-controlled, an entry can be absolute or contain `..` and cause `pnpm rebuild --pending` to probe arbitrary filesystem locations (existence/type checks) and/or waste I/O.

### Issue Context
The current logic:
- reads `.modules.yaml`
- for each `pendingBuilds` entry, does `lockfile_dir.join(entry).join("package.json").is_file()`

Rust `Path::join` will discard the prefix when `entry` is absolute, and `..` segments can escape the intended directory.

### Fix Focus Areas
- pnpm/crates/cli/src/cli_args/rebuild.rs[61-88]

### Suggested fix
Prefer a *data-based* classification rather than filesystem probing:
1. Load a trusted set of importer IDs (e.g., from the current lockfile importers, or from the materialization lockfile already available in `State`/install pipeline).
2. Classify `pendingBuilds` entries as projects if `entry` is in that importer-id set; otherwise treat as dep paths.

If you must keep filesystem probing, add a strict normalization/containment check before `is_file()` (and consider bounding/short-circuiting on obviously invalid inputs) to prevent probing unrelated paths.

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


16. Fast-path loads allowBuilds 🐞 Bug ➹ Performance
Description
The no-op frozen fast path now depends on .modules.yaml’s recorded allowBuilds policy
(has_revoked_allowed_builds), so the previously “lightweight” ModulesLayout deserialization must
include the full allow_builds map. This adds extra allocation/CPU proportional to the size of
allowBuilds for repeated installs, weakening the intent of ModulesLayout as a minimal,
fast-to-read structure.
Code

pnpm/crates/package-manager/src/install.rs[R1454-1457]

+            // The mirror image: an approval the user has since withdrawn
+            // must be re-evaluated, or a strict install would exit 0 on a
+            // package it is no longer allowed to build.
+            && !has_revoked_allowed_builds(modules, config)
Evidence
install.rs adds has_revoked_allowed_builds(modules, config) to the frozen no-op condition; that
helper reads modules.allow_builds. ModulesLayout now includes an allow_builds field, meaning
the fast path’s layout read must deserialize this map.

pnpm/crates/package-manager/src/install.rs[1435-1458]
pnpm/crates/package-manager/src/install.rs[2595-2604]
pnpm/crates/modules-yaml/src/lib.rs[214-256]

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

### Issue description
`ModulesLayout` is meant to avoid deserializing large `.modules.yaml` sections (e.g., hoisted maps). This PR adds revoked-approval detection on the fast path (`has_revoked_allowed_builds`), which requires deserializing `modules.allow_builds`. While typically small, this makes the fast path’s cost scale with policy size.

### Issue Context
Correctness-wise, the fast path needs *some* way to detect that previously-recorded approvals were removed. It likely doesn’t need the full `BTreeMap<String, AllowBuildValue>` to do so.

### Fix Focus Areas
- pnpm/crates/modules-yaml/src/lib.rs[214-256]
- pnpm/crates/package-manager/src/install.rs[1435-1458]
- pnpm/crates/package-manager/src/install.rs[2595-2604]

### Implementation direction (options)
- **Option A (schema-level):** Persist only the set (or checksum) of *approved=true* keys from the last install (e.g., `allowBuildsApproved: [String]` or `allowBuildsChecksum: String`) and use that for revocation detection, instead of deserializing the whole map.
- **Option B (keep schema, reduce work):** If only `true` entries matter for revocation, consider serializing only those `true` entries into `.modules.yaml` (omit `false` entries) to cap size.

### Acceptance criteria
- Revoked approvals still force the fast path to fall through to full install.
- Repeated install fast path does not require allocating/deserializing an arbitrarily large `allowBuilds` map when a smaller representation would suffice.

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


17. allowBuilds URL key leakage 🐞 Bug ⛨ Security
Description
build_modules_manifest now persists the full allowBuilds key set into
node_modules/.modules.yaml, which can include URL-like artifact identifiers. If a user’s
allowBuilds key embeds URL userinfo (credentials/tokens), those secrets will be written into local
state files and can be inadvertently exposed via backups, archives, or bug reports.
Code

pnpm/crates/package-manager/src/install.rs[R2663-2675]

+        // The build policy this install ran under, so the next one can
+        // tell an approval the user has since withdrawn from a package
+        // that was never approved (see [`has_revoked_allowed_builds`]).
+        // Omitted when empty, matching pnpm's omit-when-empty encoding.
+        allow_builds: (!config.allow_builds.is_empty()).then(|| {
+            config
+                .allow_builds
+                .iter()
+                .map(|(spec, &allowed)| {
+                    (spec.clone(), pacquet_modules_yaml::AllowBuildValue::Bool(allowed))
+                })
+                .collect()
+        }),
Evidence
The PR introduces serialization of config.allow_builds into .modules.yaml. The repo explicitly
documents that allowBuilds keys may be URL-like and contain :, and the build-policy machinery
can produce non-semver artifact keys that are not just plain package names, making it possible for
sensitive URL forms to be persisted.

pnpm/crates/package-manager/src/install.rs[2663-2675]
pnpm/crates/workspace-manifest-writer/src/edit.rs[937-966]
pnpm/crates/package-manager/src/build_modules.rs[266-275]

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

### Issue description
`allowBuilds` policy entries are now serialized into `node_modules/.modules.yaml`. `allowBuilds` keys are allowed to be artifact identifiers that can contain `:` (e.g., URL-like forms), so if a key embeds URL userinfo (credentials/tokens), those secrets can be persisted to disk.

### Issue Context
- This PR adds writing `Modules.allow_builds` from `config.allow_builds`.
- The workspace YAML tooling explicitly supports `allowBuilds` keys that may contain `:` (e.g., `foo@https://...`), implying URL-like identifiers are expected.

### Fix Focus Areas
- pnpm/crates/package-manager/src/install.rs[2663-2675]

### Suggested fix
- Normalize/redact potentially sensitive parts of `allowBuilds` keys before writing them to `.modules.yaml` (e.g., strip URL userinfo from URL-like keys).
- Ensure the same normalization is applied when comparing the recorded policy to the current config (so revocation detection still works). If a safe reversible normalization isn’t possible, consider recording a separate derived identifier (e.g., a hashed key) alongside the raw key and use that for comparison.

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


18. Pending rebuild reads full manifest ✓ Resolved 🐞 Bug ➹ Performance
Description
rebuild --pending uses read_modules_manifest, forcing deserialization of the entire
.modules.yaml (including potentially very large hoisted maps) even though it only needs
pendingBuilds. This adds avoidable CPU and memory overhead on large workspaces and scales with
manifest size unnecessarily.
Code

pnpm/crates/cli/src/cli_args/rebuild.rs[R66-71]

+    let Some(modules) = read_modules_manifest::<Host>(&config.modules_dir).into_diagnostic()?
+    else {
+        return Ok(RebuildSelection { names: Some(Vec::new()), projects: Vec::new() });
+    };
+    let (dep_paths, projects): (Vec<&String>, Vec<&String>) =
+        modules.pending_builds.iter().partition(|entry| entry.parse::<PackageKey>().is_ok());
Evidence
The changed resolve_selection reads the full manifest to access pending_builds. The modules-yaml
crate documents ModulesLayout as a lightweight type designed to avoid massive allocations by
skipping large maps, while still containing pending_builds, making it a better fit for this code
path.

pnpm/crates/cli/src/cli_args/rebuild.rs[55-80]
pnpm/crates/modules-yaml/src/lib.rs[214-233]

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

### Issue description
`resolve_selection(..., pending=true, ...)` reads the full modules manifest via `read_modules_manifest`, but it only uses `pending_builds`. This unnecessarily parses/allocates large structures (e.g., hoisted dependency maps) for `pnpm rebuild --pending`.

### Issue Context
`pacquet_modules_yaml::ModulesLayout` exists specifically as a lightweight alternative that skips deserializing potentially large maps, and it still includes `pending_builds`.

### Fix Focus Areas
- pnpm/crates/cli/src/cli_args/rebuild.rs[66-80]
- pnpm/crates/modules-yaml/src/lib.rs[214-233]

### Suggested fix
- Replace `read_modules_manifest::<Host>(...)` with `read_modules_layout::<Host>(...)` in the `--pending` path.
- Continue to use `pending_builds` from the layout, partitioning entries the same way as today.

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


19. merge_pending_builds uses Vec contains ✓ Resolved 📘 Rule violation ➹ Performance
Description
merge_pending_builds deduplicates entries by calling pending.contains(&entry) inside a loop,
making the merge O(n²) as pendingBuilds grows. This adds avoidable CPU overhead on an install hot
path when many deferred builds are recorded (e.g., large dependency graphs or --ignore-scripts).
Code

pnpm/crates/package-manager/src/install.rs[R2709-2716]

+    let retained = previous
+        .iter()
+        .filter(|entry| current.is_some_and(|current| current_contains_dep_path(current, entry)));
+    let mut pending: Vec<String> = Vec::new();
+    for entry in retained.cloned().chain(deferred) {
+        if !pending.contains(&entry) {
+            pending.push(entry);
+        }
Evidence
PR Compliance ID 11 requires avoiding unnecessary repeated work inside loops, and the cited code
builds pendingBuilds by repeatedly performing pending.contains(&entry) membership checks against
a growing Vec. Because each contains is a linear scan of the accumulated entries, doing it for
each candidate entry makes the overall merge quadratic in the number of carried-over plus newly
deferred entries, demonstrating the avoidable repeated work and overhead.

AGENTS.md: Prefer async/await and async filesystem APIs; parallelize independent work safely
pnpm/crates/package-manager/src/install.rs[2709-2716]
pnpm/crates/package-manager/src/install.rs[2709-2717]

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

## Issue description
`merge_pending_builds` performs order-preserving deduplication by repeatedly scanning a growing `Vec` via `pending.contains(&entry)`, which makes the merge O(n^2) and introduces avoidable CPU overhead during installs.

## Issue Context
`pendingBuilds` can become large with big dependency graphs (many packages can have build scripts), especially in scenarios like `--ignore-scripts`, and this code runs on the install hot path while writing `.modules.yaml`. The current behavior appears to intentionally preserve stable output ordering (carried-over entries first, then newly deferred), so the fix should keep that ordering while making membership checks efficient.

## Fix Focus Areas
- pnpm/crates/package-manager/src/install.rs[2694-2719]

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



Informational

20. Linear pending project filter 🐞 Bug ➹ Performance
Description
On the rebuild --pending path, projects_to_run is computed by checking
rebuild.pending_projects.contains(importer_id) for each workspace project, yielding O(n*m)
behavior (and settles_project() is also linear). Large workspaces with many deferred projects can
pay avoidable overhead on a hot command path.
Code

pnpm/crates/package-manager/src/install.rs[R2159-2172]

+        let projects_to_run: Vec<(std::path::PathBuf, &PackageManifest)> = if is_full_install
+            && !config.ignore_scripts
+        {
+            materialized_project_manifests.clone()
+        } else if let Some(rebuild) = rebuild.as_ref().filter(|_| !config.ignore_scripts) {
+            materialized_project_manifests
+                .iter()
+                .filter(|(project_dir, _)| {
+                    let importer_id =
+                        pacquet_workspace::importer_id_from_root_dir(&workspace_root, project_dir);
+                    rebuild.pending_projects.contains(&importer_id)
+                })
+                .cloned()
+                .collect()
Evidence
The code explicitly performs Vec::contains() in a per-project filter, and pending_projects is
defined as a Vec<String> in RebuildOptions, making membership linear.

pnpm/crates/package-manager/src/install.rs[2149-2172]
pnpm/crates/package-manager/src/build_modules.rs[346-379]

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

### Issue description
`RebuildOptions::pending_projects` is a `Vec<String>`, but it’s used as a membership test:
- `install.rs` filters all materialized projects with `pending_projects.contains(...)`
- `RebuildOptions::settles_project()` uses `.iter().any(...)`

This makes both operations linear in the number of pending projects, and the filter becomes O(n*m) for n projects and m pending entries.

### Issue Context
This is exercised specifically by `pnpm rebuild --pending`, which may operate on workspaces with many importers.

### Fix Focus Areas
- pnpm/crates/package-manager/src/install.rs[2159-2172]
- pnpm/crates/package-manager/src/build_modules.rs[346-379]

### Suggested fix
Switch `pending_projects` to a `HashSet<String>` (or add a cached `HashSet` view) and:
- use `pending_projects.contains(&importer_id)` in O(1)
- implement `settles_project()` as a set membership check

If you want to avoid a struct-level type change, build a `HashSet<&str>` once in `install.rs` before the `.filter(...)` and use that for membership checks.

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


Grey Divider

Qodo Logo

@qodo-code-review

qodo-code-review Bot commented Jul 19, 2026 •

Copy link
Copy Markdown

PR Code Suggestions ✨

Latest suggestions up to ecf2cf2

Warning

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

CategorySuggestion                                                                                                                                    Impact
Possible issue
Preserve deferred workspace project entries

Update retained logic to check current.importers in addition to
current_contains_dep_path to avoid mistakenly dropping workspace project
entries.

pnpm/crates/package-manager/src/install.rs [3078-3080]

 let retained = previous.iter().filter(|entry| {
-    current.is_some_and(|current| current_contains_dep_path(current, entry)) && !settled(entry)
+    current.is_some_and(|current| {
+        current.importers.contains_key(entry.as_str())
+            || current_contains_dep_path(current, entry)
+    }) && !settled(entry)
 });

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 9

__

Why: This suggestion accurately catches a critical logic bug where workspace project entries in pendingBuilds would be inadvertently dropped because current_contains_dep_path fails for importer IDs.

High
  • Update

Previous suggestions

Suggestions up to commit a9a48e2
CategorySuggestion                                                                                                                                    Impact
Possible issue
Preserve pending project entries

Update the filter condition to check both current.importers and dependency
paths. This prevents pending workspace projects from being accidentally removed.

pnpm/crates/package-manager/src/install.rs [3019-3021]

 let retained = previous.iter().filter(|entry| {
-    current.is_some_and(|current| current_contains_dep_path(current, entry)) && !settled(entry)
+    current.is_some_and(|current| {
+        current.importers.contains_key(entry.as_str())
+            || current_contains_dep_path(current, entry)
+    }) && !settled(entry)
 });
Suggestion importance[1-10]: 9

__

Why: This addresses a critical logical bug where pending workspace projects are inadvertently dropped from the pendingBuilds tracking before they can be executed.

High
General
Preserve isolated test configuration

Append the allowBuilds configuration to pnpm-workspace.yaml instead of
overwriting the file. This preserves essential test isolation settings.

pnpm/crates/cli/tests/current_lockfile.rs [77-81]

-fs::write(
-    workspace.join("pnpm-workspace.yaml"),
+let workspace_yaml_path = workspace.join("pnpm-workspace.yaml");
+let mut workspace_yaml =
+    fs::read_to_string(&workspace_yaml_path).expect("read pnpm-workspace.yaml");
+if !workspace_yaml.ends_with('\n') {
+    workspace_yaml.push('\n');
+}
+workspace_yaml.push_str(
     "allowBuilds:\n  '@pnpm.e2e/failing-postinstall': true\n",
-)
-.expect("write pnpm-workspace.yaml");
+);
+fs::write(workspace_yaml_path, workspace_yaml)
+    .expect("write pnpm-workspace.yaml");
Suggestion importance[1-10]: 8

__

Why: This prevents the test from overwriting the workspace configuration, which would break test isolation and potentially pollute the user's real package store.

Medium
Suggestions up to commit 07ffbbb
CategorySuggestion                                                                                                                                    Impact
Possible issue
Preserve deferred project build entries

Update the filter predicate to retain both importer IDs and dependency paths.
This ensures pending project builds are not lost before their lifecycle scripts
can run.

pnpm/crates/package-manager/src/install.rs [3004-3006]

 let retained = previous.iter().filter(|entry| {
-    current.is_some_and(|current| current_contains_dep_path(current, entry)) && !settled(entry)
+    current.is_some_and(|current| {
+        current.importers.contains_key(entry.as_str())
+            || current_contains_dep_path(current, entry)
+    }) && !settled(entry)
 });
Suggestion importance[1-10]: 9

__

Why: The suggestion fixes a critical logical bug that would unintentionally discard pending project builds (importers) by updating the filter to preserve them alongside dependency paths.

High
General
Preserve isolated test workspace settings

Append the allowBuilds configuration to pnpm-workspace.yaml rather than
overwriting the file. This preserves the isolated store and cache configurations
initially set up by the test harness.

pnpm/crates/cli/tests/current_lockfile.rs [77-81]

-fs::write(
-    workspace.join("pnpm-workspace.yaml"),
+let workspace_yaml_path = workspace.join("pnpm-workspace.yaml");
+let mut workspace_yaml =
+    fs::read_to_string(&workspace_yaml_path).expect("read pnpm-workspace.yaml");
+if !workspace_yaml.ends_with('\n') {
+    workspace_yaml.push('\n');
+}
+workspace_yaml.push_str(
     "allowBuilds:\n  '@pnpm.e2e/failing-postinstall': true\n",
-)
-.expect("write pnpm-workspace.yaml");
+);
+fs::write(workspace_yaml_path, workspace_yaml).expect("write pnpm-workspace.yaml");
Suggestion importance[1-10]: 7

__

Why: The suggestion prevents test isolation leakage by properly appending to pnpm-workspace.yaml instead of overwriting the test harness's crucial environment configurations.

Medium
Suggestions up to commit 0b11105
CategorySuggestion                                                                                                                                    Impact
Possible issue
Preserve deferred project build entries

Update the retained filter to preserve pending project importer entries by
checking current.importers. This prevents importer entries from being
incorrectly discarded during installs and rebuilds.

pnpm/crates/package-manager/src/install.rs [3004-3006]

 let retained = previous.iter().filter(|entry| {
-    current.is_some_and(|current| current_contains_dep_path(current, entry)) && !settled(entry)
+    current.is_some_and(|current| {
+        current.importers.contains_key(entry.as_str())
+            || current_contains_dep_path(current, entry)
+    }) && !settled(entry)
 });
Suggestion importance[1-10]: 10

__

Why: Fixes a critical logical bug in the PR where pending importer build entries are erroneously discarded, preventing the proper retention of deferred project scripts.

High
Suggestions up to commit d296ab0
CategorySuggestion                                                                                                                                    Impact
Possible issue
Preserve valid pending build entries

Update the filter for pending builds to preserve project importer IDs along with
dependency paths.

pnpm/crates/package-manager/src/install.rs [2814-2818]

-let retained = previous.iter().filter(|entry| {
-    current.is_some_and(|current| current_contains_dep_path(current, entry)) && !settled(entry)
-});
+let is_materialized = |entry: &str| {
+    current.is_some_and(|current| {
+        current.importers.contains_key(entry) || current_contains_dep_path(current, entry)
+    })
+};
+let retained = previous
+    .iter()
+    .filter(|entry| is_materialized(entry) && !settled(entry));
+let deferred = deferred.into_iter().filter(|entry| is_materialized(entry));
 let mut seen = HashSet::new();
-retained.cloned().chain(deferred).filter(|entry| seen.insert(entry.clone())).collect()
+retained
+    .cloned()
+    .chain(deferred)
+    .filter(|entry| seen.insert(entry.clone()))
+    .collect()
Suggestion importance[1-10]: 9

__

Why: This fixes a critical logical error where importer IDs would be lost during rebuilds because they fail the dependency path filter.

High
Drain only completed project builds

Drain only the projects that actually ran their lifecycle scripts.

pnpm/crates/package-manager/src/install.rs [2176-2186]

 if !projects_to_run.is_empty() {
     run_projects_lifecycle_scripts::<Reporter>(
         &projects_to_run,
         config,
         node_linker,
         &workspace_root,
     )?;
-    if let Some(rebuild) = rebuild.as_ref() {
-        drain_settled_projects::<Host>(&config.modules_dir, &rebuild.pending_projects)?;
+    if rebuild.is_some() {
+        let settled_projects = projects_to_run
+            .iter()
+            .map(|(project_dir, _)| {
+                pacquet_workspace::importer_id_from_root_dir(
+                    &workspace_root,
+                    project_dir,
+                )
+            })
+            .collect::<Vec<_>>();
+        drain_settled_projects::<Host>(&config.modules_dir, &settled_projects)?;
     }
 }
Suggestion importance[1-10]: 8

__

Why: This accurately fixes a logic bug where unselected pending projects could be incorrectly drained from the record.

Medium
General
Preserve isolated test store settings

Append the allowBuilds block to the existing pnpm-workspace.yaml instead of
overwriting it to preserve test isolation settings.

pnpm/crates/cli/tests/current_lockfile.rs [77-81]

-fs::write(
-    workspace.join("pnpm-workspace.yaml"),
+let workspace_yaml_path = workspace.join("pnpm-workspace.yaml");
+let mut workspace_yaml =
+    fs::read_to_string(&workspace_yaml_path).expect("read pnpm-workspace.yaml");
+if !workspace_yaml.ends_with('\n') {
+    workspace_yaml.push('\n');
+}
+workspace_yaml.push_str(
     "allowBuilds:\n  '@pnpm.e2e/failing-postinstall': true\n",
-)
-.expect("write pnpm-workspace.yaml");
+);
+fs::write(&workspace_yaml_path, workspace_yaml)
+    .expect("write pnpm-workspace.yaml");
Suggestion importance[1-10]: 8

__

Why: Overwriting the workspace YAML file breaks test isolation and could inadvertently pollute the user's local store.

Medium
Suggestions
CategorySuggestion                                                                                                                                    Impact
Possible issue
Preserve deferred workspace project builds

Update the filter condition to preserve workspace project IDs in pendingBuilds
by checking if the entry exists in current.importers.

pnpm/crates/package-manager/src/install.rs [2738-2741]

 let retained = previous.iter().filter(|entry| {
-    current.is_some_and(|current| current_contains_dep_path(current, entry))
-        && !rebuild.is_some_and(|rebuild| rebuild.settles(entry))
+    current.is_some_and(|current| {
+        current.importers.contains_key(entry)
+            || current_contains_dep_path(current, entry)
+    }) && !rebuild.is_some_and(|rebuild| rebuild.settles(entry))
 });
Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies a significant bug where workspace project IDs (like .) would be improperly dropped from pendingBuilds because they are not dependency paths, preventing deferred project scripts from being preserved.

High

@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

🧹 Nitpick comments (2)
pnpm/crates/cli/tests/current_lockfile.rs (1)

87-96: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Log the captured output before asserting on it.

This test captures raw process output via .output() (bypassing assert_cmd's automatic failure-output printing) but never prints it before the plain assert! calls. The duplicate-keys test later in this file (lines 248-262) follows the correct pattern by eprintln!-ing the combined stdout/stderr before asserting — this test should do the same so a CI failure here is debuggable.

As per path instructions ("Test logging: log before non-assert_eq! assertions... prefer eprintln! for multiline strings").

🪵 Proposed fix
     let output = rerun(&workspace)
         .with_args(["install", "--frozen-lockfile"])
         .output()
         .expect("run the frozen install");
+    eprintln!(
+        "frozen install output:\n{}{}",
+        String::from_utf8_lossy(&output.stdout),
+        String::from_utf8_lossy(&output.stderr),
+    );
     assert!(!output.status.success(), "a failing postinstall must fail the install");
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pnpm/crates/cli/tests/current_lockfile.rs` around lines 87 - 96, Log the
captured `output` before the plain assertions in the frozen-install test,
following the duplicate-keys test’s `eprintln!` pattern. Combine and print
stdout and stderr in a readable multiline message, then retain the existing
success-status and `CURRENT_LOCKFILE` assertions unchanged.
pnpm/crates/cli/tests/lifecycle_scripts.rs (1)

914-956: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Good coverage for the basic deferred-project + deferred-dependency case.

Consider also covering the case where a project entry (".") recorded by an earlier --ignore-scripts install survives (or correctly doesn't survive) a later partial install (e.g. pacquet add) that neither re-defers it nor actually runs the project's own scripts — this is the scenario flagged in the install.rs review for merge_pending_builds.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pnpm/crates/cli/tests/lifecycle_scripts.rs` around lines 914 - 956, The
pending-builds tests only cover a single deferred install and should also
exercise merge behavior across a later partial install. Extend the
pending_builds test module with a scenario that performs an initial
--ignore-scripts install recording "." and its dependency, then runs a partial
pacquet add that neither defers nor executes the project’s own scripts, and
assert read_pending_builds reflects the intended preservation or removal of "."
while retaining correct dependency entries.
🤖 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/install.rs`:
- Around line 2027-2044: Prevent root-project entries such as "." from being
persisted in pending_builds by filtering them out in the deferred_projects
construction within install.rs, or alternatively update rebuild --pending in
rebuild.rs to detect and execute root lifecycle scripts and drain those entries.
Ensure non-root package rebuild keys retain their existing behavior and no root
entry remains indefinitely in .modules.yaml.

---

Nitpick comments:
In `@pnpm/crates/cli/tests/current_lockfile.rs`:
- Around line 87-96: Log the captured `output` before the plain assertions in
the frozen-install test, following the duplicate-keys test’s `eprintln!`
pattern. Combine and print stdout and stderr in a readable multiline message,
then retain the existing success-status and `CURRENT_LOCKFILE` assertions
unchanged.

In `@pnpm/crates/cli/tests/lifecycle_scripts.rs`:
- Around line 914-956: The pending-builds tests only cover a single deferred
install and should also exercise merge behavior across a later partial install.
Extend the pending_builds test module with a scenario that performs an initial
--ignore-scripts install recording "." and its dependency, then runs a partial
pacquet add that neither defers nor executes the project’s own scripts, and
assert read_pending_builds reflects the intended preservation or removal of "."
while retaining correct dependency entries.
🪄 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: 597ae04c-0277-4bf7-9aed-b54ca3d18211

📥 Commits

Reviewing files that changed from the base of the PR and between 31af30e and b2614b1.

📒 Files selected for processing (14)
  • .changeset/record-pending-builds.md
  • .changeset/revoked-build-approval-is-re-evaluated.md
  • pnpm/crates/cli/src/cli_args/rebuild.rs
  • pnpm/crates/cli/tests/current_lockfile.rs
  • pnpm/crates/cli/tests/install_filters.rs
  • pnpm/crates/cli/tests/lifecycle_scripts.rs
  • pnpm/crates/package-manager/src/build_modules.rs
  • pnpm/crates/package-manager/src/build_modules/tests.rs
  • pnpm/crates/package-manager/src/install.rs
  • pnpm/crates/package-manager/src/install/tests.rs
  • pnpm/crates/package-manager/src/install_frozen_lockfile.rs
  • pnpm/crates/package-manager/src/install_with_fresh_lockfile.rs
  • pnpm/crates/package-manifest/src/lib.rs
  • pnpm/plans/TEST_PORTING.md

@greptile-apps

greptile-apps Bot commented Jul 19, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

Safe to merge — both behavioral fixes are well-motivated, the logic paths are consistent, and the test suite directly exercises the corrected flows including failure cases.

The two new install-path checks are additive and defensively coded. The BuildModulesOutput refactor is mechanical with all call sites updated. drain_settled_projects correctly re-reads .modules.yaml after the main write. Tests cover the key invariants thoroughly.

No files require special attention.

Reviews (9): Last reviewed commit: "fix(package-manager): settle a pending d..." | Re-trigger Greptile

@github-actions

github-actions Bot commented Jul 19, 2026 •

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: a9a48e244122

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.466 ± 0.128 2.331 2.710 1.74 ± 0.14
pacquet@main 2.562 ± 0.164 2.340 2.747 1.81 ± 0.16
pnpr@HEAD 1.588 ± 0.157 1.339 1.787 1.12 ± 0.13
pnpr@main 1.417 ± 0.090 1.338 1.637 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.46625191854,
      "stddev": 0.1284014908332067,
      "median": 2.4272075629399996,
      "user": 1.5331661799999998,
      "system": 1.2386556199999998,
      "min": 2.33084827894,
      "max": 2.71027882294,
      "times": [
        2.4422334379399997,
        2.6658738889399998,
        2.39219341394,
        2.43732264794,
        2.71027882294,
        2.41709247794,
        2.3747138239399996,
        2.36808976894,
        2.33084827894,
        2.52387262394
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.56235140274,
      "stddev": 0.1640661907475546,
      "median": 2.62033789794,
      "user": 1.5181469800000003,
      "system": 1.2908118199999998,
      "min": 2.33994626294,
      "max": 2.7470792719399997,
      "times": [
        2.72619416694,
        2.33994626294,
        2.66192221994,
        2.7470792719399997,
        2.72062734394,
        2.5883820689399997,
        2.43912434194,
        2.40508051494,
        2.65229372694,
        2.3428641089399997
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.58791313394,
      "stddev": 0.1567054992863085,
      "median": 1.58867506594,
      "user": 1.0634155799999998,
      "system": 1.10998632,
      "min": 1.33870178994,
      "max": 1.78743810994,
      "times": [
        1.59118555294,
        1.58616457894,
        1.78743810994,
        1.62640169594,
        1.74326720294,
        1.5411535099400002,
        1.33870178994,
        1.78284019894,
        1.51207651294,
        1.36990218694
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.4173920920400003,
      "stddev": 0.08960926016297056,
      "median": 1.37768272094,
      "user": 1.02262948,
      "system": 1.1774286200000001,
      "min": 1.3384972539400002,
      "max": 1.63674789194,
      "times": [
        1.63674789194,
        1.3384972539400002,
        1.4495027849400002,
        1.44157886894,
        1.38037925994,
        1.36323012994,
        1.35405141194,
        1.4731383339400002,
        1.37498618194,
        1.36180880294
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 255.3 ± 7.6 246.8 270.5 1.02 ± 0.05
pacquet@main 250.1 ± 10.7 233.3 271.5 1.00
pnpr@HEAD 267.8 ± 7.8 256.3 282.1 1.07 ± 0.06
pnpr@main 272.2 ± 5.7 263.0 280.7 1.09 ± 0.05
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.25530748902,
      "stddev": 0.007611752687348957,
      "median": 0.25298950742000004,
      "user": 0.21812518,
      "system": 0.4964351599999999,
      "min": 0.24677505242000003,
      "max": 0.27048044042,
      "times": [
        0.25205846342,
        0.25611924242,
        0.25663336942,
        0.26603113142,
        0.24704976942,
        0.25264377642,
        0.25194840642,
        0.24677505242000003,
        0.25333523842,
        0.27048044042
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.25007669172,
      "stddev": 0.010740461875829197,
      "median": 0.24984401241999998,
      "user": 0.20694697999999997,
      "system": 0.51370326,
      "min": 0.23333185142,
      "max": 0.27150095342,
      "times": [
        0.25130496442,
        0.23959853542,
        0.25214255242,
        0.26174167142,
        0.24947023842000002,
        0.24360789642000003,
        0.27150095342,
        0.24785046742000003,
        0.25021778642,
        0.23333185142
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.26781540912,
      "stddev": 0.007807011948960901,
      "median": 0.26860520641999996,
      "user": 0.20718308,
      "system": 0.5425306599999999,
      "min": 0.25632851742,
      "max": 0.28211218242,
      "times": [
        0.27299930242,
        0.27082221142,
        0.28211218242,
        0.26464268341999997,
        0.25632851742,
        0.25762509942,
        0.27358088642,
        0.26736795642,
        0.26283279542,
        0.26984245642
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.27218015481999996,
      "stddev": 0.005677905076349908,
      "median": 0.27175354042,
      "user": 0.21485728,
      "system": 0.53731346,
      "min": 0.26299780742,
      "max": 0.28069523342,
      "times": [
        0.26299780742,
        0.27175657142,
        0.27760835042,
        0.27172647442,
        0.27175050942,
        0.27319069242,
        0.28069523342,
        0.27865107442,
        0.26726193742,
        0.26616289742
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.720 ± 0.019 2.697 2.754 1.77 ± 0.17
pacquet@main 2.706 ± 0.014 2.687 2.734 1.76 ± 0.17
pnpr@HEAD 1.534 ± 0.146 1.388 1.820 1.00
pnpr@main 1.567 ± 0.148 1.387 1.819 1.02 ± 0.14
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.7200600064600002,
      "stddev": 0.018903404484983073,
      "median": 2.7160854638600003,
      "user": 1.5952532,
      "system": 1.2922803999999999,
      "min": 2.69695248886,
      "max": 2.75448226586,
      "times": [
        2.6969815928600003,
        2.69695248886,
        2.71048881886,
        2.7244868898600005,
        2.7371726888600003,
        2.72035099186,
        2.7118199358600004,
        2.75448226586,
        2.7087242068600004,
        2.73914018486
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.7064891117600003,
      "stddev": 0.014485399914996281,
      "median": 2.7065220773600003,
      "user": 1.5832882,
      "system": 1.2641196,
      "min": 2.68740158186,
      "max": 2.73376693486,
      "times": [
        2.73376693486,
        2.69972708386,
        2.7132390758600002,
        2.68740158186,
        2.72136972486,
        2.6874453448600004,
        2.7110758928600003,
        2.7044639418600003,
        2.7085802128600003,
        2.6978213238600004
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.53395574296,
      "stddev": 0.14625141667825015,
      "median": 1.50115407586,
      "user": 0.9827842,
      "system": 1.1316280000000003,
      "min": 1.38785610686,
      "max": 1.82028490386,
      "times": [
        1.69056273186,
        1.40868488786,
        1.67327496986,
        1.82028490386,
        1.51523636786,
        1.48783505086,
        1.39803508386,
        1.44331422586,
        1.38785610686,
        1.5144731008599999
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 1.5671575240599998,
      "stddev": 0.1483919989287952,
      "median": 1.51478218436,
      "user": 0.9243781999999999,
      "system": 1.1768041000000002,
      "min": 1.38683908186,
      "max": 1.81875514986,
      "times": [
        1.38683908186,
        1.47472025486,
        1.40376252886,
        1.60733055486,
        1.52540706186,
        1.49500301586,
        1.50415730686,
        1.6892086078600002,
        1.76639167786,
        1.81875514986
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 549.9 ± 8.8 534.2 563.9 1.89 ± 0.06
pacquet@main 538.2 ± 8.3 524.5 552.3 1.85 ± 0.06
pnpr@HEAD 290.2 ± 8.6 271.6 299.9 1.00
pnpr@main 297.1 ± 5.4 287.2 309.0 1.02 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.5499447081000001,
      "stddev": 0.008837165653266537,
      "median": 0.5502844839000001,
      "user": 0.6844366799999999,
      "system": 0.63983146,
      "min": 0.5341684659,
      "max": 0.5639256499,
      "times": [
        0.5447886179,
        0.5521000779,
        0.5541225389000001,
        0.5639256499,
        0.5453459979,
        0.5588946459,
        0.5484688899,
        0.5341684659,
        0.5416104519,
        0.5560217449
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.5382072004,
      "stddev": 0.008310770287626784,
      "median": 0.5364339473999999,
      "user": 0.6544378799999999,
      "system": 0.6509169600000001,
      "min": 0.5244984639,
      "max": 0.5522714909,
      "times": [
        0.5342988219,
        0.5427676409000001,
        0.5379015159,
        0.5320329129,
        0.5451358419000001,
        0.5462232599,
        0.5349663789,
        0.5522714909,
        0.5244984639,
        0.5319756769
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.29023429250000005,
      "stddev": 0.008554506499117402,
      "median": 0.2922958404,
      "user": 0.18097987999999998,
      "system": 0.50526066,
      "min": 0.2716265149,
      "max": 0.2999353339,
      "times": [
        0.2926798779,
        0.2716265149,
        0.2842526669,
        0.29265608390000003,
        0.28259305090000003,
        0.29193559690000004,
        0.29179231790000004,
        0.29870038790000003,
        0.2961710939,
        0.2999353339
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.29709114970000006,
      "stddev": 0.005380348035308452,
      "median": 0.2969612224,
      "user": 0.18863977999999998,
      "system": 0.5275148599999999,
      "min": 0.2872213369,
      "max": 0.3090019699,
      "times": [
        0.2967051499,
        0.29825409690000004,
        0.29559859590000004,
        0.29952457990000003,
        0.2939074799,
        0.29721729490000004,
        0.2959645649,
        0.2872213369,
        0.2975164279,
        0.3090019699
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.854 ± 0.011 1.839 1.878 6.25 ± 0.21
pacquet@main 1.853 ± 0.013 1.830 1.873 6.25 ± 0.21
pnpr@HEAD 0.297 ± 0.008 0.280 0.308 1.00 ± 0.04
pnpr@main 0.297 ± 0.010 0.280 0.305 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.85391693964,
      "stddev": 0.010750996200563653,
      "median": 1.85252596894,
      "user": 0.91433716,
      "system": 0.7241507399999998,
      "min": 1.83903027144,
      "max": 1.87789161344,
      "times": [
        1.85678247344,
        1.84714556544,
        1.85221897044,
        1.8459374994400002,
        1.86119224144,
        1.85888682944,
        1.8472509644400001,
        1.83903027144,
        1.85283296744,
        1.87789161344
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.85308127984,
      "stddev": 0.012791508002017336,
      "median": 1.8536895959400002,
      "user": 0.8737668599999999,
      "system": 0.7605459399999999,
      "min": 1.83030903444,
      "max": 1.8731179124400001,
      "times": [
        1.8462296504400002,
        1.86682146444,
        1.8591435124400002,
        1.8614785604400002,
        1.8512730894400002,
        1.84368843344,
        1.8731179124400001,
        1.85610610244,
        1.8426450384400002,
        1.83030903444
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.29669708354,
      "stddev": 0.007822575712919963,
      "median": 0.29839837094,
      "user": 0.19846336,
      "system": 0.50629224,
      "min": 0.28037770044,
      "max": 0.30800886144,
      "times": [
        0.28037770044,
        0.28727669344,
        0.29480347944,
        0.29854668944,
        0.29993843144,
        0.29825005243999997,
        0.29666195944,
        0.30099824844,
        0.30210871944,
        0.30800886144
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.29651476013999994,
      "stddev": 0.009598458192713669,
      "median": 0.30142246693999997,
      "user": 0.18687256000000002,
      "system": 0.5227540399999999,
      "min": 0.27996333944,
      "max": 0.30521044144,
      "times": [
        0.30521044144,
        0.28902576743999997,
        0.28157553644,
        0.27996333944,
        0.30366366744,
        0.30107229743999997,
        0.30289338643999997,
        0.30177263644,
        0.29573998344,
        0.30423054544
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 323.1 ± 3.8 313.8 327.7 3.89 ± 0.09
pacquet@main 326.5 ± 6.7 316.2 340.4 3.93 ± 0.11
pnpr@HEAD 83.1 ± 1.6 81.4 87.4 1.00
pnpr@main 83.5 ± 1.9 81.6 88.0 1.00 ± 0.03
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.32307042072000003,
      "stddev": 0.0038300689677797685,
      "median": 0.32412532442,
      "user": 0.32164682,
      "system": 0.04574908,
      "min": 0.31380072442,
      "max": 0.32769306842,
      "times": [
        0.32576373542000003,
        0.32168409142,
        0.32769306842,
        0.32179261742000004,
        0.32475228042000004,
        0.32361212242000004,
        0.32148380442,
        0.32548323642,
        0.31380072442,
        0.32463852642
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.32653666002000004,
      "stddev": 0.0066932536578384865,
      "median": 0.32501597742,
      "user": 0.31907922,
      "system": 0.05118737999999999,
      "min": 0.31623765342,
      "max": 0.34043660042,
      "times": [
        0.32458113842,
        0.34043660042,
        0.32994999042,
        0.32449429442,
        0.31623765342,
        0.33229894342,
        0.32173526742,
        0.32845667742,
        0.32545081642,
        0.32172521842
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.08308556257151516,
      "stddev": 0.0016152051901263801,
      "median": 0.08245671442000001,
      "user": 0.01941452606060606,
      "system": 0.007971715757575756,
      "min": 0.08141356942000001,
      "max": 0.08737911542000001,
      "times": [
        0.08560079542000001,
        0.08583118942000001,
        0.08274512842000001,
        0.08273606142,
        0.08614724442,
        0.08737911542000001,
        0.08659420742000001,
        0.08206993642000002,
        0.08239028942000001,
        0.08236790742000001,
        0.08249396442000001,
        0.08197498742,
        0.08268416342000001,
        0.08141356942000001,
        0.08283171042000001,
        0.08219366842,
        0.08233185942000001,
        0.08245671442000001,
        0.08213668142000001,
        0.08203770542000001,
        0.08238199442000001,
        0.08233361342,
        0.08208159842000001,
        0.08299856542000002,
        0.08221273542000002,
        0.08256724242,
        0.08296157542000002,
        0.08165433342000002,
        0.08256826442000001,
        0.08651245342000001,
        0.08216331242000001,
        0.08272890642000001,
        0.08224207042000001
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.08345382402606065,
      "stddev": 0.0018622575503063146,
      "median": 0.08265330442000002,
      "user": 0.018746980606060604,
      "system": 0.008754453333333332,
      "min": 0.08158602542000001,
      "max": 0.08800426242,
      "times": [
        0.08475532342000001,
        0.08236746742,
        0.08187898742000001,
        0.08304718642000002,
        0.08179026942,
        0.08181242142000002,
        0.08208071542,
        0.08237661442000001,
        0.08249184042000002,
        0.08265330442000002,
        0.08202483142000001,
        0.08267127842000001,
        0.08211121342000001,
        0.08158602542000001,
        0.08289296742,
        0.08218862942,
        0.08188341442000001,
        0.08324658342,
        0.08665057342000002,
        0.08693614142000002,
        0.08219842742000001,
        0.08193925942000001,
        0.08428147142000002,
        0.08800426242,
        0.08564235442000001,
        0.08762247342000001,
        0.08548557842000001,
        0.08309434442000001,
        0.08261835842000001,
        0.08297617342000001,
        0.08604426142000002,
        0.08250419442000001,
        0.08411924542000002
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.549 ± 0.125 4.414 4.803 1.28 ± 0.05
pacquet@main 4.585 ± 0.165 4.422 4.858 1.29 ± 0.06
pnpr@HEAD 3.544 ± 0.100 3.443 3.777 1.00
pnpr@main 3.555 ± 0.131 3.449 3.862 1.00 ± 0.05
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.54893593184,
      "stddev": 0.12515817556679867,
      "median": 4.50972025384,
      "user": 1.6884031400000001,
      "system": 1.38816428,
      "min": 4.41353495334,
      "max": 4.8034753103400005,
      "times": [
        4.67067478634,
        4.8034753103400005,
        4.4463346473400005,
        4.45638507634,
        4.62701467734,
        4.41353495334,
        4.454303003340001,
        4.46854770834,
        4.550892799340001,
        4.59819635634
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.58546826174,
      "stddev": 0.16539377730040566,
      "median": 4.521131732840001,
      "user": 1.6678097399999998,
      "system": 1.3874235799999999,
      "min": 4.42240213334,
      "max": 4.858441103340001,
      "times": [
        4.44546554434,
        4.45746400634,
        4.42240213334,
        4.464002289340001,
        4.53733961834,
        4.58608084134,
        4.858441103340001,
        4.75415730034,
        4.8244059333400005,
        4.504923847340001
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.54418998604,
      "stddev": 0.10034673378737687,
      "median": 3.5257864003400003,
      "user": 1.1607775400000002,
      "system": 1.23539158,
      "min": 3.4430702833400004,
      "max": 3.7771123553400003,
      "times": [
        3.7771123553400003,
        3.4612302563400004,
        3.61153707334,
        3.52168855234,
        3.4463382693400004,
        3.4430702833400004,
        3.49685877934,
        3.52988424834,
        3.57271757134,
        3.58146247134
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 3.5554162549400004,
      "stddev": 0.13057150180212065,
      "median": 3.5025348723400005,
      "user": 1.17808384,
      "system": 1.2549211799999997,
      "min": 3.44875252434,
      "max": 3.8623859313400004,
      "times": [
        3.5021853293400005,
        3.8623859313400004,
        3.4962875333400003,
        3.6648561613400004,
        3.5028844153400005,
        3.44875252434,
        3.64169606634,
        3.5059927893400005,
        3.47816272934,
        3.45095906934
      ]
    }
  ]
}

@github-actions

github-actions Bot commented Jul 19, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13150
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,696.95 ms
(+1.46%)Baseline: 2,658.13 ms
3,189.76 ms
(84.55%)
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
🚷 view threshold
1,839.03 ms
(+0.72%)Baseline: 1,825.97 ms
2,191.16 ms
(83.93%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
534.17 ms
(+1.07%)Baseline: 528.51 ms
634.22 ms
(84.22%)
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
🚷 view threshold
313.80 ms
(-1.31%)Baseline: 317.96 ms
381.56 ms
(82.24%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,330.85 ms
(-0.70%)Baseline: 2,347.30 ms
2,816.76 ms
(82.75%)
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
🚷 view threshold
4,413.53 ms
(+0.00%)Baseline: 4,413.39 ms
5,296.07 ms
(83.34%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
246.78 ms
(+2.41%)Baseline: 240.96 ms
289.16 ms
(85.34%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Jul 19, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/13150
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,387.86 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
280.38 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
271.63 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
81.41 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
1,338.70 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
3,443.07 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
256.33 ms
🐰 View full continuous benchmarking report in Bencher

Copilot AI review requested due to automatic review settings July 19, 2026 17:32

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

Code review by qodo was updated up to the latest commit 38e1354

@qodo-code-review

qodo-code-review Bot commented Jul 19, 2026 •

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

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

CategorySuggestion                                                                                                                                    Impact
Possible issue
Preserve deferred workspace project builds

Update the filter condition to preserve workspace project IDs in pendingBuilds
by checking if the entry exists in current.importers.

pnpm/crates/package-manager/src/install.rs [2738-2741]

 let retained = previous.iter().filter(|entry| {
-    current.is_some_and(|current| current_contains_dep_path(current, entry))
-        && !rebuild.is_some_and(|rebuild| rebuild.settles(entry))
+    current.is_some_and(|current| {
+        current.importers.contains_key(entry)
+            || current_contains_dep_path(current, entry)
+    }) && !rebuild.is_some_and(|rebuild| rebuild.settles(entry))
 });

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies a significant bug where workspace project IDs (like .) would be improperly dropped from pendingBuilds because they are not dependency paths, preventing deferred project scripts from being preserved.

High
  • More

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

🧹 Nitpick comments (2)
pnpm/crates/cli/tests/lifecycle_scripts.rs (1)

26-41: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Document the same ordering hazard as set_strict_dep_builds.

append_workspace_yaml_key shares the exact truncation hazard that set_strict_dep_builds's doc comment (lines 10-15) explicitly warns about: since allow_builds truncates the file at the first "allowBuilds:" occurrence, any key appended after an allowBuilds: block already exists will be silently dropped by a later allow_builds call — with no assertion to catch it (the "key already exists" check only fires if the key is still present). Current call sites happen to call it before allow_builds, but nothing documents or enforces that ordering for future callers.

📝 Suggested doc addition
     /// Append a top-level `key: value` line. Only valid for keys the
     /// harness never writes; the assert fails loudly if that changes.
+    /// Must be called before [`allow_builds`], like
+    /// [`set_strict_dep_builds`] — a later `allow_builds` truncates the
+    /// file at `allowBuilds:`, silently dropping anything appended after
+    /// that point.
     pub fn append_workspace_yaml_key(workspace: &Path, key: &str, value: impl std::fmt::Display) {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pnpm/crates/cli/tests/lifecycle_scripts.rs` around lines 26 - 41, Update the
documentation comment for append_workspace_yaml_key to explicitly warn that
callers must invoke it before allow_builds, because later allow_builds calls
truncate content after the allowBuilds: block and can silently remove appended
keys. Keep the existing duplicate-key assertion and implementation unchanged.
pnpm/crates/cli/src/cli_args/rebuild.rs (1)

36-46: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Duplicated RebuildSelection { names: Some(...), projects: Vec::new() } construction. Both call sites build the identical "names-only" literal for the same reason (an approve-builds rebuild never has pending-project entries); a small constructor on RebuildSelection removes the duplication at its source.

  • pnpm/crates/cli/src/cli_args/rebuild.rs#L36-L46: add a convenience constructor, e.g. RebuildSelection::names_only(names: Vec<String>) -> Self { Self { names: Some(names), projects: Vec::new() } }.
  • pnpm/crates/cli/src/cli_args/dispatch_install.rs#L556-L580: replace the inline struct literal with super::rebuild::RebuildSelection::names_only(build_packages).
  • pnpm/crates/cli/src/cli_args/global.rs#L380-L425: replace the inline struct literal with crate::cli_args::rebuild::RebuildSelection::names_only(build_packages).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pnpm/crates/cli/src/cli_args/rebuild.rs` around lines 36 - 46, Remove
duplicated names-only RebuildSelection construction by adding
RebuildSelection::names_only(names: Vec<String>) in
pnpm/crates/cli/src/cli_args/rebuild.rs lines 36-46, initializing names and an
empty projects vector. Update pnpm/crates/cli/src/cli_args/dispatch_install.rs
lines 556-580 and pnpm/crates/cli/src/cli_args/global.rs lines 380-425 to use
this constructor instead of inline struct literals.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@pnpm/crates/cli/src/cli_args/rebuild.rs`:
- Around line 36-46: Remove duplicated names-only RebuildSelection construction
by adding RebuildSelection::names_only(names: Vec<String>) in
pnpm/crates/cli/src/cli_args/rebuild.rs lines 36-46, initializing names and an
empty projects vector. Update pnpm/crates/cli/src/cli_args/dispatch_install.rs
lines 556-580 and pnpm/crates/cli/src/cli_args/global.rs lines 380-425 to use
this constructor instead of inline struct literals.

In `@pnpm/crates/cli/tests/lifecycle_scripts.rs`:
- Around line 26-41: Update the documentation comment for
append_workspace_yaml_key to explicitly warn that callers must invoke it before
allow_builds, because later allow_builds calls truncate content after the
allowBuilds: block and can silently remove appended keys. Keep the existing
duplicate-key assertion and implementation unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 76694e1b-56fa-46b8-b924-e19560077328

📥 Commits

Reviewing files that changed from the base of the PR and between b2614b1 and 38e1354.

📒 Files selected for processing (10)
  • .changeset/record-pending-builds.md
  • pnpm/crates/cli/src/cli_args/dispatch_install.rs
  • pnpm/crates/cli/src/cli_args/global.rs
  • pnpm/crates/cli/src/cli_args/rebuild.rs
  • pnpm/crates/cli/tests/current_lockfile.rs
  • pnpm/crates/cli/tests/lifecycle_scripts.rs
  • pnpm/crates/napi/src/install.rs
  • pnpm/crates/package-manager/src/build_modules.rs
  • pnpm/crates/package-manager/src/build_modules/tests.rs
  • pnpm/crates/package-manager/src/install.rs
🚧 Files skipped from review as they are similar to previous changes (4)
  • .changeset/record-pending-builds.md
  • pnpm/crates/package-manager/src/build_modules/tests.rs
  • pnpm/crates/cli/tests/current_lockfile.rs
  • pnpm/crates/package-manager/src/install.rs

Copilot AI review requested due to automatic review settings July 19, 2026 19:05

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.

Comment thread pnpm/crates/package-manifest/src/lib.rs Resolved
Comment thread pnpm/crates/cli/src/cli_args/rebuild.rs Resolved
@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 9baf4aa

Copilot AI review requested due to automatic review settings July 19, 2026 19:23
zkochan added 6 commits July 19, 2026 23:11
…scripts succeed

A workspace project's lifecycle scripts run after `.modules.yaml` is
written, so clearing its `pendingBuilds` entry in `merge_pending_builds`
dropped the debt before the work happened: a failing project script left
`pnpm rebuild --pending` reporting an error while the record said the
project was already built, and a rerun would skip it.

`merge_pending_builds` now settles only dependencies — their build phase
has already run by the time the file is written — and a new
`drain_settled_projects` rewrites the manifest to drop the project
entries after `run_projects_lifecycle_scripts` returns Ok. A script that
fails propagates before the drain, so the entry survives.

Regression test: `pending_builds::a_failed_project_script_keeps_its_pending_entry`.
Rust's `Path::join` replaces the base when the joined component is
absolute, so `lockfile_dir.join("/[email protected]")` escapes the workspace
and stats the host root. An importer id is always relative, so an
absolute `pendingBuilds` entry is a dependency by construction and is
classified without touching the filesystem.
…ld built it

merge_pending_builds dropped a dependency from pendingBuilds whenever the
rebuild selected it, but BuildModules still refuses to run a package's
scripts when allowBuilds leaves it undecided or denied. A `pnpm rebuild
--pending` could therefore erase deferred build debt without running
anything, so a later --pending reported nothing owed while the build was
still unapproved.

A dependency is now settled only when the rebuild both selected it and
the allowBuilds policy approves it — on a rebuild a selected, approved
package always runs (force-rebuild bypasses the side-effects cache gate),
so policy approval is a faithful stand-in for "was rebuilt". This mirrors
pnpm, which drops only the packages after-install actually rebuilt.

Regression test:
pending_builds::rebuild_pending_keeps_a_dependency_the_policy_still_blocks.
Copilot AI review requested due to automatic review settings July 19, 2026 21:15

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 merged commit 6f83d81 into main Jul 19, 2026
31 checks passed
@zkochan
zkochan deleted the stage-3 branch July 19, 2026 21:20
@qodo-code-review

Copy link
Copy Markdown

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

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