Skip to content

refactor: rename the agent client and agent setting to pnpr#12155

Merged
zkochan merged 2 commits into
mainfrom
rename-agent-client
Jun 3, 2026
Merged

refactor: rename the agent client and agent setting to pnpr#12155
zkochan merged 2 commits into
mainfrom
rename-agent-client

Conversation

@zkochan

@zkochan zkochan commented Jun 2, 2026

Copy link
Copy Markdown
Member

What

After the install-accelerator server moved from the experimental pnpm-agent to pnpr (#12151), the pnpm-side client and its config setting still carried the old "agent" name. This renames both to align with pnpr — and specifically with pacquet, which already exposes the setting as pnprServer / --pnpr-server.

Changes

  • Package: moved agent/clientpnpr/client and renamed @pnpm/agent.client@pnpm/pnpr.client (exported AgentProject type → PnprProject). Same MIT license, kept separate from the source-available pnpr/ server crates.
  • Config setting: renamed agentpnprServer (camelCase setting / --pnpr-server CLI flag / pnpr-server rc key), matching pacquet's pnpr_server. Updated @pnpm/config.reader (Config, types, configFileKey, getOptionsFromRootManifest), the PnpmSettings type in @pnpm/types, and the install command option lists.
  • Internals + strings: renamed the install-path symbols (mutateModulesViaAgentmutateModulesViaPnpr, canUseAgentForMutationscanUsePnprForMutations, prepareAgentProjectspreparePnprProjects, etc.) and the user-facing log / error strings (Resolving dependencies via the pnpr server, TRUST_POLICY_INCOMPATIBLE_WITH_PNPR, the /v1/files worker errors).
  • Updated the Rust comments that referenced @pnpm/agent.client.

No behavioral change — only names.

Verification

  • pnpm/test/install/pnpmRegistry.ts: 10/10 pass driving --config.pnprServer.
  • pnpm --filter pnpm run compile (tsc + bundle) clean; pnpm run lint:meta passes (it sorted the moved package's tsconfig reference and tracked the rename); ESLint clean on changed files; Rust fmt/doc/dylint/taplo clean.

Changeset: pnpm minor (the experimental agent setting is renamed; the old name no longer works).


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

Summary by CodeRabbit

  • New Features

    • pnpm install --lockfile-only honors configuration with a pnpr server and writes lockfile without fetching or linking.
  • Bug Fixes

    • Optional dependencies are forwarded to the pnpr server so resolutions include optionalDependencies.
    • Client tolerates/ignores legacy streamed file/index lines from older pnpr servers.
  • Breaking Changes

    • Config renamed from agentpnprServer (--pnpr-server).
    • Package renamed to @pnpm/pnpr.client.
  • Chores

    • Updated docs and branding to use pnpr server terminology.

The pnpm-side client and its config setting still carried the old
"agent" name after the server moved to pnpr. Align both with pnpr (and
with pacquet, which already uses `pnprServer`):

- Move `agent/client` → `pnpr/client` and rename the package
  `@pnpm/agent.client` → `@pnpm/pnpr.client` (exported `AgentProject`
  type → `PnprProject`).
- Rename the config setting `agent` → `pnprServer` (`--pnpr-server`
  CLI flag), matching pacquet's setting name.
- Rename the internal install-path symbols and the user-facing log /
  error strings that mentioned "pnpm agent" to "pnpr".

No behavioral change — only names. The e2e suite now drives
`--config.pnprServer`.
Copilot AI review requested due to automatic review settings June 2, 2026 23:47
@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c76440c3-447f-44c3-af13-cd42b45f7d3b

📥 Commits

Reviewing files that changed from the base of the PR and between 224dc56 and 6dfc533.

📒 Files selected for processing (6)
  • .changeset/pnpr-forward-optional-deps.md
  • installing/deps-installer/src/install/index.ts
  • pnpm/test/install/pnpmRegistry.ts
  • pnpr/client/src/fetchFromPnpmRegistry.ts
  • pnpr/crates/pnpr/src/install_accelerator/protocol.rs
  • pnpr/crates/pnpr/src/install_accelerator/resolve.rs
✅ Files skipped from review due to trivial changes (1)
  • pnpr/crates/pnpr/src/install_accelerator/resolve.rs
🚧 Files skipped from review as they are similar to previous changes (3)
  • pnpr/client/src/fetchFromPnpmRegistry.ts
  • pnpm/test/install/pnpmRegistry.ts
  • installing/deps-installer/src/install/index.ts
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: Dylint
  • GitHub Check: Lint and Test (windows-latest)
  • GitHub Check: Lint and Test (ubuntu-latest)
  • GitHub Check: Lint and Test (macos-latest)
  • GitHub Check: Run benchmark on ubuntu-latest
  • GitHub Check: Analyze (javascript)
  • GitHub Check: Code Coverage
  • GitHub Check: Run benchmark on ubuntu-latest
  • GitHub Check: Compile & Lint
🧰 Additional context used
📓 Path-based instructions (1)
pnpr/**/pnpr/**/*.rs

📄 CodeRabbit inference engine (pnpr/AGENTS.md)

pnpr/**/pnpr/**/*.rs: Follow the pacquet code-style guide (../pacquet/CODE_STYLE_GUIDE.md) for Rust-level conventions including imports, naming, ownership, and error handling
Follow the pacquet contributing guide (../pacquet/CONTRIBUTING.md) for test layout and Rust conventions

Files:

  • pnpr/crates/pnpr/src/install_accelerator/protocol.rs
🧠 Learnings (16)
📓 Common learnings
Learnt from: CR
Repo: pnpm/pnpm PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-05-25T12:36:42.202Z
Learning: User-visible changes (CLI flags, defaults, environment variables, lockfile/manifest/state-file formats, error codes/messages, log emissions, store layout, hook semantics) in pnpm must be mirrored to pacquet in the same PR
Learnt from: zkochan
Repo: pnpm/pnpm PR: 11784
File: pacquet/crates/resolving-deps-resolver/src/hoist_peers.rs:120-133
Timestamp: 2026-05-20T23:08:06.093Z
Learning: Pacquet (pnpm's Rust port) has a cardinal rule: "match pnpm exactly — do not fix pnpm quirks unless the same fix has landed in pnpm first." Review comments should not suggest behavioral deviations from upstream pnpm, even when the upstream behavior appears buggy. If a real bug is identified, it must be fixed upstream first.
Learnt from: CR
Repo: pnpm/pnpm PR: 0
File: pacquet/AGENTS.md:0-0
Timestamp: 2026-05-29T18:03:15.354Z
Learning: Reference the upstream pnpm commit/PR when porting code from pnpm in commit messages
Learnt from: CR
Repo: pnpm/pnpm PR: 0
File: pnpr/AGENTS.md:0-0
Timestamp: 2026-05-29T18:03:24.760Z
Learning: Use Conventional Commits with 'pnpr' as the scope in commit messages (e.g., feat(pnpr): ..., fix(pnpr): ...)
Learnt from: zkochan
Repo: pnpm/pnpm PR: 11640
File: pacquet/AGENTS.md:1-6
Timestamp: 2026-05-14T17:38:39.470Z
Learning: In the pnpm/pnpm repository, `AGENTS.md` and `pacquet/AGENTS.md` are agent guides in the agentsmd.net convention — they contain instructions FOR AI coding tools (Claude Code, Codex, Cursor, etc.) working on the repo. They are NOT documentation about software agents defined by the project. Do not apply "document agent capabilities / inputs / outputs / integration points" review rules to these files; such rules are for agentic-framework documentation, not for repo-level AI-tool guides.
Learnt from: CR
Repo: pnpm/pnpm PR: 0
File: pacquet/AGENTS.md:0-0
Timestamp: 2026-05-29T18:03:15.354Z
Learning: Match how the same feature is implemented in the TypeScript pnpm CLI — any change in pacquet must match pnpm's behavior, logic, edge cases, config resolution, error messages, file/lockfile formats, and existing tests
Learnt from: zkochan
Repo: pnpm/pnpm PR: 11915
File: pacquet/crates/resolving-deps-resolver/src/resolve_dependency_tree.rs:553-617
Timestamp: 2026-05-24T21:11:04.272Z
Learning: In the pacquet Rust port (pnpm/pnpm repo), the `ResolvedPackage.optional` AND-folding on revisit intentionally mirrors pnpm's `resolveDependencies.ts:1627-1648` behavior: only the directly-revisited package's `optional` flag is updated; transitive descendants are not re-walked. pnpm CLI corrects stale optional flags downstream via `copyDependencySubGraph` BFS in `lockfile/pruner/src/index.ts:160-205`, which tracks a `nonOptional` set and re-stamps any package reachable by an all-non-optional path. Pacquet does not yet have this pruner equivalent, so the stale flags flow directly through `dependencies_graph_to_lockfile.rs:409` → `create_virtual_store.rs:762` → `installability.rs:394`. A follow-up to port `copyDependencySubGraph` is planned; until then, do not flag the resolver-layer optional propagation gap as a bug in pacquet PRs — it is intentional parity with pnpm's resolver layer.
Learnt from: CR
Repo: pnpm/pnpm PR: 0
File: pnpr/AGENTS.md:0-0
Timestamp: 2026-05-29T18:03:24.760Z
Learning: Read the monorepo-wide AGENTS.md (../AGENTS.md) first for GitHub PR workflow, signing agent-authored content, conventional commit messages, code-reuse philosophy, and test failure handling
Learnt from: CR
Repo: pnpm/pnpm PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-05-25T12:36:42.202Z
Learning: Version pnpm CLI patch for bug fixes, internal refactors, and changes that don't require documentation; minor for new features/settings that should be documented; major for breaking changes
Learnt from: zkochan
Repo: pnpm/pnpm PR: 11915
File: pacquet/crates/resolving-deps-resolver/src/resolve_dependency_tree.rs:553-617
Timestamp: 2026-05-24T21:11:04.272Z
Learning: In pacquet (pnpm/pnpm repo), `ResolvedPackage.optional` AND-folding intentionally mirrors pnpm's resolveDependencies.ts:1627-1648 revisit behavior: only the directly-visited package's `optional` flag is updated on revisit, not transitive descendants. pnpm CLI corrects stale optional flags via `copyDependencySubGraph` BFS in `lockfile/pruner/src/index.ts:160-205`. Pacquet does not yet have this pruner equivalent, so raw `node.optional` flows directly into snapshot/virtual-store via `dependencies_graph_to_lockfile.rs:409` → `create_virtual_store.rs:762` → `installability.rs:394`. A follow-up issue to port `copyDependencySubGraph` is planned.
📚 Learning: 2026-05-24T21:11:04.272Z
Learnt from: zkochan
Repo: pnpm/pnpm PR: 11915
File: pacquet/crates/resolving-deps-resolver/src/resolve_dependency_tree.rs:553-617
Timestamp: 2026-05-24T21:11:04.272Z
Learning: In the pacquet Rust port (pnpm/pnpm repo), the `ResolvedPackage.optional` AND-folding on revisit intentionally mirrors pnpm's `resolveDependencies.ts:1627-1648` behavior: only the directly-revisited package's `optional` flag is updated; transitive descendants are not re-walked. pnpm CLI corrects stale optional flags downstream via `copyDependencySubGraph` BFS in `lockfile/pruner/src/index.ts:160-205`, which tracks a `nonOptional` set and re-stamps any package reachable by an all-non-optional path. Pacquet does not yet have this pruner equivalent, so the stale flags flow directly through `dependencies_graph_to_lockfile.rs:409` → `create_virtual_store.rs:762` → `installability.rs:394`. A follow-up to port `copyDependencySubGraph` is planned; until then, do not flag the resolver-layer optional propagation gap as a bug in pacquet PRs — it is intentional parity with pnpm's resolver layer.

Applied to files:

  • .changeset/pnpr-forward-optional-deps.md
  • pnpr/crates/pnpr/src/install_accelerator/protocol.rs
📚 Learning: 2026-05-24T21:11:04.272Z
Learnt from: zkochan
Repo: pnpm/pnpm PR: 11915
File: pacquet/crates/resolving-deps-resolver/src/resolve_dependency_tree.rs:553-617
Timestamp: 2026-05-24T21:11:04.272Z
Learning: In pacquet (pnpm/pnpm repo), `ResolvedPackage.optional` AND-folding intentionally mirrors pnpm's resolveDependencies.ts:1627-1648 revisit behavior: only the directly-visited package's `optional` flag is updated on revisit, not transitive descendants. pnpm CLI corrects stale optional flags via `copyDependencySubGraph` BFS in `lockfile/pruner/src/index.ts:160-205`. Pacquet does not yet have this pruner equivalent, so raw `node.optional` flows directly into snapshot/virtual-store via `dependencies_graph_to_lockfile.rs:409` → `create_virtual_store.rs:762` → `installability.rs:394`. A follow-up issue to port `copyDependencySubGraph` is planned.

Applied to files:

  • .changeset/pnpr-forward-optional-deps.md
  • pnpr/crates/pnpr/src/install_accelerator/protocol.rs
📚 Learning: 2026-05-25T12:36:42.202Z
Learnt from: CR
Repo: pnpm/pnpm PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-05-25T12:36:42.202Z
Learning: Always explicitly include 'pnpm' in changeset files with appropriate version bump (patch, minor, or major)

Applied to files:

  • .changeset/pnpr-forward-optional-deps.md
📚 Learning: 2026-05-25T12:36:42.202Z
Learnt from: CR
Repo: pnpm/pnpm PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-05-25T12:36:42.202Z
Learning: User-visible changes (CLI flags, defaults, environment variables, lockfile/manifest/state-file formats, error codes/messages, log emissions, store layout, hook semantics) in pnpm must be mirrored to pacquet in the same PR

Applied to files:

  • .changeset/pnpr-forward-optional-deps.md
  • pnpr/crates/pnpr/src/install_accelerator/protocol.rs
📚 Learning: 2026-05-20T23:08:06.093Z
Learnt from: zkochan
Repo: pnpm/pnpm PR: 11784
File: pacquet/crates/resolving-deps-resolver/src/hoist_peers.rs:120-133
Timestamp: 2026-05-20T23:08:06.093Z
Learning: In `pacquet/crates/resolving-deps-resolver/src/hoist_peers.rs`, the `else` branch that calls `max_satisfying_any` is intentional and matches upstream pnpm's `hoistPeers.ts` (lines 45-59). When `is_exact_version && !auto_install_peers`, pnpm still runs `semver.maxSatisfying(versions, '*', { includePrerelease: true })` and picks the closest available preferred version; any version mismatch is reported downstream as a `bad` peer issue rather than dropping the edge. Do NOT suggest changing this branch to skip `max_satisfying_any` for exact ranges — it would diverge from pnpm.

Applied to files:

  • .changeset/pnpr-forward-optional-deps.md
📚 Learning: 2026-05-25T12:36:42.202Z
Learnt from: CR
Repo: pnpm/pnpm PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-05-25T12:36:42.202Z
Learning: Version pnpm CLI patch for bug fixes, internal refactors, and changes that don't require documentation; minor for new features/settings that should be documented; major for breaking changes

Applied to files:

  • .changeset/pnpr-forward-optional-deps.md
📚 Learning: 2026-05-29T18:03:15.354Z
Learnt from: CR
Repo: pnpm/pnpm PR: 0
File: pacquet/AGENTS.md:0-0
Timestamp: 2026-05-29T18:03:15.354Z
Learning: Reference the upstream pnpm commit/PR when porting code from pnpm in commit messages

Applied to files:

  • .changeset/pnpr-forward-optional-deps.md
📚 Learning: 2026-05-29T18:03:24.760Z
Learnt from: CR
Repo: pnpm/pnpm PR: 0
File: pnpr/AGENTS.md:0-0
Timestamp: 2026-05-29T18:03:24.760Z
Learning: Applies to pnpr/**/pnpr/**/Cargo.toml : Declare new shared dependencies in the root [workspace.dependencies] and use { workspace = true } in pnpr crate's Cargo.toml

Applied to files:

  • .changeset/pnpr-forward-optional-deps.md
  • pnpr/crates/pnpr/src/install_accelerator/protocol.rs
📚 Learning: 2026-05-29T18:03:15.354Z
Learnt from: CR
Repo: pnpm/pnpm PR: 0
File: pacquet/AGENTS.md:0-0
Timestamp: 2026-05-29T18:03:15.354Z
Learning: Match how the same feature is implemented in the TypeScript pnpm CLI — any change in pacquet must match pnpm's behavior, logic, edge cases, config resolution, error messages, file/lockfile formats, and existing tests

Applied to files:

  • .changeset/pnpr-forward-optional-deps.md
📚 Learning: 2026-05-29T18:03:15.354Z
Learnt from: CR
Repo: pnpm/pnpm PR: 0
File: pacquet/AGENTS.md:0-0
Timestamp: 2026-05-29T18:03:15.354Z
Learning: Do not change lockfile format, store layout, `.npmrc` semantics, or CLI surface unless pnpm changed them first

Applied to files:

  • .changeset/pnpr-forward-optional-deps.md
📚 Learning: 2026-05-21T00:33:05.035Z
Learnt from: zkochan
Repo: pnpm/pnpm PR: 11789
File: pacquet/crates/resolving-npm-resolver/src/resolve_from_workspace.rs:145-146
Timestamp: 2026-05-21T00:33:05.035Z
Learning: In `pacquet/crates/resolving-npm-resolver/src/resolve_from_workspace.rs`, the guard `bare.starts_with("workspace:.")` is intentionally broad — matching pnpm upstream's identical `startsWith('workspace:.')` check at `resolving/npm-resolver/src/index.ts`. All dot-prefixed workspace forms including `workspace:.foo` are intentionally passed through to the local-resolver, which handles them as `link:`-style directory specs via its prefix-stripping regex. Do not suggest narrowing this to `workspace:./` or `workspace:../` only.

Applied to files:

  • .changeset/pnpr-forward-optional-deps.md
📚 Learning: 2026-05-21T00:33:05.035Z
Learnt from: zkochan
Repo: pnpm/pnpm PR: 11789
File: pacquet/crates/resolving-npm-resolver/src/resolve_from_workspace.rs:145-146
Timestamp: 2026-05-21T00:33:05.035Z
Learning: In `pacquet/crates/resolving-npm-resolver/src/resolve_from_workspace.rs`, the guard `bare.starts_with("workspace:.")` is intentionally broad — matching pnpm upstream's identical `startsWith('workspace:.')` check. All dot-prefixed workspace forms including `workspace:.foo` are intentionally handed off to the local-resolver, which handles them as `link:`-style directory specs via its prefix-stripping regex. Do not suggest narrowing this to `workspace:./` or `workspace:../` only.

Applied to files:

  • .changeset/pnpr-forward-optional-deps.md
📚 Learning: 2026-05-20T23:08:06.093Z
Learnt from: zkochan
Repo: pnpm/pnpm PR: 11784
File: pacquet/crates/resolving-deps-resolver/src/hoist_peers.rs:120-133
Timestamp: 2026-05-20T23:08:06.093Z
Learning: Pacquet (pnpm's Rust port) has a cardinal rule: "match pnpm exactly — do not fix pnpm quirks unless the same fix has landed in pnpm first." Review comments should not suggest behavioral deviations from upstream pnpm, even when the upstream behavior appears buggy. If a real bug is identified, it must be fixed upstream first.

Applied to files:

  • .changeset/pnpr-forward-optional-deps.md
📚 Learning: 2026-05-26T21:01:06.666Z
Learnt from: zkochan
Repo: pnpm/pnpm PR: 11966
File: .changeset/require-tarball-integrity.md:6-6
Timestamp: 2026-05-26T21:01:06.666Z
Learning: In pnpm lockfile-related release notes/docs (especially changeset markdown), preserve URL hostnames exactly as they appear in pnpm-lock.yaml tarball resolution entries—keep hosts like `codeload.github.com`, `bitbucket.org`, and `gitlab.com` in lowercase. Do not “correct” them to title-case/preserve brand capitalization (e.g., LanguageTool rules like `GITHUB` capitalization) because these are literal URL fragments, not platform brand names.

Applied to files:

  • .changeset/pnpr-forward-optional-deps.md
📚 Learning: 2026-05-29T18:03:24.760Z
Learnt from: CR
Repo: pnpm/pnpm PR: 0
File: pnpr/AGENTS.md:0-0
Timestamp: 2026-05-29T18:03:24.760Z
Learning: Applies to pnpr/**/pnpr/**/*.rs : Follow the pacquet code-style guide (../pacquet/CODE_STYLE_GUIDE.md) for Rust-level conventions including imports, naming, ownership, and error handling

Applied to files:

  • pnpr/crates/pnpr/src/install_accelerator/protocol.rs
🔇 Additional comments (2)
pnpr/crates/pnpr/src/install_accelerator/protocol.rs (1)

1-2: LGTM!

Also applies to: 21-22, 43-44, 126-126, 142-142, 150-150

.changeset/pnpr-forward-optional-deps.md (1)

1-7: LGTM!


📝 Walkthrough

Walkthrough

This PR renames the experimental "agent" surface to "pnprServer", renames and repackages the agent client as @pnpm/pnpr.client, forwards optionalDependencies to the pnpr protocol, and integrates pnpr resolution and mutation paths throughout install, worker, tests, and release notes.

Changes

Agent to pnprServer rename with pnpr server integration

Layer / File(s) Summary
Configuration and type system rename
config/reader/src/Config.ts, core/types/src/package.ts, config/reader/src/configFileKey.ts, config/reader/src/types.ts, installing/commands/src/install.ts, installing/commands/src/installDeps.ts, installing/commands/src/recursive.ts, .meta-updater/src/index.ts
Configuration interfaces and CLI command types replace agent with pnprServer throughout; pnpmConfigFileKeys gains 'pnpr-server'.
Package rename and workspace wiring
pnpr/client/package.json, installing/deps-installer/package.json, installing/deps-installer/tsconfig.json, pnpm-workspace.yaml, pacquet/crates/pnpr-client/src/lib.rs
Rename @pnpm/agent.client@pnpm/pnpr.client, update workspace refs, tsconfig references, crate docs, and package metadata.
Client library interface and error message updates
pnpr/client/src/fetchFromPnpmRegistry.ts, pnpr/client/README.md
Introduce PnprProject (replacing AgentProject), forward optionalDependencies in default payloads, and update error/URL/message texts and docs to reference "pnpr server".
Protocol: forward optionalDependencies
pnpr/crates/pnpr/src/install_accelerator/protocol.rs, pnpr/crates/pnpr/src/install_accelerator/resolve.rs
Add optional_dependencies to request/project shapes and propagate them into normalized ProjectDeps and synthetic per-importer package.json manifests for lockfile generation.
Install options type update
installing/deps-installer/src/install/extendInstallOptions.ts
Add pnprServer?: string to StrictInstallOptions to carry the pnpr server URL through the install pipeline.
Installer routing, preprocessing and mutation orchestration
installing/deps-installer/src/install/index.ts
Install and mutate flows check opts.pnprServer, add canUsePnprForMutations() predicate, introduce PnprNewDep/PnprInstallProject and preparePnprProjects(), add mutateModulesViaPnpr(), and apply resolved specs from pnpr lockfile into manifests.
Registry installation for pnpr servers
installing/deps-installer/src/install/index.ts
installFromPnpmRegistry() implements pnpr semantics: enforces trustPolicy incompatibility, reads pnpr lockfile shape, opens StoreIndex, calls fetchFromPnpmRegistry (pnpr client), wraps store controller to wait for pnpr downloads and skips re-verification, and adapts returned stats/comments for pnpr mode.
Worker file transfer and pnpr-specific errors
worker/src/index.ts, worker/src/start.ts
Update worker comments and fetchAndWriteCafs() error/timeout/stream messages to reference pnpr server behavior and URL prefixes.
Test coverage for pnpr server path
pnpm/test/install/pnpmRegistry.ts
Update tests to use --config.pnprServer, add optional-deps test, and verify pnpr lockfile-forwarding and workspace mutation scenarios.
Release notes and changesets
.changeset/pnpr-lockfile-only.md, .changeset/rename-agent-to-pnpr-server.md, .changeset/pnpr-forward-optional-deps.md
Update changesets to document the rename, pnprServer-specific lockfile-only behavior, and the optionalDependencies forwarding fix.

Sequence diagrams: skipped (changes are broad codebase wiring and protocol/type extensions; no single trivial 3+ actor sequential flow is rendered here).

Estimated code review effort
🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • pnpm/pnpm#12077: Introduced the initial pnprServer fast-path implementation and client workflow that this PR renames and integrates throughout the codebase.
  • pnpm/pnpm#12151: Extends pnpr install accelerator request/resolve logic (optional_dependencies) closely related to protocol changes here.
  • pnpm/pnpm#12148: Changeset and naming updates for pnpr lockfile-only behavior referenced by this PR.

Suggested reviewers

  • KSXGitHub

"🐰 I hopped through code with eager paws,
renamèd agent to pnprServer—applause!
Optional deps carried in each request,
clients and tests now wear their best.
Hooray for tidy names and passing tests! 🥕"

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main objective: renaming agent client and agent setting references to pnpr throughout the codebase.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rename-agent-client

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Review Summary by Qodo

Rename agent client and setting to pnpr for consistency

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Renamed agent config setting to pnprServer across all packages
• Moved @pnpm/agent.client package to @pnpm/pnpr.client with renamed exports
• Updated internal symbols and comments from "agent" to "pnpr" terminology
• Updated test suite to use new --config.pnprServer flag instead of --config.agent
Diagram
flowchart LR
  A["Config Setting<br/>agent → pnprServer"] --> B["Package Rename<br/>@pnpm/agent.client →<br/>@pnpm/pnpr.client"]
  B --> C["Type Rename<br/>AgentProject →<br/>PnprProject"]
  A --> D["Internal Symbols<br/>mutateModulesViaAgent →<br/>mutateModulesViaPnpr"]
  D --> E["Error Messages &<br/>Comments Updated"]
  E --> F["Tests Updated<br/>--config.pnprServer"]

Loading

Grey Divider

File Changes

1. config/reader/src/Config.ts ⚙️ Configuration changes +1/-1

Renamed agent property to pnprServer

config/reader/src/Config.ts


2. config/reader/src/configFileKey.ts ⚙️ Configuration changes +1/-1

Updated config file keys from agent to pnpr-server

config/reader/src/configFileKey.ts


3. config/reader/src/getOptionsFromRootManifest.ts ⚙️ Configuration changes +1/-1

Updated OptionsFromRootManifest type to use pnprServer

config/reader/src/getOptionsFromRootManifest.ts


View more (27)
4. config/reader/src/types.ts ⚙️ Configuration changes +1/-1

Renamed pnpmTypes agent key to pnpr-server

config/reader/src/types.ts


5. core/types/src/package.ts ⚙️ Configuration changes +1/-1

Updated PnpmSettings interface agent to pnprServer

core/types/src/package.ts


6. installing/commands/src/install.ts ⚙️ Configuration changes +2/-2

Updated rcOptionsTypes and InstallCommandOptions for pnprServer

installing/commands/src/install.ts


7. installing/commands/src/installDeps.ts ⚙️ Configuration changes +1/-1

Updated InstallDepsOptions to use pnprServer

installing/commands/src/installDeps.ts


8. installing/commands/src/recursive.ts ⚙️ Configuration changes +1/-1

Updated RecursiveOptions to use pnprServer

installing/commands/src/recursive.ts


9. installing/deps-installer/src/install/extendInstallOptions.ts ⚙️ Configuration changes +3/-4

Renamed agent property to pnprServer in StrictInstallOptions

installing/deps-installer/src/install/extendInstallOptions.ts


10. installing/deps-installer/src/install/index.ts ✨ Enhancement +60/-60

Renamed internal functions and variables from agent to pnpr

installing/deps-installer/src/install/index.ts


11. installing/deps-installer/package.json Dependencies +1/-1

Updated dependency from @pnpm/agent.client to @pnpm/pnpr.client

installing/deps-installer/package.json


12. installing/deps-installer/tsconfig.json ⚙️ Configuration changes +3/-3

Updated tsconfig path reference from agent/client to pnpr/client

installing/deps-installer/tsconfig.json


13. pnpr/client/src/fetchFromPnpmRegistry.ts ✨ Enhancement +11/-11

Renamed AgentProject to PnprProject and updated comments

pnpr/client/src/fetchFromPnpmRegistry.ts


14. pnpr/client/README.md 📝 Documentation +6/-6

Updated documentation from agent.client to pnpr.client

pnpr/client/README.md


15. pnpr/client/package.json ⚙️ Configuration changes +5/-5

Renamed package from @pnpm/agent.client to @pnpm/pnpr.client

pnpr/client/package.json


16. worker/src/index.ts 📝 Documentation +1/-1

Updated comment referencing pnpm agent to pnpr server

worker/src/index.ts


17. worker/src/start.ts ✨ Enhancement +10/-10

Updated error messages from pnpm agent to pnpr server

worker/src/start.ts


18. pnpm/test/install/pnpmRegistry.ts 🧪 Tests +26/-26

Updated test suite to use --config.pnprServer flag

pnpm/test/install/pnpmRegistry.ts


19. .meta-updater/src/index.ts ⚙️ Configuration changes +1/-1

Updated experimental packages list to use @pnpm/pnpr.client

.meta-updater/src/index.ts


20. pacquet/crates/pnpr-client/src/lib.rs 📝 Documentation +1/-1

Updated Rust comment referencing TypeScript package name

pacquet/crates/pnpr-client/src/lib.rs


21. pnpr/crates/pnpr/src/install_accelerator/protocol.rs 📝 Documentation +1/-1

Updated Rust comment referencing TypeScript package name

pnpr/crates/pnpr/src/install_accelerator/protocol.rs


22. pnpm-workspace.yaml ⚙️ Configuration changes +1/-1

Updated workspace packages path from agent/* to pnpr/client

pnpm-workspace.yaml


23. pnpm-lock.yaml Miscellaneous +31/-31

Updated lockfile with new package structure and dependencies

pnpm-lock.yaml


24. .changeset/rename-agent-to-pnpr-server.md 📝 Documentation +10/-0

Added changeset documenting the rename to pnprServer

.changeset/rename-agent-to-pnpr-server.md


25. .changeset/pnpr-lockfile-only.md 📝 Documentation +2/-2

Updated changeset to reference pnprServer instead of agent

.changeset/pnpr-lockfile-only.md


26. pnpr/client/CHANGELOG.md Additional files +0/-0

...

pnpr/client/CHANGELOG.md


27. pnpr/client/src/index.ts Additional files +0/-0

...

pnpr/client/src/index.ts


28. pnpr/client/src/protocol.ts Additional files +0/-0

...

pnpr/client/src/protocol.ts


29. pnpr/client/tsconfig.json Additional files +0/-0

...

pnpr/client/tsconfig.json


30. pnpr/client/tsconfig.lint.json Additional files +0/-0

...

pnpr/client/tsconfig.lint.json


Grey Divider

Qodo Logo

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Micro-Benchmark Results

Linux

group                          main                                   pr
-----                          ----                                   --
tarball/download_dependency    1.00      8.1±0.50ms   536.9 KB/sec    1.00      8.0±0.66ms   539.2 KB/sec

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Renames pnpm’s experimental install-accelerator client/package and configuration from the legacy “agent” naming to “pnpr”, aligning with the pnpr server and pacquet’s pnprServer naming.

Changes:

  • Renamed config setting agentpnprServer (and rc key pnpr-server) across config reader/types and install command option plumbing.
  • Moved/renamed client package to pnpr/client and updated imports, symbols, and user-facing strings to “pnpr server”.
  • Updated tests and workspace/lockfile metadata to reference the new package name and config key.

Reviewed changes

Copilot reviewed 24 out of 31 changed files in this pull request and generated no comments.

Show a summary per file
File Description
worker/src/start.ts Updates comments/errors to refer to “pnpr server” for /v1/files behavior.
worker/src/index.ts Updates doc comment for pnpr-related concurrency behavior.
pnpr/crates/pnpr/src/install_accelerator/protocol.rs Updates Rust doc comment to reference @pnpm/pnpr.client.
pnpr/client/tsconfig.lint.json Adds lint tsconfig for the renamed client package.
pnpr/client/tsconfig.json Adds build tsconfig and project references for the renamed client package.
pnpr/client/src/protocol.ts Adds protocol types for pnpr client responses.
pnpr/client/src/index.ts Adds package entrypoint exports for pnpr client.
pnpr/client/src/fetchFromPnpmRegistry.ts Renames public types/symbols and strings from “agent” to “pnpr server”.
pnpr/client/README.md Renames documentation to @pnpm/pnpr.client and pnprServer.
pnpr/client/package.json Renames the published package to @pnpm/pnpr.client and updates metadata.
pnpr/client/CHANGELOG.md Adds/moves changelog into the new package location.
pnpr/client/.gitignore Adds store ignore for the new package dir.
pnpm/test/install/pnpmRegistry.ts Updates e2e coverage to use --config.pnprServer and “pnpr server” naming.
pnpm-workspace.yaml Updates workspace package list to include pnpr/client instead of agent/*.
pnpm-lock.yaml Updates importers/deps to reflect pnpr/client and @pnpm/pnpr.client.
pacquet/crates/pnpr-client/src/lib.rs Updates Rust doc comment to reference @pnpm/pnpr.client.
installing/deps-installer/tsconfig.json Updates TS project references from agent/client to pnpr/client.
installing/deps-installer/src/install/index.ts Renames option/plumbing and user-facing strings/errors to pnprServer and pnpr terminology.
installing/deps-installer/src/install/extendInstallOptions.ts Renames the option field from agent?: to pnprServer?: and updates docs.
installing/deps-installer/package.json Switches dependency from @pnpm/agent.client to @pnpm/pnpr.client.
installing/commands/src/recursive.ts Updates command options pick list to pnprServer.
installing/commands/src/installDeps.ts Updates command options pick list to pnprServer.
installing/commands/src/install.ts Replaces rc option agent with pnpr-server and updates command option typing to pnprServer.
core/types/src/package.ts Renames PnpmSettings.agent to PnpmSettings.pnprServer.
config/reader/src/types.ts Replaces config key agent with pnpr-server in type map.
config/reader/src/getOptionsFromRootManifest.ts Updates root-manifest settings pick to include pnprServer.
config/reader/src/configFileKey.ts Updates allowed config file keys to include pnpr-server instead of agent.
config/reader/src/Config.ts Renames config field agent?: to pnprServer?:.
.meta-updater/src/index.ts Updates experimental package list to @pnpm/pnpr.client.
.changeset/rename-agent-to-pnpr-server.md Adds release notes for the agentpnprServer rename and package rename.
.changeset/pnpr-lockfile-only.md Updates changeset package name references from @pnpm/agent.client to @pnpm/pnpr.client.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov-commenter

codecov-commenter commented Jun 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 87.57%. Comparing base (2b788d5) to head (6dfc533).

Files with missing lines Patch % Lines
...pr/crates/pnpr/src/install_accelerator/protocol.rs 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12155      +/-   ##
==========================================
+ Coverage   87.56%   87.57%   +0.01%     
==========================================
  Files         268      268              
  Lines       30761    30764       +3     
==========================================
+ Hits        26935    26942       +7     
+ Misses       3826     3822       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
installing/deps-installer/src/install/index.ts (3)

2312-2316: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Return resolutionPolicyViolations from the pnpr fast path.

mutateModules() can return this object directly at Line 314, but this branch omits resolutionPolicyViolations and then casts the result to MutateModulesResult. Callers like addDependenciesToPackage() and mutateModulesInSingleProject() treat that field as a required array, so the pnpr path currently returns undefined and breaks the contract.

Minimal fix
   return {
     updatedProjects,
     stats: result.stats,
     ignoredBuilds: result.ignoredBuilds,
+    resolutionPolicyViolations: [],
   } as MutateModulesResult
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@installing/deps-installer/src/install/index.ts` around lines 2312 - 2316, The
pnpr fast-path return is missing the resolutionPolicyViolations field, breaking
the MutateModulesResult contract; update the returned object in the fast path
(the return near the end of the pnpr branch in install/index.ts where
updatedProjects, stats and ignoredBuilds are returned) to include
resolutionPolicyViolations (e.g. set it from result.resolutionPolicyViolations
or default to an empty array) so callers like addDependenciesToPackage and
mutateModulesInSingleProject receive a defined array.

2491-2497: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Normalize workspace importer IDs to POSIX here too.

Earlier in this method, the outgoing projectsList uses .split(path.sep).join('/') because the pnpr server and lockfile importer IDs are POSIX-normalized. headlessOpts.allProjects[*].id skips that normalization, so on Windows you'll pass ids like packages\foo while the returned lockfile contains packages/foo, which can make the pnpr workspace path miss importer entries.

Minimal fix
       allProjects: Object.fromEntries(
         (allInstallProjects ?? [{ rootDir, manifest }]).map((p, i) => [
           p.rootDir,
           {
             binsDir: path.join(p.rootDir, 'node_modules', '.bin'),
             buildIndex: i,
-            id: (path.relative(lockfileDir, p.rootDir) || '.') as ProjectId,
+            id: ((path.relative(lockfileDir, p.rootDir) || '.').split(path.sep).join('/')) as ProjectId,
             manifest: p.manifest,
             modulesDir: path.join(p.rootDir, 'node_modules'),
             rootDir: p.rootDir,
           },
         ])
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@installing/deps-installer/src/install/index.ts` around lines 2491 - 2497, The
project id assigned in the mapping for allInstallProjects is not
POSIX-normalized, causing Windows backslashes (e.g. "packages\\foo") to mismatch
lockfile importer IDs; update the id assignment in the (allInstallProjects ??
...).map(...) block (the id property inside the created object) to normalize via
splitting on path.sep and joining with '/' (same approach used earlier for
projectsList) so the id becomes POSIX-style (e.g. "packages/foo").

2393-2400: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Don't checkpoint and close StoreIndex before late I frames finish.

fetchFromPnpmRegistry() resolves as soon as it sees the L frame, but its own comment says the stream keeps delivering remaining D/I lines afterward. This block writes indexEntries, checkpoints, and closes SQLite immediately after that early resolve, so any index entries appended after the lockfile frame are never persisted.

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

In `@installing/deps-installer/src/install/index.ts` around lines 2393 - 2400,
fetchFromPnpmRegistry currently returns when it sees the `L` frame while the
stream may still emit `D`/`I` frames, but the code calls writeRawIndexEntries
and then immediately invokes storeIndex.checkpoint() and storeIndex.close();
move the checkpoint/close to occur only after the registry stream is fully
consumed (i.e., after fetchFromPnpmRegistry resolves only when all frames
processed) or add an explicit await for the stream completion before calling
writeRawIndexEntries/storeIndex.checkpoint() and storeIndex.close(); update
either fetchFromPnpmRegistry to delay its resolution until end-of-stream or
adjust the caller to wait for end-of-stream, ensuring late `I` frames appended
to indexEntries are persisted.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pnpr/client/src/fetchFromPnpmRegistry.ts`:
- Around line 12-17: The PnprProject type was stripped of optionalDependencies
causing optional deps to be omitted from pnpr requests; restore an
optionalDependencies?: Record<string,string> field on the PnprProject interface
and update the fast-path in the installer (where single-project and workspace
request bodies are assembled) to populate manifest.optionalDependencies into
that field so pnprServer receives them; also propagate
manifest.optionalDependencies through the caller chain (the install function
that builds the pnpr request, referenced as manifest.optionalDependencies and
the request construction in install/index.ts) so both single-project and
workspace flows include optionalDependencies.

---

Outside diff comments:
In `@installing/deps-installer/src/install/index.ts`:
- Around line 2312-2316: The pnpr fast-path return is missing the
resolutionPolicyViolations field, breaking the MutateModulesResult contract;
update the returned object in the fast path (the return near the end of the pnpr
branch in install/index.ts where updatedProjects, stats and ignoredBuilds are
returned) to include resolutionPolicyViolations (e.g. set it from
result.resolutionPolicyViolations or default to an empty array) so callers like
addDependenciesToPackage and mutateModulesInSingleProject receive a defined
array.
- Around line 2491-2497: The project id assigned in the mapping for
allInstallProjects is not POSIX-normalized, causing Windows backslashes (e.g.
"packages\\foo") to mismatch lockfile importer IDs; update the id assignment in
the (allInstallProjects ?? ...).map(...) block (the id property inside the
created object) to normalize via splitting on path.sep and joining with '/'
(same approach used earlier for projectsList) so the id becomes POSIX-style
(e.g. "packages/foo").
- Around line 2393-2400: fetchFromPnpmRegistry currently returns when it sees
the `L` frame while the stream may still emit `D`/`I` frames, but the code calls
writeRawIndexEntries and then immediately invokes storeIndex.checkpoint() and
storeIndex.close(); move the checkpoint/close to occur only after the registry
stream is fully consumed (i.e., after fetchFromPnpmRegistry resolves only when
all frames processed) or add an explicit await for the stream completion before
calling writeRawIndexEntries/storeIndex.checkpoint() and storeIndex.close();
update either fetchFromPnpmRegistry to delay its resolution until end-of-stream
or adjust the caller to wait for end-of-stream, ensuring late `I` frames
appended to indexEntries are persisted.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 12f45dfb-25b4-4503-91b3-a75c49a49386

📥 Commits

Reviewing files that changed from the base of the PR and between 2b788d5 and 224dc56.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (30)
  • .changeset/pnpr-lockfile-only.md
  • .changeset/rename-agent-to-pnpr-server.md
  • .meta-updater/src/index.ts
  • config/reader/src/Config.ts
  • config/reader/src/configFileKey.ts
  • config/reader/src/getOptionsFromRootManifest.ts
  • config/reader/src/types.ts
  • core/types/src/package.ts
  • installing/commands/src/install.ts
  • installing/commands/src/installDeps.ts
  • installing/commands/src/recursive.ts
  • installing/deps-installer/package.json
  • installing/deps-installer/src/install/extendInstallOptions.ts
  • installing/deps-installer/src/install/index.ts
  • installing/deps-installer/tsconfig.json
  • pacquet/crates/pnpr-client/src/lib.rs
  • pnpm-workspace.yaml
  • pnpm/test/install/pnpmRegistry.ts
  • pnpr/client/.gitignore
  • pnpr/client/CHANGELOG.md
  • pnpr/client/README.md
  • pnpr/client/package.json
  • pnpr/client/src/fetchFromPnpmRegistry.ts
  • pnpr/client/src/index.ts
  • pnpr/client/src/protocol.ts
  • pnpr/client/tsconfig.json
  • pnpr/client/tsconfig.lint.json
  • pnpr/crates/pnpr/src/install_accelerator/protocol.rs
  • worker/src/index.ts
  • worker/src/start.ts

Comment thread pnpr/client/src/fetchFromPnpmRegistry.ts
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.079 ± 0.058 1.976 2.162 1.00
pacquet@main 2.140 ± 0.062 2.046 2.232 1.03 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.0789570070599996,
      "stddev": 0.05832126438916964,
      "median": 2.09357934216,
      "user": 2.5738173200000003,
      "system": 3.4462924800000003,
      "min": 1.97647524316,
      "max": 2.16249380116,
      "times": [
        2.0629987601599997,
        1.97647524316,
        1.98612566216,
        2.07266280116,
        2.12279574016,
        2.09393365516,
        2.16249380116,
        2.10691970116,
        2.09322502916,
        2.11193967716
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.13959125386,
      "stddev": 0.06153706430553691,
      "median": 2.15330091966,
      "user": 2.57689672,
      "system": 3.4146083799999993,
      "min": 2.04645904416,
      "max": 2.2316548581599998,
      "times": [
        2.2316548581599998,
        2.16023353816,
        2.05973242116,
        2.16692384416,
        2.07721732416,
        2.14636830116,
        2.20296266216,
        2.17576026016,
        2.12860028516,
        2.04645904416
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 656.8 ± 27.7 635.0 732.5 1.00
pacquet@main 662.9 ± 27.0 641.9 716.3 1.01 ± 0.06
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.65680476808,
      "stddev": 0.027734100941874604,
      "median": 0.65211350408,
      "user": 0.35895412000000004,
      "system": 1.32905022,
      "min": 0.63503265108,
      "max": 0.73253578808,
      "times": [
        0.73253578808,
        0.65240805808,
        0.65963615108,
        0.65487359908,
        0.63962207408,
        0.65181895008,
        0.64653625808,
        0.63503265108,
        0.64092437508,
        0.65465977608
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.6628808371799999,
      "stddev": 0.026956447035626697,
      "median": 0.65280664658,
      "user": 0.3632003199999999,
      "system": 1.3350692199999998,
      "min": 0.64187983608,
      "max": 0.71630433208,
      "times": [
        0.71630433208,
        0.65679204108,
        0.64882125208,
        0.64187983608,
        0.64414897508,
        0.64243784408,
        0.64591976808,
        0.66332203108,
        0.7070705470800001,
        0.66211174508
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.325 ± 0.033 2.271 2.389 1.01 ± 0.02
pacquet@main 2.304 ± 0.037 2.252 2.358 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.3245373486,
      "stddev": 0.032689177174771704,
      "median": 2.3210638664,
      "user": 3.71426212,
      "system": 3.15975494,
      "min": 2.2709348049,
      "max": 2.3892803969,
      "times": [
        2.3020677159,
        2.3391797079,
        2.2980685019,
        2.3511194479,
        2.3226934049,
        2.3123294649,
        2.3892803969,
        2.3194343279,
        2.2709348049,
        2.3402657129
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 2.3040578908,
      "stddev": 0.03677272883122393,
      "median": 2.2987663068999997,
      "user": 3.70246202,
      "system": 3.10942924,
      "min": 2.2516375029,
      "max": 2.3577815569,
      "times": [
        2.2836059049,
        2.2660124859,
        2.2783485389,
        2.3005763248999997,
        2.2969562888999997,
        2.3577815569,
        2.3511336738999997,
        2.3091857228999997,
        2.3453409079,
        2.2516375029
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.558 ± 0.024 1.527 1.585 1.04 ± 0.02
pacquet@main 1.499 ± 0.021 1.468 1.535 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.55804949536,
      "stddev": 0.023827469353541117,
      "median": 1.5633822670600002,
      "user": 1.7402556200000003,
      "system": 1.9045266600000001,
      "min": 1.52670846106,
      "max": 1.58511449806,
      "times": [
        1.52803199206,
        1.57160900506,
        1.5752715960600001,
        1.53843187606,
        1.55515552906,
        1.52670846106,
        1.5790084880600002,
        1.58511449806,
        1.53641443906,
        1.5847490690600001
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.49870386156,
      "stddev": 0.020771373491026437,
      "median": 1.4993072120600002,
      "user": 1.68666032,
      "system": 1.85411026,
      "min": 1.46762363406,
      "max": 1.53549529506,
      "times": [
        1.51994523306,
        1.5000505640600001,
        1.46762363406,
        1.51241073306,
        1.53549529506,
        1.48368922506,
        1.47253745606,
        1.50083085406,
        1.49589176106,
        1.49856386006
      ]
    }
  ]
}

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/12155
Testbedpacquet
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
🚷 view threshold
2,324.54 ms
(-0.71%)Baseline: 2,341.15 ms
2,809.38 ms
(82.74%)
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
🚷 view threshold
1,558.05 ms
(+2.72%)Baseline: 1,516.86 ms
1,820.23 ms
(85.60%)
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
🚷 view threshold
2,078.96 ms
(+1.32%)Baseline: 2,051.91 ms
2,462.29 ms
(84.43%)
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
🚷 view threshold
656.80 ms
(+1.04%)Baseline: 650.03 ms
780.03 ms
(84.20%)
🐰 View full continuous benchmarking report in Bencher

`PnprProject` and the install-request body only carried `dependencies`
and `devDependencies`, so a project's `optionalDependencies` were
dropped on the way to the pnpr server — it resolved as if they didn't
exist, producing a different lockfile than the local resolver.

Thread `optionalDependencies` through the client request shape, the
deps-installer single-project and workspace request builders, and the
pnpr server (`InstallRequestProject` / `InstallRequest` + the throwaway
manifest it writes for resolution). Adds an e2e case asserting an
optional dependency is resolved through `pnprServer`.
@zkochan zkochan merged commit a017bf3 into main Jun 3, 2026
28 checks passed
@zkochan zkochan deleted the rename-agent-client branch June 3, 2026 10:01
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.

3 participants