Skip to content

feat(cli): implement the access command for both pnpm and pacquet - #12816

Merged
zkochan merged 11 commits into
pnpm:mainfrom
kairosci:feat/access-command
Jul 9, 2026
Merged

zkochan merged 11 commits into
pnpm:mainfrom
kairosci:feat/access-command

Conversation

@kairosci

@kairosci kairosci commented Jul 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR implements the pnpm access command in both the TypeScript pnpm CLI and the Rust pacquet port, providing full registry access management following npm's npm access paradigm. The command supports listing packages and collaborators, getting and setting package visibility status and MFA requirements, and granting or revoking team access to packages.

Squash Commit Body

Implement the pnpm access command in both the TypeScript CLI (pnpm11/registry-access/commands/src/access.ts) and the Rust pacquet port (pacquet/crates/cli/src/cli_args/access.rs). The command follows npm's npm access paradigm and supports: list packages (users, orgs, teams, and per-package collaborators), get status (package public/restricted access status), set status (change package visibility with restricted/private mapped to restricted), set mfa (configure two-factor authentication requirements per package with none/publish/automation levels), grant (grant read-only or read-write team access to scoped packages), revoke (revoke team access from scoped packages). Both implementations include auth header and OTP support, JSON output mode, proper error handling with pnpm error codes, and comprehensive unit tests. The TypeScript tests use mock agent fixtures and the Rust tests cover parameter validation and error paths.

Checklist

The change is implemented in both the TypeScript CLI and the Rust pacquet port. A changeset was added (feat for both @pnpm/registry-access.commands and pnpm). Added tests for the TypeScript handler (mock agent) and Rust parameter validation and error handling. Documentation was not updated as part of this PR.

Summary by CodeRabbit

  • New Features
    • Added a new pnpm access command to manage registry package visibility and team access.
    • Supports subcommands to list packages/collaborators, get/set access status, configure MFA requirements, and grant/revoke team permissions.
    • Adds --json output and --otp for MFA-protected operations; deprecated public/restricted forms are mapped to the canonical status setting.
  • Tests
    • Added Rust and Jest CLI test coverage for command parsing, validation, and success/error paths.

Copilot AI review requested due to automatic review settings July 5, 2026 21:05
@kairosci
kairosci requested a review from zkochan as a code owner July 5, 2026 21:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 5, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

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

Use the following commands to manage reviews:

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

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR adds a new pnpm access command in both the pnpm and pacquet CLIs, with registry operations, command wiring, tests, and a changeset entry.

Changes

TypeScript pnpm access command

Layer / File(s) Summary
Command contract and handler
pnpm11/registry-access/commands/src/access.ts
Defines the access command options, help text, handler dispatch, and registry response/error handling helpers.
Command registration and routing
pnpm11/registry-access/commands/src/index.ts, pnpm11/pnpm/src/cmd/index.ts, pnpm11/pnpm/src/cmd/notImplemented.ts, pnpm11/pnpm/test/cli.ts, pacquet/crates/cli/src/cli_args/cli_command.rs, pacquet/crates/cli/src/cli_args/dispatch.rs, pacquet/crates/cli/src/cli_args/dispatch_query.rs, pacquet/crates/cli/src/cli_args.rs
Exports and registers access, removes it from not-implemented commands, and routes the CLI command into the access dispatcher.
Access test suite and changeset
pnpm11/registry-access/commands/test/access.ts, pacquet/crates/cli/src/cli_args/access/tests.rs, .changeset/access-command.md
Adds tests for metadata, validation, deprecated forms, and subcommand behavior, plus the changeset entry for the new command.

Rust pacquet access command

Layer / File(s) Summary
Args, errors, and context types
pacquet/crates/cli/src/cli_args.rs, pacquet/crates/cli/src/cli_args/access.rs
Adds the access module and defines the access argument, error, and context types.
Run parsing and context setup
pacquet/crates/cli/src/cli_args/access.rs
Parses positional access command tokens and builds the registry/config context for execution.
Registry operations
pacquet/crates/cli/src/cli_args/access.rs
Implements listing, status, MFA, grant, and revoke operations against the registry.
HTTP and URL helpers
pacquet/crates/cli/src/cli_args/access.rs
Adds HTTP client construction, registry URL normalization, package-name escaping, and error-body handling.
CLI wiring and command dispatch
pacquet/crates/cli/src/cli_args/cli_command.rs, pacquet/crates/cli/src/cli_args/dispatch.rs, pacquet/crates/cli/src/cli_args/dispatch_query.rs
Adds the access command to the CLI surface and dispatch path.
Access command tests
pacquet/crates/cli/src/cli_args/access/tests.rs
Adds tests for normalization, validation, and deprecated forms.

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

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant pnpmCLI as pnpm CLI
  participant AccessHandler as access.handler
  participant Registry

  User->>pnpmCLI: pnpm access set status=public pkg
  pnpmCLI->>AccessHandler: handler(opts, params)
  AccessHandler->>AccessHandler: validate subcommand and args
  AccessHandler->>Registry: POST /pkg/access
  Registry-->>AccessHandler: success or error response
  AccessHandler-->>pnpmCLI: confirmation string or thrown error
  pnpmCLI-->>User: printed output
Loading
sequenceDiagram
  participant User
  participant AccessArgs
  participant Registry

  User->>AccessArgs: run(config)
  AccessArgs->>AccessArgs: build_access_context
  AccessArgs->>Registry: HTTP request for list/get/set/grant/revoke
  Registry-->>AccessArgs: response or error
  AccessArgs-->>User: formatted result
Loading

Suggested labels: product: pnpm@11, product: pacquet

Suggested reviewers: zkochan

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

❤️ Share

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

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

Copy link
Copy Markdown

PR Summary by Qodo

feat(cli): add pnpm access command to pnpm and pacquet

✨ Enhancement 🧪 Tests ⚙️ Configuration changes 🕐 40+ Minutes

Grey Divider

AI Description

• Add pnpm access registry access management across TS pnpm and Rust pacquet CLIs.
• Support list/get/set visibility & MFA plus team grant/revoke, with JSON and OTP.
• Add unit tests and release changeset for the new command.
Diagram

graph TD
  pnpm["pnpm CLI (TS)"] --> ts["registry-access: access.ts"] --> auth["Auth + OTP headers"] --> reg{{"npm registry API"}}
  pacq["pacquet CLI (Rust)"] --> rs["cli_args: access.rs"] --> auth
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Rust: model subcommands with `clap` enums instead of free-form params
  • ➕ Automatic help/usage per subcommand and argument validation
  • ➕ Less custom parsing logic; clearer error reporting for missing/invalid args
  • ➖ Harder to exactly mirror npm/pnpm’s flexible parsing (aliases and deprecated forms)
  • ➖ Potential breaking CLI UX differences vs pnpm’s established syntax
2. Factor registry access HTTP + error mapping into a shared client helper
  • ➕ Reduces duplication across access-related commands and future additions
  • ➕ Central place for consistent auth/OTP, retries, and error-body truncation
  • ➖ Refactor scope is larger; may delay shipping the command
  • ➖ Requires defining abstractions that might not generalize cleanly

Recommendation: Keep the current approach for parity: implement access as a dedicated handler in each CLI with explicit endpoint calls and pnpm-style error codes. Consider the clap enum refactor later if UX parity remains intact, and extract a shared registry-access HTTP/error helper once another command needs the same patterns.

Files changed (13) +2204 / -4

Enhancement (8) +1479 / -2
cli_args.rsExpose 'access' CLI args module +1/-0

Expose 'access' CLI args module

• Registers the new 'access' module under 'cli_args' so it can be used by command routing.

pacquet/crates/cli/src/cli_args.rs

access.rsImplement 'pacquet access' command (registry access management) +882/-0

Implement 'pacquet access' command (registry access management)

• Adds a full Rust implementation of the 'access' command, including subcommand parsing, registry endpoint calls with retries, auth header + OTP handling, JSON/plain output formatting, and pnpm-style diagnostic error codes with truncated error-body support.

pacquet/crates/cli/src/cli_args/access.rs

cli_command.rsAdd 'Access' variant to pacquet CLI command enum +4/-0

Add 'Access' variant to pacquet CLI command enum

• Introduces an 'Access(AccessArgs)' subcommand with an alias and help description, enabling 'pacquet access ...' in the top-level CLI.

pacquet/crates/cli/src/cli_args/cli_command.rs

dispatch.rsRoute 'Access' command to query dispatch +1/-0

Route 'Access' command to query dispatch

• Extends the main dispatcher to route 'CliCommand::Access' to the query dispatch layer.

pacquet/crates/cli/src/cli_args/dispatch.rs

dispatch_query.rsWire 'access' execution and output sanitization +15/-0

Wire 'access' execution and output sanitization

• Adds a dispatch function that loads config, runs 'AccessArgs::run', sanitizes output, and prints the final result.

pacquet/crates/cli/src/cli_args/dispatch_query.rs

index.tsRegister 'access' in pnpm CLI command list +2/-1

Register 'access' in pnpm CLI command list

• Imports the new 'access' command definition from '@pnpm/registry-access.commands' and adds it to the pnpm command registry.

pnpm11/pnpm/src/cmd/index.ts

access.tsImplement 'pnpm access' command handler and help +572/-0

Implement 'pnpm access' command handler and help

• Adds the TypeScript implementation of 'pnpm access' with subcommands for listing packages/collaborators, getting/setting visibility status, setting MFA requirement, and granting/revoking team access. Includes JSON mode, OTP header support, registry selection per package, and structured pnpm error codes.

pnpm11/registry-access/commands/src/access.ts

index.tsExport 'access' from registry-access command package +2/-1

Export 'access' from registry-access command package

• Adds the new 'access' command module to the public exports so pnpm can import and register it.

pnpm11/registry-access/commands/src/index.ts

Bug fix (1) +0 / -1
notImplemented.tsRemove 'access' from the not-implemented command list +0/-1

Remove 'access' from the not-implemented command list

• Stops treating 'access' as a passthrough/unimplemented command now that pnpm provides a native implementation.

pnpm11/pnpm/src/cmd/notImplemented.ts

Tests (3) +719 / -1
tests.rsAdd Rust unit tests for access parsing and validation +265/-0

Add Rust unit tests for access parsing and validation

• Covers registry URL normalization, package-name escaping, subcommand routing, and common invalid/missing-argument error paths using pnpm error codes.

pacquet/crates/cli/src/cli_args/access/tests.rs

cli.tsAdjust CLI passthrough failure test now that 'access' exists +1/-1

Adjust CLI passthrough failure test now that 'access' exists

• Updates the test case that asserted old npm passthrough behavior, switching it to use 'team' as an example of a command that should fail.

pnpm11/pnpm/test/cli.ts

access.tsAdd comprehensive TS tests for 'pnpm access' via mock agent +453/-0

Add comprehensive TS tests for 'pnpm access' via mock agent

• Adds Jest tests covering all major subcommands (list packages/collaborators, get/set status, set MFA, grant/revoke) including JSON output, deprecated forms (public/restricted), and key HTTP error responses.

pnpm11/registry-access/commands/test/access.ts

Other (1) +6 / -0
access-command.mdAdd changeset for new 'pnpm access' command +6/-0

Add changeset for new 'pnpm access' command

• Introduces a minor-version changeset for both '@pnpm/registry-access.commands' and 'pnpm'. Documents the new access-management command and supported operations.

.changeset/access-command.md

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

qodo-free-for-open-source-projects Bot commented Jul 5, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

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

Context used
✅ Compliance rules (platform): 51 rules

Grey Divider


Action required

1. Extra quote in UnknownSubcommand ✗ Dismissed 📘 Rule violation ≡ Correctness ⭐ New
Description
AccessError::UnknownSubcommand’s user-facing display message contains an extra trailing
double-quote character, causing the rendered text to end with subcommands.". This diverges from
pnpm’s Unknown subcommand message text, breaking the parity requirement and potentially leading to
brittle tests, user confusion, or broken-looking output.
Code

pacquet/crates/cli/src/cli_args/access.rs[40]

+    #[display(r#"Unknown subcommand: {cmd}. Run "pnpm help access" for available subcommands."#)]
Evidence
The compliance requirement states pacquet’s error messages must align with pnpm, but in
pacquet/crates/cli/src/cli_args/access.rs the raw string literal used for the UnknownSubcommand
Display text visibly ends with subcommands." before the raw-string terminator (around line 40),
which means the rendered message will include an extra trailing quote. pnpm’s corresponding message
has no trailing quote (Unknown subcommand: ... Run "pnpm help access" for available subcommands.),
so the current pacquet output is user-visibly different and malformed.

Rule 713473: Align pacquet error codes and messages with pnpm
Rule 713428: Keep pnpm TypeScript and pacquet Rust user-visible behavior changes in sync
pacquet/crates/cli/src/cli_args/access.rs[40-45]
pnpm11/registry-access/commands/src/access.ts[159-159]

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

## Issue description
Pacquet’s `AccessError::UnknownSubcommand` `#[display(...)]` string includes a stray trailing `"`, causing the rendered message to end with `subcommands."` and diverge from pnpm’s `Unknown subcommand` message text.

## Issue Context
pnpm’s TypeScript implementation emits: `Unknown subcommand: ... Run "pnpm help access" for available subcommands.` (no trailing quote). Pacquet should match this exactly for parity, and the current extra quote is a user-visible formatting defect that can also make test expectations brittle.

## Fix Focus Areas
- pacquet/crates/cli/src/cli_args/access.rs[40-45]

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


2. Pacquet list packages strips @ ✓ Resolved 📘 Rule violation ≡ Correctness
Description
pacquet access list packages now strips a leading @ from the scope:team argument, which makes
pacquet accept @scope:team while pnpm TypeScript still builds the URL with the @ included. This
introduces a pacquet-only user-visible behavior divergence for the same CLI input.
Code

pacquet/crates/cli/src/cli_args/access.rs[R321-324]

+        (Some("team"), Some(team_str)) => {
+            let parts: Vec<&str> = team_str.splitn(2, ':').collect();
+            let scope = parts[0].strip_prefix('@').unwrap_or(parts[0]);
+            let team = parts.get(1).unwrap_or(&"");
Evidence
The checklist requires pacquet not to introduce user-visible behavior beyond pnpm and to keep
pnpm/pacquet behavior in sync. Pacquet strips @ from the scope when parsing scope:team, while
pnpm TypeScript currently does not, so the same user input (@scope:team) can succeed in pacquet
but fail/diverge in pnpm.

Rule 713429: Pacquet must not introduce new user-visible behavior beyond pnpm
Rule 713428: Keep pnpm TypeScript and pacquet Rust user-visible behavior changes in sync
pacquet/crates/cli/src/cli_args/access.rs[321-324]
pnpm11/registry-access/commands/src/access.ts[217-220]

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

## Issue description
Pacquet’s `access list packages <scope:team>` now strips a leading `@` from the scope (`@scope:team`), but pnpm TypeScript’s equivalent path construction does not. This causes pacquet to accept an input form that pnpm doesn’t reliably support, violating the parity/no-extra-behavior requirement.

## Issue Context
- Pacquet: `scope` is derived via `strip_prefix('@')`, so `@scope:team` becomes `scope:team`.
- pnpm TypeScript: `scope` is used as-is from `entity.split(':')`, so `@scope:team` becomes `scope='@scope'` in the URL path.

## Fix Focus Areas
- pacquet/crates/cli/src/cli_args/access.rs[321-324]
- pnpm11/registry-access/commands/src/access.ts[217-220]

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


3. @scope:team URL mismatch ✓ Resolved 🐞 Bug ≡ Correctness
Description
Both pnpm (TS) and pacquet (Rust) show @scope:team in grant/revoke examples but do not strip the
leading @ when building /-/team/<scope>/<team>/... URLs, so users who follow the example will
hit a different endpoint and likely fail grant/revoke.
Code

pnpm11/registry-access/commands/src/access.ts[R451-478]

+  if (params.length < 2) {
+    throw new PnpmError('ACCESS_GRANT_ARGS_REQUIRED', 'Permissions and scope:team are required (e.g., pnpm access grant read-only @scope:developers @scope/pkg)')
+  }
+
+  const permissions = params[0]
+  if (permissions !== 'read-only' && permissions !== 'read-write') {
+    throw new PnpmError('ACCESS_GRANT_INVALID_PERMISSIONS', `Invalid permissions "${permissions}". Must be "read-only" or "read-write".`)
+  }
+
+  const scopeTeam = params[1]
+  if (!scopeTeam.includes(':')) {
+    throw new PnpmError('ACCESS_GRANT_INVALID_TEAM', `Invalid team "${scopeTeam}". Format must be "scope:team".`)
+  }
+
+  const packageName = params[2]
+  if (!packageName) {
+    throw new PnpmError('ACCESS_GRANT_PACKAGE_REQUIRED', 'Package name is required (e.g., pnpm access grant read-only @scope:developers @scope/pkg)')
+  }
+
+  const [scope, team] = scopeTeam.split(':')
+  const registries = getRegistries(opts)
+  const registryUrl = pickRegistryForPackage(registries, packageName)
+  const authHeader = getAuthHeaderForRegistry(opts.configByUri, registryUrl, packageName)
+  const fetchFromRegistry = createFetchFromRegistry(opts)
+  const otp = opts.cliOptions?.otp
+
+  const grantUrl = new URL(`-/team/${encodeURIComponent(scope)}/${encodeURIComponent(team)}/package`, normalizeRegistryUrl(registryUrl)).href
+  const response = await fetchFromRegistry(grantUrl, {
Evidence
In pnpm TS, the error example contains @scope:developers and the code uses scopeTeam.split(':')
and encodeURIComponent(scope) directly into the -/team/... path. Pacquet Rust has the same
@scope:developers example and uses encode_uri_component(scope) directly. Pacquet already strips
@ for org listing, which reinforces that @ is intended as user-input sugar, not part of the URL
path segment.

pnpm11/registry-access/commands/src/access.ts[447-478]
pacquet/crates/cli/src/cli_args/access.rs[91-121]
pacquet/crates/cli/src/cli_args/access.rs[653-683]
pacquet/crates/cli/src/cli_args/access.rs[308-313]

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

### Issue description
Grant/revoke example strings suggest `@scope:team`, but the implementation uses the raw `scope` segment when constructing the `/-/team/...` URL. If users include `@`, it is encoded into the path, likely producing an invalid/unknown endpoint.

### Issue Context
This impacts both pnpm (TS) and pacquet (Rust), and the mismatch is especially problematic because users frequently copy/paste examples from help/errors.

### Fix Focus Areas
- pnpm11/registry-access/commands/src/access.ts[451-536]
- pacquet/crates/cli/src/cli_args/access.rs[91-132]
- pacquet/crates/cli/src/cli_args/access.rs[653-779]

### Suggested fix
- Either:
 - Update all examples/help text to use `scope:team` (no `@`) consistently, **or**
 - Support both forms by normalizing `scope = scopeRaw.startsWith('@') ? scopeRaw.slice(1) : scopeRaw` in both implementations.
- Validate the split result is exactly two non-empty parts before building the URL (fail fast with a clear "Invalid team" error).

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


View more (4)
4. CR allowed in errors ✓ Resolved 🐞 Bug ⛨ Security
Description
throwRegistryError() prints registry-controlled error bodies after sanitize(), but sanitize()
explicitly preserves carriage returns (\r), enabling terminal/log line-overwrite spoofing via a
malicious registry response body.
Code

pnpm11/registry-access/commands/src/access.ts[R604-612]

+function sanitize (text: string): string {
+  let result = ''
+  for (let i = 0; i < text.length; i++) {
+    const code = text.charCodeAt(i)
+    if ((code > 31 && code !== 127) || code === 9 || code === 10 || code === 13) {
+      result += text[i]
+    }
+  }
+  return result
Evidence
throwRegistryError() includes the sanitized response body in thrown errors, and sanitize()
currently allows code === 13 (carriage return). The repo’s Rust-side sanitizer explicitly calls
out \r/\n terminal injection as something to strip.

pnpm11/registry-access/commands/src/access.ts[557-572]
pnpm11/registry-access/commands/src/access.ts[604-612]
pacquet/crates/network/src/auth.rs[602-612]

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

### Issue description
`pnpm access` sanitizes registry error bodies but currently allows carriage returns (`\r`). A malicious registry can include `\r` in an error response body and cause line-overwrite/log-spoofing in terminals/CI logs.

### Issue Context
The error body is read from the registry and embedded into thrown `PnpmError` messages.

### Fix Focus Areas
- pnpm11/registry-access/commands/src/access.ts[557-612]

### Suggested fix
- Update `sanitize()` to **exclude** `\r` (and ideally all control chars except `\n`/`\t` if you need multiline readability).
- Avoid quadratic string concatenation in a loop (build an array of chars and `join('')`, or use a regex-based filter).

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


5. Registry credential leak ✓ Resolved 🐞 Bug ⛨ Security
Description
If a registry URL contains embedded credentials (https://user:pass@host/...) and the server
responds with a redirect missing a Location header, the fetch layer throws an error that includes
the full URL (currentUrl.toString()), which contains the credentials. The new access command does
not catch/redact fetch exceptions, so these credentials can be emitted to stderr/CI logs.
Code

pnpm11/registry-access/commands/src/access.ts[R233-236]

+  const response = await ctx.fetchFromRegistry(url, {
+    authHeaderValue: ctx.authHeader,
+  })
+
Evidence
The access command performs registry requests via createFetchFromRegistry and does not wrap the
call to sanitize/redact thrown errors. The fetch implementation can throw an error embedding the
full current URL string on malformed redirects, and the auth-header module supports user:pass@
URLs (making credential-bearing URLs plausible in real configs).

pnpm11/registry-access/commands/src/access.ts[229-239]
pnpm11/network/fetch/src/fetchFromRegistry.ts[170-176]
pnpm11/network/auth-header/src/index.ts[108-112]

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

### Issue description
Some fetch-layer exceptions include full URLs in error messages. When the registry URL includes embedded credentials (`user:pass@`), these can leak into thrown error messages and end up printed to stderr/CI logs. The new `access` command makes multiple registry calls and currently lets such exceptions bubble up without redaction.

### Issue Context
- The fetch layer throws `Redirect location header missing for ${currentUrl.toString()}` when a redirect is malformed.
- pnpm’s auth header logic explicitly supports `user:pass@` URLs (Basic auth).

### Fix Focus Areas
- pnpm11/registry-access/commands/src/access.ts[229-246]
- pnpm11/network/fetch/src/fetchFromRegistry.ts[170-176]
- pnpm11/network/auth-header/src/index.ts[108-112]

### Suggested fix
Prefer fixing this in the shared network layer:
1) Change the thrown error in `resolveRedirectUrl` to avoid embedding `currentUrl.toString()` (or redact URL userinfo before including it).

Optionally add defense-in-depth in `access.ts`:
2) Wrap `fetchFromRegistry(...)` calls in `try/catch` and rethrow a `PnpmError` with a redacted/sanitized message (strip control chars and redact `://user:pass@`).

Add tests covering a credential-bearing registry URL and a redirect response missing `Location` to ensure credentials never appear in error output.

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


6. Pacquet accepts access list ✓ Resolved 📘 Rule violation ≡ Correctness
Description
Pacquet treats pnpm access list as list packages, but the pnpm TypeScript implementation
requires list packages (or ls). This introduces a pacquet-only user-visible subcommand behavior
beyond pnpm.
Code

pacquet/crates/cli/src/cli_args/access.rs[R210-214]

+        let (action, rest) = match (first.as_str(), second.as_deref()) {
+            ("list", Some("packages") | None) => ("list_packages", params),
+            ("ls", None) => ("list_packages", params),
+            ("ls", Some("packages")) => ("list_packages", params),
+            ("list", Some("collaborators")) => ("list_collaborators", params),
Evidence
Rule 713429 forbids pacquet from adding user-visible CLI behavior not present in pnpm. In pacquet,
the match arm ("list", Some("packages") | None) allows access list to work, while pnpm’s handler
only dispatches list when the second token is packages or collaborators, otherwise it falls
through to unknown subcommand handling.

Rule 713429: Pacquet must not introduce new user-visible behavior beyond pnpm
pacquet/crates/cli/src/cli_args/access.rs[210-214]
pnpm11/registry-access/commands/src/access.ts[121-129]

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

## Issue description
Pacquet accepts `pnpm access list` (with no second token) and runs the list-packages path, but pnpm TypeScript does not.

## Issue Context
Pacquet must not introduce user-visible CLI behaviors that pnpm does not support.

## Fix Focus Areas
- pacquet/crates/cli/src/cli_args/access.rs[210-214]
- pnpm11/registry-access/commands/src/access.ts[121-129]

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


7. Unknown subcommand text diverges ✓ Resolved 📘 Rule violation ⌂ Architecture
Description
Pacquet’s unknown-subcommand error message truncates the command to only the first (or first two)
tokens and omits pnpm’s help guidance. This creates user-visible divergence between pnpm and pacquet
behavior.
Code

pacquet/crates/cli/src/cli_args/access.rs[R258-265]

+            _ => {
+                return Err(AccessError::UnknownSubcommand {
+                    cmd: match second {
+                        Some(s) => format!("{first} {s}"),
+                        None => first.clone(),
+                    },
+                }
+                .into());
Evidence
Rule 713428 requires user-visible behavior (including error messages) to stay in sync across pnpm
and pacquet. Pacquet constructs the unknown subcommand string from only first/second and
displays Unknown subcommand: {cmd}, while pnpm includes the full params.join(' ') and appends
guidance to run pnpm help access.

Rule 713428: Keep pnpm TypeScript and pacquet Rust user-visible behavior changes in sync
pacquet/crates/cli/src/cli_args/access.rs[258-265]
pacquet/crates/cli/src/cli_args/access.rs[40-45]
pnpm11/registry-access/commands/src/access.ts[159-159]

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

## Issue description
Pacquet builds `UnknownSubcommand.cmd` using only `first` and `second`, ignoring any remaining args, and the displayed message differs from pnpm’s message which includes the full subcommand string and a help hint.

## Issue Context
The compliance checklist requires pnpm TypeScript and pacquet Rust user-visible behavior (including error message text/structure) to remain in sync unless explicitly called out.

## Fix Focus Areas
- pacquet/crates/cli/src/cli_args/access.rs[258-265]
- pacquet/crates/cli/src/cli_args/access.rs[40-45]
- pnpm11/registry-access/commands/src/access.ts[159-159]

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



Remediation recommended

8. Unsanitized cmd echo 🐞 Bug ⛨ Security ⭐ New
Description
AccessError::UnknownSubcommand concatenates user-supplied argv tokens and prints them verbatim,
allowing control characters/ANSI escapes (and potentially URL userinfo credentials) to be echoed
into terminals/CI logs. This enables terminal output injection/log spoofing and accidental secret
disclosure when unknown-subcommand args contain credential-bearing URLs.
Code

pacquet/crates/cli/src/cli_args/access.rs[R258-264]

+            _ => {
+                let mut parts = vec![first.clone()];
+                if let Some(s) = &second {
+                    parts.push(s.clone());
+                }
+                parts.extend(params.iter().cloned());
+                return Err(AccessError::UnknownSubcommand { cmd: parts.join(" ") }.into());
Evidence
The access command constructs cmd from raw CLI tokens and formats it directly into the error’s
Display string, while the codebase already documents redact_and_sanitize() as necessary to prevent
credential leaks and control-character terminal injection for untrusted text.

pacquet/crates/cli/src/cli_args/access.rs[40-45]
pacquet/crates/cli/src/cli_args/access.rs[258-265]
pacquet/crates/network/src/auth.rs[602-612]

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

### Issue description
`UnknownSubcommand` currently embeds a raw, user-controlled `cmd` string into the diagnostic. This can print terminal control characters (escape sequences) and leak inline `user:pass@` URL credentials when present in argv.

### Issue Context
The repo already provides `pacquet_network::redact_and_sanitize()` for exactly this purpose (strip credentials + control characters), but it is not applied to the `cmd` field.

### Fix Focus Areas
- pacquet/crates/cli/src/cli_args/access.rs[258-264]

### Suggested change
- When building `cmd`, wrap the joined string with `redact_and_sanitize(&joined)` (and optionally truncate to a reasonable length) before storing it in `AccessError::UnknownSubcommand { cmd: ... }`.

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


9. Team arg colon truncation 🐞 Bug ≡ Correctness
Description
listEntityPackages() parses <scope:team> using entity.split(':'), which discards everything
after the second : and can route the request to the wrong team endpoint for inputs like
scope:team:subteam. This can make pnpm access list packages <scope:team> return results for an
unintended team (or fail unexpectedly) despite the URL now stripping a leading @ correctly.
Code

pnpm11/registry-access/commands/src/access.ts[R217-220]

+  if (entityType === 'team') {
+    const [scope, team] = entity.split(':')
+    listUrl = new URL(`-/team/${encodeURIComponent(scope.startsWith('@') ? scope.slice(1) : scope)}/${encodeURIComponent(team)}/package?format=cli`, registryUrl).href
+  } else if (entityType === 'org') {
Evidence
The TS code uses entity.split(':') and only keeps the first two segments, while pacquet uses
splitn(2, ':'), indicating the intended delimiter is the first colon only (preserving the rest as
the team name).

pnpm11/registry-access/commands/src/access.ts[217-224]
pacquet/crates/cli/src/cli_args/access.rs[320-329]

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

### Issue description
`listEntityPackages()` uses `entity.split(':')` and destructures `[scope, team]`. If the team string contains additional colons (or the user passes extra colons), everything after the second colon is dropped, producing a request for the wrong team.

### Issue Context
The Rust pacquet implementation splits on the **first** colon only (`splitn(2, ':')`), preserving the remainder as the team name.

### Fix
Parse `<scope:team>` by splitting at the first `:` (or joining the remainder back), e.g.:
- `const idx = entity.indexOf(':')`; `scope = entity.slice(0, idx)`; `team = entity.slice(idx + 1)`
- (Optional) validate that `idx > 0` and `idx < entity.length - 1` to reject empty scope/team.

### Fix Focus Areas
- pnpm11/registry-access/commands/src/access.ts[217-220]

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


10. Empty scope-team accepted 🐞 Bug ⛨ Security
Description
In both pnpm (TS) and pacquet (Rust), the new logic that strips a leading '@' from the scope in
<scope:team> does not validate that the remaining scope is non-empty. Inputs like "@:developers"
build URLs containing an empty path segment ("/-/team//developers/package"), which can be rejected
or routed unexpectedly by registries and is especially risky/confusing for access-management
operations.
Code

pnpm11/registry-access/commands/src/access.ts[R477-521]

+  const grantUrl = new URL(`-/team/${encodeURIComponent(scope.startsWith('@') ? scope.slice(1) : scope)}/${encodeURIComponent(team)}/package`, normalizeRegistryUrl(registryUrl)).href
+  const response = await fetchFromRegistry(grantUrl, {
+    authHeaderValue: authHeader,
+    method: 'PUT',
+    headers: {
+      'content-type': 'application/json',
+      ...(otp ? { 'npm-otp': otp } : {}),
+    },
+    body: JSON.stringify({ package: packageName, permissions }),
+  })
+
+  if (!response.ok) {
+    await throwRegistryError(response, `grant ${permissions} access for ${scopeTeam} on`)
+  }
+
+  return `+${scopeTeam} (${permissions}): ${packageName}`
+}
+
+async function revokeAccess (
+  opts: AccessOptions,
+  params: string[]
+): Promise<string> {
+  if (params.length < 1) {
+    throw new PnpmError('ACCESS_REVOKE_ARGS_REQUIRED', 'scope:team and package name are required (e.g., pnpm access revoke @scope:developers @scope/pkg)')
+  }
+
+  const scopeTeam = params[0]
+  if (!scopeTeam.includes(':')) {
+    throw new PnpmError('ACCESS_REVOKE_INVALID_TEAM', `Invalid team "${scopeTeam}". Format must be "scope:team".`)
+  }
+
+  const packageName = params[1]
+  if (!packageName) {
+    throw new PnpmError('ACCESS_REVOKE_PACKAGE_REQUIRED', 'Package name is required (e.g., pnpm access revoke @scope:developers @scope/pkg)')
+  }
+
+  const [scope, team] = scopeTeam.split(':')
+  const registries = getRegistries(opts)
+  const registryUrl = pickRegistryForPackage(registries, packageName)
+  const authHeader = getAuthHeaderForRegistry(opts.configByUri, registryUrl, packageName)
+  const fetchFromRegistry = createFetchFromRegistry(opts)
+  const otp = opts.cliOptions?.otp
+
+  const revokeUrl = new URL(`-/team/${encodeURIComponent(scope.startsWith('@') ? scope.slice(1) : scope)}/${encodeURIComponent(team)}/package`, normalizeRegistryUrl(registryUrl)).href
+  const response = await fetchFromRegistry(revokeUrl, {
Evidence
The TS code now strips a leading '@' inline when building the team URL, and the Rust code strips '@'
via strip_prefix('@'). Neither path checks for the edge case where the scope becomes an empty
string, so an input like @:developers yields a /-/team//developers/package URL.

pnpm11/registry-access/commands/src/access.ts[477-521]
pacquet/crates/cli/src/cli_args/access.rs[670-682]
pacquet/crates/cli/src/cli_args/access.rs[733-745]

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

## Issue description
`pnpm access grant|revoke` strips a leading `@` from the scope portion of `scope:team`, but it doesn't validate that the scope is still non-empty afterwards. As a result, values like `@:developers` produce a malformed registry URL path (`/-/team//developers/package`).

The same pattern exists in pacquet's Rust implementation.

## Issue Context
This was introduced/activated by the new `@`-stripping behavior in the URL construction for team endpoints.

## Fix Focus Areas
- pnpm11/registry-access/commands/src/access.ts[477-521]
- pacquet/crates/cli/src/cli_args/access.rs[670-682]
- pacquet/crates/cli/src/cli_args/access.rs[733-745]

## Suggested fix
- In **TypeScript** (`grantAccess`, `revokeAccess`): after splitting `scopeTeam`, compute `normalizedScope = scope.startsWith('@') ? scope.slice(1) : scope` and reject if `normalizedScope.length === 0` or `team.length === 0` (throw the existing `ACCESS_*_INVALID_TEAM` error).
- In **Rust** (`grant_access`, `revoke_access`): after `strip_prefix('@')`, reject if `scope.is_empty()` or `team.is_empty()` (return `GrantInvalidTeam` / `RevokeInvalidTeam`).

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


View more (6)
11. --json stdout can corrupt 🐞 Bug ☼ Reliability
Description
pnpm access adds --json output, but pnpm only routes reporter output to stderr for a fixed
command allowlist; since access isn’t included, stdout warnings (e.g. --force warning) can
interleave with and corrupt JSON output.
Code

pnpm11/pnpm/src/cmd/index.ts[R124-126]

const commands: CommandDefinition[] = [
+  access,
  add,
Evidence
pnpm’s stderr reporter routing is gated by COMMANDS_WITH_STDERR_REPORTER.has(cmd). access is
newly added as a command, but not included in that set. pnpm emits warnings via logger.warn(...)
(e.g. on --force), and command output is written to stdout, so warnings and JSON can mix on
stdout.

pnpm11/pnpm/src/main.ts[39-45]
pnpm11/pnpm/src/main.ts[151-153]
pnpm11/pnpm/src/main.ts[344-349]
pnpm11/pnpm/src/main.ts[390-395]
pnpm11/pnpm/src/cmd/index.ts[124-126]

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

### Issue description
`pnpm access --json` is intended to be machine-readable, but pnpm’s reporter output may still go to stdout (command not in the stderr-reporter allowlist). Any stdout warning/progress output can corrupt the JSON.

### Issue Context
This is newly relevant because `access` is newly registered and introduces a JSON output mode.

### Fix Focus Areas
- pnpm11/pnpm/src/cmd/index.ts[124-126]
- pnpm11/pnpm/src/main.ts[39-45]
- pnpm11/pnpm/src/main.ts[151-153]
- pnpm11/pnpm/src/main.ts[344-349]

### Suggested fix
- Add `access` to `COMMANDS_WITH_STDERR_REPORTER`, **or**
- Conditionally set `config.useStderr = true` when `cmd === 'access'` and the parsed CLI options include `--json`.
This keeps stdout clean for JSON piping while retaining current behavior for other commands.

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


12. Rust tests lack pnpm references 📘 Rule violation ▣ Testability
Description
The Rust access tests do not reference the corresponding pnpm tests they mirror (by name or
comment), despite the PR explicitly porting pnpm behavior. This reduces traceability and makes it
harder to ensure future parity during maintenance.
Code

pacquet/crates/cli/src/cli_args/access/tests.rs[R1-44]

+use crate::cli_args::access::{AccessArgs, escaped_package_name, normalize_registry_url};
+use pacquet_config::Config;
+
+#[tokio::test]
+async fn test_normalize_registry_url() {
+    assert_eq!(normalize_registry_url("https://registry.npmjs.org"), "https://registry.npmjs.org/");
+    assert_eq!(
+        normalize_registry_url("https://registry.npmjs.org/"),
+        "https://registry.npmjs.org/",
+    );
+    assert_eq!(
+        normalize_registry_url("https://custom.registry.com/some-path"),
+        "https://custom.registry.com/some-path/",
+    );
+}
+
+#[tokio::test]
+async fn test_escaped_package_name() {
+    assert_eq!(escaped_package_name("@scope/pkg"), "@scope%2fpkg".to_string());
+    assert_eq!(escaped_package_name("simple-pkg"), "simple-pkg".to_string());
+}
+
+#[tokio::test]
+async fn test_access_subcommand_required() {
+    let err = AccessArgs { registry: None, json: false, otp: None, params: vec![] }
+        .run(&Config::default())
+        .await
+        .unwrap_err();
+
+    let err_str = format!("{err:?}");
+    assert!(err_str.contains("ERR_PNPM_ACCESS_SUBCOMMAND_REQUIRED"));
+}
+
+#[tokio::test]
+async fn test_access_unknown_subcommand() {
+    let err =
+        AccessArgs { registry: None, json: false, otp: None, params: vec!["foobar".to_string()] }
+            .run(&Config::default())
+            .await
+            .unwrap_err();
+
+    let err_str = format!("{err:?}");
+    assert!(err_str.contains("ERR_PNPM_ACCESS_UNKNOWN_SUBCOMMAND"));
+}
Evidence
The checklist requires that when pnpm behavior is ported to Rust, equivalent Rust tests should
reference the pnpm tests they correspond to. The PR adds pnpm access tests and adds Rust access
tests, but the Rust tests shown contain no port-reference to the pnpm test file/cases.

Rule 713446: Port pnpm behavior with corresponding Rust regression tests
pacquet/crates/cli/src/cli_args/access/tests.rs[1-44]
pnpm11/registry-access/commands/test/access.ts[1-40]

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

## Issue description
Pacquet’s Rust regression tests for the ported `access` behavior do not cite which pnpm tests/cases they correspond to.

## Issue Context
The compliance rule requires Rust tests (or comments) to reference the pnpm test/file they were ported from when behavior is explicitly ported.

## Fix Focus Areas
- pacquet/crates/cli/src/cli_args/access/tests.rs[1-44]
- pnpm11/registry-access/commands/test/access.ts[1-40]

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


13. Malformed team arg accepted 🐞 Bug ≡ Correctness
Description
list packages <scope:team> splits on : without validating that both scope and team are
non-empty, so inputs like myscope: produce malformed endpoints and confusing failures. This is a
user-input validation gap in the new command.
Code

pnpm11/registry-access/commands/src/access.ts[R217-220]

+  if (entityType === 'team') {
+    const [scope, team] = entity.split(':')
+    listUrl = new URL(`-/team/${encodeURIComponent(scope)}/${encodeURIComponent(team)}/package?format=cli`, registryUrl).href
+  } else if (entityType === 'org') {
Evidence
The URL path for the team list endpoint is built from scope and team derived from
entity.split(':') without validating non-empty segments, so malformed input can be encoded into a
malformed URL path.

pnpm11/registry-access/commands/src/access.ts[209-227]

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 team form for `pnpm access list packages <scope:team>` does not validate that both parts exist and are non-empty before constructing the URL.

### Issue Context
- `entity.split(':')` is used and the result is passed into `encodeURIComponent(...)` without checking for empty segments.

### Fix Focus Areas
- pnpm11/registry-access/commands/src/access.ts[209-227]

### Suggested fix
- Parse with a single split (e.g. `const idx = entity.indexOf(':')`) and validate:
 - `idx > 0` (non-empty scope)
 - `idx < entity.length - 1` (non-empty team)
- If invalid, throw a dedicated `PnpmError` with a clear message (similar to the existing invalid-team checks in `grant`/`revoke`).

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


14. handler() params missing comma 📘 Rule violation ⚙ Maintainability
Description
Multi-line function parameter lists are missing trailing commas (e.g., handler, listPackages).
This violates the TypeScript trailing-comma requirement for multi-line constructs.
Code

pnpm11/registry-access/commands/src/access.ts[R110-113]

+export async function handler (
+  opts: AccessOptions,
+  params: string[]
+): Promise<string> {
Evidence
Rule 713434 requires trailing commas in multi-line TypeScript constructs. The multi-line parameter
lists for handler and listPackages end their last parameter without a trailing comma.

Rule 713434: Require trailing commas in TypeScript collections and multi-line constructs
pnpm11/registry-access/commands/src/access.ts[110-113]
pnpm11/registry-access/commands/src/access.ts[169-172]

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

## Issue description
Multi-line parameter lists in `access.ts` omit trailing commas after the last parameter.

## Issue Context
The compliance rule requires trailing commas in multi-line TypeScript constructs (including parameter lists) to keep diffs clean and formatting consistent.

## Fix Focus Areas
- pnpm11/registry-access/commands/src/access.ts[110-113]
- pnpm11/registry-access/commands/src/access.ts[169-172]

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


15. getRegistries() before first call 📘 Rule violation ⚙ Maintainability
Description
getRegistries is declared before its first usage in the same file. This violates the rule
requiring TypeScript function declarations to appear only after their first usage.
Code

pnpm11/registry-access/commands/src/access.ts[R17-19]

+function getRegistries (opts: AccessOptions): Registries {
+  return opts.registries ?? { default: DEFAULT_REGISTRY_URL }
+}
Evidence
Rule 713432 requires TypeScript function declarations to appear only after their first usage in the
same file. getRegistries() is declared at lines 17-19 but first used later in listPackages() at
lines 173-176.

Rule 713432: Declare TypeScript functions only after their first usage
pnpm11/registry-access/commands/src/access.ts[17-19]
pnpm11/registry-access/commands/src/access.ts[173-176]

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

## Issue description
`getRegistries()` is declared before its first usage in `access.ts`, violating the rule that function declarations should appear only after their first use.

## Issue Context
This rule is intended to make files easier to read top-to-bottom by encountering usages before helper declarations.

## Fix Focus Areas
- pnpm11/registry-access/commands/src/access.ts[17-19]
- pnpm11/registry-access/commands/src/access.ts[173-176]

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


16. Terminal output injection 🐞 Bug ⛨ Security
Description
pnpm access formats registry-controlled fields (package names/access levels and collaborator
usernames/emails) into human-readable output without stripping control characters, and pnpm writes
that output directly to stdout. A malicious registry response can inject terminal control sequences
(or \r log-spoofing) into interactive terminals and CI logs.
Code

pnpm11/registry-access/commands/src/access.ts[R248-309]

+function formatPackagesList (data: Record<string, unknown>): string {
+  const lines: string[] = []
+  for (const [pkg, access] of Object.entries(data)) {
+    if (typeof access === 'string') {
+      lines.push(`${pkg}: ${access}`)
+    } else {
+      lines.push(pkg)
+    }
+  }
+  return lines.sort().join('\n')
+}
+
+async function listCollaborators (
+  opts: AccessOptions,
+  params: string[]
+): Promise<string> {
+  if (params.length === 0) {
+    throw new PnpmError('ACCESS_LIST_COLLABORATORS_PACKAGE_REQUIRED', 'Package name is required (e.g., pnpm access list collaborators @scope/pkg)')
+  }
+
+  const packageName = params[0]
+  const user = params[1]
+  const registries = getRegistries(opts)
+  const registryUrl = pickRegistryForPackage(registries, packageName)
+  const authHeader = getAuthHeaderForRegistry(opts.configByUri, registryUrl, packageName)
+  const fetchFromRegistry = createFetchFromRegistry(opts)
+  const jsonMode = opts.cliOptions?.json ?? false
+
+  let collaboratorsUrl: string
+  if (user) {
+    collaboratorsUrl = new URL(`-/package/${escapePackageName(packageName)}/collaborators?format=cli&user=${encodeURIComponent(user)}`, normalizeRegistryUrl(registryUrl)).href
+  } else {
+    collaboratorsUrl = new URL(`-/package/${escapePackageName(packageName)}/collaborators?format=cli`, normalizeRegistryUrl(registryUrl)).href
+  }
+
+  const response = await fetchFromRegistry(collaboratorsUrl, {
+    authHeaderValue: authHeader,
+  })
+
+  if (!response.ok) {
+    if (response.status === 404) {
+      throw new PnpmError('PACKAGE_NOT_FOUND', `Package "${packageName}" not found in registry`)
+    }
+    await throwRegistryError(response, 'list collaborators for')
+  }
+
+  const data = await response.json() as Array<Record<string, unknown>>
+  if (jsonMode) {
+    return JSON.stringify(data, null, 2)
+  }
+  return formatCollaboratorsList(data)
+}
+
+function formatCollaboratorsList (data: Array<Record<string, unknown>>): string {
+  const lines: string[] = []
+  for (const entry of data) {
+    const user = entry.user ?? entry.username ?? 'unknown'
+    const email = entry.email ?? ''
+    const permissions = entry.permissions ?? 'read-only'
+    lines.push(`${String(user)}${email ? ` <${email}>` : ''}: ${permissions}`)
+  }
+  return lines.sort().join('\n')
Evidence
The access command builds output lines directly from registry JSON fields, and pnpm’s main command
runner writes returned strings to stdout without sanitizing control characters (only optionally
stripping ANSI when --color=never, which does not address all control characters such as \r).

pnpm11/registry-access/commands/src/access.ts[248-258]
pnpm11/registry-access/commands/src/access.ts[301-309]
pnpm11/pnpm/src/main.ts[178-191]
pnpm11/pnpm/src/main.ts[390-395]

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

### Issue description
`pnpm access` returns human-readable output that includes registry-controlled strings (package names, permissions, collaborator fields) without stripping control characters. Because pnpm prints command output as-is, a malicious registry can inject terminal control sequences or log-spoofing characters.

### Issue Context
- `formatPackagesList` and `formatCollaboratorsList` interpolate raw registry response fields into output lines.
- pnpm prints command output via `write(output)` with no control-character filtering.

### Fix Focus Areas
- pnpm11/registry-access/commands/src/access.ts[248-310]
- pnpm11/pnpm/src/main.ts[178-191]
- pnpm11/pnpm/src/main.ts[390-395]

### Suggested fix
- Add a small helper for **terminal-safe** output (strip all control chars except `\n` and `\t`; do not allow `\r`).
- Apply it to all non-`--json` outputs built from registry responses (at minimum: package list and collaborators list; ideally also status output fields coming from the registry).
- Keep `--json` output untouched (or clearly document sanitization if you choose to sanitize JSON too).

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



Informational

17. Inefficient sanitize string build 🐞 Bug ➹ Performance
Description
sanitize() builds the output via per-character result += text[i], which adds avoidable overhead
when sanitizing large registry error bodies (bounded to 64KiB) on repeated failures.
Code

pnpm11/registry-access/commands/src/access.ts[R604-612]

+function sanitize (text: string): string {
+  let result = ''
+  for (let i = 0; i < text.length; i++) {
+    const code = text.charCodeAt(i)
+    if ((code > 31 && code !== 127) || code === 9 || code === 10) {
+      result += text[i]
+    }
+  }
+  return result
Evidence
The function loops over text and conditionally appends one character at a time to result, which
is less efficient than collecting and joining—especially when sanitizing up to ERROR_BODY_LIMIT
bytes during registry error handling.

pnpm11/registry-access/commands/src/access.ts[604-612]

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

### Issue description
`sanitize()` concatenates to a string inside a loop (`result += ...`). Even though inputs are bounded, it’s an avoidable inefficiency on error paths and can be replaced with a linear, allocation-friendly approach.

### Issue Context
Used to sanitize registry-controlled error bodies returned by `readErrorBody()` (up to `ERROR_BODY_LIMIT`).

### Fix Focus Areas
- Replace `result += ...` with collecting characters into an array and `join('')`, or use a pre-sized buffer approach.
- Keep the same allowed-character policy.

- file/path[start_line-end_line]
 - pnpm11/registry-access/commands/src/access.ts[604-612]

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


Grey Divider

Qodo Logo

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

Copy link
Copy Markdown

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

@codecov-commenter

codecov-commenter commented Jul 5, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 29.00901% with 394 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.34%. Comparing base (de1371d) to head (90bbc23).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
pacquet/crates/cli/src/cli_args/access.rs 28.40% 378 Missing ⚠️
pacquet/crates/cli/src/cli_args/dispatch_query.rs 0.00% 13 Missing ⚠️
pacquet/crates/cli/src/cli_args/cli_command.rs 0.00% 1 Missing ⚠️
pacquet/crates/cli/src/cli_args/dispatch.rs 0.00% 1 Missing ⚠️
...quet/crates/cli/src/cli_args/switch_cli_version.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12816      +/-   ##
==========================================
- Coverage   85.80%   85.34%   -0.47%     
==========================================
  Files         448      449       +1     
  Lines       69402    69951     +549     
==========================================
+ Hits        59552    59697     +145     
- Misses       9850    10254     +404     

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

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 7

🧹 Nitpick comments (6)
pnpm11/registry-access/commands/src/access.ts (2)

368-373: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Error message omits "restricted" as an accepted value; redundant ternary on return.

Line 370's error message says Must be "public" or "private", but line 369 also silently accepts "restricted". Separately, line 405's ternary is redundant since normalizedAccess is already only 'public' or 'restricted'.

♻️ Suggested cleanup
-  return `${packageName}: ${normalizedAccess === 'public' ? 'public' : 'restricted'}`
+  return `${packageName}: ${normalizedAccess}`

Also applies to: 405-405

🤖 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 `@pnpm11/registry-access/commands/src/access.ts` around lines 368 - 373, Update
access.ts so the validation in the access command matches the accepted values:
the PnpmError in the status parsing branch should mention "restricted" alongside
"public" and "private", and the normalization logic in accessValue handling
should be simplified so the result is assigned directly without the redundant
ternary. Use the accessValue and normalizedAccess logic in the access command as
the place to make both fixes.

349-357: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Duplicate package: ${packageName} line across both branches.

The line is pushed identically in both the if and else branches; hoist it above the conditional.

♻️ Suggested simplification
   const lines: string[] = []
-  if (data.access) {
-    lines.push(`package: ${packageName}`)
-    lines.push(`access: ${data.access}`)
-  } else {
-    lines.push(`package: ${packageName}`)
-    lines.push('access: public')
-  }
+  lines.push(`package: ${packageName}`)
+  lines.push(`access: ${data.access ?? 'public'}`)
   return lines.join('\n')
🤖 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 `@pnpm11/registry-access/commands/src/access.ts` around lines 349 - 357, The
access output builder repeats the same `package: ${packageName}` push in both
branches, so simplify `access.ts` by hoisting that line before the `if
(data.access)` conditional in the `lines` construction logic. Keep the existing
`data.access` handling in place for `access:` vs `access: public`, but remove
the duplicated package entry from the `if`/`else` blocks.
pnpm11/registry-access/commands/test/access.ts (1)

9-453: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Solid coverage; a few gaps worth adding.

Missing tests: default self-listing (['list', 'packages'] with no entity → -/-/package?format=cli), the getStatus public-fallback branch when data.access is absent, and the missing-packageName validation paths for grant/revoke.

🤖 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 `@pnpm11/registry-access/commands/test/access.ts` around lines 9 - 453, Add
tests in the access command spec to cover the missing branches: verify
`listPackages` with no entity defaults to self lookup and hits the
`-/-/package?format=cli` endpoint, verify `getStatus` falls back correctly when
`data.access` is absent, and add missing validation cases for `grant` and
`revoke` when `packageName` is omitted. Use the existing `access.handler`,
`getStatus`, `list packages`, `grant`, and `revoke` test patterns to locate the
right assertions and keep the new cases aligned with the current mock-agent
setup.
pacquet/crates/cli/src/cli_args/access/tests.rs (3)

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

Avoid star import in test module.

As per path instructions, pacquet's CODE_STYLE_GUIDE.md states to "avoid star imports in normal modules (tests included)". use super::*; should be replaced with explicit imports of the symbols actually used (AccessArgs, Config, normalize_registry_url, escaped_package_name).

♻️ Suggested fix
-use super::*;
+use super::{AccessArgs, Config, escaped_package_name, normalize_registry_url};
🤖 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 `@pacquet/crates/cli/src/cli_args/access/tests.rs` at line 1, The test module
currently uses a star import via the top-level import in access/tests.rs, which
violates the code style rule to avoid wildcard imports. Replace the blanket
import with explicit imports for only the symbols used in this test module,
namely AccessArgs, Config, normalize_registry_url, and escaped_package_name, so
the test stays clear and aligned with CODE_STYLE_GUIDE.md.

Source: Path instructions


1-266: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift

No HTTP-level (fixture/mocked-registry) tests, and no coverage of the ls/ls-packages/ls-collaborators dispatch paths.

Coverage here is limited to parsing/validation errors that never reach the network. None of list_packages, list_collaborators, get_status, set_status, set_mfa, grant_access, or revoke_access's actual request/response handling (success paths, 401/403/404/422 mapping, JSON output mode) is exercised, and the ls/ls-packages/ls-collaborators forms flagged in access.rs have no regression test that would have caught the bug. Per pacquet AGENTS.md, tests spanning both stacks should stay aligned, and REVIEW_GUIDE.md calls for regression tests that fail without the fix.

🤖 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 `@pacquet/crates/cli/src/cli_args/access/tests.rs` around lines 1 - 266, Add
regression coverage in the access tests by exercising the real dispatch paths in
AccessArgs::run, not just validation errors. Include mocked-registry/HTTP-level
cases for list_packages, list_collaborators, get_status, set_status, set_mfa,
grant_access, and revoke_access, and verify success plus response/error mapping
(401/403/404/422 and JSON mode). Also add explicit tests for the ls,
ls-packages, and ls-collaborators aliases in access.rs so the dispatch bug is
caught if it regresses.

Source: Path instructions


3-265: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Missing logging before non-assert_eq! assertions.

As per path instructions, pacquet's CODE_STYLE_GUIDE.md testing convention says to "log before non-assert_eq! assertions; avoid redundant logging for simple scalar assert_eq!." Every test here uses assert!(err_str.contains(...)) (not assert_eq!) without first logging err_str, so a failure won't show the actual error string in test output.

♻️ Example fix pattern (repeat per test)
     let err_str = format!("{err:?}");
+    dbg!(&err_str);
     assert!(err_str.contains("ERR_PNPM_ACCESS_SUBCOMMAND_REQUIRED"));
🤖 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 `@pacquet/crates/cli/src/cli_args/access/tests.rs` around lines 3 - 265, The
tests in AccessArgs are missing the required logging before non-assert_eq!
assertions, so failures won’t print the actual error string. In each test that
uses err_str and assert!(err_str.contains(...)), add a log statement for err_str
immediately before the assertion, following the existing test convention in this
file. Keep the existing assert_eq! tests unchanged, and update the affected
AccessArgs test cases consistently so the failure context is visible for
ERR_PNPM_ACCESS_* checks.

Source: Path instructions

🤖 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 `@pacquet/crates/cli/src/cli_args/access.rs`:
- Around line 816-833: The `fetch_error_from_response` helper has a dead
`StatusCode::NOT_FOUND` branch because both the 404 path and the fallback return
the same `AccessError::RegistryFetchFailed` value. Either remove the redundant
conditional and keep a single վերադարձ path in `fetch_error_from_response`, or,
if 404 is meant to be handled differently, update that branch to construct a
distinct error/message before returning it so the check has an effect.
- Around line 199-291: The `AccessArgs::run` subcommand parsing currently treats
`ls <arg>` as `list_packages`, which incorrectly accepts unsupported forms like
`ls collaborators`. Update the `match` on `(first.as_str(), second.as_deref())`
so `ls` only maps to `list_packages` for `ls` and `ls packages`, and route any
other `ls <arg>` input through the existing unknown-subcommand error path. Keep
the change localized in `AccessArgs::run` and preserve the current handling for
`list`, `get`, `set`, `public`, `restricted`, `grant`, and `revoke`.
- Around line 835-852: The 404 branch in write_error_from_response is dropping
the real package identifier by always constructing AccessError::PackageNotFound
with "unknown". Update the helper signature to accept package_name and pass it
through from the access command call sites so the NotFound path preserves the
actual package name. Keep the existing handling for the other status codes
unchanged.

In `@pacquet/crates/cli/src/cli_args/cli_command.rs`:
- Around line 130-132: Remove the extra visible alias from the
CliCommand::Access variant in cli_command.rs so the Rust CLI matches the TS
command surface. Update the Access enum entry to keep only the primary access
command and delete the accesses alias, ensuring clap registration stays aligned
with pnpm parity.

In `@pnpm11/registry-access/commands/src/access.ts`:
- Line 159: The default registry URL is hardcoded and duplicated across multiple
access command paths, so centralize it instead of repeating the literal in each
call site. Add a shared helper such as getRegistries in access.ts that returns
opts.registries or the default registry from configurable command/config inputs,
then update listPackages, listOwnPackages, listEntityPackages,
listCollaborators, getStatus, setStatus, setMfa, grantAccess, and revokeAccess
to use that helper and remove all inline fallbacks to the npm registry URL.
- Around line 188-251: The helper functions `listOwnPackages`,
`listEntityPackages`, and `fetchListResponse` take too many positional
parameters and should be refactored to use an options object for the shared
`registries`/`fetchFromRegistry`/`authHeader`/`jsonMode` bundle. Update the call
sites to pass a single options parameter, and adjust each function signature and
internal references accordingly while preserving the existing behavior and
URL-building logic. Apply the same consolidation pattern consistently across the
three functions so they stay within the argument guideline.
- Around line 552-555: The escapePackageName helper currently lets
npa(packageName) throw a raw parser error for malformed user input. Update
escapePackageName in access.ts to catch npa failures and rethrow them as a
PnpmError with the access command’s standard error handling, so all access
subcommands that use this helper keep the expected PnpmError contract. Keep the
fix localized to escapePackageName and preserve the existing
escapedName/encodeURIComponent fallback behavior for valid package names.

---

Nitpick comments:
In `@pacquet/crates/cli/src/cli_args/access/tests.rs`:
- Line 1: The test module currently uses a star import via the top-level import
in access/tests.rs, which violates the code style rule to avoid wildcard
imports. Replace the blanket import with explicit imports for only the symbols
used in this test module, namely AccessArgs, Config, normalize_registry_url, and
escaped_package_name, so the test stays clear and aligned with
CODE_STYLE_GUIDE.md.
- Around line 1-266: Add regression coverage in the access tests by exercising
the real dispatch paths in AccessArgs::run, not just validation errors. Include
mocked-registry/HTTP-level cases for list_packages, list_collaborators,
get_status, set_status, set_mfa, grant_access, and revoke_access, and verify
success plus response/error mapping (401/403/404/422 and JSON mode). Also add
explicit tests for the ls, ls-packages, and ls-collaborators aliases in
access.rs so the dispatch bug is caught if it regresses.
- Around line 3-265: The tests in AccessArgs are missing the required logging
before non-assert_eq! assertions, so failures won’t print the actual error
string. In each test that uses err_str and assert!(err_str.contains(...)), add a
log statement for err_str immediately before the assertion, following the
existing test convention in this file. Keep the existing assert_eq! tests
unchanged, and update the affected AccessArgs test cases consistently so the
failure context is visible for ERR_PNPM_ACCESS_* checks.

In `@pnpm11/registry-access/commands/src/access.ts`:
- Around line 368-373: Update access.ts so the validation in the access command
matches the accepted values: the PnpmError in the status parsing branch should
mention "restricted" alongside "public" and "private", and the normalization
logic in accessValue handling should be simplified so the result is assigned
directly without the redundant ternary. Use the accessValue and normalizedAccess
logic in the access command as the place to make both fixes.
- Around line 349-357: The access output builder repeats the same `package:
${packageName}` push in both branches, so simplify `access.ts` by hoisting that
line before the `if (data.access)` conditional in the `lines` construction
logic. Keep the existing `data.access` handling in place for `access:` vs
`access: public`, but remove the duplicated package entry from the `if`/`else`
blocks.

In `@pnpm11/registry-access/commands/test/access.ts`:
- Around line 9-453: Add tests in the access command spec to cover the missing
branches: verify `listPackages` with no entity defaults to self lookup and hits
the `-/-/package?format=cli` endpoint, verify `getStatus` falls back correctly
when `data.access` is absent, and add missing validation cases for `grant` and
`revoke` when `packageName` is omitted. Use the existing `access.handler`,
`getStatus`, `list packages`, `grant`, and `revoke` test patterns to locate the
right assertions and keep the new cases aligned with the current mock-agent
setup.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

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

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 433a7ea5-48f1-42fb-b0f1-493bfa1227fb

📥 Commits

Reviewing files that changed from the base of the PR and between 23996e9 and bc4ca8b.

📒 Files selected for processing (13)
  • .changeset/access-command.md
  • pacquet/crates/cli/src/cli_args.rs
  • pacquet/crates/cli/src/cli_args/access.rs
  • pacquet/crates/cli/src/cli_args/access/tests.rs
  • pacquet/crates/cli/src/cli_args/cli_command.rs
  • pacquet/crates/cli/src/cli_args/dispatch.rs
  • pacquet/crates/cli/src/cli_args/dispatch_query.rs
  • pnpm11/pnpm/src/cmd/index.ts
  • pnpm11/pnpm/src/cmd/notImplemented.ts
  • pnpm11/pnpm/test/cli.ts
  • pnpm11/registry-access/commands/src/access.ts
  • pnpm11/registry-access/commands/src/index.ts
  • pnpm11/registry-access/commands/test/access.ts
💤 Files with no reviewable changes (1)
  • pnpm11/pnpm/src/cmd/notImplemented.ts

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

Copy link
Copy Markdown

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

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

qodo-free-for-open-source-projects Bot commented Jul 5, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

Grey Divider

New Review Started

This review has been superseded by a new analysis

Grey Divider

Qodo Logo

Copilot AI review requested due to automatic review settings July 5, 2026 21:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Jul 5, 2026
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 03944f6

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

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 03944f6

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

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 0247fac

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

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 0247fac

Copilot AI review requested due to automatic review settings July 5, 2026 22:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 19c132f

Comment on lines +288 to +303
let registry =
args.registry.as_deref().map_or_else(|| config.registry.clone(), normalize_registry_url);

Ok(AccessContext {
config,
http_client: build_http_client(config)?,
retry_opts: RetryOpts {
retries: config.fetch_retries,
factor: config.fetch_retry_factor,
min_timeout: Duration::from_millis(config.fetch_retry_mintimeout),
max_timeout: Duration::from_millis(config.fetch_retry_maxtimeout),
},
registry,
json: args.json,
otp: args.otp.clone(),
})

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. Scoped registries ignored 🐞 Bug ≡ Correctness

The pacquet access command builds all request URLs from a single context.registry (config
default or --registry) and never consults config.resolved_registries() / per-scope routes. This
breaks access operations for packages hosted on scoped registries (@scope:registry), unlike
other pacquet registry commands that route per package.
Agent Prompt
### Issue description
`AccessContext` stores only a single `registry` string and all subcommands construct URLs from it. This ignores pacquet’s scoped registry map (`config.resolved_registries()`), so access operations for packages that should route to `registries["@scope"]` will be sent to the wrong registry.

### Issue Context
Other pacquet registry commands (e.g. `dist-tag`) already build a registries map via `config.resolved_registries()` and then pick the correct registry per package using `pick_registry_for_package`.

### Fix Focus Areas
- pacquet/crates/cli/src/cli_args/access.rs[191-304]
- pacquet/crates/cli/src/cli_args/access.rs[484-563]
- pacquet/crates/cli/src/cli_args/dist_tag.rs[193-220]

### Suggested fix
- Change `AccessContext` to store `registries: HashMap<String, String>` (from `config.resolved_registries()`), and if `--registry` is set, override `registries["default"]` (same pattern as `dist-tag`).
- For per-package subcommands (`list_collaborators`, `get_status`, `set_status`, `set_mfa`, `grant`, `revoke`), compute `registry_url = pick_registry_for_package(&context.registries, package_name, None)` and build URLs/auth headers from that.
- For team/org listing (`list packages <scope>` / `<scope:team>`), pick the registry based on the scope key `"@{scope}"` when present, else fall back to `default`.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed in 03944f6

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

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 19c132f

@github-actions

github-actions Bot commented Jul 5, 2026 •

Copy link
Copy Markdown
Contributor

Integrated-Benchmark Report (Linux)

Commit: 90bbc23e6086

Each scenario reports direct installs and pnpr installs. Bencher consumes pacquet@HEAD and pnpr@HEAD.

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.098 ± 0.118 3.942 4.329 1.95 ± 0.11
pacquet@main 4.059 ± 0.111 3.940 4.269 1.93 ± 0.11
pnpr@HEAD 2.102 ± 0.107 2.004 2.312 1.00
pnpr@main 2.128 ± 0.134 1.968 2.343 1.01 ± 0.08
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.097978144440001,
      "stddev": 0.11799254391220046,
      "median": 4.06286305574,
      "user": 3.99673424,
      "system": 3.4114751400000003,
      "min": 3.9422468467400003,
      "max": 4.32921602774,
      "times": [
        4.12256620574,
        4.05695437874,
        4.32921602774,
        3.9422468467400003,
        4.0517488547400005,
        3.95600930274,
        4.06877173274,
        4.21243622174,
        4.1834806567400005,
        4.05635121674
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.05907661504,
      "stddev": 0.11095960650627094,
      "median": 4.01407544724,
      "user": 3.9142826399999997,
      "system": 3.4117087399999995,
      "min": 3.93954513174,
      "max": 4.26943348774,
      "times": [
        3.95502531174,
        4.13000596174,
        3.99029926074,
        4.00296451474,
        4.02518637974,
        3.93954513174,
        4.26943348774,
        4.20830111074,
        4.07949045074,
        3.99051454074
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 2.1017497884400003,
      "stddev": 0.1072150608690269,
      "median": 2.05925988824,
      "user": 2.73751224,
      "system": 2.8970384399999998,
      "min": 2.00418509174,
      "max": 2.31208729174,
      "times": [
        2.2415450747400003,
        2.00699576974,
        2.17701197374,
        2.02937181674,
        2.0644987877400003,
        2.31208729174,
        2.10712568474,
        2.0206554047400003,
        2.00418509174,
        2.05402098874
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 2.1277883153399997,
      "stddev": 0.1337066422274206,
      "median": 2.09245424124,
      "user": 2.73090944,
      "system": 2.91419444,
      "min": 1.9679992637400001,
      "max": 2.3427370827400003,
      "times": [
        2.02972863874,
        1.9679992637400001,
        2.3427370827400003,
        1.9982519997400001,
        2.06688664174,
        2.31662181974,
        2.16126981874,
        2.03338148874,
        2.11802184074,
        2.24298455874
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 645.7 ± 14.1 628.1 668.8 1.00
pacquet@main 745.5 ± 67.7 706.2 934.0 1.15 ± 0.11
pnpr@HEAD 723.8 ± 68.9 681.8 914.9 1.12 ± 0.11
pnpr@main 713.4 ± 58.8 677.6 877.7 1.10 ± 0.09
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.6457191879799999,
      "stddev": 0.014109631521584589,
      "median": 0.64390330978,
      "user": 0.37460346,
      "system": 1.3213117399999998,
      "min": 0.62813164728,
      "max": 0.66884652328,
      "times": [
        0.62813164728,
        0.63424433428,
        0.6283905212800001,
        0.66265185128,
        0.66884652328,
        0.6394691032800001,
        0.64800143128,
        0.63980518828,
        0.65684170828,
        0.65080957128
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.74547750858,
      "stddev": 0.06773671234228641,
      "median": 0.7239161992800001,
      "user": 0.39049366,
      "system": 1.38757844,
      "min": 0.70617976228,
      "max": 0.93403875028,
      "times": [
        0.72967105728,
        0.71594798728,
        0.72308714228,
        0.75564955828,
        0.7095121802800001,
        0.70617976228,
        0.71985284928,
        0.73609054228,
        0.7247452562800001,
        0.93403875028
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.7237917621800001,
      "stddev": 0.06886779919102803,
      "median": 0.70280107128,
      "user": 0.39236336,
      "system": 1.35307094,
      "min": 0.68178192128,
      "max": 0.9149055582800001,
      "times": [
        0.68537406828,
        0.69538089228,
        0.70275908528,
        0.68178192128,
        0.70781403028,
        0.7122691022800001,
        0.69788293528,
        0.7028430572800001,
        0.9149055582800001,
        0.73690697128
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.71340337028,
      "stddev": 0.05880938609392044,
      "median": 0.6979957642800001,
      "user": 0.39434096,
      "system": 1.34926664,
      "min": 0.67761364028,
      "max": 0.87774834428,
      "times": [
        0.70931449928,
        0.69800002228,
        0.67761364028,
        0.70163317928,
        0.68668232828,
        0.6819436492800001,
        0.69101531628,
        0.87774834428,
        0.71209121728,
        0.6979915062800001
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.266 ± 0.032 4.222 4.329 2.02 ± 0.09
pacquet@main 4.233 ± 0.036 4.181 4.274 2.00 ± 0.09
pnpr@HEAD 2.166 ± 0.169 1.971 2.411 1.02 ± 0.09
pnpr@main 2.115 ± 0.091 1.954 2.278 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.266241044100001,
      "stddev": 0.03165752126346309,
      "median": 4.261551122,
      "user": 3.8647984200000005,
      "system": 3.2951895799999997,
      "min": 4.2221027505,
      "max": 4.328801177500001,
      "times": [
        4.328801177500001,
        4.2981155565,
        4.2542367175,
        4.274939740500001,
        4.2393835515000005,
        4.2688655265,
        4.2470022505000005,
        4.2846996155,
        4.2221027505,
        4.244263554500001
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 4.232511811499999,
      "stddev": 0.03601387526304319,
      "median": 4.235146050500001,
      "user": 3.85777842,
      "system": 3.2372632799999996,
      "min": 4.1809513755,
      "max": 4.2736530915,
      "times": [
        4.1809513755,
        4.2661604805,
        4.251017351500001,
        4.2014081835,
        4.2736530915,
        4.2735062065000005,
        4.259948528500001,
        4.2192747495,
        4.2068363235,
        4.192361824500001
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 2.1663522772,
      "stddev": 0.168858660843664,
      "median": 2.0984328239999996,
      "user": 2.5732368200000004,
      "system": 2.81429088,
      "min": 1.9707050604999998,
      "max": 2.4108871874999998,
      "times": [
        1.9707050604999998,
        2.0702570195,
        2.0064956805,
        2.1082196735,
        2.3266772435,
        2.4081216725,
        2.0175307284999997,
        2.4108871874999998,
        2.2559825315,
        2.0886459745
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 2.1146014608000003,
      "stddev": 0.09101015083033628,
      "median": 2.1189585634999997,
      "user": 2.57416912,
      "system": 2.81224818,
      "min": 1.9537379735,
      "max": 2.2780500815,
      "times": [
        2.1090241525,
        2.2053443914999997,
        2.1605853515,
        2.1233326235,
        2.1228953675,
        1.9537379735,
        2.0394074585,
        2.1150217595,
        2.0386154485,
        2.2780500815
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.387 ± 0.014 1.365 1.403 2.15 ± 0.02
pacquet@main 1.418 ± 0.026 1.383 1.461 2.20 ± 0.04
pnpr@HEAD 0.659 ± 0.009 0.645 0.674 1.02 ± 0.01
pnpr@main 0.645 ± 0.004 0.640 0.650 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.3868032276600002,
      "stddev": 0.013717822765301297,
      "median": 1.3838608684600002,
      "user": 1.33986296,
      "system": 1.6919989599999998,
      "min": 1.36504167746,
      "max": 1.40311621146,
      "times": [
        1.40311621146,
        1.3990919674600002,
        1.40143059946,
        1.37205191946,
        1.4017291734600001,
        1.3839954324600001,
        1.3808048344600001,
        1.37704415646,
        1.3837263044600001,
        1.36504167746
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 1.4176259149600001,
      "stddev": 0.026381162683571307,
      "median": 1.4166004449600003,
      "user": 1.38369226,
      "system": 1.6912929599999997,
      "min": 1.38309941546,
      "max": 1.46088295246,
      "times": [
        1.38512108046,
        1.46088295246,
        1.44303704146,
        1.4233267544600001,
        1.43197465146,
        1.39872202646,
        1.44048175046,
        1.3997393414600001,
        1.4098741354600002,
        1.38309941546
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.65923588596,
      "stddev": 0.008829869974675374,
      "median": 0.6602941479600001,
      "user": 0.34245826,
      "system": 1.26587906,
      "min": 0.6446556024600001,
      "max": 0.6742827884600001,
      "times": [
        0.65220347046,
        0.6446556024600001,
        0.6577030384600001,
        0.6742827884600001,
        0.6604598464600001,
        0.66012844946,
        0.6605528464600001,
        0.6624490544600001,
        0.6698485714600001,
        0.65007519146
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.6447401422600001,
      "stddev": 0.003653340845044923,
      "median": 0.6439806569600001,
      "user": 0.34303876,
      "system": 1.25611816,
      "min": 0.6397439024600001,
      "max": 0.6500750234600001,
      "times": [
        0.6426496434600001,
        0.6449081414600001,
        0.6427353784600001,
        0.64305317246,
        0.6406387154600001,
        0.6498860364600001,
        0.6481170994600001,
        0.6455943094600001,
        0.6397439024600001,
        0.6500750234600001
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 3.074 ± 0.034 3.035 3.144 4.69 ± 0.10
pacquet@main 3.098 ± 0.031 3.056 3.178 4.73 ± 0.10
pnpr@HEAD 0.656 ± 0.012 0.641 0.673 1.00
pnpr@main 0.657 ± 0.007 0.649 0.674 1.00 ± 0.02
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 3.0740343566599995,
      "stddev": 0.034049522679091455,
      "median": 3.06251292376,
      "user": 1.7956357,
      "system": 1.9946665999999997,
      "min": 3.0352612947599997,
      "max": 3.14417173376,
      "times": [
        3.05404948576,
        3.06226901476,
        3.0550209327599998,
        3.04555778276,
        3.06275683276,
        3.0734315577599998,
        3.11785045976,
        3.0352612947599997,
        3.14417173376,
        3.0899744717599997
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 3.09812217936,
      "stddev": 0.031122000993982497,
      "median": 3.09153239826,
      "user": 1.7952073000000002,
      "system": 2.0194403,
      "min": 3.05643929776,
      "max": 3.17751966676,
      "times": [
        3.0907762767599998,
        3.09946437876,
        3.0891643537599998,
        3.08676409876,
        3.1097834507599997,
        3.08271203276,
        3.09630971776,
        3.09228851976,
        3.17751966676,
        3.05643929776
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.6556601531600001,
      "stddev": 0.011651203692996314,
      "median": 0.65158901626,
      "user": 0.3421227,
      "system": 1.2672759999999998,
      "min": 0.64050826076,
      "max": 0.6731948467600001,
      "times": [
        0.64050826076,
        0.66436481776,
        0.64132305176,
        0.65039761076,
        0.6506777517600001,
        0.6483589887600001,
        0.66820351276,
        0.66707240976,
        0.65250028076,
        0.6731948467600001
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.6565057216600001,
      "stddev": 0.007348436987152904,
      "median": 0.65477339176,
      "user": 0.35175769999999995,
      "system": 1.2651849,
      "min": 0.64891924576,
      "max": 0.67437685776,
      "times": [
        0.64911706276,
        0.66165982376,
        0.64891924576,
        0.67437685776,
        0.65388540476,
        0.65554101276,
        0.6571223927600001,
        0.65296238376,
        0.65400577076,
        0.65746726176
      ]
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 675.2 ± 12.8 663.1 699.9 6.14 ± 0.17
pacquet@main 675.7 ± 9.3 660.4 692.5 6.14 ± 0.15
pnpr@HEAD 112.2 ± 0.6 110.6 113.3 1.02 ± 0.02
pnpr@main 110.0 ± 2.3 107.2 113.0 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.6752344482000001,
      "stddev": 0.012809110458163376,
      "median": 0.6700462891000001,
      "user": 0.6339931200000001,
      "system": 0.15394416,
      "min": 0.6631468206000001,
      "max": 0.6998729246000001,
      "times": [
        0.6998729246000001,
        0.6673961986000001,
        0.6726963796000001,
        0.6655095306000001,
        0.6631468206000001,
        0.6892108796,
        0.6829658476,
        0.6830916866000001,
        0.6632611666,
        0.6651930476000001
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 0.6757341656000001,
      "stddev": 0.009330102962832534,
      "median": 0.6764903096000001,
      "user": 0.63363972,
      "system": 0.15340826000000002,
      "min": 0.6604198446,
      "max": 0.6924797876000001,
      "times": [
        0.6729848766000001,
        0.6740989686000001,
        0.6650338376,
        0.6695555076,
        0.6604198446,
        0.6819626196,
        0.6788816506,
        0.6820208466000001,
        0.6924797876000001,
        0.6799037166
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.1122326887666667,
      "stddev": 0.0006461353662937328,
      "median": 0.11230579010000001,
      "user": 0.02754290333333333,
      "system": 0.021294593333333334,
      "min": 0.11058630760000002,
      "max": 0.11325104960000001,
      "times": [
        0.11203847860000002,
        0.11247648660000001,
        0.1121570166,
        0.11225372160000001,
        0.11146108560000001,
        0.11316432960000002,
        0.11210794860000001,
        0.11165294960000001,
        0.11241920060000002,
        0.11270912660000001,
        0.11199204860000002,
        0.11166044060000001,
        0.1122863406,
        0.11255162860000001,
        0.11235792260000001,
        0.11325104960000001,
        0.11058630760000002,
        0.11260817860000001,
        0.1129256316,
        0.11102979360000001,
        0.11232523960000002,
        0.1126559356,
        0.11181941460000001,
        0.11309425460000001
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 0.11004554936000002,
      "stddev": 0.0023121852267261934,
      "median": 0.1112943806,
      "user": 0.02758096000000001,
      "system": 0.02125278,
      "min": 0.10721576860000001,
      "max": 0.11300745360000002,
      "times": [
        0.10742067160000002,
        0.11183784760000001,
        0.10721576860000001,
        0.10734668060000001,
        0.10726282960000001,
        0.10765930060000001,
        0.1112943806,
        0.10736562960000001,
        0.11300745360000002,
        0.11149650860000002,
        0.10729377160000002,
        0.11271147460000001,
        0.11172236960000001,
        0.11189333660000002,
        0.10796642760000001,
        0.11126737060000001,
        0.10819064460000001,
        0.11243792460000002,
        0.10755545460000002,
        0.11201312560000001,
        0.11186507860000001,
        0.10763964660000001,
        0.11273718360000001,
        0.11224970660000001,
        0.11168814760000001
      ]
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 6.774 ± 0.073 6.688 6.908 1.37 ± 0.03
pacquet@main 6.874 ± 0.111 6.703 7.040 1.39 ± 0.03
pnpr@HEAD 4.942 ± 0.122 4.740 5.102 1.00 ± 0.03
pnpr@main 4.934 ± 0.074 4.800 5.037 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 6.77368143734,
      "stddev": 0.07289331560137209,
      "median": 6.74725849224,
      "user": 4.1958851,
      "system": 3.6539015399999997,
      "min": 6.68823319424,
      "max": 6.90787309224,
      "times": [
        6.85959446124,
        6.73133741824,
        6.7150284322400005,
        6.75417429624,
        6.68823319424,
        6.7324490182400005,
        6.74321366124,
        6.90787309224,
        6.8536074762400006,
        6.75130332324
      ]
    },
    {
      "command": "pacquet@main",
      "mean": 6.873889363340001,
      "stddev": 0.11133131460032494,
      "median": 6.9104037182399995,
      "user": 4.1275733,
      "system": 3.62402864,
      "min": 6.70325597524,
      "max": 7.040486688240001,
      "times": [
        6.921530321240001,
        6.90686676524,
        6.94683645224,
        6.91394067124,
        6.95468470824,
        7.040486688240001,
        6.76589820424,
        6.71199817824,
        6.87339566924,
        6.70325597524
      ]
    },
    {
      "command": "pnpr@HEAD",
      "mean": 4.94221442154,
      "stddev": 0.12178958671822723,
      "median": 4.9464434952400005,
      "user": 2.8588229000000003,
      "system": 3.0962908399999995,
      "min": 4.74030438724,
      "max": 5.10165818924,
      "times": [
        5.10165818924,
        4.80549409724,
        4.92400494424,
        5.09155954324,
        4.977742027240001,
        4.9594508932400005,
        4.83394804324,
        4.93343609724,
        5.0545459932400005,
        4.74030438724
      ]
    },
    {
      "command": "pnpr@main",
      "mean": 4.93439178164,
      "stddev": 0.073931450678143,
      "median": 4.92560903774,
      "user": 2.8517826,
      "system": 3.13049654,
      "min": 4.7999686312400005,
      "max": 5.03700427024,
      "times": [
        5.03700427024,
        5.03462619524,
        4.97561733424,
        4.87922123724,
        4.8899072422400005,
        4.97991510024,
        4.93448815424,
        4.89643973024,
        4.7999686312400005,
        4.91672992124
      ]
    }
  ]
}

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

Copy link
Copy Markdown

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

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

qodo-free-for-open-source-projects Bot commented Jul 7, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

Grey Divider

New Review Started

This review has been superseded by a new analysis

Grey Divider

Qodo Logo

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

Copy link
Copy Markdown

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

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

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 92353a4

Comment on lines +334 to +349
let url = match (entity_type, entity) {
(Some("team"), Some(team_str)) => {
let parts: Vec<&str> = team_str.splitn(2, ':').collect();
let scope = parts[0].strip_prefix('@').unwrap_or(parts[0]);
let team = parts.get(1).unwrap_or(&"");
let team_path = if team.is_empty() {
String::new()
} else {
format!("{}/", encode_uri_component(team))
};
format!(
"{}-/team/{}{}package?format=cli",
normalize_registry_url(&context.registry),
encode_uri_component(scope),
team_path,
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. Team list url malformed 🐞 Bug ≡ Correctness

pacquet’s access list packages team path concatenates the encoded scope directly with the encoded
team segment without a /, producing /-/team/<scope><team>/package?format=cli instead of
/-/team/<scope>/<team>/package?format=cli. This breaks pnpm access list packages <scope:team>
for valid inputs and can send requests to an unintended endpoint.
Agent Prompt
## Issue description
In `pacquet`’s `list_packages()` implementation for team entities, the URL format string is missing a `/` separator between the scope and team path segments, so requests for `scope:team` are constructed incorrectly and likely fail.

## Issue Context
Current code builds:
`.../-/team/{scope}{team}/package?format=cli`
when it should be:
`.../-/team/{scope}/{team}/package?format=cli`

This affects the core `access list packages <scope:team>` workflow.

## Fix Focus Areas
- pacquet/crates/cli/src/cli_args/access.rs[334-350]

## Implementation notes
- Simplify the URL construction to avoid the `team_path` concatenation bug, e.g.:
  - `format!("{}-/team/{}/{}/package?format=cli", base, scope_enc, team_enc)`
- Add validation for `scope:team` ensuring both parts are non-empty; if invalid, return a dedicated `AccessError` (recommended) rather than constructing a malformed URL.
- Add a unit test that asserts the generated URL/path for a team list request contains `/-/team/<scope>/<team>/package?format=cli`.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed in a876773

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

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 92353a4

Copilot AI review requested due to automatic review settings July 7, 2026 16:01
@kairosci
kairosci force-pushed the feat/access-command branch from 92353a4 to 2f4493e Compare July 7, 2026 16:01
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Qodo is busy working

Check back in a few minutes. Qodo's code review agents are on it.

Grey Divider

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@kairosci
kairosci force-pushed the feat/access-command branch from 2f4493e to a876773 Compare July 7, 2026 16:40
- Remove duplicate dlx_resolves_caller_catalog_references_in_overrides test in dlx.rs
- Remove duplicate function definitions in installability.rs from rebase artifact
- Fix C1 sanitize fast-path in sanitize.rs: use chars().any() for full detection
- Fix OTP redirect leak on TS side in fetchFromRegistry.ts: always delete npm-otp
Copilot AI review requested due to automatic review settings July 7, 2026 16:45
@kairosci
kairosci force-pushed the feat/access-command branch from a876773 to 90bbc23 Compare July 7, 2026 16:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branchpr/12816
Testbedpnpr

⚠️ WARNING: No Threshold found!

Without a Threshold, no Alerts will ever be generated.

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds flag.

Click to view all benchmark results
BenchmarkLatencymilliseconds (ms)
isolated-linker.fresh-install.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
2,166.35 ms
isolated-linker.fresh-install.cold-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
655.66 ms
isolated-linker.fresh-install.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
659.24 ms
isolated-linker.fresh-resolve.hot-cache.offline📈 view plot
⚠️ NO THRESHOLD
112.23 ms
isolated-linker.fresh-restore.cold-cache.cold-store📈 view plot
⚠️ NO THRESHOLD
2,101.75 ms
isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr📈 view plot
⚠️ NO THRESHOLD
4,942.21 ms
isolated-linker.fresh-restore.hot-cache.hot-store📈 view plot
⚠️ NO THRESHOLD
723.79 ms
🐰 View full continuous benchmarking report in Bencher

@zkochan
zkochan added this pull request to the merge queue Jul 8, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Jul 8, 2026
@zkochan
zkochan merged commit 508b8c2 into pnpm:main Jul 9, 2026
34 checks passed
@kairosci
kairosci deleted the feat/access-command branch July 19, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants