Skip to content

chore: sync upstream and repin Garnet action - #129

Merged
jadoonf merged 278 commits into
mainfrom
cursor/sync-upstream-repin-garnet-99b1
Nov 4, 2026
Merged

jadoonf merged 278 commits into
mainfrom
cursor/sync-upstream-repin-garnet-99b1

Conversation

@jadoonf

@jadoonf jadoonf commented Nov 4, 2026 •

Copy link
Copy Markdown

Summary

  • Merge pnpm/pnpm main at 37ade57d2dcaa9aa77ef7de8423e45eb12bf3607 into the fork with a real merge commit so upstream ancestry remains connected.
  • Update all 10 garnet-org/action references across 8 workflow files to the v2.5.2 commit 673a06d87748bec49e4d8df22d371b2a3420aba4.
  • Keep the explicit Jibril version inputs at v2.17.0.

This PR must be merged with a merge commit. Squashing or rebasing it would discard the upstream ancestry this sync restores.

The only merge conflict was .pr_agent.toml; it was resolved with the upstream version as required. No Garnet-owned workflow or script conflicted.

Squash Commit Body

Merge the current pnpm upstream history into the fork while preserving ancestry.

Repin Garnet runtime monitoring to v2.5.2, which supports runner images where sudo-rs strips environment variables.

Checklist

  • Verified the sync commit has the previous fork head and current upstream head as its two parents.
  • Verified all 10 action references use the full v2.5.2 SHA and label.
  • Verified explicit jibril_version inputs remain at v2.17.0.
  • Ran the repository pre-push checks and actionlint over all repinned workflows, excluding only the repository's intentional Blacksmith-label and $/ self-action diagnostics.

Written by an agent (Cursor, GPT-5.6 Sol).

Open in Web Open in Cursor 

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

samanyudas and others added 30 commits October 25, 2026 16:35
… does not list (pnpm#17320)

An importer that the wanted lockfile does not list falls back to
`all_locked_peer_versions`, which walks every snapshot and recovers the
peers of every hashed suffix. `LockedPeers::of` ran that walk once per
such importer, so N new workspace projects repeated the whole-lockfile
scan N times.

The result does not depend on the importer, so `WorkspaceTreeCtx` now
holds it in a `OnceLock` and every unlisted importer shares the same
`Arc`. pnpm v11 already shares this result, through the
`UNLISTED_IMPORTER` key in `getLockedPeerVersionsOfImporter`.

Closes pnpm#17311

---------

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

`pnpm audit --ignore` and `pnpm audit --ignore-unfixable` returned exit
code 0 right after writing the ignore list, so CI passed even when
vulnerabilities that were not ignored remained. Both CLIs now remove
every GHSA in the merged ignore list (the configured ignores plus the
new ones) from the report and apply the same audit-level check a plain
`pnpm audit` uses. The printed message is unchanged.

v11: the threshold filter is extracted into filterAdvisoriesByAuditLevel
and shared by the report and ignore paths.
v12: ignore_vulnerabilities returns the merged list it wrote, and
filter_ignored_advisories delegates to a new remove_advisories_by_ghsa.

Part of pnpm/tasks#191
…ce (pnpm#17341)

get-pnpm moves from pnpm/get.pnpm.io into pnpm/npm/get-pnpm, at 0.0.9
(get.pnpm.io be4e983, where its history stays).

- The pnpm v12 npm package depends on it with `workspace:*`, so a pnpm
  release bundles get-pnpm's source as of that release. A wrapper fix no
  longer needs a get-pnpm release, a catalog bump, and a
  minimumReleaseAge exclusion first. bundle-node-gyp builds it before
  the deploy injects its build output.
- It is released on its own: a `get-pnpm` product in bump.ts and
  create-release-pr.yml (off by default), `get-pnpm@<version>` tags,
  and build-get-pnpm/publish-get-pnpm jobs in release.yml. It is private
  in the workspace so the TypeScript release's recursive publish skips
  it; the packed manifest drops the flag.
- Its runtime dependencies stay exact, through a `get-pnpm` named
  catalog. Its lint is the root ESLint config. Its TLS tests use the
  fixture the Rust network tests use.
- The npm-wrapper CI job runs its tests on Node.js 24 and 22, beside
  the wrapper's. The forwarding proxy in its download tests forwards
  only to the servers the tests start.

npm's registry signing keys were pinned in five places: v11, v12,
get-pnpm, and get.pnpm.io's install.sh and install.ps1. Only v11's copy
was refreshed, by the release PR, and the two repositories handled a
withdrawn key in opposite ways. They now come from
.config/npm-signing-keys.json:

- .github/scripts/update-npm-signing-keys.mjs refreshes it from npm on
  every release PR, not only v11 ones. A key npm stops listing stays,
  marked withdrawn.
- The meta-updater renders it into the v11, v12, and get-pnpm copies,
  so `pnpm lint:meta` fails on a copy edited by hand. pnpm v11 and v12
  keep trusting withdrawn keys, so packages signed before a rotation
  verify. get-pnpm drops them, as get.pnpm.io's installers do.
- get.pnpm.io's update script is to read this file.
…ersion> (pnpm#17340)

Rewrite served `dist.tarball` URLs on `.tgz` registries to
`{public_url}/{pkg}@{version}` for every addressable version (matching
tar registries), so `serverType: pnpr` drops canonical tarball URLs from
`pnpm-lock.yaml` on both `.tgz` and tar registries while keeping
`{public_url}/{pkg}/-/{filename}` served for existing lockfiles and
older clients.

- Emit `{public_url}/{pkg}@{version}` in `pnpr-upstream` for all
  addressable versions and normalize `<pkg>@{version}` tarball URLs to
  `<scopeless-name>-<version>.tgz` in `tarball_basename_for_package` for
  chained `pnpr` instances.
- Accept round-tripped `{public_url}/{pkg}@{version}` URLs in
  `check_tarball_immutable` during `PUT /:pkg/-rev/:rev` and restore the
  stored `.tgz` URL on disk.
- Route `DELETE /:pkg@:version/-rev/:rev` and
  `DELETE /@:scope/:pkg@:version/-rev/:rev` to `unpublish_version_tarball`
  while rejecting reserved `+r<digits>` revision suffixes.
- Fall back to the version parsed from a canonical `<name>-<version>.tgz`
  request in `expected_tarball_dist` so chained `pnpr` proxies resolve
  non-canonical upstream filenames, and preserve `<name>@<version>`
  routes in `TarballRouter`.

Related to pnpm/tasks#208.
… of --depth (pnpm#17330)

The subtree-reuse walk keyed its memo and cycle detection on a depth
bucket, so under a finite `--depth` a dependency cycle only closed once
the walk had gone round it once per level: `pnpm update --depth=<n>`
held a memo entry per node per level and recursed `n` frames deep. On a
1,600-package lockfile `--depth=9999` passed 6 GB before being killed,
and `--depth=30000` overflowed the stack.

Compute instead, once per update scope, each snapshot node's shortest
distance to an update target, by a breadth-first search from the targets
over the reversed snapshot graph. A node visited at depth `d` has a
target within the ceiling `n` iff `d + k <= n` for its distance `k`, and
when that fails for a node it fails for every node below it. The walk
checks it before the memo, so the memoised answers are purely structural
and need neither a depth nor an importer in their key, and the walk's
cost never depends on `--depth`.

Fixes pnpm#17329

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Zoltan Kochan <z@kochan.io>
…chDB suffixes (pnpm#17346)

Mount DELETE handlers on /{name}, /@{scope}/{name}, /{name}@{version},
/@{scope}/{name}@{version}, /{name}/-/{filename}, and
/@{scope}/{name}/-/{filename} alongside the legacy /-rev/{rev} routes,
and accept bare /-/user/{name} on PUT and GET while still stripping the
legacy org.couchdb.user: prefix.

Related to pnpm/tasks#208.

Written by an agent (Antigravity, Gemini 4 Argon).
…m#17351)

Mount batch::serve_ecosystem_publish at both /-/pnpr/v0/publish and
/npm/-/pnpr/v0/publish, remove the duplicate npm-only serve_batch_publish
handler on /-/pnpm/v1/publish, and point pnpm publish --batch at
/-/pnpr/v0/publish.

Since batch::serve_ecosystem_publish defaults entries without an explicit
`ecosystem` field to npm, mounting it on `/npm/-/pnpr/v0/publish` as well as
the server root lets `pnpm publish --batch` and cross-ecosystem batch
publishes share a single implementation and journaled commit path.

Closes pnpm/tasks#208

Written by an agent (Antigravity, Gemini 4 Argon).
…pm#17353)

A scoped package was one escaped segment, so `@pnpm-testing/fresh` was
stored as `packages/!40pnpm-testing!2ffresh/` and its tarball as
`blobs/fresh-1.0.0.tgz`, repeating a name the directory already holds.

The hosted store and the proxy cache now place every package two
directories below `packages/`:

- `@<scope>/<name>/` for a scoped name, `@/<name>/` for any other. No npm
  scope is empty, so `@` cannot collide with a scope.
- A `.tgz`, `.sigstore` or `.crate` blob named `<basename>-<rest>` is
  stored as `<rest>`, so a tarball is `blobs/1.0.0.tgz`. Such a file that
  does not start with `<basename>-` (a non-canonical upstream tarball in
  the proxy cache) is stored with a leading `@`, which `encode_segment`
  never writes, so the two forms cannot collide. Every other file (OCI
  digests, PyPI wheels and sdists) keeps its name.
- The rule keys on the extension rather than the ecosystem because
  `pnpr verify` and the image maintenance walk namespaces read from
  storage, where the ecosystem is not known.
- The prefix is not stripped when the rest would be empty or start with
  `.`, so `foo-..tgz` cannot become a hidden `..tgz` file.

Each segment is still `encode_segment`ed, so names that differ only in
case stay apart on a case-insensitive filesystem. The mapping lives in
`layout.rs` with strict inverses; every backend and listing goes through
it, so no caller of the storage API changed.

`LAYOUT_VERSION` stays 1: pnpr is experimental, and an existing store is
republished rather than converted. `pnpr upgrade-storage` writes the new
paths when converting a pre-marker store, and the fixture fingerprint
hashes a sample path so cached fixture trees in the old layout are
rebuilt.
pnpr serves dist.tarball as <registry>/<name>@<version> on .tgz
registries since pnpm#17340. pnpm v12 rebuilds those URLs for a
registry declared with `serverType: pnpr`, so it leaves them out of the
lockfile. The TypeScript CLI knew only npm and artifactory, so it wrote a
host-specific tarball URL for every package installed from pnpr.

Teach it the pnpr layout, matching v12: the package name unencoded and
the version with its build metadata. getNpmTarballUrl is the single
source of the shape, so the lockfile writer, the reader, and the fast
override rewrite agree by construction.

The e2e tests that assert a lockfile without tarball URLs now declare
`serverType: pnpr` for the mock registry, as the v12 tests do.

The deps-installer testDefaults and the shared command-handler
DEFAULT_OPTS declare `serverType: pnpr` for the mock registry. Config
dependencies do not read serverType in either CLI, so the env lockfile
tests expect the pnpr URL.

pnpm#17351 moved pnpr's batch publish to PUT /-/pnpr/v0/publish,
so `pnpm publish --batch` now sends there, as v12 does.

The fast lockfile rewrite for override and catalog changes now gets
registryOptionsByUrl, so it applies the declared serverType.

The registry mock's getIntegrity and hostedBlobPath read pnpr's
packages/@<scope>/<name>/ storage layout from pnpm#17353.

This is a maintainer-approved exception to the bug-fix-only policy for
the TypeScript CLI, for compatibility with pnpr.
…7355)

Separate hosted storage namespaces by ecosystem (`default/<ecosystem>/` and
`orgs/<org>/<ecosystem>/`) and map package names to path segments per
ecosystem:

- Hosted registries declared under an `<ecosystem>:` group without an
  explicit `org:` now default their `org` to their own registry `name`
  instead of `<ecosystem>~<name>`.
- Hosted registries in different ecosystems may share an `org:` without
  colliding; the collision check in `pnpr-config` compares
  `(org, ecosystem)`.
- `layout::package_segments` and `layout::decode_package_segments` take an
  `Ecosystem`: npm maps scoped `@<scope>/<name>` to `[@<scope>, <name>]`
  and unscoped to `[@, <name>]`; Cargo and PyPI map to `[@, <name>]`; OCI
  maps multi-component `c_1/.../c_k` to `[@<c_1>, ..., @<c_{k-1}>, <c_k>]`
  and single-component names to `[@, <name>]`.
- `pnpr upgrade-storage` converts legacy hosted stores into the
  per-ecosystem layout and maps nested OCI repositories into multi-segment
  `@<c_i>` directories.

Closes pnpm/tasks#213
…pnpm#17352)

A fix flow writes overrides or updates the lockfile but never records
ignores, so `--ignore` and `--ignore-unfixable` were silently dropped next
to `--fix` (any method) or `--interactive`, which implies `--fix`. Both
CLIs now fail with ERR_PNPM_AUDIT_FIX_WITH_IGNORE before loading the
lockfile or contacting the registry, naming the flags that were passed.

Part of pnpm/tasks#191

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
pnpm#17355 moved pnpr's hosted storage under default/<ecosystem>/,
so getIntegrity and hostedBlobPath looked in default/packages/ and every
v11 test that calls them failed on main.

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

Part of pnpm/tasks#213.

- Store `.team-rosters` and `.rule-overrides` records under `<ecosystem>/<local_name>.json` regardless of whether the registry is declared at top level or under an `<ecosystem>:` block in `pnpr.yaml`, and remove the legacy flat-key fallback and `HostedBackend::remove_record_if_current`.
- Store package tombstones under `.tombstones/<ecosystem>/<scope>/<name>.json` via `package_segments` instead of flat `!`-escaped filenames.
- Normalize upstream names to `<ecosystem>/<local_name>` in `compute_upstream_cache_namespace` so moving an upstream between top-level `registries:` and an `<ecosystem>:` group does not invalidate its cache digest, and use `CanonicalPackageName::ecosystem()` directly in `Store::package_dir` and `S3Store::package_prefix`.
- Drop redundant `/v0`, `/v1`, and `pnpr-` prefixes from storage and cache directories (`.tombstones`, `.team-rosters`, `.rule-overrides`, `.scim-users`, `.pipeline-runs`, `.uploads`, `.journal`, `.staging`, `.artifacts`, `shared-artifacts`, `resolver-store`, `resolver-cache`) and migrate legacy keys in `pnpr upgrade-storage`.
The registry mock proxies real npm packages through its npmjs upstream.
pnpr's breaker opens after two consecutive upstream failures and stays
open for 5m, which outlasts pnpm's fetch retries. One network blip on a
Windows runner (an "error sending request" and a 504) tripped it, and the
retries of optionalDependencies.ts all got 503 "circuit open", failing
TS CI on main (run 40241451781).

With maxFails: 0 every retry reaches npmjs again.
…npm#17360)

Extend PHILOSOPHY.md, pnpr/AGENTS.md, REVIEW_GUIDE.md, .coderabbit.yaml, and
.pr_agent.toml so the repository philosophy applies to pnpr and establishes
that pnpr is pre-1.0 on the alpha prerelease lane (experimental per
PHILOSOPHY.md), consolidating storage layouts, internal record formats,
configuration keys, and CLI flags in place before 1.0 without
backward-compatibility fallbacks, aliases, or migration commands between alpha
builds.

- Remove pnpr upgrade-storage and Command::UpgradeStorage.
- Remove legacy .pnpr-journal recovery path and journal manifest serde aliases
  (packument_file, tarballs).
- Remove StoredDerivedTar::Legacy and DerivedTar::scanned in .tar-integrity
  records.
- Remove the redundant /v1 segment from compiler_cache_path.
- Remove CLI subcommand and flag aliases (pnpr config-check,
  --packument-ttl-secs, --no-check-hashes, --min-age-secs, --max-age-secs) and
  the PNPR_PACKUMENT_TTL_SECS env fallback.
- Remove YAML configuration snake_case, *_secs, maxage, and backend.postgresql
  serde aliases, standardizing on camelCase.
…7362)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
A pnpr resolve request carries the client's registries as declarations
keyed by URL. Each declaration held one prefix, so when a project routed
two prefixes to one URL (for example through namedRegistries), only the
smallest reached the server. A dependency or lockfile entry using the
other prefix then failed on a delegated install.

The request protocol adds an `aliases` list next to `prefix`. `prefix`
stays the smallest prefix, the one lockfile keys carry, so the server keys
packages the way the client does and re-keys a lockfile entry written with
another declared prefix. `aliases` exists only in the request protocol.
pnpm-workspace.yaml refuses it in both CLIs, so no new setting is added
to v11.

The v11 config reader now defines prefix routes as own data properties,
so a `__proto__` prefix is kept instead of hitting the inherited setter.

Closes pnpm/tasks#204.

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Reject `-T` on `add` with an error that names `--save-types` and `--tilde`.

`add` has both `--save-types` and `--tilde`. Accepting `-T` would force pnpm to
guess between two long options that are both valid for the command, so the
parser reports the ambiguity and points at the explicit spellings instead.

`-T` is declared as a hidden short flag on `add` and rejected in
`validate_command_scoped_global_options` after clap parses. Going through clap
keeps short clusters (`-DT`), attached values (`-CT`, `--save-prefix=-T`) and
tokens after `--` handled by clap's own rules. The `install <pkg>` -> `add`
rewrite runs before parsing, so `install foo -T` gets the same error. The flag
is hidden, so `-T` does not appear in the help text.

This change is v12-only. pnpm v11 does not expose both options on `add`.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tats-u <12870451+tats-u@users.noreply.github.com>
Co-authored-by: Zoltan Kochan <z@kochan.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The legacy directory matcher rejected equal paths, so a directory selector
skipped its own project and a negated selector failed to exclude it.

Treat an empty relative path as a match in the shared directory helper.
Cover inclusion, exclusion, sibling-prefix boundaries, and recursive exec.
pnpm v11 already includes the directory itself and needs no change.

Closes pnpm/tasks#196.

---------

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

The CAS prune removed a store file whose hard-link count was 1. A
package imported with clone or copy leaves its store files at one link
while a project still uses it. That is every patched or built package,
every package under packageImportMethod: copy, and every package of a
macOS clone. So the prune removed them, and the next install downloaded
them again.

The prune now also keeps every file that a registered project's
installed lockfile references:

- For each registered project it reads <modulesDir>/.pnpm/lock.yaml and
  the lock.yaml in the virtualStoreDir recorded in
  <modulesDir>/.modules.yaml. modulesDir comes from the nearest
  pnpm-workspace.yaml at or above the registered directory.
- Each package's store index keys come from the install's own key
  functions: both keys of a git-hosted package, the manifest-keyed and
  plain keys of a runtime, and every variant of a variations
  resolution.
- Every file of each row is kept, including each side-effects entry.
- A project with no installed lockfile and a package with no row add
  nothing, so the hard-link check still decides for them.
- A lockfile of an unsupported version is skipped with a warning. A
  lockfile, .modules.yaml, pnpm-workspace.yaml, or store index row that
  cannot be read fails the prune with
  ERR_PNPM_STORE_DIR_PRUNE_IN_USE_FILES. Registry errors keep their own
  codes.

In pnpm 12, StoreDir::prune_keeping runs a caller's collector under the
prune lock, and the CLI supplies the collector because store-dir does
not depend on the lockfile crate. pnpm 11 collects before any removal.

pnpm 11 and pnpm 12 share one store. pnpm 12 keys a runtime row with
its synthesized manifest, so the pnpm 11 collector also keeps
package-manifest keys whose tail it references. It scans the index keys
only when a lockfile holds a runtime.

A modulesDir set only on the command line, in the environment, in the
global config, or in packageConfigs is not seen.

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Windows Rust CI aborted pnpr-auth libsql tests with 0xc0000005 (four
times recently: registration_cap_is_strict_across_backend_instances
three times, sync_server::bulk_revocation_refreshes_a_replica_whose_tokens_went_elsewhere
once).

libsql's LibsqlConnection::drop calls disconnect() and then the inner
local::Connection's own Drop calls disconnect() again. Both see the
drop_ref Arc as unique, so sqlite3_close_v2 runs a second time on a
handle SQLite already freed. Usually it reads freed memory as "closed"
and reports misuse. When another thread reused that memory, it read
garbage and crashed. The tests that crashed run several connections
concurrently, which makes reuse likely.

Upstream fixed it in tursodatabase/libsql#2261 (released in 0.10.0),
which nulls the handle after the first close. pnpr stays on the pnpm
fork because tursodatabase/libsql#2301 is still unreleased, so the fix
is cherry-picked onto the fork's pnpm-0.9.30 branch.

The new test installs an SQLite log callback, drops one connection and
asserts no misuse was logged. It logged two before the fork bump.

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

An optional dependency that fails to resolve is skipped unless the wanted
lockfile already holds an entry that satisfies it. The check only accepted
plain semver ranges, so a specifier with a named-registry prefix such as
`work:^1.0.0` was always skipped and its locked entries were dropped.

Both stacks now let the existing lockfile-reuse spec parser
(`locked_child_admits` in v12, `getRangeOfLockedPackage` in v11) judge
the entries. The parser unwraps a declared prefix or built-in alias to its
range and registry, and it matches only entries locked from that registry.

Closes pnpm/tasks#210
…ws (pnpm#17369)

The git fetchers wrote store-index rows with no bundled manifest, so the
warm prefetch re-derived `requiresBuild` from the row's files on every
install, reading and parsing `package.json` once per git dependency, and
the cached git prepare check could read it again.

`queue_files_index` now reads the manifest once, derives `requiresBuild`
from it and the file list, and stores the normalized manifest in the row,
as pnpm v11 does. Rows with a bundled manifest keep their stored
`requiresBuild`; only rows written by older releases are re-derived.

`normalize_bundled_manifest` moves from `pnpm-tarball` to
`pnpm-package-manifest` so the git fetcher can use it. The
manifest-plus-files build check moves there too as
`requires_build_from_files`, next to a new
`read_package_json_from_cas_paths` that `requires_build_from_cas_paths`
and the warm git prepare check now share.

Closes pnpm/tasks#188
…pm#17367)

The settings a repository must not control (ci, stateDir, scope, globalDir,
globalBinDir, macosBackup, globalShims, tools, symlinkedLockfileTargetDirs)
move from WorkspaceSettings into a new MachineSettings struct. A project's
pnpm-workspace.yaml and a config dependency's entry parse into
WorkspaceSettings only, so clear_machine_only_settings and the separate
globalShims clearing go away. A new machine setting can no longer reach a
project file because someone forgot to add it to a list.

The global config.yaml, PNPM_CONFIG_*, the command line, and the
updateConfig hook round-trip read into TrustedSettings, which holds both
halves. The global file is read once per half rather than through
serde(flatten), which buffers values untyped and would break scalar
settings such as `tag: 1.0`. The machine half is parsed only when the file
mentions one of its keys.

The pnpm-home pnpm-workspace.yaml keeps setting globalShims. A global
command reads that one key from it explicitly.

The refused-key warning and the `pnpm config set` refusal now cover every
MachineSettings key, derived from the struct. Keys that
`pnpm config set --global` cannot write (tools) are routed to the global
config.yaml and their PNPM_CONFIG_* variable.

updateConfig hooks keep reading and writing machine settings as before,
except the two already hidden from them, because hook code runs as the user.

Closes pnpm/tasks#207
…to the pnpm bootstrap (pnpm#17368)

Both CLIs built the network config for self-update and the pinned-pnpm
download (the package-manager bootstrap) from the trusted `.npmrc`
files and the command line's `.npmrc`-spelled tokens only, so
`strictSsl` / `localAddress` set in the global `config.yaml` or through
`PNPM_CONFIG_STRICT_SSL` / `PNPM_CONFIG_LOCAL_ADDRESS` applied to
ordinary registry requests but not to the bootstrap. Both sources are
trusted, so the bootstrap now reads them with the project precedence:
trusted `.npmrc` < global `config.yaml` < environment < command line.
The project `pnpm-workspace.yaml` stays out of the bootstrap.

v12: `WorkspaceSettings::apply_tls_to` no longer consumes its fields,
and `Config::load_sources` applies it to `package_manager_bootstrap.tls`
where it already overlays the proxy settings: in
`apply_bootstrap_settings` (global `config.yaml`), `apply_env_settings`
(`PNPM_CONFIG_*`), and `apply_cli_setting_values`. The last one is what
makes `--config.localAddress` reach the bootstrap: the CLI kebab-cases
the key into `setting_values`, while `npmrc_tokens` keeps it as given
and the `.npmrc` parser does not know the camelCase spelling.

v11: `createPackageManagerNetworkConfig` resolves `strictSsl` and
`localAddress` as `configFromCliOpts` (camelCased, so both spellings),
then the global `config.yaml`, then `trustedConfig`. The command line
comes first because its kebab-case tokens also sit inside
`trustedConfig`, where the global yaml would otherwise override them.
`applyEnvSetting` mirrors the two settings onto
`packageManagerNetworkConfig` as it does for `registry`; it already
skips keys the command line set. `applyGlobalYamlConfig` returns the
file's two settings next to the registries, so
`addSettingsFromWorkspaceManifestToConfig` returns the manifest's
settings (copying the command line over them instead of mutating them)
and `PnpmSettings` types `strictSsl` and `localAddress`, which are yaml
settings since b652047. `TYPED_WORKSPACE_MANIFEST_KEYS` and its Rust
mirror list them too.

Covered by `tests::tls_settings` in pnpm-config and the "package
manager bootstrap" tests in `pnpm11/config/reader/test/index.ts`; with
the overlays removed, three tests fail in each stack.

Closes pnpm/tasks#201
…npm#17370)

Under nodeLinker: hoisted, both CLIs reuse a package at a location the
previous install's hoistedLocations records. Nothing marked an install in
progress, so an install that stopped after replacing a recorded location
but before writing .modules.yaml left the old record behind. Reverting the
change then reused the replaced files.

Before the linker touches the tree, both CLIs now rewrite .modules.yaml
without every recorded location the install does not reuse as is. A
repeat install that reuses everything writes nothing extra.

A narrow window remains between the final .modules.yaml write and the
current lockfile write, which this change keeps in their existing order.

Closes pnpm/tasks#182
…to another registry (pnpm#17373)

A plain lockfile key (`@scope/a@1.0.0`) records no registry, so the
reuse gate read its registry from the current scope route. Routing the
scope to another registry was invisible: the lockfile stayed fresh, the
install went headless, and the locked versions and children were
fetched from the new registry with the old integrity. The install
failed where resolving against the new registry would succeed.

The workspace state now records the scope routes an install resolved
the lockfile under (registryRoutes). A resolving unfiltered install
records the routes it ran under; a frozen or filtered install keeps the
previous record while a plain key still sits under a moved route. The
default registry is not recorded: switching it is routinely a mirror
switch and would resolve every unscoped package again.

The registry context carries those routes as the provenance of plain
keys. The reuse gate reads a plain key's registry from them, so a key
under a moved scope is refused, loses its pin, and resolves again from
its range against the new registry. In pacquet the subtree-reuse walk
also refuses a subtree holding a moved key, because a reused parent
seeds its children with exact pins and only its fresh manifest carries
the ranges. A plain key under a moved route marks the lockfile stale
for a resolving install; --frozen-lockfile installs it as recorded.
A route change is a settings drift for the repeat-install shortcut.

The route: entries of registryPrefixes are redundant with the new
record and are dropped (that record is unreleased).

Closes pnpm/tasks#209
pnpm#17372)

The v12 command reference (pnpm/docs/cli) had drifted from the clap
definitions, and the error codes the docs name had drifted from the ones
the source emits. Nothing caught either.

Two unit tests in pnpm-cli now compare the docs with the code, following
the settings test from pnpm#17269. docs_command_pages maps every
visible clap command to its page and checks both directions: a flag
without a heading, and a heading for a flag the command rejects. Pages
may delegate to another page, import .mdx partials, and document a
--[no-] pair with either side; a flag that spells a setting is claimed
by ConfigOverrides::extract before clap sees it, so the test asks that
entry point, and the -s shorthand is accepted everywhere too.
docs_error_codes checks that every ERR_PNPM_* code the docs name is
emitted by a source file under pnpm/, with the migration guides exempt,
and keeps errors.md in alphabetical order. Each test keeps a list of
today's gaps, and fixing a gap means deleting its entry.

The gaps the tests found are fixed: add documents its include, lockfile,
dedupe, and script flags; deploy names the install options it accepts; remove
documents --[no-]trust-lockfile; import documents --pnpr-server; recursive.md no longer
presents --link-workspace-packages as a recursive option; the
frozenStore section drops the v11-only ERR_PNPM_FROZEN_STORE_INCOMPLETE.

errors.md in both docs trees opens with what a code is for, lists its
codes in alphabetical order, and adds the codes users meet most. The
doctor page stops describing v11 (no skipped store check, no @pnpm/exe
install method), and the exec page states that pnpm parses its own
options up to the command name on either side of `exec`.

DOCUMENTATION.md gets the reference-page templates and the rules the
three drift tests parse.

Part of pnpm/tasks#191.
…7363)

createPackageManagerNetworkConfig now reads `https-proxy`, `http-proxy`,
and `proxy` as unset unless they are a non-empty string. `false`, `null`,
and an empty value fall through to the next setting and then the
environment, matching resolveProxySettings for installs and pnpm v12.
An explicit `proxy=false` remains the way to turn the proxy off, and it now also stops the
download's `httpProxy` from falling back to `HTTP_PROXY`, as installs do.

The engine identity check of the pinned pnpm now takes its network
settings from getPackageManagerBootstrapConfig, like the store controller
that downloads it, instead of the project's proxy, TLS, and auth settings.

Closes pnpm/tasks#193

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(install): refuse nodeLinker changes on v11 mutations

* fix(install): keep node_modules on a filtered install after a nodeLinker change

A plain install that selected the workspace root purged the root modules
directory on a nodeLinker mismatch even when other workspace projects were
not selected. Under the hoisted linker those projects keep their
dependencies in the root modules directory, and the filtered install does
not relink them, so they lost their dependencies.

The purge for a nodeLinker mismatch now runs only when the install covers
every workspace project. Otherwise it fails with ERR_PNPM_NODE_LINKER_DIFF.
Adds tests for the whole-workspace purge and the root-only refusal, and
documents the error in the v11 docs.

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

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
zkochan and others added 21 commits November 4, 2026 08:14
…17654)

A version may now be published with platform variants only: its
document has no `dist` and no plain attachment. pnpr normalizes the
submitted manifest as an archive's is, requires it and every variant to
name the URL's package and the version key (so a key with the `+r<N>`
reserved for revisions is refused), checks the variants against it, then
generates the minimal archive that
npm's documents point to: a package.json with the version's name and
version and the union of the variants' `os`, `cpu`, and Linux `libc`
(glibc when a Linux platform names none; none of them when a variant is
`wasm32`), packed deterministically so every replica and rebuild
produces the same bytes. It is written through the publish's own slot
path, so a registry that stores tars stores its tar.

The generated archive is not one of the version's archives. pnpr's
document and the release record describe such a version by the manifest
its variants share (the peers, and each dependency every variant
declares with the same specifier), with no top-level integrity, facts,
or primary inputs, and each variant's manifest difference is taken
against that shared manifest. Provenance does not name it, but a
statement over the variants may accompany the version, and npm's
documents keep its attestations.

Variants published with an `any` archive are held to the same identity,
and a packument rewrite restores the variant fields pnpr derived for
every retained version instead of dropping them.

A staged `any` archive may also be referenced by `dist.integrity` alone,
as a release job that packs none sends it; a test covers that.

pnpr's variant handling calls the archive every other host installs the
`any` archive, as pnpm/rfcs#70 models it, instead of the primary.
Two Windows e2e tests that switch to a downloaded pnpm 9.x sometimes
outlive nextest's 300 s limit, and the TS counterpart hits spawnSync's
ETIMEDOUT. Both runs drop everything the command printed, so the logs
show nothing about where the stall is.

- `pnpm_testing_utils::stall_report::output_within` replaces
  `Command::output` in `dispatched_pinned_pnpm_inherits_env_file_and_strips_flag`
  and `child_pnpm_selects_the_version_for_its_own_directory`. It echoes
  output to stderr as it arrives, stamped with the time since the start,
  which survives nextest killing the test. The command is done once it
  has exited and its output streams have closed. If it is not done after
  4 minutes, the test fails with the output so far and the processes of
  the run, each with its CPU time and uptime, and those are killed. The
  processes are found by an environment variable each of them inherits,
  so ones whose parent has exited are included.
- `execPnpmSync` adds the output a process printed before it failed,
  timed out or was killed to the error. Its stderr was labelled STDOUT.

Refs pnpm/tasks#263
…7657)

pnpm reads `publishConfig.variants`, an array with one entry per
archive: `targets` are canonical platform tags, or the reserved `any` for
the archive of every other host; a platform variant's tag is its targets
sorted by their bytes and joined with `+`.

Before anything is packed, pnpm checks that every target is `any` or a
canonical tag (suggesting the canonical spelling, such as `linux-x64` for
the napi-rs triple `linux-x64-gnu`), that no target appears twice and
`any` stands alone, which also rules out two variants that could tie on
a host, that each tag fits pnpr's 128-byte limit, and that no manifest
sets a field every archive shares or, for a platform variant, `os`,
`cpu`, or `libc`.

`pnpm pack` writes one archive per entry, the `any` archive under the
usual name and each variant as `<name>-<version>~<tag>.tgz`, and
`--variant <target>` packs only the archives its targets name. A file an
entry's pattern claims goes only into that entry's archives; every other
file is shared. Each archive holds the files its own manifest's `main`,
`browser`, and `bin` name, after its entry's `manifest`, rather than the
base manifest's, and each must name a file the archive holds by its exact
path. A
pattern of a packed entry that matches nothing fails the pack. Each
archive passes the checks pnpr runs, and the CRLF shebang and dotenv
checks a single archive gets, before it is written.
…npm#17669)

Require matching child variants before collapsing peer dependents. Recursive
compatibility could independently choose incompatible targets for a child
and its parent, giving one project two instances of the same dependency.

Retain all surviving variants for subsequent rounds, stop when no variant
collapses, and compose replacement maps so importer references reach the
final survivor. Use an iterative loop for the rounds. When a cycle prevents child-first
progress, collapse one recursively compatible pair per independent cyclic
component and resume those rounds. Defer parents of changed components.
Process dependency components before their parents when selecting that pair.
Reuse the peer walker's iterative component pass and the graph sequencer's
component helper. Index incoming edges so each round rewrites references to collapsed paths
without scanning unrelated nodes.

Add synthetic regression coverage in both implementations. Declare serde's
rc feature in resolver-base, whose serialized manifest contains Arc<Value>,
so scoped resolver builds do not depend on workspace feature unification.

Closes pnpm#17666.
`pnpm publish` of a package that declares `publishConfig.variants` packs
every archive and publishes them as one version to a registry declared
with `serverType: pnpr`: it stages each archive by its integrity (HEAD,
then PUT when missing) and sends the usual document, which references
the `any` archive as `<name>-<version>.tgz` and each platform variant as
`<name>-<version>~<tag>.tgz`, by integrity and length. A version without
an `any` entry is sent with no `dist` and no plain attachment, and pnpr
generates the archive npm's documents point to.

Publishing variants to any other registry is refused, also in a dry run,
because a version published without its variants cannot get them later.
`--no-variants` publishes only the `any` archive instead. Provenance for
such a version is refused before any archive is staged.

pnpm warns when `publishConfig.variants` has no entry that targets `any`,
so the version has no archive for a host no variant matches, and when it
declares platform variants without a top-level `files` field, so every
file no entry claims ships in every archive.
The resolver adds optional type peers before running readPackage on an
injected workspace dependency. Freshness verification used the importer
manifest, which lacked those inferred peers.

Retain the project manifests before importer hooks. The existing directory
manifest walk uses that source and the resolver's ordered hook chain when
addMissingPeerTypes is enabled. Only reachable directory dependencies are
transformed. Importer manifests remain unchanged, since inferred peers on
an importer would become install requirements.

Cover normal install followed by frozen install with shared and per-project
lockfiles, including hooks that remove an inferred type peer or add a peer.
Isolate the existing external-importer fixture from ancestor workspaces.

Closes pnpm#17668.
…e records (pnpm#17671)

With `sharedWorkspaceLockfile: false` the up-to-date fast path declined,
since each project keeps its own lockfile and workspace state, and the
install ran its loop over every project after discovery parsed every
manifest. The fast path now lists the projects without reading them and
checks each one against its own state, as its run in the loop would:
its configuration anchored to it, its manifest rebuilt from its record,
and the other projects as the ones whose commands it links. The projects
are registered in the store once all of them are up to date. Any project
that cannot be decided from its record sends the install to the loop.

The check of each project already refuses the shortcut while an injected
source may have changed, so injected copies still follow their sources.
`packageConfigs` and the global virtual store decline, since the records
carry neither per-project settings nor the runtime the build markers
depend on.

Part of pnpm/tasks#256.
… by integrity (pnpm#17659)

`pnpm publish --upload-variant <target>` packs the archive of the
`publishConfig.variants` entry the target names, uploads it to the
registry's staging area, and prints `<target>=<integrity>`. It publishes
nothing, always sends the PUT so a rerun renews the archive, needs a
registry declared `serverType: pnpr`, and refuses `--provenance`.

`pnpm publish --variant-integrity <target>=<integrity>`, repeated per
entry (`<name>~<target>=<integrity>` with `--recursive`), publishes the
version from those archives without packing any. Before the commit, pnpm
checks that every entry, the `any` entry included, has exactly one value,
and asks the registry with HEAD that each archive is still staged for
this account, taking its length from the answer; a missing one fails
naming the archive and the job to rerun.
…ersion (pnpm#17660)

With `--provenance`, a version with platform variants is published with
one statement whose subjects are every archive it publishes: the `any`
archive by the version's PURL, and each platform variant by the same
PURL with a `variant` qualifier holding its tag (`+` written `%2B`), each
with its `.tgz` SHA-512. Archives other jobs uploaded are named by the
integrity given with `--variant-integrity`. A version without an `any`
archive names only its variants, since pnpr generates the archive npm's
documents point to.
Upgrade serde-saphyr to 2.1.0. Adapt scanner and token handling, and treat comment-only YAML as empty where callers use defaults. Preserve lockfile serialization. Closes pnpm/tasks#258.

---------

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

With sharedWorkspaceLockfile: false, a recursive run or exec checks
each selected project with its own verify-deps gate. Each gate of a
project that links workspace commands walked the workspace and read
every project manifest again, so the manifest reads grew with the
square of the project count.

check_deps_status_before_run_at now takes an optional GateWorkspace,
which a recursive command creates once and passes to every gate. It
discovers the workspace projects lazily, on the first gate that needs
them. A gate that finds its project out of date drops the shared
projects, so the gates after a possible install discover them again,
and the rechecks after a spawned install pass None. The shared projects
keep the discovery options they ran with. A gate whose anchored config
discovers differently, such as one with a custom modulesDir, walks the
workspace itself. FindWorkspaceProjectsOpts::finds_the_same_as compares
options by what they can change. It leaves out an ignored directory
under a node_modules that the walk skips by name, meaning one spelled
that way on disk or one that does not exist, so each project's own
node_modules still shares the discovery. The walk itself still receives
every configured exclusion. A gate whose workspace root differs from
the shared one, in a nested workspace, walks its own workspace. The
shared discovery keeps the workspace manifest with its projects, so a
forgotten discovery reads pnpm-workspace.yaml again.

pnpm -r exec true in a 300-project workspace with verifyDepsBeforeRun:
error went from 492 ms to 42 ms (median, release build).

The opens test helper now also watches IN_CLOSE. inotify merges an
event into an identical one left unread at the tail of the queue, so
back-to-back opens were counted as one.
pnpm#17675)

A version pnpr publishes with variants and no archive for every other
host has no integrity of its own in pnpr's document. The resolver no
longer records that missing archive as the variant that targets any:
the lockfile lists only the version's platform variants.

On a host none of them fits, the package is skipped as an optional
dependency, as a platform its manifest excluded would be; a dependency
that is not optional fails with an error that lists the platforms the
version is published for. The fit is decided for the host, whose variant
the installer links.
…m#17674)

Replicas sharing a libSQL metadata database hold no package lock in
common, which left two publish races.

- Two publishes to one package could read the same packument, and the
  one that committed second was refused with 409. It now rebases what it
  changed (its versions, tags, times, and other fields) onto the
  packument the store holds and commits again, a bounded number of
  times. It does so only while the package's maintainers are the ones
  the publish was authorized against. A batch of npm packuments rebases
  each one; other formats keep answering the conflict.
- A refused publish removed the archives it had written, though another
  replica may have found one in place with the same bytes and committed
  it. On libSQL they now stay, referenced by nothing and never served. A
  single SQLite instance keeps removing them under its package lock.
Retain the declaring package id in cached missing-peer requirements. Re-anchor
relative workspace peer specifiers to the current importer when emitting the
hoist input, using the existing LocalSpec parser and renderer and the
directory-resolution helper ordinary dependencies use.
Keep the original ranges in peer requirements and lockfile declarations.

This covers both fresh peer discovery and cached subtree replay without
binding shared cache entries to the first importer's directory.

The issue reproduction completes on the TypeScript v11 CLI without the
wrong-directory error, so this fix targets v12.

Closes pnpm#17676.
…m#17682)

Loading the config for a switch to the pinned pnpm placed the project's
store, which probes hard linking by writing a `_tmp_*` file into the
project directory on every command. File watchers report it. The switch
installs into the engine store under the pnpm home and never uses the
project's store, so the switch load now leaves it unplaced, as the pin
decision load already does.

Closes pnpm#17681

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

Every written archive, a platform variant's included, now reports its
SHA-512 integrity and its size, so a publish from several machines can
reference an archive without hashing it again. A dry run writes no
archive and reports neither.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Add advisory declaration diagnostics to peers check when peer auto-installation
is disabled and deduplication reuses required peer providers outside the
project's declared dependency scope. Account for ancestor providers and the
enabled workspace-root scope. Keep these advisories separate from unresolved
and incompatible peer errors and leave strict install behavior unchanged.

Expose advisory data in JSON and document the distinction between resolved
peers and project dependency declarations. Preserve existing resolution.
The new diagnostic targets v12; document the existing reuse behavior in both
versions and exercise the settings matrix in both CLIs.

Closes pnpm#17673.
…e record (pnpm#17683)

* feat(publish): confirm a retried publish against the version's release record

When pnpr answers that the version is already published, pnpm reads the
version's release record, its provenance statement when this run signs
one, and its dist-tags. It reports the version as published only when
the record names the same archives, the statement names every archive,
and the dist-tag points at the version, and otherwise names what
differs. A version without an any archive is compared by its variants.

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

* fix(publish): confirm the release when a rerun finds its staged archives retired

pnpr retires the archives another job staged once the version they were
published with is accepted, so rerunning that publish failed on the
missing archive before the release check ran. A rerun now confirms the
recorded release instead, and fails as before when pnpr has no record of
the version. Signing is a named case, and the tests show the values they
check.

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

* refactor(publish): drop comments that repeat the code

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

* fix(publish): take only a response with the record schema as the release record

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Walkthrough

Warning

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

@jadoonf
jadoonf marked this pull request as ready for review November 4, 2026 17:54
Copilot AI balanced review requested due to automatic review settings November 4, 2026 17:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot encountered an error: Your billing is not configured or you have Copilot licenses from multiple standalone organizations or enterprises. To use AI Credits, select a billing entity via the GitHub site, under Settings > Copilot > Features.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@jadoonf
jadoonf merged commit b9456b8 into main Nov 4, 2026
3 checks passed
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Sync pnpm upstream and repin Garnet monitoring to v2.5.2

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

Grey Divider

AI Description

• Merge upstream pnpm history while preserving ancestry for future fork synchronizations.
• Incorporate upstream changes across pnpm, pnpm 11, pnpr, tooling, and documentation.
• Repin ten Garnet action references to v2.5.2; retain Jibril v2.17.0 inputs.
Diagram

graph TD
  U["Upstream history"] --> F["Fork merge"] --> R["Rust pnpm"]
  F --> T["pnpm 11"]
  F --> P["pnpr registry"]
  F --> C["CI workflows"] --> G["Garnet v2.5.2"]
Loading
High-Level Assessment

Merge with a merge commit. Squashing or rebasing would discard the upstream ancestry this synchronization is intended to restore; individually replaying upstream changes would make future synchronization harder. Keeping the Garnet action pinned to a full commit SHA preserves the existing workflow dependency policy.

Files changed (27) +5986 / -1106

Enhancement (8) +2783 / -114
pin.rsUnify CLI version-pin decisions +212/-114

Unify CLI version-pin decisions

• Synchronizes upstream changes to pnpm version selection and switching before command dispatch.

pnpm/crates/cli/src/cli_args/pre_command/pin.rs

pinDecision.tsAdd pnpm 11 pin-decision logic +308/-0

Add pnpm 11 pin-decision logic

• Introduces corresponding TypeScript version-pin decisions for pnpm 11.

pnpm11/engine/pm/commands/src/pinDecision.ts

ecosystem_deps.rsAdd ecosystem dependency commands +400/-0

Add ecosystem dependency commands

• Introduces command handling for dependencies outside the npm ecosystem.

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

install.tsImplement standalone pnpm installation +406/-0

Implement standalone pnpm installation

• Adds the new get-pnpm package's installation flow.

pnpm/npm/get-pnpm/src/install.ts

registry.tsAdd installer registry access +486/-0

Add installer registry access

• Adds registry interactions used to discover and obtain pnpm releases.

pnpm/npm/get-pnpm/src/registry.ts

lib.rsIntroduce transparency-log crate +39/-0

Introduce transparency-log crate

• Adds the crate's public entry point for checkpoint, proof, tile, and signing functionality.

pnpm/crates/transparency-log/src/lib.rs

sql.rsIntroduce transactional SQL metadata +435/-0

Introduce transactional SQL metadata

• Adds the shared metadata layer for SQLite and libSQL, including transactional writes and freshness-aware reads.

pnpr/crates/storage/src/metadata/sql.rs

staged_archives.rsStage archives for publication +497/-0

Stage archives for publication

• Adds archive staging to support the synchronized registry publishing flow.

pnpr/crates/storage/src/staged_archives.rs

Bug fix (2) +41 / -11
audit.rsCorrect audit ignore exit status +8/-4

Correct audit ignore exit status

• Incorporates upstream handling so remaining, non-ignored vulnerabilities can still fail an audit.

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

audit.tsCheck vulnerabilities after audit ignores +33/-7

Check vulnerabilities after audit ignores

• Filters configured and newly ignored advisories before applying the audit-level failure check.

pnpm11/deps/compliance/commands/src/audit/audit.ts

Tests (2) +1160 / -1
ignore.tsTest audit ignore exit behavior +80/-1

Test audit ignore exit behavior

• Adds coverage for audits that still contain actionable vulnerabilities after ignores are applied.

pnpm11/deps/compliance/commands/test/audit/ignore.ts

platform_variants.rsTest registry platform variants +1080/-0

Test registry platform variants

• Adds extensive server-level coverage for publishing and serving platform-specific variants.

pnpr/crates/pnpr/tests/server/platform_variants.rs

Documentation (1) +172 / -29
storage.mdDocument registry storage changes +172/-29

Document registry storage changes

• Updates storage documentation for the synchronized pnpr architecture.

pnpr/docs/storage.md

Other (14) +1830 / -951
garnet-dependabot-fixtures.ymlRepin Garnet monitoring +1/-1

Repin Garnet monitoring

• Updates the Garnet action reference to the v2.5.2 commit.

.github/workflows/garnet-dependabot-fixtures.yml

garnet-dependabot-record.ymlRepin Garnet monitoring +1/-1

Repin Garnet monitoring

• Updates the Garnet action reference to the v2.5.2 commit.

.github/workflows/garnet-dependabot-record.yml

garnet-execution-diff.ymlRepin execution-diff monitoring +1/-1

Repin execution-diff monitoring

• Updates the Garnet action reference to the v2.5.2 commit.

.github/workflows/garnet-execution-diff.yml

garnet-jibril-release-gate-job.ymlRepin both release-gate sensors +2/-2

Repin both release-gate sensors

• Updates both Garnet action references to v2.5.2 without changing the gate's Jibril inputs.

.github/workflows/garnet-jibril-release-gate-job.yml

garnet-oidc-canary.ymlRepin canary monitoring +1/-1

Repin canary monitoring

• Updates the Garnet action reference to the v2.5.2 commit.

.github/workflows/garnet-oidc-canary.yml

release.ymlExpand release routing and repin monitoring +134/-20

Expand release routing and repin monitoring

• Adds get-pnpm release-tag handling and updates Garnet references in release jobs.

.github/workflows/release.yml

test.ymlRepin test-workflow monitoring +2/-2

Repin test-workflow monitoring

• Updates the Garnet action reference to the v2.5.2 commit.

.github/workflows/test.yml

update-latest.ymlRepin update-workflow monitoring +4/-4

Repin update-workflow monitoring

• Updates the Garnet action reference to the v2.5.2 commit.

.github/workflows/update-latest.yml

.pr_agent.tomlAdopt upstream review guidance +1/-3

Adopt upstream review guidance

• Resolves the merge conflict using upstream guidance for reviewing pnpr's experimental alpha storage and interfaces.

.pr_agent.toml

pacquet-ci.ymlExtend pacquet CI coverage +159/-20

Extend pacquet CI coverage

• Incorporates upstream changes to the Rust product's CI jobs.

.github/workflows/pacquet-ci.yml

pacquet-integrated-benchmark.ymlRevise integrated benchmark automation +115/-58

Revise integrated benchmark automation

• Incorporates upstream benchmark-workflow changes alongside updated comparison scripts.

.github/workflows/pacquet-integrated-benchmark.yml

create-release-pr.ymlUpdate release-PR automation +22/-15

Update release-PR automation

• Synchronizes upstream release-PR workflow behavior with the expanded release process.

.github/workflows/create-release-pr.yml

Cargo.lockRefresh Rust dependency resolutions +647/-197

Refresh Rust dependency resolutions

• Records the dependency changes required by the synchronized Rust workspace.

Cargo.lock

pnpm-lock.yamlRefresh workspace dependency resolutions +740/-626

Refresh workspace dependency resolutions

• Updates resolved packages, including the workspace's pinned pnpm version from 12.15.0 to 12.16.1.

pnpm-lock.yaml

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (3) 📘 Rule violations (14) 📜 Skill insights (0)

Grey Divider


Action required

1. Dependabot recordings cannot be published 🐞 Bug ≡ Correctness
Description
validateWorkflowPins still allows the old Garnet action commit while the recording workflow now
uses v2.5.2. When the publisher reads a recording made from the updated workflow, it rejects the
workflow with unapproved_worker_action_pin.
Code

.github/workflows/garnet-dependabot-record.yml[212]

+        uses: garnet-org/action@673a06d87748bec49e4d8df22d371b2a3420aba4 # v2.5.2
Relevance

●● Moderate

Concrete allowlist mismatch, but no close precedent on publisher pin validation; semantic and risky,
so uncertain.

PR-#43

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The publisher fetches the recording workflow at the recorded control commit and validates its
uses: entries against an allowlist built from the old action commit; the new workflow entry cannot
pass that check.

.github/workflows/garnet-dependabot-record.yml[209-214]
.github/scripts/garnet-dependabot-publish.mjs[13-19]
.github/scripts/garnet-dependabot-publish.mjs[1083-1093]
.github/scripts/garnet-dependabot-publish.mjs[1472-1479]

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 repinned recording workflow fails the publisher's hard-coded action-pin check.
## Fix Focus Areas
- .github/workflows/garnet-dependabot-record.yml[212-212]
- .github/scripts/garnet-dependabot-publish.mjs[19-19]
- .github/scripts/garnet-dependabot-publish.mjs[1088-1092]
## Recommended Fix
Update the publisher's allowed Garnet action commit to `673a06d87748bec49e4d8df22d371b2a3420aba4`, keeping its workflow-pin verification intact.

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

Dismiss ↗ | View ↗


2. Recorder receipts name the wrong action 🐞 Bug ≡ Correctness
Description
garnet-dependabot-record.mjs still writes the old action commit into action_sha, despite the
workflow running v2.5.2. Its receipt validator compares that field to the same stale constant, so
recordings from the updated workflow retain an incorrect action identity even after the publisher's
allowlist is fixed.
Code

.github/workflows/garnet-dependabot-record.yml[212]

+        uses: garnet-org/action@673a06d87748bec49e4d8df22d371b2a3420aba4 # v2.5.2
Relevance

●● Moderate

Stale ACTION constant in recorder receipts is a real issue, but no matching precedent; uncertain.

PR-#43

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The workflow's new action commit differs from the recorder's unchanged constant. Receipt creation
and validation both use that constant, allowing the incorrect value to validate.

.github/workflows/garnet-dependabot-record.yml[210-214]
.github/scripts/garnet-dependabot-record.mjs[29-29]
.github/scripts/garnet-dependabot-record.mjs[565-572]
.github/scripts/garnet-dependabot-record.mjs[1286-1290]

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 recording workflow runs v2.5.2, but its receipts attest the previous action commit.
## Fix Focus Areas
- .github/workflows/garnet-dependabot-record.yml[212-212]
- .github/scripts/garnet-dependabot-record.mjs[29-29]
- .github/scripts/garnet-dependabot-record.mjs[570-570]
## Recommended Fix
Update the recorder's `ACTION` constant to `673a06d87748bec49e4d8df22d371b2a3420aba4` and keep its receipt check aligned with the action actually run.

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

Dismiss ↗ | View ↗



Remediation recommended

3. Source comment cites issue history 📘 Rule violation ⚙ Maintainability
Description
The added comment in linkBins.ts cites a GitHub issue number to explain why the current behavior
exists, instead of stating the constraint itself. The constraint is already described on the line
above, so the issue link only records history that belongs in the tracker or commit message.
Code

pnpm11/installing/deps-installer/src/install/linkBins.ts[166]

+    // due to the following issue: https://github.com/pnpm/pnpm/issues/4761
Relevance

●●● Strong

Trivial comment cleanup under the historical-commentary rule; no rejection precedent found.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The comment's added text is an issue URL, which is change-history rather than a precondition or
invariant.

Rule 2757166: Avoid historical or refactor-focused commentary in source comments
pnpm11/installing/deps-installer/src/install/linkBins.ts[165-166]

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 comment added in `linkBins.ts` references a GitHub issue to explain the limitation, which is historical rather than describing the behavior.

## Fix Focus Areas
- pnpm11/installing/deps-installer/src/install/linkBins.ts[165-166]

## Recommended Fix
Remove the issue URL and keep only the description of the current behavior on the preceding line.

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

Dismiss ↗ | View ↗


4. Signatures miss trailing commas 📘 Rule violation ⚙ Maintainability
Description
The new multi-line parameter lists in createBinRefreshPlan, pruneStaleBins,
relinkModulesDirPackageBins, lockedVersionSatisfies, and helpers in workspaceStateUpdate.ts
omit the trailing comma after their final parameter. The omission occurs where those signatures wrap
across lines and also affects multi-line call arguments in the cited linker ranges.
Code

pnpm11/bins/linker/src/index.ts[R79-80]

+  binsDir: string,
+  opts: LinkBinOptions & { warn: WarnFunction }
Relevance

●●● Strong

Trailing-comma style nit with a deterministic fix; easy to apply and low risk.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The cited linker signature ends with opts immediately before the closing parenthesis, without a
trailing comma. In workspaceStateUpdate.ts, verifiedRegistryKeySettings ends with
readLockfiles without a trailing comma, and the other two cited new helpers follow the same
pattern.

Rule 2757168: Use trailing commas in multi-line TypeScript literals and parameter lists
pnpm11/bins/linker/src/index.ts[77-81]
pnpm11/installing/commands/src/workspaceStateUpdate.ts[148-151]

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

## Issue description
New multi-line TypeScript function signatures omit the trailing comma after their final parameter; multi-line call arguments in the cited linker ranges need the same correction.

## Fix Focus Areas
- pnpm11/bins/linker/src/index.ts[77-81]
- pnpm11/bins/linker/src/index.ts[381-395]
- pnpm11/bins/linker/src/relinkModulesDirPackageBins.ts[8-12]
- pnpm11/installing/commands/src/workspaceStateUpdate.ts[148-151]
- pnpm11/installing/commands/src/workspaceStateUpdate.ts[184-188]
- pnpm11/installing/commands/src/workspaceStateUpdate.ts[203-206]

## Recommended Fix
Add a trailing comma after the final parameter in each cited multi-line signature and after the final argument in the cited multi-line linker calls.

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

Dismiss ↗ | View ↗


5. Internal test notes sit in doc comments 📘 Rule violation ⚙ Maintainability
Description
The inner //! doc comment and the /// comment on a constant in the new test module describe
implementation behavior of a private test module rather than a public API contract. The rule
reserves doc comments for public API contracts, so these should be plain comments or removed.
Code

pnpm/crates/cli/tests/suite/repeat_install_records.rs[R1-3]

+//! The repeat-install fast path deciding from the workspace state's manifest
+//! records, without reading the project manifests whose recorded stat still
+//! holds.
Relevance

●●● Strong

Trivial comment-style fix under the doc-comment rule; low-risk cosmetic change typically accepted.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The added module-level //! comment explains the repeat-install fast-path implementation in a
test-only module, which the doc-comment rule classifies as implementation rationale.

Rule 2757258: Use doc comments only for public API contracts, not for implementation rationale
pnpm/crates/cli/tests/suite/repeat_install_records.rs[1-3]

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

Issue description
The new test module uses `//!` and `///` doc comments to describe internal fast-path behavior, which the doc-comment rule reserves for public API contracts.

Fix Focus Areas
- pnpm/crates/cli/tests/suite/repeat_install_records.rs[1-3]
- pnpm/crates/cli/tests/suite/repeat_install_records.rs[17-18]

Recommended Fix
Replace the `//!` and `///` lines with regular `//` comments, or delete them if they only restate the code.

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

Dismiss ↗ | View ↗


View medium (12)
6. Pacquet peers -g flag missing in pnpm 📘 Rule violation ≡ Correctness
Description
The Rust peers check command adds a --global/-g flag that checks each globally installed
package group, but no matching flag or behavior is added to the TypeScript CLI in this PR. Users and
scripts running pnpm peers check -g get different results depending on which stack handles the
command.
Code

pnpm/crates/cli/src/cli_args/peers.rs[R18-20]

+    /// Check each globally installed package group separately.
+    #[clap(short = 'g', long)]
+    pub global: bool,
Relevance

●● Moderate

CLI parity rule applies, but mirroring a flag in TypeScript is a larger change with no precedent.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
A new user-visible CLI flag was added to pacquet only. The rule requires the same flags and
semantics in both stacks.

Rule 2757147: Mirror user-visible CLI behaviors between TypeScript and Rust pacquet CLIs
pnpm/crates/cli/src/cli_args/peers.rs[18-20]

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 Rust `peers check` command gained `--global`/`-g`, but the TypeScript CLI has no equivalent flag, so the two CLIs accept different flags for the same command.

## Fix Focus Areas
- pnpm/crates/cli/src/cli_args/peers.rs[18-20]

## Recommended Fix
Add a `--global`/`-g` option to the TypeScript `peers check` command with the same semantics (check each global package group separately), or document why the flag is intentionally Rust-only.

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

Dismiss ↗ | View ↗


7. Publish flags exist only in pacquet 📘 Rule violation ≡ Correctness
Description
The Rust publish arguments add --no-variants, --upload-variant, --variant-integrity,
--release-notes, --no-release-notes and --publication-name, which change which archives are
uploaded and what release notes are published. The TypeScript publish command gets no matching flags
in this PR, so the same pnpm publish invocation uploads different artifacts depending on the
stack.
Code

pnpm/crates/cli/src/cli_args/publish/arguments.rs[R54-57]

+    #[clap(long)]
+    pub no_variants: bool,
+    /// Pack the archive of the `publishConfig.variants` entry this target
+    /// names, such as `linux-x64-musl` or `any`, upload it to the registry's
Relevance

●● Moderate

Several new publish flags need substantial TS parity work; no precedent found, so uncertain.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Multiple new publish flags that change observable publish behavior were added to the Rust CLI only,
which the rule forbids unless mirrored.

Rule 2757147: Mirror user-visible CLI behaviors between TypeScript and Rust pacquet CLIs
pnpm/crates/cli/src/cli_args/publish/arguments.rs[54-65]

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 Rust publish command accepts variant and release-notes flags that change what gets uploaded and published, but the TypeScript publish command does not accept them, so behavior diverges between stacks.

## Fix Focus Areas
- pnpm/crates/cli/src/cli_args/publish/arguments.rs[54-65]
- pnpm/crates/cli/src/cli_args/publish/arguments.rs[97-106]

## Recommended Fix
Mirror these flags in the TypeScript `publish` command with the same names, defaults and semantics, or record why they are intentionally pacquet-only.

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

Dismiss ↗ | View ↗


8. mimalloc is declared workspace-wide 📘 Rule violation ⌂ Architecture
Description
The mimalloc dependency is added to the root [workspace.dependencies] table even though the only
consumer is the pnpm/crates/cli crate, which is the only file importing it as the global
allocator. Other workspace members inherit the declaration without using it, widening the dependency
scope beyond what the consumer needs.
Code

Cargo.toml[193]

+mimalloc = { version = "0.1.52" }
Relevance

●● Moderate

Dependency scoping is architectural; no matching precedent found, so uncertain.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The root workspace declares an open-source dependency that a single crate consumes, which is the
case the rule asks to scope to that crate.

Rule 2757154: Scope open-source dependencies to the narrowest consuming package
Cargo.toml[193]

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

## Issue description
`mimalloc` is declared in the root workspace dependencies, but only `pnpm/crates/cli` uses it as the global allocator.

## Fix Focus Areas
- Cargo.toml[193]
- pnpm/crates/cli/Cargo.toml[152-154]

## Recommended Fix
Declare `mimalloc` with its version directly in `pnpm/crates/cli/Cargo.toml` instead of the root `[workspace.dependencies]` table, and drop the root entry if no other crate uses it.

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

Dismiss ↗ | View ↗


9. Test helper takes four positional args 📘 Rule violation ⚙ Maintainability
Description
The new satisfies helper in the lockedRegistryKey test takes four separate positional parameters,
with the registries value last. Call sites must pass the options in fixed order, which the rule
discourages beyond three inputs.
Code

pnpm11/installing/deps-resolver/test/lockedRegistryKey.test.ts[27]

+function satisfies (alias: string, bareSpecifier: string, depPath: string, registries: RegistryContext = prefixedRegistries): boolean | undefined {
Relevance

●● Moderate

Parameter-count rule applies, but no precedent in history showed how the team handles test helpers.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The added function declares four positional parameters (alias, bareSpecifier, depPath,
registries), exceeding the three-parameter limit without using an options object.

Rule 2757172: Limit TypeScript function parameters to three or fewer (use an options object beyond that)
pnpm11/installing/deps-resolver/test/lockedRegistryKey.test.ts[27]

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 test helper `satisfies` declares four positional parameters, exceeding the three-parameter limit.

## Fix Focus Areas
- pnpm11/installing/deps-resolver/test/lockedRegistryKey.test.ts[27]

## Recommended Fix
Change the helper to accept a single options object, such as `{ alias, bareSpecifier, depPath, registries }`, and update its call sites.

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

Dismiss ↗ | View ↗


10. Workspace settings errors all swallowed 📘 Rule violation ≡ Correctness
Description
The new localSettings.ts fallbacks use bare catch {} and catch { return false } blocks that
handle every exception from reading and applying workspace settings as a fallback. The surrounding
applyAllOrNothing rethrows the original error, so programmer faults and unrelated failures are
silently converted into default configuration instead of surfacing.
Code

pnpm11/config/reader/src/getConfig/localSettings.ts[R89-92]

+  try {
+    const fullManifest = await readWorkspaceManifest(opts.workspaceDir)
+    return applyAllOrNothing(state, () => applyLoadedProjectWorkspaceManifest(state, fullManifest, opts))
+  } catch {}
Relevance

●● Moderate

Broad catch-and-fallback in workspace settings is a semantic design choice; no matching precedent
found.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The new catch blocks do not check an error type or code before returning fallback values, so any
exception from the settings read is treated as an expected condition.

Rule 2757176: Catch only specific, expected error types or codes in TypeScript
pnpm11/config/reader/src/getConfig/localSettings.ts[89-131]

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

## Issue description
The new workspace settings fallbacks catch every exception and return default configuration, hiding unexpected failures.

## Fix Focus Areas
- pnpm11/config/reader/src/getConfig/localSettings.ts[89-131]

## Recommended Fix
Narrow each catch to the specific expected error (for example a `PnpmError` with a known code, or a missing-file error code), and rethrow everything else.

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

Dismiss ↗ | View ↗


11. Global config errors all swallowed 📘 Rule violation ≡ Correctness
Description
The new globalConfigYaml.ts try/catch blocks use catch {} and return default registries and
network settings on any error. This includes errors from applyGlobalYamlManifest, so a malformed
or failing global config is silently ignored rather than reported.
Code

pnpm11/config/reader/src/getConfig/globalConfigYaml.ts[R42-45]

+  try {
+    return applyAllOrNothingSync(state, () => applyGlobalYamlManifest(state, { configDir, globalYamlConfig: { ...globalYamlConfig } }))
+  } catch {}
+  const pinDecisionSubset = pickKeys(globalYamlConfig, PIN_DECISION_SETTINGS)
Relevance

●● Moderate

Swallowed-error concern is semantic; no closely matching accepted or rejected precedent found in
searches.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The added catch clauses accept any thrown value without checking its type or code, even though
applyAllOrNothingSync rethrows the original error for the caller to handle.

Rule 2757176: Catch only specific, expected error types or codes in TypeScript
pnpm11/config/reader/src/getConfig/globalConfigYaml.ts[42-60]

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 global config reader swallows every error when applying the global YAML manifest, returning empty defaults.

## Fix Focus Areas
- pnpm11/config/reader/src/getConfig/globalConfigYaml.ts[42-60]

## Recommended Fix
Check the error code or type in each catch and rethrow anything other than the expected missing-or-invalid-file case.

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

Dismiss ↗ | View ↗


12. Misconfigured catalog silently ignored 📘 Rule violation ≡ Correctness
Description
The new switch in workspaceResolution.ts maps the misconfiguration case of the catalog
resolution result to undefined through its default branch. The misconfiguration carries a
user-facing error that is dropped, so the dependency is treated as unlinked rather than reported as
an invalid catalog setup.
Code

pnpm11/resolving/npm-resolver/src/workspaceResolution.ts[R154-157]

+function dereferenceCatalog (catalogs: Catalogs, dep: { alias: string, bareSpecifier: string }): string | undefined {
+  const result = resolveFromCatalog(catalogs, dep)
+  switch (result.type) {
+    case 'found': return result.resolution.specifier
Relevance

●● Moderate

Dropped misconfiguration error in a switch default is a semantic correctness call; no matching
precedent found.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The default branch catches the misconfiguration variant of the discriminated union and returns
undefined, so the union's error case is silently handled instead of thrown.

Rule 2757177: Throw on impossible discriminated union states in TypeScript
pnpm11/resolving/npm-resolver/src/workspaceResolution.ts[154-160]

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 catalog resolution switch maps the `misconfiguration` variant to `undefined`, dropping the user-facing error that the variant carries.

## Fix Focus Areas
- pnpm11/resolving/npm-resolver/src/workspaceResolution.ts[154-160]
- pnpm11/catalogs/resolver/src/resolveFromCatalog.ts[20-29]

## Recommended Fix
Handle the `misconfiguration` case explicitly by throwing its error, and keep `default` for the truly impossible state.

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

Dismiss ↗ | View ↗


13. Bundled deps packlist blocks event loop 📘 Rule violation ➹ Performance
Description
The new realpathOfPackageDir helper calls fs.statSync and fs.realpathSync while resolving
bundled dependencies. It is invoked from buildRootTree in the async packlistWithSources path, so
these synchronous calls stall the event loop during packing.
Code

pnpm11/fs/packlist/src/bundleDependencyResolver.ts[R75-78]

+function realpathOfPackageDir (dir: string): string | undefined {
+  try {
+    if (!fs.statSync(path.join(dir, 'package.json')).isFile()) return undefined
+    return fs.realpathSync(dir)
Relevance

●● Moderate

Sync fs in an async path is a performance/architecture call; the only fs-rule hits were unrelated
workflow-script suggestions.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The newly added function uses synchronous filesystem APIs, and its caller runs inside an async
packing operation, which the rule says must use async fs with async/await.

Rule 2757206: Use async fs APIs with async/await instead of synchronous fs methods
pnpm11/fs/packlist/src/bundleDependencyResolver.ts[75-78]

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

## Issue description
The new bundled-dependency helper performs synchronous `statSync` and `realpathSync` calls inside an async packlist path.

## Fix Focus Areas
- pnpm11/fs/packlist/src/bundleDependencyResolver.ts[75-78]

## Recommended Fix
Make `realpathOfPackageDir` async using `fs.promises.stat` and `fs.promises.realpath`, and await it from its callers in the packlist path.

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

Dismiss ↗ | View ↗


14. Error check fails for cross-realm errors 📘 Rule violation ≡ Correctness
Description
isErrno in the get-pnpm config reader gates on err instanceof Error before checking code, so
an errno error created in another VM realm is not recognized and the ENOENT/EACCES/EISDIR/EPERM
branches are skipped. The rule's realm-safe isError() from @pnpm/error is not used, and
get-pnpm's manifest has no dependency on that package, so adopting it also requires a dependency
decision for this standalone bootstrap package.
Code

pnpm/npm/get-pnpm/src/npmConfig.ts[R327-328]

+function isErrno (err: unknown, code: string): err is NodeJS.ErrnoException {
+  return err instanceof Error && 'code' in err && err.code === code
Relevance

●● Moderate

Realm-safe isError is valid, but adopting it needs a dependency decision for the standalone get-pnpm
package.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The added isErrno helper uses instanceof Error as the sole test of Error-ness before reading
code, which is the failure pattern the rule describes. The helper is used by the ENOENT and
permission-error branches at lines 122 and 324 of the same file.

Rule 2757213: Use isError() from @pnpm/error instead of instanceof Error for caught values
pnpm/npm/get-pnpm/src/npmConfig.ts[327-328]

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 `isErrno` helper in get-pnpm config decides Error-ness with `err instanceof Error`, which fails for errors created in other VM realms and silently skips the errno branches.

Fix Focus Areas
- pnpm/npm/get-pnpm/src/npmConfig.ts[327-328]

Recommended Fix
Replace the `instanceof Error` check with `isError` imported from `@pnpm/error`, or, if get-pnpm must stay dependency-free, document why the realm-unsafe check is acceptable for this package.

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

Dismiss ↗ | View ↗


15. Test suite glob-re-exports helper module 📘 Rule violation ⚙ Maintainability
Description
The added pub use _utils::*; re-exports the entire helper namespace from inside a test module body
rather than from a crate root, so every helper becomes visible to sibling test modules. The rule
allows glob imports only for preludes and root re-exports, and this line is neither.
Code

pnpm/crates/cli/tests/suite/repeat_install_records.rs[5]

+pub use _utils::*;
Relevance

●● Moderate

Glob re-export rule applies and fix is simple, but no precedent confirms the team enforces it.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The new test module contains a glob re-export of _utils in its module body, which the
disallow-glob-imports rule forbids outside preludes and root re-exports.

Rule 2757252: Disallow glob imports inside module bodies except preludes and root re-exports
pnpm/crates/cli/tests/suite/repeat_install_records.rs[5-5]

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

Issue description
The new test module re-exports all of `_utils` with a glob in its module body, which the import rule forbids outside preludes and root re-exports.

Fix Focus Areas
- pnpm/crates/cli/tests/suite/repeat_install_records.rs[5-5]

Recommended Fix
Remove the `pub use _utils::*;` line and import only the specific helpers the module uses with an explicit `use crate::_utils::{...};` list.

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

Dismiss ↗ | View ↗


16. New crates land without approval markers 📘 Rule violation § Compliance
Description
The root workspace manifest adds several third-party dependencies, including ed25519-dalek,
mimalloc, signed_note, tlog_tiles and zeroize, with no # APPROVED-NEW-CRATE: comment
directly above any of them, and the PR contains no such marker anywhere. The rule requires each
newly introduced third-party crate to carry that marker, so the approval trail for these
dependencies is missing for later reviewers and audits.
Code

Cargo.toml[169]

+ed25519-dalek = { version = "2.2.0", default-features = false, features = ["std", "zeroize"] }
Relevance

●● Moderate

Explicit compliance rule, but no precedent on approval markers for new crates; process-level
decision unclear.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The added ed25519-dalek line at the root workspace dependencies has no preceding approval comment,
and the same is true of the other new crates in the same table. A search of the patches for the
approval marker returns no matches.

Rule 2757300: Forbid addition of new third-party crates without explicit approval marker
Cargo.toml[169-169]

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

Issue description
Several third-party crates were added to the root workspace dependency table without the `# APPROVED-NEW-CRATE:` marker that the rule requires for newly introduced crates.

Fix Focus Areas
- Cargo.toml[169-169]
- Cargo.toml[193-193]
- Cargo.toml[250-253]
- Cargo.toml[272-272]
- Cargo.toml[283-283]

Recommended Fix
Add a `# APPROVED-NEW-CRATE: <short reason>` comment line directly above each new third-party dependency entry (`ed25519-dalek`, `mimalloc`, `signed_note`, `tlog_tiles`, `zeroize`), or document the approval in the PR and get the marker added before merge.

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

Dismiss ↗ | View ↗


17. Publish cleanup scans all stored outcomes 🐞 Bug ➹ Performance
Description
record_outcome deletes expired rows by committed_at during each publication request, but the
outcomes table has no index on that column. As retained requests accumulate, each publish scans the
entire outcomes table while holding the publication transaction.
Code

pnpr/crates/storage/src/metadata/sql/publications.rs[R138-139]

+            "DELETE FROM publication_outcomes WHERE committed_at < ?1",
+            params![retention_cutoff()],
Relevance

●● Moderate

Missing index on retention DELETE is a performance tradeoff; no matching precedent in pnpr history.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Publication recording invokes the cleanup for requests, while the table's primary key and sole
additional index both begin with fields other than committed_at.

pnpr/crates/storage/src/metadata/sql/publications.rs[101-119]
pnpr/crates/storage/src/metadata/sql/publications.rs[130-159]
pnpr/crates/storage/src/metadata/sql/schema.rs[239-252]

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

## Issue description
Every publication request scans the outcomes table to expire old entries.
## Fix Focus Areas
- pnpr/crates/storage/src/metadata/sql/publications.rs[130-140]
- pnpr/crates/storage/src/metadata/sql/schema.rs[239-252]
## Recommended Fix
Add an index beginning with `committed_at`, or move expiry to a bounded periodic cleanup outside the per-publication transaction. Preserve the seven-day retention and idempotency behavior.

ⓘ 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): 100 rules
✅ Context preparation
  Commit messages: summarized; full text retained for this review
✅ REVIEW.md
Review mode: Auto: ⚖️ Balanced: Large upstream merge, mostly already-reviewed code; workflow pins are security-relevant.
ⓘ  2 issues published inline · 17 in summary

Grey Divider

Tip of the day
💡 Did you know, you can commit Qodo's fix in one click with committable suggestions (GitHub & GitLab)

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@@ -209,7 +209,7 @@ jobs:
run: node control/.github/scripts/garnet-dependabot-record.mjs prepare
- name: Start trusted sensor using OIDC only
timeout-minutes: ${{ fromJSON(needs.resolve.outputs.stop_budget).experiment && 2 || 45 }}
uses: garnet-org/action@8cccc85403e4ac4e05fb7822c994d3c199f9aa57 # v2.4.0
uses: garnet-org/action@673a06d87748bec49e4d8df22d371b2a3420aba4 # v2.5.2

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. Dependabot recordings cannot be published 🐞 Bug ≡ Correctness

validateWorkflowPins still allows the old Garnet action commit while the recording workflow now
uses v2.5.2. When the publisher reads a recording made from the updated workflow, it rejects the
workflow with unapproved_worker_action_pin.
Agent Prompt
## Issue description
The repinned recording workflow fails the publisher's hard-coded action-pin check.
## Fix Focus Areas
- .github/workflows/garnet-dependabot-record.yml[212-212]
- .github/scripts/garnet-dependabot-publish.mjs[19-19]
- .github/scripts/garnet-dependabot-publish.mjs[1088-1092]
## Recommended Fix
Update the publisher's allowed Garnet action commit to `673a06d87748bec49e4d8df22d371b2a3420aba4`, keeping its workflow-pin verification intact.

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

Dismiss ↗ | View ↗

@@ -209,7 +209,7 @@ jobs:
run: node control/.github/scripts/garnet-dependabot-record.mjs prepare
- name: Start trusted sensor using OIDC only
timeout-minutes: ${{ fromJSON(needs.resolve.outputs.stop_budget).experiment && 2 || 45 }}
uses: garnet-org/action@8cccc85403e4ac4e05fb7822c994d3c199f9aa57 # v2.4.0
uses: garnet-org/action@673a06d87748bec49e4d8df22d371b2a3420aba4 # v2.5.2

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. Recorder receipts name the wrong action 🐞 Bug ≡ Correctness

garnet-dependabot-record.mjs still writes the old action commit into action_sha, despite the
workflow running v2.5.2. Its receipt validator compares that field to the same stale constant, so
recordings from the updated workflow retain an incorrect action identity even after the publisher's
allowlist is fixed.
Agent Prompt
## Issue description
The recording workflow runs v2.5.2, but its receipts attest the previous action commit.
## Fix Focus Areas
- .github/workflows/garnet-dependabot-record.yml[212-212]
- .github/scripts/garnet-dependabot-record.mjs[29-29]
- .github/scripts/garnet-dependabot-record.mjs[570-570]
## Recommended Fix
Update the recorder's `ACTION` constant to `673a06d87748bec49e4d8df22d371b2a3420aba4` and keep its receipt check aligned with the action actually run.

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