Repository navigation
test: read fixture packages from pnpr's npm namespace - #17356
Conversation
#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]>
|
Caution Review failedThe pull request is closed. Finishing Touches
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. Comment |
|
Execution Profiles recorded for 1 job, triggered by
+1 −2 ·
|
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
PR Summary by QodoFix registry-mock fixture paths for pnpr’s npm namespace
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1. Namespace changes lack a regression test
|
| // exist yet on the first attempt. | ||
| const candidatePaths = [ | ||
| documentPath(path.join(storage, 'default'), pkgName), | ||
| documentPath(path.join(storage, HOSTED_NPM_NAMESPACE), pkgName), |
There was a problem hiding this comment.
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
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Summary
TS CI on main fails in every chunk with
Failed to read package.json for <pkg>@<version> after 4 attempts, thrown bygetIntegrityin@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 helpersgetIntegrityandhostedBlobPathstill 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-mockis private.Squash Commit Body
Checklist
Written by an agent (Claude Code, claude-opus-5-5).
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.