Skip to content

test: read fixture packages from pnpr's npm namespace - #17356

Merged
zkochan merged 1 commit into
mainfrom
fix-registry-mock-npm-namespace
Oct 25, 2026
Merged

zkochan merged 1 commit into
mainfrom
fix-registry-mock-npm-namespace

Conversation

@zkochan

@zkochan zkochan commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Summary

TS CI on main fails in every chunk with Failed to read package.json for <pkg>@<version> after 4 attempts, thrown by getIntegrity in @pnpm/testing.registry-mock.

#17355 moved pnpr's hosted storage from <storage>/default/ to <storage>/default/<ecosystem>/ (pnpr/crates/storage/src/layout.rs, namespace_segments). The v11 test helpers getIntegrity and hostedBlobPath still read <storage>/default/packages/.... #17355 touched no v11 file, so its own CI didn't run the full v11 suite. The first change to v11 after it, #17352, did, and main went red.

The helpers now read the fixture packages from default/npm. The proxy-cache paths (.pnpr-cache/~public/<digest>/) are unchanged.

No changeset: @pnpm/testing.registry-mock is private.

Squash Commit Body

pnpm/pnpm#17355 moved pnpr's hosted storage under default/<ecosystem>/,
so getIntegrity and hostedBlobPath looked in default/packages/ and every
v11 test that calls them failed on main. Read the fixture packages from
default/npm.

Checklist

  • Added or updated tests.

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

🤖 Generated with Claude Code


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

#17355 moved pnpr's hosted storage under default/<ecosystem>/,
so getIntegrity and hostedBlobPath looked in default/packages/ and every
v11 test that calls them failed on main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Caution

Review failed

The pull request is closed.

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.

❤️ Share

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

@garnet-runtime-review

garnet-runtime-review Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Execution Profiles recorded for 1 job, triggered by bc4ba66

1 job changed +1 −2 destinations · compared with 2f725d5
recorded at the kernel by Garnet · 2026-10-25 22:48 UTC

+1 −2 · TS CI / test ↗
@@ 2f725d5 (previous) vs bc4ba66 (current) @@
  systemd
- ├─ bash
- │  └─ bash
- │     └─ bash
- │        └─ bash
- │           └─ bash
- │              └─ bash
- │                 └─ bash
- │                    └─ bash
- │                       └─ pn
- │                          └─ dash
- │                             └─ node
- │                                └─ pn
- │                                   └─ node (step: "Validate test chunk inputs")
- │                                      └─ ○ pnpm[.]io
  ├─ nginx (runner background · +1 −1)
  │  └─ nginx
  │     ├─ ○ 140.82.112.22
  │     ├─ ○ 140.82.113.22
+ │     ├─ ○ 140.82.114.21
  │     ├─ ○ 8.8.8.8
- │     └─ ○ glb-db52c2cf8be544.github[.]com
  ├─ chronyd (runner background · +4 −4)
- │  ├─ ○ 149.28.200.179
  │  ├─ ○ 169.254.169.123
  │  ├─ ○ 185.125.190.56
  │  ├─ ○ 185.125.190.57
  │  ├─ ○ 185.125.190.58
- │  ├─ ○ 198.44.55.245
+ │  ├─ ○ 23.143.196.201
+ │  ├─ ○ 23.157.160.168
- │  ├─ ○ 40.160.237.131
- │  ├─ ○ 40.160.28.79
+ │  ├─ ○ 45.12.52.138
+ │  ├─ ○ 67.215.249.229
  │  └─ ○ 91.189.91.157
  └─ snapd
     └─ ○ api.snapcraft[.]io
 
  Runner.Worker
  ├─ bash
  │  ├─ MainThread
  │  │  └─ pn
  │  │     └─ dash
  │  │        └─ node
  │  │           └─ node
  │  │              └─ node (step: "Validate test chunk inputs")
  │  │                 ├─ git
  │  │                 │  └─ ○ 192.168.127.1
  │  │                 ├─ ○ codeload.github[.]com
  │  │                 ├─ ○ github[.]com
  │  │                 ├─ ○ registry.npmjs[.]org
  │  │                 └─ ○ unofficial-builds.nodejs[.]org
  │  ├─ gh (step: "Wait for prebuilt pnpr binaries")
  │  │  └─ ○ api.github[.]com
  │  └─ rustup (step: "Initialize Rust before dependenc…tion ($/.github/actions/rustup)")
  │     ├─ ○ dualstack.k.sni.global.fastly[.]net
  │     └─ ○ localhost (dns resolver)
  ├─ node
  │  ├─ ○ blacksmith.blob.core.windows[.]net
+ │  └─ ○ blob.bn9prdstrz04a.store.core.windows[.]net
  └─ MainThread
     ├─ pnpm
     │  └─ dash
     │     └─ node
     │        └─ dash
     │           └─ node (step: "Install pnpm and Node (pnpm/setu…cdefc3a7cb25655c122e00cf6e636e)")
     │              └─ ○ nodejs[.]org
-    └─ ○ productionresultssa18.blob.core[.]windows

2 addresses rotated (github infra)

View this job's Execution Profile in Garnet →


💡 How to read this
Runner.Worker          ← process on a path
└─ npm
   └─ node             ← process that acted
      └─ ○ npmjs[.]org ← observed action

follow a path downward to see what ran and what it did — each path to an observed action is an execution chain

names on the path = processes · ○ = observed action · (…) = context

+ only in the current record · − only in the previous record · runner background = the runner's infrastructure, not your workflow

@zkochan
zkochan marked this pull request as ready for review October 25, 2026 22:42
Copilot AI balanced review requested due to automatic review settings October 25, 2026 22:42

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

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 insufficient remaining quota.

@zkochan
zkochan merged commit 3ae790c into main Oct 25, 2026
38 of 39 checks passed
@zkochan
zkochan deleted the fix-registry-mock-npm-namespace branch October 25, 2026 22:42
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Fix registry-mock fixture paths for pnpr’s npm namespace

🐞 Bug fix 🕐 10-20 Minutes

Grey Divider

AI Description

• Read hosted fixture packuments and blobs from pnpr’s new default/npm namespace.
• Restore v11 tests that fail when integrity lookups use the old storage path.
• Leave upstream proxy-cache lookups unchanged.
Diagram

graph TD
  I["getIntegrity"] --> N["default/npm"] --> P[("Fixture packuments")]
  B["hostedBlobPath"] --> N --> T[("Fixture blobs")]
  I --> C["Proxy cache"] --> U[("Upstream packuments")]
Loading
High-Level Assessment

Using one shared namespace constant for the two hosted-fixture paths matches pnpr’s storage layout without changing proxy-cache behavior. Deriving the path through an additional pnpr integration would add complexity for this fixed test namespace.

Files changed (1) +4 / -2

Bug fix (1) +4 / -2
index.tsPoint hosted fixture lookups at default/npm +4/-2

Point hosted fixture lookups at default/npm

• Defines a shared hosted npm namespace and uses it when getIntegrity reads fixture packuments and hostedBlobPath locates fixture blobs. The separate proxy-cache lookup remains unchanged.

pnpm11/testing/registry-mock/src/index.ts

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (1)

Grey Divider


Action required

1. Namespace changes lack a regression test 📜 Skill insight ▣ Testability
Description
getIntegrity and hostedBlobPath now use default/npm, but no regression test was added or
modified to exercise the new fixture location. A future namespace-layout change can therefore leave
the v11 helpers looking in the wrong directory again while the broad suite provides no focused test
proving both metadata and blob reads.
Code

pnpm11/testing/registry-mock/src/index.ts[132]

+      documentPath(path.join(storage, HOSTED_NPM_NAMESPACE), pkgName),
Relevance

●●● Strong

Focused regression tests are consistently accepted for changed behavior, especially when explicitly
requested by the finding.

PR-#17181
PR-#17091

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The bug-fix changes the hosted fixture namespace used by getIntegrity and hostedBlobPath, but
the supplied PR diff contains no added or modified test file or test hunk that exercises either
changed lookup. This fails the checklist requirement that a regression test prove the defect is
reproduced without the fix and passes with it.

pnpm11/testing/registry-mock/src/index.ts[129-156]
Skill: review-code

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 namespace fix changes both fixture metadata and blob lookup paths, but the PR adds no regression test that fails against the previous `default` path and passes with `default/npm`.

## Fix Focus Areas
- pnpm11/testing/registry-mock/src/index.ts[129-156]
- pnpm11/testing/registry-mock/test[1-200]

## Recommended Fix
Add focused tests that construct or use a registry-mock storage fixture under `default/npm`, then assert that `getIntegrity` returns the expected package integrity and `hostedBlobPath` resolves the expected blob path. Ensure the tests fail when either helper is changed back to the pre-fix `default` namespace.

ⓘ 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): 52 rules
✅ Cross-repo context — repo relationships
Review mode: Auto: 🚀 Fast: Localized test-fixture path update with minimal, self-contained behavioral risk.

Grey Divider

Tip of the day
💡 Did you know, you can enable the Remediation agent and Qodo fixes findings in a dedicated fix PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

// exist yet on the first attempt.
const candidatePaths = [
documentPath(path.join(storage, 'default'), pkgName),
documentPath(path.join(storage, HOSTED_NPM_NAMESPACE), pkgName),

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. Namespace changes lack a regression test 📜 Skill insight ▣ Testability

getIntegrity and hostedBlobPath now use default/npm, but no regression test was added or
modified to exercise the new fixture location. A future namespace-layout change can therefore leave
the v11 helpers looking in the wrong directory again while the broad suite provides no focused test
proving both metadata and blob reads.
Agent Prompt
## Issue description
The namespace fix changes both fixture metadata and blob lookup paths, but the PR adds no regression test that fails against the previous `default` path and passes with `default/npm`.

## Fix Focus Areas
- pnpm11/testing/registry-mock/src/index.ts[129-156]
- pnpm11/testing/registry-mock/test[1-200]

## Recommended Fix
Add focused tests that construct or use a registry-mock storage fixture under `default/npm`, then assert that `getIntegrity` returns the expected package integrity and `hostedBlobPath` resolves the expected blob path. Ensure the tests fail when either helper is changed back to the pre-fix `default` namespace.

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

Dismiss ↗ | View ↗

@qodo-code-review

Copy link
Copy Markdown

PR Code Suggestions ✨

Warning

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

No code suggestions found for the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants