Skip to content

chore(fork): sync with upstream main 736ffe4 - #92

Merged
jadoonf merged 1183 commits into
mainfrom
garnet/sync-upstream-736ffe4
Oct 7, 2026
Merged

jadoonf merged 1183 commits into
mainfrom
garnet/sync-upstream-736ffe4

Conversation

@jadoonf

@jadoonf jadoonf commented Oct 7, 2026 •

Copy link
Copy Markdown

Summary

Fork-only sync. This is a merge commit with two parents: fork main (7243d0e) and upstream main (736ffe4). Fork history is kept, with no force-push or reset. After the merge, the fork's source, workflows and reviewer setup match upstream (AGENTS.md, .agents/skills/review-code/references/REVIEW_GUIDE.md, .coderabbit.yaml, .pr_agent.toml, ci.yml, which already runs garnet-org/action v2.3.0).

Exact divergence from upstream after merge (git diff upstream/main HEAD):

  • Added (33): fork Garnet machinery only: garnet-* workflows and scripts (including the mirror-only version from the last fork PR), .github/scripts/__fixtures__/, .github/garnet-gate/, and .garnet/.
  • Modified (3):
    • REVIEW_GUIDE.md gains one line: "For changes to network, registry, config or build-script gates, read the Garnet comment for the head commit and name any added program or host, tied to the diff. Missing or incomplete evidence is not a pass."
    • .coderabbit.yaml keeps all of upstream's settings and adds a path_instructions entry for network, registry, config and build-gate paths, telling CodeRabbit to read the mirrored record in the description and refuse stale or missing evidence. It also adds a fork-only auto_review.base_branches for the routing experiment base.
    • .husky/reject-bare-mentions.mjs keeps the fork's hook fix.

Removed from the fork's own reviewer stack: REVIEW.md, the root REVIEW_GUIDE.md and its references, the garnet-runtime-review skill, .greptile/, .github/copilot-instructions.md, and the fork edits to AGENTS.md, .pr_agent.toml and ci.yml.

The tree equals the reviewed twin branch plus the mirror-only change that landed on main.

Squash Commit Body

Merge, do not squash: keeps fork history and records upstream main 736ffe4 as a parent.

Checklist

  • Fork-only; no published package changes.

Link to Devin session: https://app.devin.ai/sessions/b554fb265c3347cfb2b92892896f618d
Open in Devin Desktop: https://app.devin.ai/desktop/session/b554fb265c3347cfb2b92892896f618d?variant=devin
Requested by: @jadoonf


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

Runtime evidence (Garnet)

Kernel-recorded execution record for head b97c998 (1 job, recorded 2026-10-07 20:46:06 UTC), copied from the sticky Garnet Runtime Review comment on this PR so reviewers that read only the description ground in the same bytes. The comment is the source: it gains jobs as they finish and this block follows it. Facts only. Judgment stays with the reviewer.

Execution record, copied from the comment (1 job, recorded 2026-10-07 20:46:06 UTC)

Execution Profiles recorded for 1 job, triggered by b97c998

27 destinations
recorded at the kernel by Garnet · 2026-10-07 20:46 UTC

TS CI / test ↗ · 27 destinations
systemd
├─ bash
│  └─ bash
│     └─ bash
│        └─ bash
│           └─ bash
│              └─ bash
│                 ├─ bash
│                 │  ├─ node
│                 │  │  ├─ git (step: "<unknown>")
│                 │  │  │  ├─ git
│                 │  │  │  │  └─ git
│                 │  │  │  │     └─ git-remote-http
│                 │  │  │  │        └─ ○ github[.]com
│                 │  │  │  └─ ○ 192.168.127.1
│                 │  │  └─ pn (step: "Validate test chunk inputs")
│                 │  │     ├─ dash
│                 │  │     │  └─ node
│                 │  │     │     └─ pn
│                 │  │     │        └─ dash
│                 │  │     │           └─ pn
│                 │  │     │              └─ dash
│                 │  │     │                 └─ pnpm
│                 │  │     │                    └─ dash
│                 │  │     │                       └─ node
│                 │  │     │                          ├─ ○ codeload.github[.]com
│                 │  │     │                          └─ ○ registry.npmjs[.]com
│                 │  │     └─ ○ nodejs[.]org
│                 │  └─ gh (step: "Wait for prebuilt pnpr binaries")
│                 │     └─ ○ api.github[.]com
│                 └─ node
│                    └─ ○ blacksmith.blob.core.windows[.]net
├─ nginx
│  └─ nginx
│     ├─ ○ 140.82.112.21
│     ├─ ○ 140.82.112.22
│     ├─ ○ 140.82.114.22
│     └─ ○ 8.8.8.8
├─ chronyd
│  ├─ ○ 169.254.169.123
│  ├─ ○ 170.187.142.180
│  ├─ ○ 185.125.190.56
│  ├─ ○ 185.125.190.57
│  ├─ ○ 185.125.190.58
│  ├─ ○ 23.186.168.133
│  ├─ ○ 5.78.62.36
│  ├─ ○ 64.131.47.178
│  └─ ○ 91.189.91.157
└─ snapd
   └─ ○ api.snapcraft[.]io

Runner.Worker
├─ bash
│  ├─ rustup (step: "Initialize Rust before dependenc…tion ($/.github/actions/rustup)")
│  │  ├─ ○ dualstack.k.sni.global.fastly[.]net
│  │  └─ ○ localhost (dns resolver)
│  └─ MainThread
│     └─ pn
│        └─ dash
│           └─ node
│              ├─ pn
│              │  └─ node (step: "Validate test chunk inputs")
│              │     ├─ ○ npm.jsr[.]io
│              │     └─ ○ pnpm[.]io
│              └─ node
│                 └─ node (step: "Validate test chunk inputs")
│                    └─ ○ unofficial-builds.nodejs[.]org
└─ node
   └─ ○ productionresultssa2.blob.core.windows[.]net

View this job's Execution Profile in Garnet →


💡 How to read this
Runner.Worker          ← process on a path
└─ npm
   └─ node             ← process that acted
      └─ ○ npmjs[.]org ← observed action

follow a path downward to see what ran and what it did — each path to an observed action is an execution chain

names on the path = processes · ○ = observed action · (…) = context


Devin Review


Note

Medium Risk
Large merge touching CI workflows, review automation, and hundreds of pending release intents; incorrect fork-only deltas in CodeRabbit or conflict scripts could break PR/review loops without affecting end-user installs directly.

Overview
Fork merge that brings upstream main (736ffe4) into the fork while keeping fork-only Garnet workflows and mirror machinery; the PR body calls out three intentional fork deltas on top of upstream (extra REVIEW_GUIDE line, scoped CodeRabbit Garnet path_instructions, experiment auto_review.base_branches).

Upstream changes in this sync reshape agent workflows: the standalone garnet-runtime-review skill, root REVIEW.md, Copilot/Greptile review docs are dropped in favor of .agents/skills/* (implement-change, pull-requests, review-code + REVIEW_GUIDE, testing-changes, release-notes, review-and-fix-pr), with .claude/skills symlinked to .agents/skills. The git worktree PR hook now points agents at those skills instead of an inline prompt and the old shell/resolve-pr-conflicts.sh.

PR conflict handling moves to .agents/skills/pull-requests/scripts/resolve-pr-conflicts.sh (rebase, lockfile regen, fork-safe push validation, --continue / --no-push) plus a large stub-based test suite; AGENTS.md documents the new path.

Review bot config shifts CodeRabbit/Qodo to .agents/skills/review-code/references/REVIEW_GUIDE.md, narrows full-runtime-evidence instructions to network/registry/config/build paths, and updates product-fit wording (PHILOSOPHY, compatibility, changeset prose rules).

CI and tooling: cargo-nextest smoke profile and guard scripts; composite actions install-crates and wasm-toolchain; rust-cache workspace roots and lockfile hashing; integrated-benchmark compare/confirm scripts; Windows static CRT PE import gate; docs artifact copy helper; issue-form “working on a fix” parser. .cargo/config.toml adds pnpm-vendored crate sources and target-specific rustflags.

Product surface (bulk of the diff): many new .changeset/* entries and composed changelog sections for pacquet/pnpm/pnpr (Cargo/Python resolution, pnpr OCI/multi-ecosystem, loaded linker, trust policy, deprecation output, and numerous install/registry fixes), plus GitHub issue templates routing feature ideas to Discussions.

Reviewed by Cursor Bugbot for commit b97c998. Bugbot is set up for automated code reviews on this repo. Configure here.

zkochan and others added 30 commits September 28, 2026 15:17
The global rayon pool was sized at max(4, 2 x available_parallelism),
which reaches 64 threads on a 32-core box. Past 16 threads the extra
workers only add kernel time during linking. The pool is now clamped
to 4..=16 threads.

A warm-install sweep of the main build (nuxt, next, nitro fixtures)
on Linux runners with 2-32 vCPUs, Windows runners with 4-16 vCPUs, a
12-core macOS runner and a local 10-core M1 Max found no host where
the old default beat 16 threads. The 32-vCPU Linux runner kept its
wall time and halved its system time. The 16-vCPU Windows runner got
10% faster. The M1 Max was unchanged at 16 but 19% slower at 8, which
rules out a lower uniform ceiling.

Non-frozen installs in projects with a pnpm-workspace.yaml still build
the pool at 1x cores on the repeat-install fast path, before it is
configured. Fixing that ordering is tracked separately, because on
an 8-vCPU runner it slowed non-frozen fresh installs.

Closes pnpm/tasks#51
…npm#16317)

The verify-deps-before-run gate spawned an install whenever no workspace
state file existed, even for projects that give an install nothing to
do. That install only wrote node_modules and pnpm-lock.yaml, which
became visible in directories the workspace packages patterns leave
out after pnpm#15125.

The gate now returns up to date when no state file exists and no
project the install would cover declares a dependency, a required peer
that autoInstallPeers would fetch, or an install lifecycle script
(preinstall through postprepare, or an implicit binding.gyp build) that
ignoreScripts does not disable. pnpm:devPreinstall counts only in the
workspace root, the only place an install runs it. Under a shared
lockfile every workspace project is checked, and the projects are walked
only when the root manifest itself has nothing to install. With separate
lockfiles a non-recursive run checks only its own project. A
non-recursive pnpm 11 command gets no allProjects, so the gate reads the
workspace itself, as checkDepsStatus does.

A readPackage hook can add dependencies, so any pnpmfile the install
would load (looked up from the lockfile directory) keeps the install.
A workspace that cannot be read, or a lockfileDir pinned away from the
project, also keeps it. Projects with lifecycle scripts still
install on the first run, so those scripts keep running on first use.

Closes pnpm#16313

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Zoltan Kochan <z@kochan.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…es (pnpm#16335)

A lockfile key's peer suffix is hashed once it exceeds
`peersSuffixMaxLength`. The locked peer pins read an explicit suffix in
full, recursing into each segment's provider, so they include the peers
a descendant resolved. A hashed suffix recovered only the package's own
declared peers from its snapshot edges.

When `dedupe_peer_dependents` collapses two variants of equal size, the
dep-path tie-break can pick either spelling. The next run then pinned a
different set of peers depending on which spelling it read, which changed
the size of one variant and the winner of the collapse, so the lockfile
alternated between two states and `pnpm dedupe --check` never passed.

A hashed suffix now also recovers the peers listed in the snapshot's
`transitivePeerDependencies`, read from the descendants that declare
them, and recurses into each peer provider's own snapshot like an
explicit suffix does. A visited set bounds the walk.

Closes pnpm#16331
…t is the filesystem root (pnpm#16334)

For a workspace with a shared lockfile, the recursive installer filters the
selected importers with is-subdir against the calculated repository root.
is-subdir 2.0.0 appends a path separator to the parent directory, so when
the repository root is the filesystem root ("/" on POSIX, a drive root such
as "C:\" on Windows) the parent becomes "//" or "C:\\" and no importer
matches. The command then reported success without installing anything.

Take the fix from is-subdir 2.0.1, which no longer appends a second
separator to a filesystem root, so the importer filter matches projects
under "/" or a drive root as-is.

Closes pnpm#16328

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Global update candidates start with the installed group's manifest. Resolving
plain registry dependencies by bare name keeps the saved range during the
lockfile-only comparison and can make an available update look unchanged.

Resolve those dependencies through the latest dist-tag. Preserve the source
of non-registry dependencies and keep downgrade pins. Cover the saved-range
case with a mocked-registry regression test.

Closes pnpm#16320

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…space link (pnpm#16346)

A frozen install rejected a freshly generated lockfile when an injected
workspace package declared a peer dependency that the consuming project
provides from the workspace. The lockfile snapshot records that peer as
`link:<dir>`, and the freshness check re-tested every resolved peer against
the declared range, which never matches a `link:` ref. The same test also
failed for an unmet peer, which pnpm only warns about.

The resolved peers are the parent's choice, so they do not indicate a stale
lockfile. The check now compares only the declared peer ranges and
`peerDependenciesMeta` with the ones recorded in the lockfile, which still
catches every edit to the injected package's peers.

pnpm v11 is not affected.

Closes pnpm#16332

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…d install (pnpm#16324)

After a filtered install, verifyDepsBeforeRun reported the dependencies
as outdated whenever pnpm-lock.yaml had a newer mtime than
lastValidatedTimestamp, even with unchanged contents. With the default
install action, pnpm run then reinstalled every workspace project with
lifecycle scripts on.

A newer lockfile makes both stacks assert that the wanted lockfile
equals the current lockfile in the virtual store. A filtered install
only materializes the projects it selected, so its current lockfile
leaves out everything else and the equality can never hold.

When the workspace state records a filtered install, compare the
current lockfile against what that install materialized:

- pacquet compares it with the materialization closure of the wanted
  lockfile rooted at the importers the current lockfile lists.
- pnpm v11 keeps every importer in the current lockfile, so it requires
  everything but packages to be equal and every recorded package to
  equal its wanted entry.

A lockfile change that reaches an installed project still fails the
check. The install fast path already refuses a filtered state, so only
the run gate is affected.

After a filtered install the gate also requires the selected projects
that declare dependencies to be recorded in the current lockfile. A
modules directory alone no longer counts as installed. pacquet requires
an importer entry; pnpm v11, which keeps every importer, requires a
package entry for each direct dependency that is not a link.

Closes pnpm#16322

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Zoltan Kochan <z@kochan.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* chore(release): 11.28.2, pacquet 12.8.1

* docs(release): curate the 11.28.2 and 12.8.1 release notes

Add the lead paragraph the previous release pages carry, order the
pacquet entries by impact (failing installs and damaged files first,
then wrong lockfiles, speed, and command behavior), lead the exec-bit
entry with what the reader sees, and use the same issue-link style in
every entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…5869)

* chore: update dependencies, Node.js, pnpm, and GitHub Actions

* chore: keep `@yarnpkg/core` at 4.9.1

`@yarnpkg/core@4.9.2` was published with a Yarn-only
`patch:got@npm%3A11.8.2#~/.yarn/patches/...` dependency. pnpm locked it
as a dangling `link:`, so `got` was never installed and `tsgo` failed on
`@yarnpkg/core/lib/httpUtils.d.ts` in TS CI / Compile & Lint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: drop registry mirror URLs from the lockfile

The previous commit regenerated the lockfile with a local scoped
registry override, which wrote non-npmjs tarball URLs for `@pnpm/`
packages and failed the supply-chain check in CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
In a project with a pnpm-workspace.yaml, which covers workspaces and
single projects that keep their settings there, the repeat-install
fast path discovers workspace projects with rayon before
configure_rayon_pool ran. That built the global pool at rayon's
default of one thread per core, and build_global then failed silently.
So non-frozen installs there ignored both the 2x sizing and the
16-thread ceiling. Frozen installs skip the fast path and were sized
as intended.

The pool is now configured before the fast path. Shell completion is
checked first, since it never uses rayon. Debug builds assert that
configure_rayon_pool built the pool, so the CLI e2e suite catches the
next rayon use that runs ahead of it.

Early materialization, which links packages while resolution is still
running, now uses its own pool at one thread per core. On the global
pool at 2x it competed with the resolver: the integrated benchmark's
non-frozen fresh install against a local registry was slower in 8 of 8
runs with the reordering alone, and faster in 4 of 4 with this pool.

Windows now uses one thread per core, still clamped to 4..=16. Warm
frozen installs were 4-5% faster at 1x on 4- and 8-vCPU runners, and a
fresh install of the benchmark fixture took 3.9 s at 1x and 4.5 s at
2x on a 4-vCPU runner. It was even on an 8-vCPU runner.

Closes pnpm/tasks#52 perf(cli): size the rayon pool before the install fast path

In a project with a pnpm-workspace.yaml, which covers workspaces and
single projects that keep their settings there, the repeat-install
fast path discovers workspace projects with rayon before
configure_rayon_pool ran. That built the global pool at rayon's
default of one thread per core, and build_global then failed silently.
So non-frozen installs there ignored both the 2x sizing and the
16-thread ceiling. Frozen installs skip the fast path and were sized
as intended.

The pool is now configured before the fast path. Shell completion is
checked first, since it never uses rayon. Debug builds assert that
configure_rayon_pool built the pool, so the CLI e2e suite catches the
next rayon use that runs ahead of it.

Windows now uses one thread per core, still clamped to 4..=16. A
fresh-install sweep (1x vs capped 2x, 11 rounds, nuxt and the
1352-package benchmark fixture, --offline with a warm store) found:
- Linux 4 and 8 vCPUs: even.
- Windows 8 vCPUs: even. Windows 4 vCPUs: the benchmark fixture took
  3.9 s at 1x and 4.5 s at 2x. Earlier warm frozen sweeps also
  favoured 1x on Windows at every core count.
- macOS: a 10-core M1 Max was 16% faster at 16 threads than at 10,
  a 12-core macOS runner 3-6% slower. 2x is what frozen installs
  already used there.

Refs pnpm/tasks#52

* perf(package-manager): give early materialization its own one-per-core rayon pool

* docs: scope the rayon changesets to what users see; soften the Windows claim

* perf(package-manager): cap the early-link pool at the global pool size

The early-link pool took one thread per core with no ceiling, so a
32-core machine got 32 workers, and it ignored a caller's
RAYON_NUM_THREADS. It now takes one thread per core but never more
than the global pool has, which carries both the CLI's 16-thread
ceiling and the caller's override.

The pool's doc now states its current purpose, and the ordering
changeset leads with its effect.

* docs(package-manager): say where the early import runs without its pool
…pnpm#16359)

A lockfile key is the package id plus a peer suffix that spells out
the keys of the peers it resolved. dedupe_peer_dependents runs after
those keys are built. When it collapses a variant into a larger
compatible one, it rewrites the edges that pointed at the collapsed
variant but kept every other node's key. A node whose suffix named the
collapsed variant stayed keyed after a variant that no longer exists.
When the collapse left two variants with identical edges, the dep-path
tie-break could also keep the one whose key spelled the collapsed peer.

pnpm v12 reads locked peer versions back from those keys, so the next
resolution started from the stale names and produced a different
graph. `pnpm dedupe` therefore needed a second run to settle, and
`pnpm dedupe --check` failed right after `pnpm dedupe`.

After the collapse, every surviving node is now renamed from the peers
it resolves to. The name is rebuilt from the peer ids the final depPath
pass recorded for it, so a hashed suffix is hashed again and a
`name@version` peer that closes a cycle is left alone. Only the
provisional depPaths the walk nests in a suffix to break a cycle are
read back from their text; a graph node without recorded peer ids,
such as one whose tarball-URL id ends in parentheses, is never renamed.
Keys, child edges, and importer direct deps are rewritten through the
renames. Nodes renamed to one key merge the way the peer resolution
merges records that share a depPath. The rename runs only when something
collapsed, and peer ids are recorded only when this pass will read them.

pnpm v11 shares the collapse-without-rename code but does not read peer
pins back from lockfile keys, and it is not affected by the reported
repro, so it is unchanged.

Closes pnpm#16356
…npm#16360)

In a project that pins another pnpm, both CLIs rejected an option they
did not know before they switched to the pinned version. The option
could belong to the pinned pnpm, so the command failed although the
pinned pnpm supports it. pnpm v11 checked unknown options right after
parsing, ahead of switchCliVersion. pnpm v12 let clap exit on an
unknown argument before the pre-command dispatch. `pnpm --version`
went through the switch, so it reported the pinned version while
`pnpm install --auto-dedupe` failed in the global pnpm 11.

pnpm v11 now strips the unknown options from the config it reads,
runs the package manager handling, and reports them only when no
switch happened. The env lockfile sync, the `pnpm fetch` prefetch,
and the runtime checks are skipped for a command that is about to be
rejected.

pnpm v12 retries the pin dispatch from argv when clap reports an
unknown argument. The argv scan reads the path flags and the
install-family pin flags (`--frozen-lockfile`, `--offline`,
`--prefer-offline`, `--lockfile-dir`) on both sides of the command
name, since clap never relocated them, and treats `ci` as frozen. It
gives up when an option no command declares comes before the command
name, because its value could be mistaken for the command. Only a
switch plan is acted on, so a rejected command records nothing in the
lockfile. The config commands switch only for `--location project`,
as they do for a parsed command line.

Closes pnpm#16353
…s merge (pnpm#16361)

With injectWorkspacePackages, an injected workspace copy can resolve an
optional peer (such as supports-color for debug) from its consumer that
the target project's own dependencies were walked without. The injected
dedupe pass ran before peer-dependent dedupe, so it compared the
injected children against the project's peer-free variants, found no
match, and kept a peer-suffixed file: copy in importers. pnpm 11 records
link: for the same workspace.

Run peer-dependent dedupe first. It merges the peer-free variants into
the ones carrying the optional peer, after which the injected copy's
children equal the project's direct deps and the edge becomes link:.
Both fixtures from the issue now produce the pnpm 11 importers.

Closes pnpm#16354

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(deps): update undici to 7.29.1

The audit job fails on every pull request since GHSA-3wwx-pv8p-q78v was
published against undici >=7.28.0 <7.29.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Update .changeset/undici-7-29-1.md

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* docs(changeset): lead the undici note with what users see

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…scan (pnpm#16362)

The unparsed scan kept the command name as typed, so the `c` alias
slipped past the config-command exclusion, and the `ic`,
`clean-install` and `install-clean` aliases of `ci` were not treated
as frozen. The scan now resolves an alias to the command's own name
through the clap grammar.

`-g` inside a short cluster such as `add -gE` was not read as global,
so the fallback could switch a global command to the project's pinned
pnpm. `--global`, `-g` in a short cluster, and `--location` are now
read in the unparsed scan itself, which steps over the values of
declared options. A scope flag right after an undeclared option may
be that option's value, so the scan declines and the rejection
stands.
`pnpm install --frozen-lockfile` returned an existing Cargo.lock as it was
and never compared it with the workspace manifests. A lockfile that no
longer satisfied a dependency requirement in Cargo.toml passed the install,
and `cargo --locked` rejected the same pair afterwards.

Check every registry and git dependency of the workspace members against
each member's dependency edges in Cargo.lock, and require every edge to be
claimed by a declared dependency, before a frozen install continues, and fail with ERR_PNPM_OUTDATED_LOCKFILE, naming the crate, its
requirement, and the locked versions. Sources are not compared, because a
[patch] legitimately locks a dependency from another source. The check reads the metadata that
workspace discovery already fetched, so a frozen install runs no additional
`cargo metadata`.

Closes pnpm#16355

---------

Co-authored-by: arturict <arturict@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Zoltan Kochan <z@kochan.io>
…A certificates (pnpm#16367)

rustls-platform-verifier only fails on an empty system trust store when
it gets no extra roots. With NODE_EXTRA_CA_CERTS set, the extra CA kept
the platform client buildable on a system without CA certificates, so
the bundled-roots fallback never ran and the client trusted only that
CA. Registry requests then failed with UnknownIssuer.

Build the platform client without the extra roots first, and fall back
to the bundled roots (with the extra roots added) when that fails.

Closes pnpm#16365
…pm#16382)

A git-hosted dependency that pinned a pnpm version was always prepared by
that version, provisioned through `pnpm dlx --package pnpm@<pin>`, even
when the install ran with `pmOnFail=ignore`. On NixOS the downloaded
generic Linux binary cannot start, and `pmOnFail=ignore` is the way to
keep the nixpkgs build, so such dependencies could not be installed.

The install's `pmOnFail` now reaches the fetcher through a new
`RunningPnpm` group in `PrepareScriptOptions`. That struct holds the
running pnpm's path and the setting, because the options struct is at
the field limit. When the setting is anything but `download`, a
dependency that wants pnpm gets a shim that runs the running pnpm
directly. The setting is also passed to the nested install as
`pnpm_config_pm_on_fail`, since a CLI flag does not otherwise reach it,
and that install would switch to the pin on its own.

pnpm v11 does not provision package managers for git-hosted
dependencies, so only v12 is affected.

Closes pnpm#16376

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…npm#16381)

With injectWorkspacePackages: true, pnpm deploy failed with
ERR_PNPM_DEPLOY_AMBIGUOUS_PEER when a workspace package lists its peer
as a dev dependency too and the deployed graph holds a second version
of that peer.

dedupeInjectedDeps turns an injected workspace dependency into a link
when the injected resolution's children are a subset of the target
project's importer, dev dependencies included. A package whose peer is
also its dev dependency therefore gets linked. Deploy synthesizes the
snapshot of a linked workspace package from its importer's prod and
optional dependencies only, so the peer binding was lost, and the
singleton-peer binder then saw every version of the peer in the
deployed graph.

In an injected workspace, deploy now binds such a peer to the
package's own dev-dependency resolution, which dedupe guaranteed is the
resolution the injected snapshot would have carried. The binding is
used only when the deployed graph contains that resolution. Only the
dev dependencies that are also peers are converted, and one the
conversion rejects (a link outside the workspace) is skipped, since it
can never name a deployed snapshot. Neither fails the deploy.
Non-injected workspaces keep the existing behavior, which picks what
injection would choose rather than the linked package's dev dependency.

Fixed in both the TypeScript CLI and pacquet.

Closes pnpm#16375
The cross 0.2.5 ppc64le image uses binutils 2.26.1. It mislinks
calls to optional libc functions absent from its sysroot: the
published binary tests the dynamically resolved gettid address,
then branches to an unmapped address instead of calling it.

Let GCC retain its sysroot and library selection, but route its
linker invocation to the LLD bundled with the pinned Rust toolchain.
This fixes the weak-symbol calls without raising the glibc baseline
or adding another linker download. Scope the setting to ppc64le.

Smoke-test the actual release binary against a newer libc, where
gettid is present. Testing only against the build sysroot misses
the bug because Rust takes its syscall fallback there.

Closes pnpm#16380.
…npm#16371)

`path_value` took the first key of the environment map that matched
`PATH` case-insensitively, and the lifecycle and `pnpm run` spawns
dropped every such key before setting `PATH`. Environment names are
case-sensitive outside Windows, so a `Path` variable is a variable of
its own. When the environment held both `PATH` and `Path`, the map's
random order decided which one a script got. A script that got `Path`
could not find `node` and failed with exit code 127.

`is_path_key` now matches `PATH` exactly outside Windows and keeps the
case-insensitive match on Windows. The lookup and both spawns use it,
so `Path` neither supplies `PATH` nor gets dropped.

`set_command_path`, used by `pnpm exec` and the other CLI spawn sites,
removes `Path` only on Windows, so a POSIX `Path` reaches those
children too.

Fixes pnpm#16308

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Shims fall back to the filtered PATH when command -p finds no helper, as in a Nix build sandbox.

A helper comes from PATH only when PATH has it, because the bash 3.2 that macOS ships as sh answers command -p -v from PATH.

Closes pnpm#16377
* docs: move website documentation into the pnpm repository

* docs: keep v11 and v12 documentation beside their implementations

* docs(pnpr): keep registry documentation beside its implementation

* ci: classify product documentation as documentation changes

* test: cover product documentation in Rust CI exclusions

* ci: isolate documentation publishing and support manual sync

* test: make dependency status fixture timestamps deterministic
Gate documentation publication on creation of a generated commit.

An unchanged import exits the commit step successfully, but must also skip
credential lookup and pushing. Emit changed=true after a successful commit
and use it as the condition for the push step.
…npm#16345)

Profiling a 331-importer, 5,000-package workspace resolution (perf and
heaptrack on the micro-benchmark's --full-workspace-resolution runner)
put 35 percent of the CPU time in the allocator and 13 percent in memcmp.
Almost all of it came from copying immutable identity strings: the
dependency walk cloned the whole ancestor-id Vec<String> for every node
it seeded (7.5 million of the run's 42 million allocations), copied the
package id into every DirectDep, tree node and children-owner claim, and
the peer walk re-rendered each package's name and version on every visit
and pushed a fresh String onto its ancestor chain per node.

Every holder of a pkgIdWithPatchHash now shares the package table's own
Arc<str>: ancestor chains are Arc<Vec<Arc<str>>>, DirectDep::id,
PendingNodeIdentity::id and the provider index carry the shared id,
register_seeded_package and register_reused_package hand it back, and
the tree, children and owner maps clone the pointer where they used to
re-allocate. ResolvedPackage gains name and version, rendered once by
ResolvedPackage::new, and the peer walk reads them instead of calling
pkg_name_version per visit; its chains and caches are keyed by the same
Arc<str>. Content-based hashing and ordering are unchanged, so lockfile
output is identical.

ResolvedPackage's result, name and version are private and read through
result(), name() and version(), so nothing can replace the resolution
and leave the rendered pair stale; ResolvedPackage::new takes a
ResolvedPackageInput with named fields.

Measured on the same machine, idle, three runs each: the plain shape of
the full-size scenario (the dependency walk alone) drops from 0.88 s to
0.45 s, the peer-heavy and hoist-heavy shapes by 12 percent, and the CI
group workspace_resolution/hoist_heavy from 596 ms to 549 ms.

A representation study on the fixture lockfile's keys (String, Arc<str>,
string_cache atoms, smol_str) showed that a global interner would cost 2
to 3 times more on construction, 2 to 3 times more under concurrent
construction and 5 to 6 times more on borrowed-text lookups, for an
equality speedup the resolver does not need once its comparisons hit
Arc's pointer-equality fast path. No new dependency is introduced.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QYTBQo8HY7xD2iz6hjo1CW
Port applicable documentation contributions from the website PR backlog to
pnpm/docs and pnpm11/docs now that documentation lives alongside the CLI.
Reconcile overlapping fixes and outdated paths against the current code.
Keep documentation for unmerged features with the implementation PRs.
The PR description credits each original author and records all 99 dispositions.
…oup (pnpm#16372)

Without a terminal each script runs in a process group of its own, and
after a relayed signal pnpm waits until kill(-pgid, 0) reports the group
empty, reaping its own children with waitpid(-pgid, WNOHANG). A member
that another process adopted stays in the group as a zombie until that
process reaps it. When pnpm is a container's PID 1 and a script runs
pnpm again, the relayed SIGTERM ends both shells of the nested run, the
inner pnpm and the script become children of the outer pnpm, and only
the outer pnpm can reap the script, while it reaps only its own group
and waits for the inner one. Neither pnpm exits until the runtime sends
SIGKILL.

On Linux the wait now reads /proc, as the v11 runner already does, and
ends once two readings in a row show the same members of the group, all
of them zombies, since a member can start a process and exit while the
table is read. The stat line is read as bytes and split after the last
`)`, since the command may hold `)` or a character cut in half. A member
that reads as a zombie but lists other threads under its task directory
still counts, since its main thread exited while the rest run. Where /proc cannot
tell, the wait keeps to the kernel's count: when /proc cannot be listed
to the end, its self is not pnpm, as with an empty directory or another
pid namespace's /proc, or it shows no member of the group, as under
hidepid=invisible, and for a member whose stat cannot be read, which
counts while getpgid puts it in the group. Entries are read newest
first, so a script that is still shutting down is found within a few
reads.

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Zoltan Kochan <z@kochan.io>
…npm#16400)

The site is now built with the pnpm.website components, which expect the
docs sidebar to be an array of items. The v12 sidebar still used the
Docusaurus shorthand object (label -> items), so convert each entry to an
explicit category object. In both versions, list the Introduction pages
(motivation, feature-comparison, installation) at the top level instead
of nesting them in a category, matching the change made on pnpm.io.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…npm#16370)

Level siblings resolving the same wanted key concurrently both
missed the completed cache: the fetch locker coalesced the network,
but each caller still repeated the resolver chain's remaining work
and the manifest hook pipeline (pnpmfile is a JS bridge). Admit one
caller per wanted key through a per-key lock; waiters re-check the
completed cache after the holder finishes, so the hooks run once.
The lock is never held across the map's own lock, and a cancelled
holder releases it on drop, so the next caller retries cleanly.

Covered by a barrier-started fan-in test: with a yielding resolver,
two level siblings ask for the same key while the first is still
resolving; the counting pnpmfile hook runs once with the lock and
twice without it.
altaywtf and others added 18 commits October 7, 2026 08:08
…npm#16657)

When the platform package is missing, `bin/pnpm.mjs` downloads the
native binary on first run. It only read `COREPACK_NPM_REGISTRY` and
otherwise always used registry.npmjs.org, even when npm or pnpm was
configured for a mirror (Closes pnpm#16655).

Without `COREPACK_NPM_REGISTRY`, the registry now comes from the
`pnpm_config_registry`/`npm_config_registry` environment variables and
from the `@pnpm:registry` or `registry` setting of the project and user
`.npmrc`, with the credentials those files hold for that registry. The
credentials are only sent over HTTPS or to the local machine, and the
Corepack credentials stay on Corepack's registry.

The project `.npmrc` is read from the workspace root, without expanding
`${VAR}` placeholders in registry settings or credentials. It is read
only while the download is checked against npm's signature, which pins
the bytes. With `COREPACK_INTEGRITY_KEYS` turning the check off, a
repository could otherwise choose the binary that is cached next to the
wrapper and run in every later project (GHSA-j2hc-m6cf-6jm8).

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…dencies (pnpm#16670)

Verifying locked config dependencies against the registry enforces
minimumReleaseAge, but resolving them did not. A config dependency range
therefore resolved to a version that a later clean frozen install
rejected.

Keep the age gate on verification, since a config dependency's pnpmfile
runs on every install, and apply the same cutoff and
minimumReleaseAgeExclude when resolving config dependencies and their
optional subdependencies, in both the Rust and TypeScript CLIs. A
version+integrity pin resolves without the cutoff, as verification
already skips pins. Config
dependencies are resolved before any updateConfig hook runs, so only an
exclude in pnpm-workspace.yaml can cover one.

Closes pnpm#16660

---------

Signed-off-by: C. Spencer Beggs <spencer@beggs.codes>
Co-authored-by: Zoltan Kochan <z@kochan.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…m#16667)

* docs: explain how optional peers are resolved from the workspace

The autoInstallPeers docs said only non-optional peers are installed.
Both CLIs also resolve a missing optional peer to a version that already
exists anywhere in the workspace, including another project's
devDependencies, and they do it when either autoInstallPeers or
dedupePeerDependents is on. Document that and how to turn it off.

Related to https://github.com/orgs/pnpm/discussions/16666

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: say when a missing optional peer is installed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
catalogPrune dropped catalog entries that the lockfile left on disk
still records when a workspace project was missing from disk: on v11
for installs that skip resolution (frozen, CI, lockfile up to date)
and for remove, and on v12 for remove. The next frozen install then
failed with ERR_PNPM_LOCKFILE_CONFIG_MISMATCH. The prune now keeps
those entries, except when `lockfile` is false.

Fixes pnpm#16679

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ly in peerDependenciesMeta (pnpm#16682)

The resolver treats a peerDependenciesMeta entry with optional: true
and no peerDependencies entry as an optional "*" peer. The versions
overrider only iterated peerDependencies, so a removal override never
reached such a peer and a sibling workspace project could still
satisfy it.

Both overriders now also match each peerDependenciesMeta name that
peerDependencies does not declare against the overrides as "*", and
drop the meta entry when the chosen override is "-". In pacquet the
apply_to_arc fast path checks the same entries, so the manifest is
cloned and rewritten.

The workspace regression tests from pnpm#15199 now also run
against @pnpm.e2e/abc-optional-peers-meta-only.

Fixes pnpm#16681

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…edicated lockfiles (pnpm#16684)

The split-lockfile sync added in pnpm#15685 patches each injected
copy from its source project after all selected projects are installed.
It read the source directory with every file, while the install builds
the copy from the package files only (the files field and .npmignore)
unless deployAllFiles is set. So when the injected project was part of
the same run, the copy picked up files such as tsconfig.json and the
project's own pnpm-lock.yaml.

The sync now reads the source with includeOnlyPackageFiles set to
!deployAllFiles, as the install's directory fetch does. The target is
still read in full, so files that an earlier sync added are removed.
The sync after a project's own scripts with a shared lockfile keeps
reading every file.

Fixes pnpm#16683

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…6685)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
)

* fix(hoist): remove each parent of stale workspace links once

pruneStaleWorkspaceHoists cleaned up the empty parents of every stale
workspace link in parallel. Links under one scope share the scope
directory, so it was removed by several concurrent rmdir calls. On
Windows, a removal of a directory whose delete is still pending fails
with EPERM, which failed the install. The hoisted linker unlinks every
workspace hoist before relinking, so any install that did not take the
up-to-date fast path hit this.

The cleanup now runs once per parent directory. A workspace alias has at
most a scope directory above it, so distinct parents never overlap.

Closes pnpm#16690

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(hoist): type the stale workspace link fixture keys

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…me (pnpm#16692)

The shared-lockfile deploy built the deployed package.json dependency
groups by iterating the lockfile importer's HashMap, and serialized
allowBuilds into the deployed pnpm-workspace.yaml from a HashMap, so
both came out in a different order on every run. Sort both by name,
which matches the lockfile importer order that v11 writes.

Closes pnpm#16687
…m#16694)

When `pnpm run` or `pnpm exec` prints a script's output under the
project's name (--stream, --parallel, concurrent recursive runs, pipeline
tasks), the child's stdout is piped, so most tools turned their colors
off. pnpm now sets FORCE_COLOR=1 for these children when its own output
is in color through the default or append-only reporter, keeping a
FORCE_COLOR that is already set.

Colored child output exposed rendering bugs in the v12 reporter, fixed
here:

- cut_line counted escape bytes as visible characters and could split a
  color code. It now uses console::truncate_str.
- Lines are split only on \n, so a \r progress bar reached the in-place
  frame with embedded carriage returns. printable_script_line keeps the
  last non-empty \r frame.
- Cursor movement, OSC links and other control characters from a child
  are dropped by a small ECMA-48 escape parser (the locked console
  0.16.3 iterator misses OSC and private-marker CSI). Only SGR sequences
  whose parameters are digits, ';' or ':' count as colors, and they
  are kept only when pnpm renders in color. A line that keeps a color
  ends with a reset so it cannot bleed into the next line or prefix.

run_stage wrote the [ELIFECYCLE] line with eprintln! while the default
reporter redrew its frame in place, so the next redraw moved the cursor
over the wrong rows. A streamed run now emits it as an error-level pnpm
log, which the reporter adds to the frame. An inherited run still writes
it to stderr.

The v11 reporter had the same cursor-code problem (a TODO in
reportLifecycleScripts.ts). It now keeps only SGR sequences, using
node:util stripVTControlCharacters for the rest, and appends the same
reset. v11 already splits \r into separate lines, and FORCE_COLOR is a
v12-only feature.
Code blocks that hold only shell commands now use the `sh` language,
and blocks showing a file's contents carry a `title` naming the file,
across the pnpm v12, pnpm v11, and pnpr docs. Bold file-name labels
above code blocks are folded into the titles.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…m#16686)

Five sites where the fallback argument of an Option or Result combinator
contained a branch of its own. In each, the branch becomes a sibling arm of a
match, so the value is read before the fallback and the nesting goes away.

Two of them also stop doing work that was never needed. map_or and unwrap_or
evaluate their default unconditionally, so a branching default was computed
even when the option was Some:

- napi/native_reporter.rs built a two-way Duration default on every call.
- cli/pre_command/pin.rs ran a five-arm match even when pm_on_fail was set.
  Its two arms that produced the same value are now one, and PmOnFail is Copy,
  so the configured value is returned by value rather than cloned.

The other three removed nesting only:

- cli/pre_command/input/reporter_flags.rs and cli/audit/render.rs each held an
  if or a match inside an unwrap_or_else closure. The audit one also stopped
  cloning an Option wrapper to return the String inside it.
- pnpr/resolver/wire/tarball_router.rs nested map_or_else inside another
  map_or_else's closure, so the failure arm preceded the success arm twice. An
  early return keeps the package name from being parsed when the basename is
  already present. A single flat match over a tuple would have changed the work
  done, so the remaining laziness is deliberate.

An earlier revision of this branch also converted every default-first
map_or_else call found by matching on a newline between the call and its first
closure. That selector keys on where rustfmt put a line break, not on anything
the code does: those calls nest nothing, evaluate nothing early and invert no
logic, so its 41 hits were a survey rather than a work list.

Twelve files are back at their base state, on four conditions where any single
one disqualifies a site:

- The rewrite has to invent a name whose only job is to be matched one line
  later, which moves a level out of the expression into the enclosing block
  instead of removing it.
- The first closure diverges, so there is no default value to put second.
  unwrap_or_else and expect already read as "this must be Some".
- The call sits in a macro's value position, where a match block is not a
  value, so the field ends up lines away from what fills it.
- It is test code, read only when it fails, where churn costs review and git
  blame and returns nothing.

No file under tests/ is modified. The conversions in the files that remain were
reviewed individually and kept for reading better than what they replaced,
rather than because they fix a defect.

Laziness is held wherever it existed and no public signature changes, so the
observable behaviour is unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNxMkLRG8CRDPwe5vcd28n
…ient setup (pnpm#16700)

Centralize `normalize_registry_url` and `escaped_package_name` in
`pnpm_network` and reuse them across `pnpm-config`, `pnpm-publish`,
`pnpm-auth-commands`, and CLI subcommands (`access`, `audit`, `bugs`,
`deprecate`, `dist-tag`, `login`, `logout`, `owner`, `repo`, `search`,
`self-update`, `team`, `view`, and `config_overrides`).

Reuse `build_registry_client_with_guard` and `build_registry_client`
across CLI commands rather than duplicating `ThrottledClient::for_installs`
construction. Reuse `pnpm_network::read_limited_body` and
`body_display_string` in `team` and `access` registry error handling.
…pnpm#16698)

QEMU user-mode emulation intercepts opening /proc/self/exe and returns
a stale descriptor number that may already belong to another open file.
When that number was tokio's epoll descriptor, libc detection read from
it, got EINVAL, and closed it. The I/O driver's next epoll_wait then
failed and pnpm panicked with "unexpected error when polling the I/O
driver".

Resolve the path with std::env::current_exe(), which QEMU emulates
correctly, and open that instead.

Closes pnpm#16696.
… body reading (pnpm#16703)

Centralize origin-based redirect guard construction as origins_redirect_guard
in pnpm_network, replacing duplicate implementations in client_builder.rs,
owner.rs, and team/registry.rs.

Add resolve_registries_with_override and build_registry_client_with_otp_guard
to CLI registry_client, unifying registry URL resolution across subcommands
(access, bugs, deprecate, dist_tag, owner, repo, stage, team, and view).

Add read_sanitized_error_body to CLI sanitize to consolidate reading and
sanitizing HTTP error response bodies with a configurable limit across access,
owner, stage, star, and team.
…lose (pnpm#16708)

A TLS-intercepting proxy can send a packument with neither
Content-Length nor chunked framing and end it by closing the TCP
connection without a close_notify alert. rustls reports that close as
an UnexpectedEof error, so `pnpm view` and the resolver failed with
ERR_PNPM_RESOLVING_NPM_RESOLVER_BODY_READ_ERROR. Node.js treats the
close as the end of the body, which is why pnpm v11 works behind the
same proxy.

reqwest exposes no hook to wrap the connection stream, so the fix sits
at the body read: `read_self_delimiting_text` keeps the bytes received
before an unclean TLS close when the response has neither
Content-Length nor chunked Transfer-Encoding. A framed body cut short
by the close still fails, as in Node.js. The gzip decoder also polls
the connection after the last member, so a complete gzipped body hit
the same error. Decompression drops Content-Length, so a cut-short
gzipped body is left to the packument JSON parse, and the resolver
retries decode failures.

Closes pnpm#16704
An install that misses the repeat-install fast path, such as one under
`recursiveInstall: false` or with a `file:` dependency, re-imported the
side-effects overlay into every project-local slot of a patched or built
package and reran builds whose cache had nothing to restore. Only the
global virtual store checked whether a slot already carried the overlay.

The isolated linker now scopes the build phase the way the hoisted
linker does: the snapshots this install materialized, plus those the
previous install recorded as unbuilt in `.modules.yaml`. A rebuild or an
`allowBuilds` change still considers every candidate. pnpm v11 already
builds only new nodes on this path, so it is not affected.

The check for an entry recorded as unbuilt moved into a shared helper,
which also matches an `ignoredBuilds` key that carries a patch hash.

Closes pnpm#16705
Upstream source, workflows and reviewer configuration (AGENTS.md, the review guide,
.coderabbit.yaml, .pr_agent.toml) now match pnpm/pnpm main. Fork-only work is kept:
the garnet-* workflows and scripts, .garnet/ and .github/garnet-gate/.

Removed fork-only reviewer stack: REVIEW.md, the root REVIEW_GUIDE.md, the
garnet-runtime-review skill, .greptile/, .github/copilot-instructions.md, and the
fork edits to AGENTS.md, .pr_agent.toml and ci.yml.

Remaining divergence from upstream: one line in the review guide, a CodeRabbit path
instruction for the mirrored runtime record plus a fork-only auto_review base branch,
and the bare-mention hook.
@devin-ai-integration

Copy link
Copy Markdown

I'll fix CI failures and address comments from users with write access that start with 'Devin'.

  • Disable automatic comment, CI, and merge conflict monitoring

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Walkthrough

Warning

Review details and warnings were omitted to fit the comment limit.

@garnet-runtime-review

garnet-runtime-review Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Execution Profiles recorded for 1 job, triggered by b97c998

27 destinations
recorded at the kernel by Garnet · 2026-10-07 20:46 UTC

TS CI / test ↗ · 27 destinations
systemd
├─ bash
│  └─ bash
│     └─ bash
│        └─ bash
│           └─ bash
│              └─ bash
│                 ├─ bash
│                 │  ├─ node
│                 │  │  ├─ git (step: "<unknown>")
│                 │  │  │  ├─ git
│                 │  │  │  │  └─ git
│                 │  │  │  │     └─ git-remote-http
│                 │  │  │  │        └─ ○ github[.]com
│                 │  │  │  └─ ○ 192.168.127.1
│                 │  │  └─ pn (step: "Validate test chunk inputs")
│                 │  │     ├─ dash
│                 │  │     │  └─ node
│                 │  │     │     └─ pn
│                 │  │     │        └─ dash
│                 │  │     │           └─ pn
│                 │  │     │              └─ dash
│                 │  │     │                 └─ pnpm
│                 │  │     │                    └─ dash
│                 │  │     │                       └─ node
│                 │  │     │                          ├─ ○ codeload.github[.]com
│                 │  │     │                          └─ ○ registry.npmjs[.]com
│                 │  │     └─ ○ nodejs[.]org
│                 │  └─ gh (step: "Wait for prebuilt pnpr binaries")
│                 │     └─ ○ api.github[.]com
│                 └─ node
│                    └─ ○ blacksmith.blob.core.windows[.]net
├─ nginx
│  └─ nginx
│     ├─ ○ 140.82.112.21
│     ├─ ○ 140.82.112.22
│     ├─ ○ 140.82.114.22
│     └─ ○ 8.8.8.8
├─ chronyd
│  ├─ ○ 169.254.169.123
│  ├─ ○ 170.187.142.180
│  ├─ ○ 185.125.190.56
│  ├─ ○ 185.125.190.57
│  ├─ ○ 185.125.190.58
│  ├─ ○ 23.186.168.133
│  ├─ ○ 5.78.62.36
│  ├─ ○ 64.131.47.178
│  └─ ○ 91.189.91.157
└─ snapd
   └─ ○ api.snapcraft[.]io

Runner.Worker
├─ bash
│  ├─ rustup (step: "Initialize Rust before dependenc…tion ($/.github/actions/rustup)")
│  │  ├─ ○ dualstack.k.sni.global.fastly[.]net
│  │  └─ ○ localhost (dns resolver)
│  └─ MainThread
│     └─ pn
│        └─ dash
│           └─ node
│              ├─ pn
│              │  └─ node (step: "Validate test chunk inputs")
│              │     ├─ ○ npm.jsr[.]io
│              │     └─ ○ pnpm[.]io
│              └─ node
│                 └─ node (step: "Validate test chunk inputs")
│                    └─ ○ unofficial-builds.nodejs[.]org
└─ node
   └─ ○ productionresultssa2.blob.core.windows[.]net

View this job's Execution Profile in Garnet →


💡 How to read this
Runner.Worker          ← process on a path
└─ npm
   └─ node             ← process that acted
      └─ ○ npmjs[.]org ← observed action

follow a path downward to see what ran and what it did — each path to an observed action is an execution chain

names on the path = processes · ○ = observed action · (…) = context

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

Micro-Benchmark Results

Linux

group                                            main                                   pr
-----                                            ----                                   --
lockfile/parse_pnpm_lock                         1.00     12.5±0.78ms    29.9 MB/sec    1.16     14.5±1.25ms    25.9 MB/sec
packument/parse                                  1.00     43.0±1.65µs  1542.4 MB/sec    1.06     45.4±1.49µs  1460.2 MB/sec
tarball/download_dependency                      1.00      3.5±0.18ms  1233.5 KB/sec    1.60      5.6±1.39ms   770.7 KB/sec
tarball_batch/cold_store_many_medium_tarballs    1.00   216.4±13.92ms 73.9 KElem/sec    1.34   289.5±26.12ms 55.3 KElem/sec
version_pick/repeated_ranges_file                                                       1.00      4.7±0.11ms  6.7 KElem/sec
version_pick/repeated_ranges_raw                                                        1.00      4.6±0.10ms  6.8 KElem/sec
workspace_resolution/hoist_heavy                 1.03   300.5±13.33ms        ? ?/sec    1.00   292.0±26.26ms        ? ?/sec
workspace_sort/chained_projects                  1.00     15.2±1.20ms        ? ?/sec    1.43     21.7±9.75ms        ? ?/sec

@jadoonf
jadoonf marked this pull request as ready for review October 7, 2026 21:58
@jadoonf
jadoonf merged commit b71c13c into main Oct 7, 2026
68 of 70 checks passed
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Sync fork with upstream main while preserving Garnet review gates

✨ Enhancement 🐞 Bug fix 🧪 Tests 📝 Documentation ⚙️ Configuration changes 🕐 40+ Minutes

Grey Divider

AI Description

• Merge upstream main without resetting fork history or changing fork-specific published packages.
• Incorporate upstream CLI, registry, documentation, tests, and CI changes.
• Retain Garnet evidence gates while restoring upstream reviewer guidance.
Diagram

graph TD
  U["Upstream main"] --> M["Merge commit"] --> F["Fork main"]
  G["Garnet machinery"] --> F
  F --> C["CI workflows"] --> E["Runtime evidence"] --> R["Reviewer guidance"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Reset to upstream and reapply fork changes
  • ➕ Simplifies the resulting tree
  • ➖ Rewrites fork history
  • ➖ Risks losing Garnet fixes
2. Cherry-pick upstream changes
  • ➕ Permits smaller staged reviews
  • ➖ Does not fully synchronize upstream
  • ➖ Increases ongoing maintenance

Recommendation: Keep the history-preserving merge. Verify the resulting fork against upstream separately from reviewing incoming upstream changes; this isolates unintended fork divergence without sacrificing history.

Files changed (22) +9203 / -8949

Enhancement (4) +1737 / -0
resolve-pr-conflicts.shAdd upstream PR conflict-resolution helper +408/-0

Add upstream PR conflict-resolution helper

• Introduces a shell helper for resolving pull-request conflicts.

.agents/skills/pull-requests/scripts/resolve-pr-conflicts.sh

resolution.rsAdd Cargo dependency resolution +429/-0

Add Cargo dependency resolution

• Introduces resolution logic for Cargo dependencies alongside new metadata, registry, feature, and lockfile modules.

pnpm/crates/cargo-resolver/src/resolution.rs

cargo_deps.rsIntegrate Cargo dependencies into the CLI +448/-0

Integrate Cargo dependencies into the CLI

• Introduces CLI handling for Cargo dependency installation and related workspace behavior.

pnpm/crates/cli/src/cargo_deps.rs

pipeline.rsAdd pipeline command orchestration +452/-0

Add pipeline command orchestration

• Introduces pipeline orchestration backed by selection, execution, caching, and reporting modules.

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

Bug fix (1) +274 / -38
verify_deps.rsSkip unnecessary pre-run installs +274/-38

Skip unnecessary pre-run installs

• Avoids spawning an install when a project has nothing to install and workspace state is absent.

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

Refactor (3) +657 / -6408
lib.rsSplit configuration into focused modules +197/-3904

Split configuration into focused modules

• Moves substantial configuration behavior into dedicated settings, loading, authentication, registry, and workspace modules.

pnpm/crates/config/src/lib.rs

create_virtual_store.rsModularize virtual-store restoration +243/-1383

Modularize virtual-store restoration

• Separates virtual-store creation into planning, caching, linking, and warm and cold installation modules.

pnpm/crates/deps-restorer/src/create_virtual_store.rs

npm_resolver.rsRestructure npm resolution +217/-1121

Restructure npm resolution

• Extracts version selection, release policy, and resolution-result handling into focused modules.

pnpm/crates/resolving-npm-resolver/src/npm_resolver.rs

Tests (2) +1664 / -0
resolve-pr-conflicts.test.shTest PR conflict resolution +603/-0

Test PR conflict resolution

• Adds shell tests for the conflict-resolution helper.

.agents/skills/pull-requests/scripts/resolve-pr-conflicts.test.sh

tests.rsCover Cargo resolver behavior +1061/-0

Cover Cargo resolver behavior

• Adds tests for the incoming Cargo resolver.

pnpm/crates/cargo-resolver/src/tests.rs

Documentation (4) +334 / -45
REVIEW_GUIDE.mdConsolidate canonical review guidance +16/-12

Consolidate canonical review guidance

• Updates review policies and links for the upstream skill location. Retains the fork's requirement to inspect Garnet evidence for sensitive changes.

.agents/skills/review-code/references/REVIEW_GUIDE.md

AGENTS.mdAdopt upstream agent guidance +137/-33

Adopt upstream agent guidance

• Adds philosophy, documentation, and targeted-testing guidance. Replaces references to removed fork review documents with the upstream review skill.

AGENTS.md

DOCUMENTATION.mdDocument website documentation workflow +130/-0

Document website documentation workflow

• Adds guidance for maintaining and publishing documentation across product versions.

DOCUMENTATION.md

PHILOSOPHY.mdAdd upstream project philosophy +51/-0

Add upstream project philosophy

• Documents the principles referenced by the synchronized implementation and review guidance.

PHILOSOPHY.md

Other (8) +4537 / -2458
.coderabbit.yamlAlign review instructions and retain Garnet evidence checks +10/-10

Align review instructions and retain Garnet evidence checks

• Points CodeRabbit to the upstream review guide and adds targeted, head-commit-aware evidence instructions for sensitive paths. Retains a fork-specific auto-review base branch.

.coderabbit.yaml

ci.ymlSynchronize TypeScript CI checks +72/-102

Synchronize TypeScript CI checks

• Adds changeset-only lint coverage, skill-script tests, and revised tooling setup while aligning CI with upstream.

.github/workflows/ci.yml

garnet-evidence-gate.ymlRetain the fork's evidence workflow +7/-11

Retain the fork's evidence workflow

• Adjusts the Garnet evidence gate during the upstream sync so runtime evidence remains available to fork reviewers.

.github/workflows/garnet-evidence-gate.yml

Cargo.tomlSynchronize Rust workspace dependencies +244/-186

Synchronize Rust workspace dependencies

• Registers incoming crates and updates workspace dependencies to support upstream Rust changes.

Cargo.toml

Cargo.lockLock updated Rust dependencies +1189/-79

Lock updated Rust dependencies

• Refreshes dependency resolutions for the synchronized Rust workspace.

Cargo.lock

pnpm-lock.yamlLock updated JavaScript dependencies +2528/-1978

Lock updated JavaScript dependencies

• Refreshes workspace dependency resolutions for incoming upstream tooling changes.

pnpm-lock.yaml

pacquet-ci.ymlExpand pacquet CI +258/-65

Expand pacquet CI

• Synchronizes Rust CI checks with the broader upstream workspace.

.github/workflows/pacquet-ci.yml

release.ymlSynchronize release automation +229/-27

Synchronize release automation

• Brings release jobs into line with upstream's expanded publication process.

.github/workflows/release.yml

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Action required

1. Conflict resolution can run a pull request's code 🐞 Bug ⛨ Security
Description
regenerate_lockfile runs pnpm install with --ignore-scripts but not --ignore-pnpmfile, so
pnpm can load a project-controlled pnpmfile. When a maintainer resolves a lockfile conflict on a
pull request branch, that file can execute through Node with the maintainer's local access.
Code

.agents/skills/pull-requests/scripts/resolve-pr-conflicts.sh[284]

+  pnpm install --lockfile-only --no-frozen-lockfile --ignore-scripts
Relevance

●●● Strong

Security-sensitive pnpmfile execution during maintainer conflict resolution warrants an explicit
ignore-pnpmfile safeguard.

PR-#43

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Static inference: the script checks out the PR branch before regenerating its lockfile. The pnpmfile
finder discovers project .pnpmfile.cjs and .pnpmfile.mjs files, and the Node runtime loads them;
the repository's install test uses the separate --ignore-pnpmfile flag to suppress a custom
resolver.

.agents/skills/pull-requests/scripts/resolve-pr-conflicts.sh[181-191]
.agents/skills/pull-requests/scripts/resolve-pr-conflicts.sh[281-285]
pnpm/crates/hooks/src/finder.rs[14-31]
pnpm/crates/hooks/src/node_runtime.rs[46-67]
pnpm/crates/cli/tests/suite/custom_fetchers.rs[268-282]

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

## Issue description
Lockfile regeneration can execute a pnpmfile supplied by the pull request despite `--ignore-scripts`.

## Fix Focus Areas
- .agents/skills/pull-requests/scripts/resolve-pr-conflicts.sh[281-285]

## Recommended Fix
Add `--ignore-pnpmfile` to the lockfile-regeneration invocation and test conflict handling with a malicious project pnpmfile present.

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

Dismiss ↗ | View ↗


2. Git submodules can reach guarded addresses 🐞 Bug ⛨ Security
Description
CachedSource::ensure_submodules invokes checkout_submodules_with without the guarded Git
configuration used for the repository checkout. A Git dependency with a .gitmodules entry can
therefore make the install-phase Git process resolve a submodule host again or follow an HTTP
redirect without the address pinning and redirect restriction applied during resolution.
Code

pnpm/crates/git-fetcher/src/source_cache.rs[R30-34]

+                if has_submodules(self.path()).map_err(Arc::new)? {
+                    checkout_submodules_with(
+                        git_bin.unwrap_or_else(|| Path::new("git")),
+                        self.path(),
+                    )
Relevance

●●● Strong

Submodule Git operations should preserve the resolver’s address-pinning and redirect protections.

PR-#43

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Static inference: the resolver constructs pinned Git settings from AddressGuard, and the top-level
clone or fetch receives them. The subsequent install fetcher calls ensure_submodules, whose
recursive Git command receives only the binary and checkout path; its protocol filter does not
provide DNS pinning or redirect control.

pnpm/crates/resolving-git-resolver/src/git_resolver.rs[180-195]
pnpm/crates/resolving-git-resolver/src/pinned_remote.rs[5-18]
pnpm/crates/git-fetcher/src/fetcher/remote.rs[23-39]
pnpm/crates/git-fetcher/src/fetcher.rs[140-160]
pnpm/crates/git-fetcher/src/fetcher.rs[350-356]

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

## Issue description
Submodule fetching does not carry the Git connection guard applied to the top-level repository.

## Fix Focus Areas
- pnpm/crates/git-fetcher/src/source_cache.rs[24-35]
- pnpm/crates/git-fetcher/src/fetcher.rs[350-356]
- pnpm/crates/resolving-git-resolver/src/pinned_remote.rs[5-18]

## Recommended Fix
Validate each submodule URL and its resolved addresses against the connection policy, disable unchecked redirects, and apply the resulting guarded configuration to recursive submodule fetches. Add a test with a disallowed submodule destination.

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

Dismiss ↗ | View ↗



Remediation recommended

3. A changeset exposes internal rename 📘 Rule violation ⚙ Maintainability
Description
The changeset describes an internal rename and names hook APIs and map fields in its release-note
body. Published release notes therefore expose implementation wiring instead of only explaining the
registry behavior users receive.
Code

.changeset/registries-by-scope-by-prefix.md[58]

+This is an internal rename: no setting, error code, or lockfile field changes. A `preResolution` hook still reads `ctx.registries`. An `updateConfig` hook is the exception, because it receives the resolved configuration. It reads and returns the per-scope and per-prefix maps as `registriesByScope` and `registriesByPrefix`. The `registries` and `namedRegistries` settings are read under the names users write them.
Relevance

●●● Strong

Explicit release-note guidance favors concise user-facing descriptions over internal hook and map
implementation details.

PR-#47

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The compliance rule requires changeset descriptions to be concise user-facing release notes and
forbids implementation rationale or low-level internal names. The changed paragraph explicitly
discusses an internal rename, hook APIs, and internal map names.

Rule 2757157: Keep changeset descriptions as user-facing release notes, not implementation details
.changeset/registries-by-scope-by-prefix.md[58-58]

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 changeset includes internal rename details, hook names, and map field names that are implementation details rather than user-facing release information.

## Fix Focus Areas
- .changeset/registries-by-scope-by-prefix.md[58-58]

## Recommended Fix
Rewrite the paragraph to describe only the observable registry behavior and compatibility impact. Remove internal type names, hook APIs, field names, and implementation rationale while retaining any user-relevant configuration or compatibility information.

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

Dismiss ↗ | View ↗


4. HTTP close failures bypass diagnostics 📘 Rule violation ◔ Observability
Description
Response::drop prints a resource-close error directly with eprintln! instead of routing it
through the project diagnostic mechanism. Any failed response cleanup writes raw error text to
stderr during normal library use, outside centralized error reporting.
Code

pnpm/crates/http/src/response.rs[R116-120]

+impl Drop for Response {
+    fn drop(&mut self) {
+        if let Err(error) = pnpm_wasm_host::close_resource(self.handle) {
+            eprintln!("Failed to close HTTP response stream: {error}");
+        }
Relevance

●●● Strong

The repository explicitly requires user-visible errors to use centralized diagnostics rather than
direct stderr writes.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The changed Drop implementation emits an error directly to stderr, while the checklist requires
user-visible errors to flow through miette-compatible diagnostics provided by pnpm_diagnostics.
The new cleanup path is the exact direct-write site.

Rule 2757272: Route user-facing errors through miette via pnpm-diagnostics
pnpm/crates/http/src/response.rs[116-120]

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

## Issue description
`Response::drop` writes close failures directly to stderr, bypassing centralized diagnostics and making library errors inconsistent with the CLI reporting path.

## Fix Focus Areas
- pnpm/crates/http/src/response.rs[116-120]

## Recommended Fix
Replace the direct `eprintln!` with the repository's supported tracing or `pnpm_diagnostics` reporting mechanism for cleanup failures. Preserve the original error as structured context and avoid panicking from `Drop`.

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

Dismiss ↗ | View ↗


5. A rogue Cargo registry can exhaust memory 🐞 Bug ⛨ Security
Description
fetch_sparse_index_file downloads each sparse-index entry with
get_bytes_with_secure_auth_and_retry, which forwards usize::MAX as the body limit. The whole
body is then turned into a String and written to the cache. A malicious or compromised custom
Cargo registry, or a hostile proxy in front of it, can return an arbitrarily large index entry. The
resolver fetches up to 16 entries at once (buffer_unordered(network_concurrency.clamp(1, 16))), so
memory use can multiply until the install is killed.
Code

pnpm/crates/cli/src/cargo_deps/sparse_registry.rs[R190-193]

+    let url = format!("{}/{relative_path}", sparse_index.trim_end_matches('/'));
+    let response = http_client
+        .get_bytes_with_secure_auth_and_retry(&url, auth_headers, None, retry_opts)
+        .await
Relevance

●●● Strong

Unbounded concurrent registry responses create a concrete denial-of-service risk and conflict with
existing response-size caps.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The index-entry fetch uses the variant with no size cap, and its implementation passes usize::MAX.
The registry-config fetch in the same file uses the capped variant with MAX_REGISTRY_CONFIG_BYTES
and rejects oversized bodies. That shows the codebase already treats registry responses as untrusted
and caps their size, but the index-file path does not. Up to 16 entries download concurrently and
each is fully read into memory.

pnpm/crates/cli/src/cargo_deps/sparse_registry.rs[189-211]
pnpm/crates/network/src/requests.rs[20-36]
pnpm/crates/cli/src/cargo_deps/sparse_registry.rs[229-258]
pnpm/crates/cli/src/cargo_deps/sparse_registry.rs[108-130]

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

## Issue description
`fetch_sparse_index_file` downloads Cargo sparse-index entries with `get_bytes_with_secure_auth_and_retry`, which uses a `usize::MAX` body limit. A hostile registry can stream an unbounded body that is buffered in memory, up to 16 at a time.

## Fix Focus Areas
- pnpm/crates/cli/src/cargo_deps/sparse_registry.rs[189-211]
- pnpm/crates/cli/src/cargo_deps/sparse_registry.rs[229-258]

## Recommended Fix
Add a `MAX_SPARSE_INDEX_ENTRY_BYTES` constant, for example a few tens of MiB, which is far above the largest crates.io index entry. Switch the call to `get_limited_bytes_with_secure_auth_and_retry(&url, auth_headers, None, retry_opts, MAX_SPARSE_INDEX_ENTRY_BYTES)`. If `response.body_truncated` is set, return an error before decoding or caching, the same way `download_registry_config` handles `MAX_REGISTRY_CONFIG_BYTES`. Add a test that serves an oversized index entry and checks that the error is returned and nothing is cached.

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

Dismiss ↗ | View ↗


View medium (2)
6. Cargo resolution repeatedly parses old data 🐞 Bug ➹ Performance
Description
fetch_sparse_index calls the stateless missing_index_names helper on every fetch wave,
rebuilding discovery from all accumulated index files. Cargo dependency graphs that require several
waves repeatedly parse and traverse earlier results rather than using the resolver's retained
incremental state.
Code

pnpm/crates/cli/src/cargo_deps/sparse_registry.rs[R102-104]

+    loop {
+        let missing = pnpm_cargo_resolver::missing_index_names(metadata, &index_files, &source)
+            .wrap_err("discover Cargo sparse-index files")?;
Relevance

●● Moderate

The incremental-state concern is plausible, but performance impact depends on sparse-index wave
counts and resolver behavior.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Static inference: missing_index_names creates a fresh IndexDiscovery and adds every supplied
file. The CLI grows index_files on each loop iteration, while the resolver's stateful API
explicitly supports parsing each newly added file once and resuming blocked dependency edges.

pnpm/crates/cli/src/cargo_deps/sparse_registry.rs[99-131]
pnpm/crates/cargo-resolver/src/resolution.rs[30-37]
pnpm/crates/cargo-resolver/src/resolution.rs[45-79]

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

## Issue description
Each Cargo sparse-index fetch wave reparses all index files fetched in earlier waves.

## Fix Focus Areas
- pnpm/crates/cli/src/cargo_deps/sparse_registry.rs[97-131]
- pnpm/crates/cargo-resolver/src/resolution.rs[45-79]

## Recommended Fix
Create one `IndexDiscovery` before the loop, add only newly fetched entries after each wave, and call its `missing_names` method on that retained instance.

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

Dismiss ↗ | View ↗


7. Repeat installs do extra store writes 🐞 Bug ➹ Performance
Description
repeat_install_verdict calls register_workspace_in_store before deciding whether an install is
already up to date. Even a short-circuited warm install now creates or checks store directories,
attempts a registry symlink, and inspects the existing entry when that symlink already exists.
Code

pnpm/crates/package-manager/src/install/run/fast_path.rs[R49-50]

+    if !check.resolve_only {
+        register_workspace_in_store(check.workspace.config, check.workspace.workspace_root)?;
Relevance

●● Moderate

The extra registration work is measurable, but it may be intentional for maintaining workspace-store
invariants.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Static inference: the new call precedes the unchanged-install verdict. Registration creates the
store root and enters register_project; an existing registry link takes the AlreadyExists path,
which reads its target and canonicalizes the project path. The prior fast path returned before the
old registration block.

pnpm/crates/package-manager/src/install/run/fast_path.rs[46-75]
pnpm/crates/package-manager/src/install/run/fast_path.rs[193-232]
pnpm/crates/store-dir/src/project_registry.rs[101-117]
pnpm/crates/store-dir/src/project_registry.rs[125-139]

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 repeat-install fast path performs filesystem registration work even when it skips the install.

## Fix Focus Areas
- pnpm/crates/package-manager/src/install/run/fast_path.rs[46-57]
- pnpm/crates/package-manager/src/install/run/fast_path.rs[193-232]

## Recommended Fix
Preserve registration for projects that need it, but avoid attempting and inspecting an already-valid registry link on every up-to-date check. Cover both first registration and repeated warm installs in tests.

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

Dismiss ↗ | View ↗


Grey Divider

Context sources
✅ Compliance rules (platform): 63 rules
Review mode: Auto: 🧠 Deep: Massive upstream sync modifies many independent resolver, store, and networking paths.
ⓘ  2 issues published inline · 7 in summary

Grey Divider

Tip of the day
💡 Did you know, you can route each severity your way: inline, summary, both, or drop

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

# Helper: regenerate lockfile without running lifecycle scripts
regenerate_lockfile() {
echo "Regenerating pnpm-lock.yaml..."
pnpm install --lockfile-only --no-frozen-lockfile --ignore-scripts

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. Conflict resolution can run a pull request's code 🐞 Bug ⛨ Security

regenerate_lockfile runs pnpm install with --ignore-scripts but not --ignore-pnpmfile, so
pnpm can load a project-controlled pnpmfile. When a maintainer resolves a lockfile conflict on a
pull request branch, that file can execute through Node with the maintainer's local access.
Agent Prompt
## Issue description
Lockfile regeneration can execute a pnpmfile supplied by the pull request despite `--ignore-scripts`.

## Fix Focus Areas
- .agents/skills/pull-requests/scripts/resolve-pr-conflicts.sh[281-285]

## Recommended Fix
Add `--ignore-pnpmfile` to the lockfile-regeneration invocation and test conflict handling with a malicious project pnpmfile present.

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

Dismiss ↗ | View ↗

Comment on lines +30 to +34
if has_submodules(self.path()).map_err(Arc::new)? {
checkout_submodules_with(
git_bin.unwrap_or_else(|| Path::new("git")),
self.path(),
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

2. Git submodules can reach guarded addresses 🐞 Bug ⛨ Security

CachedSource::ensure_submodules invokes checkout_submodules_with without the guarded Git
configuration used for the repository checkout. A Git dependency with a .gitmodules entry can
therefore make the install-phase Git process resolve a submodule host again or follow an HTTP
redirect without the address pinning and redirect restriction applied during resolution.
Agent Prompt
## Issue description
Submodule fetching does not carry the Git connection guard applied to the top-level repository.

## Fix Focus Areas
- pnpm/crates/git-fetcher/src/source_cache.rs[24-35]
- pnpm/crates/git-fetcher/src/fetcher.rs[350-356]
- pnpm/crates/resolving-git-resolver/src/pinned_remote.rs[5-18]

## Recommended Fix
Validate each submodule URL and its resolved addresses against the connection policy, disable unchecked redirects, and apply the resulting guarded configuration to recursive submodule fetches. Add a test with a disallowed submodule destination.

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

Dismiss ↗ | View ↗

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

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

No code suggestions found for the PR.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.