You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The registry cache job fails before any benchmarks run because pnpr 0.1.0-alpha.19 rejects auth.htpasswd. Use the current auth.users key, preserving the user file and single-user registration limit so the benchmark can still obtain a resolver token.
Smoke run with pnpm 12.19.0 and pnpr 0.1.0-alpha.19: server startup, user registration, cache population through both registry formats (including the update graph), level-19 zstd warm-up, and authenticated server-side resolution through the latency proxy all pass. The full benchmark suite was not run.
Summary by CodeRabbit
Bug Fixes
Updated pnpr authentication configuration to use the configured user file.
The authentication configuration matches the pnpr version used by the benchmark. No merge-blocking issue was identified.
Pre-merge checks: 5
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly describes the change to the pnpr authentication configuration.
Docstring Coverage
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files.
Finishing Touches
Generate docstrings
Commit to this branch
Create a new PR
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
A rabbit checks the config with care, And finds auth.users waiting there. The file path stays, the limit too, One user keeps the setting true. Then off it hops through fields of dew.
Recent review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 3a39855e-1c6a-4e88-8d0d-71bd88363500
Commits
Reviewing files that changed from the base of the PR and between 8e71514 and dc6d829.
Files selected for processing: 1
pnprServer.js
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.
Recent review details
Context from checks skipped due to timeout: 1
GitHub Check: CodeRabbit
Additional context used
ast-grep (0.51.1)
pnprServer.js
[warning] 107-166: Filesystem path is not a string literal; a request-/variable-derived path can enable path traversal. Validate and normalize the path before use.
Context: fs.writeFileSync(configPath, [ storage: ${path.join(dir, 'storage')},
'auth:',
' users:', file: ${path.join(dir, 'htpasswd')},
// The benchmark registers its own resolver user on startup.
' maxUsers: 1',
'registries:',
// The public npm registry. No packages: map, so it claims every
// name — the catch-all, and therefore last in the router's sources.
' npmjs:',
' type: upstream',
' url: https://registry.npmjs.org/',
' public: true',
// Bit publishes to a registry of its own, and alotta-packages
// depends on it. Declaring the scopes it serves is all the routing
// that is needed: every manager keeps installing from the one
// registry URL the benchmark hands it, and the names below are the
// only ones fetched from bit. Tarball URLs come back rewritten to
// pnpr's own address, so bit's packages cross the emulated link
// like every other package.
' bit:',
' type: upstream', url: ${BIT_REGISTRY},
' public: true',
' packages:',
...BIT_SCOPES.map((scope) => '${scope}/*':),
// One URL in front of both: a router resolves a name to the first
// source whose declared packages claim it. defaultRegistry has to
// name this rather than a concrete registry — a concrete one
// resolves only its own namespace and answers Unclaimed for
// everything else, with no fall-through to a sibling.
' main:',
' type: router',
' sources: [bit, npmjs]',
// The same sources again, served as tars rather than .tgz files (see
// tarRegistryUrl). One storage behind both: a package pulled through
// either is cached once. ${TAR_REGISTRY}:,
' type: router',
' sources: [bit, npmjs]',
' tarballs: tar',
'defaultRegistry: main',
'resolver:',
' enabled: true',
// The accelerated scenario asks the server to resolve against this
// address — its own un-proxied tar registry — so the resolver's metadata fetches
// stay on loopback instead of crossing the emulated link and coming back
// in through the front door (see applyPnprServerRegistry). The server
// resolves against whatever registry the client sends but only if that
// registry is declared, so the address has to be listed as a route here.
'routes:',
' public:', - registry: ${tarRegistryUrl(http://127.0.0.1:${port})},
'log:',
' type: stdout',
' format: pretty', level: ${logLevel},
'',
].join('\n'))
Note: [CWE-22] Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Fix pnpr authentication configuration for benchmark startup
🐞 Bug fix🕐 Less than 10 minutes
AI Description
• Replace the rejected auth.htpasswd key with auth.users so pnpr can start.
• Preserve the user file and registration limit needed to obtain a resolver token.
Use the supported auth.users key. It fixes startup without changing the existing user file, registration limit, or token workflow.
Files changed (1) +1 / -1
Bug fix (1) +1 / -1
pnprServer.jsUse pnpr's current user authentication key+1/-1
Use pnpr's current user authentication key
• Changes the generated pnpr configuration from 'auth.htpasswd' to 'auth.users', which pnpr 0.1.0-alpha.19 accepts. The user file path and single-user limit remain unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The registry cache job fails before any benchmarks run because pnpr 0.1.0-alpha.19 rejects
auth.htpasswd. Use the currentauth.userskey, preserving the user file and single-user registration limit so the benchmark can still obtain a resolver token.Fixes the startup failure in https://github.com/pnpm/benchmarks/actions/runs/42803586025.
Validation:
pnpm test— all 9 tests pass.pnpm run lint— passes.Summary by CodeRabbit