Skip to content

fix(publish): preserve registry paths in OIDC token exchanges - #17006

Merged
zkochan merged 3 commits into
pnpm:mainfrom
theMackabu:fix/oidc-registry-path-prefix
Oct 17, 2026
Merged

zkochan merged 3 commits into
pnpm:mainfrom
theMackabu:fix/oidc-registry-path-prefix

Conversation

@theMackabu

@theMackabu theMackabu commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Join the exchange endpoint relative to the normalized registry URL in both CLIs, preserving path prefixes with or without a trailing slash. Fixes pnpm/tasks#124

Squash Commit Body

Join the exchange endpoint relative to the normalized registry URL in
both CLIs, preserving path prefixes with or without a trailing slash.

Add regression coverage for publishing and dist-tag operations.

Fixes https://github.com/pnpm/tasks/issues/124

Co-authored-by: Amp <[email protected]>

Checklist

  • I checked the referenced issue and verified that none of the PRs
    already linked to it solves it.
  • New features are implemented only in the Rust pnpm v12 CLI. Bug fixes
    are implemented in every affected version.
  • Added a changeset (pnpm changeset) if this PR changes any published
    package. Keep it short and written for pnpm users — it becomes a release note.
  • Added or updated tests.
  • Updated the documentation if needed. (No user docs change: the fix restores expected URL handling.)

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

Summary by CodeRabbit

  • Bug Fixes
    • Fixed OIDC trusted publishing for registries with URL path prefixes. Token exchange, package visibility checks, and package publishing now use the configured registry path, whether or not the registry URL ends with a slash.

@theMackabu
theMackabu requested a review from zkochan as a code owner October 16, 2026 21:56
Copilot AI balanced review requested due to automatic review settings October 16, 2026 21:56
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

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.

@greptile-apps greptile-apps 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: pnpm/pnpm/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ae9a6cf6-96f6-4a48-9626-159972449120
📥 Commits

Reviewing files that changed from the base of the PR and between d842f1a and 05a2b07.

📒 Files selected for processing: 4
  • pnpm/crates/publish/src/oidc/provenance.rs
  • pnpm/crates/publish/src/oidc/provenance/tests.rs
  • pnpm11/releasing/commands/src/publish/oidc/provenance.ts
  • pnpm11/releasing/commands/test/publish/oidcProvenance.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

📝 Walkthrough

Both pnpm CLI stacks now normalize registry URLs when constructing OIDC token-exchange and package-visibility URLs. Tests cover path-prefixed registries, including token exchange, publishing, and dist-tag operations.

Changes: OIDC registry path preservation

Layer / File(s) Summary
v12 OIDC URLs and registry tests
pnpm/crates/publish/src/oidc/*, pnpm/crates/publish/src/publish_packed_pkg/tests.rs, pnpm/crates/cli/tests/suite/dist_tag/oidc.rs, .changeset/fix-oidc-registry-path.md
The v12 token-exchange and package-visibility URLs use the normalized registry URL and relative paths. Tests cover trailing slashes and path-prefixed registry requests for publishing and dist-tag operations.
v11 OIDC URLs and publish tests
pnpm11/releasing/commands/src/publish/oidc/*, pnpm11/releasing/commands/test/publish/oidc*
The v11 token-exchange and package-visibility URLs use the normalized registry URL. Tests cover path-prefixed registries with and without trailing slashes, plus publish options for a prefixed registry.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Assessment against linked issues

Objective Addressed Explanation
Fix OIDC token-exchange URL path handling in both CLI stacks [#124] ✅
Add path-prefixed registry tests for publish and dist-tag [#124] ✅

Out-of-scope changes

Code Change Explanation
Preserve registry paths when building package-visibility URLs (pnpm/crates/publish/src/oidc/provenance.rs:101-102, pnpm11/releasing/commands/src/publish/oidc/provenance.ts:102) Issue #124 specifies token-exchange URL handling and tests for publishing and dist-tag. It does not specify package-visibility URL changes.

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

Merge Risk: ⚪ Minimal · up to 05a2b

OIDC exchange and visibility requests retain path-prefixed registry URLs in both CLIs, with regression coverage for the slash variants and affected flows. No actionable merge risk remains.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • 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.

❤️ Share

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

@github-actions github-actions Bot added the reviewed: coderabbit CodeRabbit submitted an approving review label Oct 16, 2026
@codecov-commenter

codecov-commenter commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.53%. Comparing base (086165d) to head (05a2b07).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #17006   +/-   ##
=======================================
  Coverage   92.53%   92.53%           
=======================================
  Files        1775     1775           
  Lines      228551   228551           
=======================================
+ Hits       211490   211495    +5     
+ Misses      17061    17056    -5     

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

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Same-run regression check

HEAD and main are measured on the same runner. The tolerance is 5% of the main median or 2 ms, whichever is larger. A regression requires both the median slowdown and the gap between the fastest retained HEAD sample and slowest retained main sample to exceed this tolerance, after trimming up to 10% from each tail. Suspected regressions are rerun once with target order reversed and only fail if reproduced. This conservative noise guard is not a statistical confidence interval.

Inconclusive rows do not fail the check. They remain visible for performance review. Bencher retains absolute minimum timings for historical tracking; historical alerts do not gate this PR. Sequential measurements can still be affected by runner drift.

Scenario Engine main median HEAD median Change Tolerance Result
isolated-fresh-restore-cold-cache-cold-store pacquet 2355.18 ms 2425.50 ms 3.0% 117.76 ms Within tolerance
isolated-fresh-restore-cold-cache-cold-store pnpr 1368.27 ms 1448.96 ms 5.9% 68.41 ms Inconclusive (overlapping samples)
isolated-fresh-restore-hot-cache-hot-store pacquet 223.80 ms 228.17 ms 2.0% 11.19 ms Within tolerance
isolated-fresh-restore-hot-cache-hot-store pnpr 240.98 ms 242.66 ms 0.7% 12.05 ms Within tolerance
isolated-repeat-install-hot-cache-hot-store pacquet 10.71 ms 14.24 ms 33.0% 2.00 ms Inconclusive (overlapping samples)
isolated-repeat-install-hot-cache-hot-store pnpr 10.61 ms 10.56 ms -0.4% 2.00 ms Within tolerance
isolated-repeat-install-cold-cache-hot-store pacquet 7.97 ms 8.19 ms 2.9% 2.00 ms Within tolerance
isolated-repeat-install-cold-cache-hot-store pnpr 8.21 ms 8.15 ms -0.7% 2.00 ms Within tolerance
isolated-fresh-install-cold-cache-cold-store pacquet 2457.10 ms 2496.18 ms 1.6% 122.86 ms Within tolerance
isolated-fresh-install-cold-cache-cold-store pnpr 1552.19 ms 1500.35 ms -3.3% 77.61 ms Within tolerance
isolated-fresh-install-hot-cache-hot-store pacquet 478.49 ms 450.75 ms -5.8% 23.92 ms Within tolerance
isolated-fresh-install-hot-cache-hot-store pnpr 298.50 ms 292.03 ms -2.2% 14.92 ms Within tolerance
isolated-fresh-install-cold-cache-hot-store pacquet 1657.26 ms 1636.45 ms -1.3% 82.86 ms Within tolerance
isolated-fresh-install-cold-cache-hot-store pnpr 280.50 ms 309.22 ms 10.2% 14.02 ms Inconclusive (overlapping samples)
isolated-fresh-resolve-hot-cache-offline pacquet 273.00 ms 305.97 ms 12.1% 13.65 ms Inconclusive (overlapping samples)
isolated-fresh-resolve-hot-cache-offline pnpr 92.23 ms 91.30 ms -1.0% 4.61 ms Within tolerance
isolated-peer-heavy-resolve-hot-cache-offline pacquet 224.75 ms 216.65 ms -3.6% 11.24 ms Within tolerance
isolated-linked-workspace-resolve-hot-cache-offline pacquet 213.15 ms 218.71 ms 2.6% 10.66 ms Within tolerance
isolated-injected-workspace-repeat-install-hot-cache-hot-store pacquet 73.89 ms 108.10 ms 46.3% 3.69 ms Inconclusive (overlapping samples)
isolated-fresh-restore-cold-cache-cold-store-cold-pnpr pacquet 4426.49 ms 4402.02 ms -0.6% 221.32 ms Within tolerance
isolated-fresh-restore-cold-cache-cold-store-cold-pnpr pnpr 3578.19 ms 3483.94 ms -2.6% 178.91 ms Within tolerance
gvs-fresh-restore-hot-cache-hot-store pacquet 145.69 ms 149.12 ms 2.4% 7.28 ms Within tolerance
gvs-fresh-restore-hot-cache-hot-store pnpr 164.82 ms 157.55 ms -4.4% 8.24 ms Within tolerance
store-only-unlocked-direct-deps-cold-cache-hot-store pacquet 1152.40 ms 1169.12 ms 1.5% 57.62 ms Within tolerance

Integrated-Benchmark Report (Linux)

Commit: 05a2b075888c

Regular scenarios report direct and pnpr installs. The peer-heavy resolver scenario compares current Rust, main Rust, and TypeScript pnpm; the linked and injected workspace scenarios compare current Rust against main Rust. Bencher consumes pacquet@HEAD and pnpr@HEAD.

The tables below show mean ± σ. Bencher tracks absolute minimum latency; PR regression checks compare HEAD and main samples from the same runner. Historical timing alerts do not gate PRs.

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.450 ± 0.164 2.263 2.761 1.77 ± 0.17
pacquet@main 2.397 ± 0.146 2.246 2.592 1.73 ± 0.16
pnpr@HEAD 1.432 ± 0.114 1.287 1.588 1.03 ± 0.11
pnpr@main 1.385 ± 0.092 1.286 1.550 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.44979213686,
      "stddev": 0.1642304912519322,
      "median": 2.42549598396,
      "user": 1.3127095399999997,
      "system": 1.3743860399999999,
      "min": 2.26275366496,
      "max": 2.76098416296
    },
    {
      "command": "pacquet@main",
      "mean": 2.3969290621599995,
      "stddev": 0.1462436169310103,
      "median": 2.35517898646,
      "user": 1.23573674,
      "system": 1.29987024,
      "min": 2.2463350369599997,
      "max": 2.59176328696
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.43183169786,
      "stddev": 0.11431749489128394,
      "median": 1.4489583704600002,
      "user": 1.0985363399999997,
      "system": 1.2136025399999997,
      "min": 1.2866593109600002,
      "max": 1.5880847049600002
    },
    {
      "command": "pnpr@main",
      "mean": 1.3849230733600002,
      "stddev": 0.09162090035582474,
      "median": 1.36826917996,
      "user": 1.1207625399999999,
      "system": 1.1900275399999996,
      "min": 1.2857281679600001,
      "max": 1.5496974969600001
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 227.8 ± 6.4 218.7 236.9 1.02 ± 0.04
pacquet@main 224.2 ± 5.4 213.6 231.7 1.00
pnpr@HEAD 244.4 ± 12.3 226.6 275.5 1.09 ± 0.06
pnpr@main 243.4 ± 5.9 237.7 256.7 1.09 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.2277642889,
      "stddev": 0.006399660763575207,
      "median": 0.228168369,
      "user": 0.25912562,
      "system": 0.56517406,
      "min": 0.21868553550000003,
      "max": 0.23689851250000002
    },
    {
      "command": "pacquet@main",
      "mean": 0.22418987260000006,
      "stddev": 0.005446479350657701,
      "median": 0.22379804450000002,
      "user": 0.26379122,
      "system": 0.56559556,
      "min": 0.21359189950000002,
      "max": 0.2316824395
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.24440900250000003,
      "stddev": 0.01232879096947599,
      "median": 0.242660796,
      "user": 0.26473902,
      "system": 0.57020836,
      "min": 0.22660350250000003,
      "max": 0.2754698425
    },
    {
      "command": "pnpr@main",
      "mean": 0.24337088190000006,
      "stddev": 0.005927188959309288,
      "median": 0.24098022800000002,
      "user": 0.26522651999999997,
      "system": 0.58108886,
      "min": 0.23765640350000003,
      "max": 0.2566666565
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 14.8 ± 3.6 9.4 24.9 1.35 ± 0.39
pacquet@main 11.2 ± 1.7 8.8 16.8 1.02 ± 0.23
pnpr@HEAD 11.0 ± 1.8 8.3 18.0 1.00
pnpr@main 11.2 ± 1.8 8.9 18.0 1.03 ± 0.23
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.014804780614251502,
      "stddev": 0.003557986694697324,
      "median": 0.01424344674,
      "user": 0.007684766227544911,
      "system": 0.008560332934131732,
      "min": 0.009432505740000001,
      "max": 0.02485212674
    },
    {
      "command": "pacquet@main",
      "mean": 0.011170409784247786,
      "stddev": 0.0017466749664945876,
      "median": 0.010711499740000002,
      "user": 0.005902274867256641,
      "system": 0.006431641858407077,
      "min": 0.008783122740000001,
      "max": 0.01683111374
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.010964900950116726,
      "stddev": 0.0017863847439614476,
      "median": 0.01056372474,
      "user": 0.005763577431906614,
      "system": 0.006325255097276267,
      "min": 0.008324994740000001,
      "max": 0.01799175674
    },
    {
      "command": "pnpr@main",
      "mean": 0.011239631179688726,
      "stddev": 0.001803885719580031,
      "median": 0.010611065740000002,
      "user": 0.006113199999999999,
      "system": 0.006297338910505836,
      "min": 0.00889904874,
      "max": 0.01799424474
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 8.2 ± 0.4 7.3 11.2 1.03 ± 0.08
pacquet@main 8.0 ± 0.5 7.1 11.6 1.00
pnpr@HEAD 8.2 ± 0.3 7.4 9.6 1.02 ± 0.07
pnpr@main 8.2 ± 0.4 7.4 9.6 1.03 ± 0.08
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.008227833468571434,
      "stddev": 0.0004490825656399937,
      "median": 0.00819292704,
      "user": 0.005305657807308969,
      "system": 0.0037470330897009987,
      "min": 0.007345685040000001,
      "max": 0.011203889040000001
    },
    {
      "command": "pacquet@main",
      "mean": 0.008000563668975265,
      "stddev": 0.00047531331615533536,
      "median": 0.007965610040000001,
      "user": 0.0050738515901060065,
      "system": 0.0036823238869257958,
      "min": 0.007093370040000001,
      "max": 0.011630411040000002
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.008175741821818176,
      "stddev": 0.0003326776749593422,
      "median": 0.008150859040000001,
      "user": 0.004835425454545455,
      "system": 0.004136027345454547,
      "min": 0.007357767040000001,
      "max": 0.009580446040000001
    },
    {
      "command": "pnpr@main",
      "mean": 0.008213096687940076,
      "stddev": 0.0003680767586857052,
      "median": 0.008205180040000001,
      "user": 0.005001827715355807,
      "system": 0.004008545318352059,
      "min": 0.007356975040000001,
      "max": 0.00964645004
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 2.539 ± 0.118 2.457 2.833 1.64 ± 0.15
pacquet@main 2.475 ± 0.047 2.437 2.586 1.60 ± 0.13
pnpr@HEAD 1.544 ± 0.120 1.422 1.740 1.00
pnpr@main 1.564 ± 0.144 1.408 1.731 1.01 ± 0.12
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 2.53873725014,
      "stddev": 0.117844854062612,
      "median": 2.4961785245400003,
      "user": 2.0447212599999998,
      "system": 1.7007805200000004,
      "min": 2.4570253815400003,
      "max": 2.8328909065400003
    },
    {
      "command": "pacquet@main",
      "mean": 2.4751906703400004,
      "stddev": 0.047450085748082474,
      "median": 2.45710213754,
      "user": 1.8886163599999999,
      "system": 1.4917929200000002,
      "min": 2.43652670254,
      "max": 2.58609484154
    },
    {
      "command": "pnpr@HEAD",
      "mean": 1.5441223873400003,
      "stddev": 0.12017470861220543,
      "median": 1.50035302404,
      "user": 1.2035783599999996,
      "system": 1.25179902,
      "min": 1.42157514054,
      "max": 1.73954755154
    },
    {
      "command": "pnpr@main",
      "mean": 1.5636701057399998,
      "stddev": 0.1437570817041988,
      "median": 1.55218779504,
      "user": 1.2443565599999997,
      "system": 1.1493287200000002,
      "min": 1.40831335554,
      "max": 1.73088431254
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 453.3 ± 15.4 433.0 487.0 1.56 ± 0.07
pacquet@main 555.6 ± 128.9 418.5 728.6 1.92 ± 0.45
pnpr@HEAD 290.0 ± 9.3 274.0 305.7 1.00
pnpr@main 296.4 ± 7.2 283.0 303.8 1.02 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.45334935888,
      "stddev": 0.015373898171633173,
      "median": 0.45075049118,
      "user": 0.6607892399999999,
      "system": 0.7398709400000001,
      "min": 0.43302499518000004,
      "max": 0.48700073318000003
    },
    {
      "command": "pacquet@main",
      "mean": 0.5556244595800001,
      "stddev": 0.12894907952761106,
      "median": 0.47849209618,
      "user": 0.8103627399999999,
      "system": 0.9243452399999998,
      "min": 0.41851711618000004,
      "max": 0.72863489018
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.29002121068,
      "stddev": 0.009274815870300117,
      "median": 0.29203080068,
      "user": 0.24489223999999998,
      "system": 0.58573934,
      "min": 0.27404774518,
      "max": 0.30566921318
    },
    {
      "command": "pnpr@main",
      "mean": 0.29640494688,
      "stddev": 0.007249330874251531,
      "median": 0.29849741368000005,
      "user": 0.25259054,
      "system": 0.58673424,
      "min": 0.28296570518,
      "max": 0.30375821718
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.638 ± 0.027 1.600 1.689 5.83 ± 0.26
pacquet@main 1.689 ± 0.096 1.632 1.955 6.01 ± 0.42
pnpr@HEAD 0.312 ± 0.011 0.300 0.333 1.11 ± 0.06
pnpr@main 0.281 ± 0.012 0.268 0.300 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.6383497090999999,
      "stddev": 0.02699422607064524,
      "median": 1.6364544134,
      "user": 0.9216158999999999,
      "system": 0.92275338,
      "min": 1.5999673723999999,
      "max": 1.6891322174
    },
    {
      "command": "pacquet@main",
      "mean": 1.6886927591999998,
      "stddev": 0.09627251969952329,
      "median": 1.6572610558999998,
      "user": 1.0223506,
      "system": 0.9654412800000001,
      "min": 1.6323602503999999,
      "max": 1.9552464564
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.3120386365,
      "stddev": 0.011051720323446963,
      "median": 0.3092195399,
      "user": 0.2577104,
      "system": 0.6134767799999999,
      "min": 0.3000821644,
      "max": 0.3334644324
    },
    {
      "command": "pnpr@main",
      "mean": 0.2810683696,
      "stddev": 0.011659522537017677,
      "median": 0.2804970579,
      "user": 0.2267258,
      "system": 0.51718728,
      "min": 0.2677327174,
      "max": 0.2999154904
    }
  ]
}

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

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 305.4 ± 26.3 272.5 348.0 3.33 ± 0.30
pacquet@main 265.7 ± 43.9 205.6 315.3 2.89 ± 0.48
pnpr@HEAD 91.8 ± 2.6 87.1 96.5 1.00
pnpr@main 92.4 ± 2.0 89.3 99.5 1.01 ± 0.04
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.30539619281999997,
      "stddev": 0.026323098981547118,
      "median": 0.30596821442,
      "user": 0.30696968,
      "system": 0.11707969999999998,
      "min": 0.27253762042,
      "max": 0.34796020642000003
    },
    {
      "command": "pacquet@main",
      "mean": 0.26574340122000006,
      "stddev": 0.04388158062726885,
      "median": 0.27299760042,
      "user": 0.24768777999999997,
      "system": 0.10653199999999999,
      "min": 0.20555606542000002,
      "max": 0.31531590542000004
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.09182245400064515,
      "stddev": 0.0025860836170373126,
      "median": 0.09130142542000001,
      "user": 0.032892080000000004,
      "system": 0.015615977419354839,
      "min": 0.08706026042000001,
      "max": 0.09649035142000001
    },
    {
      "command": "pnpr@main",
      "mean": 0.0924089628716129,
      "stddev": 0.001952418856100569,
      "median": 0.09223086242,
      "user": 0.033496563870967735,
      "system": 0.015527816129032255,
      "min": 0.08926272142000001,
      "max": 0.09950132342000001
    }
  ]
}

Scenario: Isolated linker: peer-heavy resolve, hot cache, offline

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 215.5 ± 9.5 205.7 235.4 1.00
pacquet@main 223.5 ± 15.4 202.8 256.8 1.04 ± 0.08
pnpm@HEAD 3430.9 ± 112.3 3327.8 3637.2 15.92 ± 0.87
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.2155161144311111,
      "stddev": 0.009481337481658764,
      "median": 0.21664956032000002,
      "user": 0.2101115688888889,
      "system": 0.057041864444444444,
      "min": 0.20565884432,
      "max": 0.23542304432
    },
    {
      "command": "pacquet@main",
      "mean": 0.22345767387555554,
      "stddev": 0.015426500560679832,
      "median": 0.22475134532000002,
      "user": 0.21231379111111115,
      "system": 0.05565753111111111,
      "min": 0.20283425032,
      "max": 0.25681444232
    },
    {
      "command": "pnpm@HEAD",
      "mean": 3.4308519372088893,
      "stddev": 0.11230277302174077,
      "median": 3.39060939032,
      "user": 4.873940902222222,
      "system": 0.44314541999999996,
      "min": 3.32777698132,
      "max": 3.63716793732
    }
  ]
}

Scenario: Isolated linker: linked-workspace resolve, hot cache, offline

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 285.4 ± 99.6 207.6 471.8 1.33 ± 0.47
pacquet@main 214.2 ± 5.2 208.1 225.5 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.28535775122,
      "stddev": 0.09960930325453086,
      "median": 0.21870993122000001,
      "user": 0.2257215999999999,
      "system": 0.10323374,
      "min": 0.20761339122000003,
      "max": 0.47179172222
    },
    {
      "command": "pacquet@main",
      "mean": 0.21424886307714286,
      "stddev": 0.005211440497382006,
      "median": 0.21314984122000002,
      "user": 0.15837645714285714,
      "system": 0.08992689714285713,
      "min": 0.20809207122,
      "max": 0.22548293222000002
    }
  ]
}

Scenario: Isolated linker: injected workspace repeat install, hot cache + hot store

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 105.3 ± 28.6 71.1 155.8 1.11 ± 0.48
pacquet@main 94.7 ± 32.1 68.8 149.4 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.10530520846820512,
      "stddev": 0.02857313902795691,
      "median": 0.10810293034,
      "user": 0.04025771897435898,
      "system": 0.0726451687179487,
      "min": 0.07109680934,
      "max": 0.15581853734
    },
    {
      "command": "pacquet@main",
      "mean": 0.09473585473130433,
      "stddev": 0.03213405947578513,
      "median": 0.07388609834,
      "user": 0.03900314260869565,
      "system": 0.06256174173913044,
      "min": 0.06884109734,
      "max": 0.14942157334
    }
  ]
}

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

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 4.462 ± 0.161 4.353 4.823 1.28 ± 0.05
pacquet@main 4.446 ± 0.109 4.341 4.651 1.28 ± 0.04
pnpr@HEAD 3.486 ± 0.059 3.410 3.575 1.00
pnpr@main 3.587 ± 0.148 3.414 3.807 1.03 ± 0.05
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 4.462459256600001,
      "stddev": 0.16070505822007095,
      "median": 4.402018411,
      "user": 1.4807875999999998,
      "system": 1.5499162,
      "min": 4.352802299,
      "max": 4.8231934160000005
    },
    {
      "command": "pacquet@main",
      "mean": 4.4460852332,
      "stddev": 0.10889805853365071,
      "median": 4.426493206,
      "user": 1.4437479999999998,
      "system": 1.4102514999999998,
      "min": 4.341128833,
      "max": 4.651282542000001
    },
    {
      "command": "pnpr@HEAD",
      "mean": 3.4856107302,
      "stddev": 0.059439253318906114,
      "median": 3.483944255,
      "user": 1.3565608999999998,
      "system": 1.3157086,
      "min": 3.409684563,
      "max": 3.575173198
    },
    {
      "command": "pnpr@main",
      "mean": 3.5872114877000003,
      "stddev": 0.14759577997052992,
      "median": 3.578187605,
      "user": 1.3768279999999997,
      "system": 1.3623591999999998,
      "min": 3.4137365469999996,
      "max": 3.8074687189999996
    }
  ]
}

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

Same install as the isolated fresh-restore hot/hot scenario, into the shared virtual store, the layout pnpm 12 installs into by default. Scenarios run on separate machines, so compare main and branch within each table.

Command Mean [ms] Min [ms] Max [ms] Relative
pacquet@HEAD 148.7 ± 3.9 142.4 157.9 1.02 ± 0.04
pacquet@main 145.6 ± 4.0 138.7 153.3 1.00
pnpr@HEAD 157.5 ± 2.0 154.3 160.9 1.08 ± 0.03
pnpr@main 206.6 ± 58.3 159.1 303.0 1.42 ± 0.40
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 0.14871267979764702,
      "stddev": 0.003933917454715671,
      "median": 0.14912327768,
      "user": 0.18132153764705883,
      "system": 0.18407521411764707,
      "min": 0.14236846768,
      "max": 0.15790344168
    },
    {
      "command": "pacquet@main",
      "mean": 0.14561865273882352,
      "stddev": 0.003971268893857678,
      "median": 0.14568893168,
      "user": 0.18326253764705877,
      "system": 0.18206468470588236,
      "min": 0.13873533268,
      "max": 0.15329775468
    },
    {
      "command": "pnpr@HEAD",
      "mean": 0.1574650116175,
      "stddev": 0.002026213164227642,
      "median": 0.15754843468,
      "user": 0.1854746075,
      "system": 0.17909567000000004,
      "min": 0.15434061568,
      "max": 0.16086962468
    },
    {
      "command": "pnpr@main",
      "mean": 0.20664970993,
      "stddev": 0.05832684019988891,
      "median": 0.16482388067999998,
      "user": 0.24360873249999995,
      "system": 0.21885554499999998,
      "min": 0.15912557268,
      "max": 0.30300994668000003
    }
  ]
}

Scenario: Store only: unlocked direct deps, cold cache + hot store

Store-only install (enableModulesDir: false, per-file store index, trusted lockfile) against a lockfile missing the direct dependencies that have peers, with the metadata cache wiped per iteration: the install resolves those from the registry, reuses their subtrees from the lockfile and checks the store, linking nothing. Direct installs only.

Command Mean [s] Min [s] Max [s] Relative
pacquet@HEAD 1.169 ± 0.029 1.125 1.223 1.02 ± 0.03
pacquet@main 1.148 ± 0.020 1.118 1.173 1.00
BENCHMARK_REPORT.json
{
  "results": [
    {
      "command": "pacquet@HEAD",
      "mean": 1.1688537904399998,
      "stddev": 0.029391595907444022,
      "median": 1.1691231686399999,
      "user": 0.5802435599999999,
      "system": 0.21705158,
      "min": 1.1246125516399998,
      "max": 1.2228214416399998
    },
    {
      "command": "pacquet@main",
      "mean": 1.1484003109399998,
      "stddev": 0.019791847527787468,
      "median": 1.15239751264,
      "user": 0.5591081599999999,
      "system": 0.20641318000000003,
      "min": 1.11781428864,
      "max": 1.17312731264
    }
  ]
}

Copilot AI balanced review requested due to automatic review settings October 17, 2026 07:51
@zkochan
zkochan force-pushed the fix/oidc-registry-path-prefix branch from 7c290ff to aa0ed44 Compare October 17, 2026 07:51

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.

@greptile-apps greptile-apps 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@qodo-code-review

qodo-code-review Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (2) 📎 Requirement gaps (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Publish tokens leave the registry path ✗ Dismissed
Description
The OIDC exchange now preserves a configured registry prefix, but determine_provenance still joins
the visibility endpoint with an absolute path and sends the exchanged bearer token there. When
automatic provenance runs for a path-prefixed registry, that request reaches a route outside the
configured prefix; the older CLI has the same mismatch, and a failed visibility check can also leave
a public publish without automatic provenance.
Code

pnpm/crates/publish/src/oidc/auth_token.rs[R28-29]

+        format!("-/npm/v1/oidc/token/exchange/package/{}", escaped_package_name(package_name));
+    let url = Url::parse(&normalize_registry_url(registry))
Evidence
The changed Rust exchange joins a relative path, allowing a path-prefixed registry to issue the
token. Without an explicit provenance setting, publish passes that token to the visibility check,
which joins an absolute path and sends the token as a bearer header. The older CLI likewise invokes
provenance after a successful exchange and constructs its visibility URL with an absolute path; its
new path-prefixed test explicitly sets provenance: false, so it does not exercise this request.

pnpm/crates/publish/src/oidc/auth_token.rs[27-39]
pnpm/crates/publish/src/publish_options.rs[151-163]
pnpm/crates/publish/src/oidc/provenance.rs[39-48]
pnpm/crates/publish/src/oidc/provenance.rs[100-106]
pnpm11/releasing/commands/src/publish/publishPackedPkg.ts[332-343]
pnpm11/releasing/commands/src/publish/oidc/provenance.ts[101-109]
pnpm11/releasing/commands/test/publish/oidcOrchestrator.test.ts[81-95]

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

## Issue description
Path-prefixed OIDC exchanges now succeed, but the subsequent automatic-provenance visibility request drops the registry prefix while carrying the exchanged bearer token.

## Fix Focus Areas
- pnpm/crates/publish/src/oidc/provenance.rs[100-106]
- pnpm11/releasing/commands/src/publish/oidc/provenance.ts[101-107]

## Recommended Fix
Join the visibility endpoint relative to a normalized registry URL in both CLIs. Add path-prefixed tests that verify the visibility request URL and authorization header when provenance is determined automatically.

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


2. Standalone publishing loses registry paths ✗ Dismissed
Description
fetchAuthToken assumes normalizeRegistryUrl(registry) adds a trailing slash, but upstream
normalize-registry-url 2.0.1 leaves path-containing URLs without one unchanged; only pnpm’s
workspace patch adds it. When the published @pnpm/releasing.commands package is installed without
that patch and given https://host/npm/private, the relative URL sends the OIDC exchange to
/npm/-/npm/... rather than /npm/private/-/npm/....
Code

pnpm11/releasing/commands/src/publish/oidc/authToken.ts[75]

+      new URL(`-/npm/v1/oidc/token/exchange/package/${npa(packageName).escapedName}`, normalizeRegistryUrl(registry)).href,
Evidence
The changed call joins a relative endpoint against the library result. Upstream explicitly preserves
a path URL without a trailing slash, whereas pnpm’s local patch changes that behavior; the
publishing package declares the library as a dependency.

pnpm -> normalize-registry-url
pnpm11/releasing/commands/src/publish/oidc/authToken.ts[73-75]
pnpm11/releasing/commands/package.json[80-86]
patches/[email protected][5-14]
External repo: pnpm/normalize-registry-url, index.js [9-16]
External repo: pnpm/normalize-registry-url, test.js [7-12]

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 published publishing command relies on a workspace-only patch to normalize-registry-url; outside the workspace, a registry path without a trailing slash loses its final segment during OIDC exchange.
## Fix Focus Areas
- pnpm11/releasing/commands/src/publish/oidc/authToken.ts[73-75]
- pnpm11/releasing/commands/test/publish/oidcAuthToken.test.ts[47-65]
## Recommended Fix
Ensure the registry base ends in `/` at this call site before constructing the relative exchange URL, without depending on pnpm’s patch to normalize-registry-url. Test against the upstream library behavior for a path-prefixed registry without a trailing slash.

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



Remediation recommended

3. Registry import order is inconsistent 📘 Rule violation ⚙ Maintainability
Description
normalize-registry-url is imported after @pnpm/npm-package-arg, although its module name sorts
before npa within the external dependency group. This leaves the modified file inconsistent with
the repository's required alphabetical ordering for external TypeScript imports.
Code

pnpm11/releasing/commands/src/publish/oidc/authToken.ts[3]

+import normalizeRegistryUrl from 'normalize-registry-url'
Evidence
The checklist requires external TypeScript imports to be grouped and sorted alphabetically by module
specifier. The changed import at line 3 (normalize-registry-url) follows npa at line 2, even
though normalize-registry-url sorts before npa.

Rule 713472: Enforce consistent TypeScript import order
pnpm11/releasing/commands/src/publish/oidc/authToken.ts[1-3]

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

## Issue description
The new `normalize-registry-url` external import appears after `@pnpm/npm-package-arg`, but external imports must be alphabetized by module specifier.

## Fix Focus Areas
- pnpm11/releasing/commands/src/publish/oidc/authToken.ts[1-3]

## Recommended Fix
Move the `normalize-registry-url` import before the `npa` import while keeping the external dependency group together.

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

Dismiss ↗ | View ↗



Informational

4. Rust releases use the wrong package bump 📘 Rule violation § Compliance
Description
The single changeset lists pnpm and pacquet together even though this PR changes both the
TypeScript and Rust CLI implementations. When the release is published, the Rust CLI's metadata is
coupled to the TypeScript package entry, preventing the version-specific release targeting required
for the two stacks.
Code

.changeset/fix-oidc-registry-path.md[R2-4]

+"@pnpm/releasing.commands": patch
+"pnpm": patch
+"pacquet": patch
Relevance

● Weak

Recent reviews rejected the same split-changeset finding for combined pnpm and pacquet entries.

PR-#17003
PR-#16997

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The changeset contains both pnpm and pacquet entries, while the diff changes the TypeScript OIDC
implementation and the Rust OIDC implementation. Compliance ID 713436 requires separate changesets
when a PR touches both stacks, with the TypeScript change targeting pnpm and the Rust change
targeting pacquet.

Rule 713436: Changesets for pnpm v11 vs v12 (pacquet) must target the correct package and bump type
.changeset/fix-oidc-registry-path.md[1-7]
pnpm11/releasing/commands/src/publish/oidc/authToken.ts[75-75]
pnpm/crates/publish/src/oidc/auth_token.rs[28-30]

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

## Issue description
The changeset combines `pnpm` and `pacquet` entries even though the PR changes both the pnpm v11 TypeScript CLI and the pnpm v12 Rust CLI. Each stack needs its own changeset targeting only the appropriate published package.

## Fix Focus Areas
- .changeset/fix-oidc-registry-path.md[1-7]
- pnpm11/releasing/commands/src/publish/oidc/authToken.ts[75-75]
- pnpm/crates/publish/src/oidc/auth_token.rs[28-30]

## Recommended Fix
Replace the combined changeset with separate changeset files: one targeting `pnpm` (and the affected TypeScript package, if required) for the v11 implementation, and another targeting only `pacquet` for the Rust v12 implementation. Keep each release note accurate for the behavior implemented by its corresponding stack.

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

Dismiss ↗ | View ↗


Grey Divider

Context sources
✅ Compliance rules (platform): 66 rules
✅ Cross-repo context — repo relationships
  Explored: repo: pnpm/npm-package-arg (sha: c8d9ad1f) — View relationship
  Explored: repo: pnpm/normalize-registry-url (sha: 64f7a931) — View relationship
Review mode: Auto: ⚖️ Balanced: OIDC URL construction affects security-sensitive publishing behavior across two runtime stacks.
✅ Fix-loop round: fix loop

Grey Divider

Tip of the day
💡 Did you know, you can see how risky a PR is at a glance with blast radius labels

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Previous reviews

Review updated until commit 05a2b07

Results up to commit aa0ed44 ⚖️ Balanced


🐞 Bugs (0) 📘 Rule violations (1) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)


Action required
1. Publish tokens leave the registry path ✗ Dismissed
Description
The OIDC exchange now preserves a configured registry prefix, but determine_provenance still joins
the visibility endpoint with an absolute path and sends the exchanged bearer token there. When
automatic provenance runs for a path-prefixed registry, that request reaches a route outside the
configured prefix; the older CLI has the same mismatch, and a failed visibility check can also leave
a public publish without automatic provenance.
Code

pnpm/crates/publish/src/oidc/auth_token.rs[R28-29]

+        format!("-/npm/v1/oidc/token/exchange/package/{}", escaped_package_name(package_name));
+    let url = Url::parse(&normalize_registry_url(registry))
Evidence
The changed Rust exchange joins a relative path, allowing a path-prefixed registry to issue the
token. Without an explicit provenance setting, publish passes that token to the visibility check,
which joins an absolute path and sends the token as a bearer header. The older CLI likewise invokes
provenance after a successful exchange and constructs its visibility URL with an absolute path; its
new path-prefixed test explicitly sets provenance: false, so it does not exercise this request.

pnpm/crates/publish/src/oidc/auth_token.rs[27-39]
pnpm/crates/publish/src/publish_options.rs[151-163]
pnpm/crates/publish/src/oidc/provenance.rs[39-48]
pnpm/crates/publish/src/oidc/provenance.rs[100-106]
pnpm11/releasing/commands/src/publish/publishPackedPkg.ts[332-343]
pnpm11/releasing/commands/src/publish/oidc/provenance.ts[101-109]
pnpm11/releasing/commands/test/publish/oidcOrchestrator.test.ts[81-95]

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

## Issue description
Path-prefixed OIDC exchanges now succeed, but the subsequent automatic-provenance visibility request drops the registry prefix while carrying the exchanged bearer token.

## Fix Focus Areas
- pnpm/crates/publish/src/oidc/provenance.rs[100-106]
- pnpm11/releasing/commands/src/publish/oidc/provenance.ts[101-107]

## Recommended Fix
Join the visibility endpoint relative to a normalized registry URL in both CLIs. Add path-prefixed tests that verify the visibility request URL and authorization header when provenance is determined automatically.

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


2. Standalone publishing loses registry paths ✗ Dismissed
Description
fetchAuthToken assumes normalizeRegistryUrl(registry) adds a trailing slash, but upstream
normalize-registry-url 2.0.1 leaves path-containing URLs without one unchanged; only pnpm’s
workspace patch adds it. When the published @pnpm/releasing.commands package is installed without
that patch and given https://host/npm/private, the relative URL sends the OIDC exchange to
/npm/-/npm/... rather than /npm/private/-/npm/....
Code

pnpm11/releasing/commands/src/publish/oidc/authToken.ts[75]

+      new URL(`-/npm/v1/oidc/token/exchange/package/${npa(packageName).escapedName}`, normalizeRegistryUrl(registry)).href,
Evidence
The changed call joins a relative endpoint against the library result. Upstream explicitly preserves
a path URL without a trailing slash, whereas pnpm’s local patch changes that behavior; the
publishing package declares the library as a dependency.

pnpm -> normalize-registry-url
pnpm11/releasing/commands/src/publish/oidc/authToken.ts[73-75]
pnpm11/releasing/commands/package.json[80-86]
patches/[email protected][5-14]
External repo: pnpm/normalize-registry-url, index.js [9-16]
External repo: pnpm/normalize-registry-url, test.js [7-12]

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 published publishing command relies on a workspace-only patch to normalize-registry-url; outside the workspace, a registry path without a trailing slash loses its final segment during OIDC exchange.
## Fix Focus Areas
- pnpm11/releasing/commands/src/publish/oidc/authToken.ts[73-75]
- pnpm11/releasing/commands/test/publish/oidcAuthToken.test.ts[47-65]
## Recommended Fix
Ensure the registry base ends in `/` at this call site before constructing the relative exchange URL, without depending on pnpm’s patch to normalize-registry-url. Test against the upstream library behavior for a path-prefixed registry without a trailing slash.

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



Remediation recommended
3. Registry import order is inconsistent 📘 Rule violation ⚙ Maintainability
Description
normalize-registry-url is imported after @pnpm/npm-package-arg, although its module name sorts
before npa within the external dependency group. This leaves the modified file inconsistent with
the repository's required alphabetical ordering for external TypeScript imports.
Code

pnpm11/releasing/commands/src/publish/oidc/authToken.ts[3]

+import normalizeRegistryUrl from 'normalize-registry-url'
Evidence
The checklist requires external TypeScript imports to be grouped and sorted alphabetically by module
specifier. The changed import at line 3 (normalize-registry-url) follows npa at line 2, even
though normalize-registry-url sorts before npa.

Rule 713472: Enforce consistent TypeScript import order
pnpm11/releasing/commands/src/publish/oidc/authToken.ts[1-3]

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

## Issue description
The new `normalize-registry-url` external import appears after `@pnpm/npm-package-arg`, but external imports must be alphabetized by module specifier.

## Fix Focus Areas
- pnpm11/releasing/commands/src/publish/oidc/authToken.ts[1-3]

## Recommended Fix
Move the `normalize-registry-url` import before the `npa` import while keeping the external dependency group together.

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

Dismiss ↗ | View ↗


Results up to commit d842f1a 🧠 Deep


🐞 Bugs (0) 📘 Rule violations (1) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)


Informational
1. Rust releases use the wrong package bump 📘 Rule violation § Compliance
Description
The single changeset lists pnpm and pacquet together even though this PR changes both the
TypeScript and Rust CLI implementations. When the release is published, the Rust CLI's metadata is
coupled to the TypeScript package entry, preventing the version-specific release targeting required
for the two stacks.
Code

.changeset/fix-oidc-registry-path.md[R2-4]

+"@pnpm/releasing.commands": patch
+"pnpm": patch
+"pacquet": patch
Relevance

● Weak

Recent reviews rejected the same split-changeset finding for combined pnpm and pacquet entries.

PR-#17003
PR-#16997

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The changeset contains both pnpm and pacquet entries, while the diff changes the TypeScript OIDC
implementation and the Rust OIDC implementation. Compliance ID 713436 requires separate changesets
when a PR touches both stacks, with the TypeScript change targeting pnpm and the Rust change
targeting pacquet.

Rule 713436: Changesets for pnpm v11 vs v12 (pacquet) must target the correct package and bump type
.changeset/fix-oidc-registry-path.md[1-7]
pnpm11/releasing/commands/src/publish/oidc/authToken.ts[75-75]
pnpm/crates/publish/src/oidc/auth_token.rs[28-30]

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

## Issue description
The changeset combines `pnpm` and `pacquet` entries even though the PR changes both the pnpm v11 TypeScript CLI and the pnpm v12 Rust CLI. Each stack needs its own changeset targeting only the appropriate published package.

## Fix Focus Areas
- .changeset/fix-oidc-registry-path.md[1-7]
- pnpm11/releasing/commands/src/publish/oidc/authToken.ts[75-75]
- pnpm/crates/publish/src/oidc/auth_token.rs[28-30]

## Recommended Fix
Replace the combined changeset with separate changeset files: one targeting `pnpm` (and the affected TypeScript package, if required) for the v11 implementation, and another targeting only `pacquet` for the Rust v12 implementation. Keep each release note accurate for the behavior implemented by its corresponding stack.

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

Dismiss ↗ | View ↗


Grey Divider

Qodo Logo

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

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

No code suggestions found for the PR.

theMackabu and others added 2 commits October 17, 2026 09:58
Join the exchange endpoint relative to the normalized registry URL in
both CLIs, preserving path prefixes with or without a trailing slash.

Add regression coverage for publishing and dist-tag operations.
Update documentation and add a changeset.

Fixes pnpm/tasks#124

Co-authored-by: Amp <[email protected]>
Revert the unrelated `@pnpm/exe` packageManagerDependencies entry that a
local install added to pnpm-lock.yaml. Remove the docs sentences: they
describe the expected URL handling rather than a setting or behavior a
user acts on. Reword the changeset around what users see.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 17, 2026 08:02
@zkochan
zkochan force-pushed the fix/oidc-registry-path-prefix branch from aa0ed44 to d842f1a Compare October 17, 2026 08:02

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.

@greptile-apps greptile-apps 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@qodo-code-review

Copy link
Copy Markdown

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

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

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

No code suggestions found for the PR.

The visibility request that decides automatic provenance joined an
absolute path onto the registry URL, so a path-prefixed registry got
the exchanged OIDC token sent to the host root. Join it relative to the
normalized registry URL in both CLIs, as the token exchange now does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 17, 2026 08:18

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.

@greptile-apps greptile-apps 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@qodo-code-review

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 05a2b07

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

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

No code suggestions found for the PR.

@zkochan

zkochan commented Oct 17, 2026

Copy link
Copy Markdown
Member

Review-and-fix pass is done. Head is 05a2b07.

Changes pushed on top of the original commit:

  • Rebased onto main.
  • Reverted an unrelated @pnpm/exe entry that a local install had added to pnpm-lock.yaml.
  • Removed the added docs sentences. They described expected URL handling, not something a user configures. Reworded the changeset around what users see.
  • Fixed the Qodo finding about the automatic-provenance visibility request in both CLIs. It also joined an absolute path onto the registry URL, so a path-prefixed registry had the exchanged OIDC token sent to the host root. Added regression tests in both stacks.
  • Declined Qodo's standalone normalize-registry-url finding (reason in the thread).

Status:

  • All checks pass on the head commit.
  • CodeRabbit reviewed the head commit and found nothing to act on.
  • Qodo's latest summary covers the head commit and has no new findings.
  • Copilot and Greptile did not review (quota or trial limits).
  • An earlier Code Coverage failure came from a flaky optimistic_repeat_install test on main, unrelated to this PR. It reproduces locally on main and is tracked in Flaky single-project lockfile convergence tests in optimistic_repeat_install tasks#140.

Nothing else remains within this PR's scope.


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

@zkochan
zkochan merged commit 1fcbf30 into pnpm:main Oct 17, 2026
71 checks passed
@welcome

welcome Bot commented Oct 17, 2026

Copy link
Copy Markdown

Congrats on merging your first pull request! 🎉🎉🎉

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.

OIDC token exchange drops the registry path prefix

4 participants