Repository navigation
fix(pnpr): reject dist.integrity tampering in the partial-unpublish PUT - #12647
Conversation
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe partial-unpublish packument update now rejects mismatched package names, validates ChangesPartial-unpublish packument validation
Sequence Diagram(s)sequenceDiagram
participant Client
participant update_packument
participant HostedPackument
participant parse_integrity
Client->>update_packument: PUT /:pkg/-rev/:rev packument JSON
update_packument->>HostedPackument: read current hosted packument
update_packument->>parse_integrity: validate incoming dist.integrity values
update_packument-->>Client: persist packument or return BadRequest
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
PR Summary by QodoReject dist.integrity tampering in partial-unpublish packument PUT Description
Diagram
High-Level Assessment
Files changed (2)
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@pnpr/crates/pnpr/src/server.rs`:
- Around line 1904-1908: The hosted-packument handling in
server::read_hosted_packument logic is swallowing JSON parse failures by
converting serde_json::from_slice(&bytes) into None, which bypasses the
immutability check. Update the hosted packument load path so a malformed
packument is treated like an Err from storage: propagate the parse failure
instead of falling back to the None branch, and ensure the hosted_versions
comparison path only runs when the packument was successfully parsed.
🪄 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: c23cfb12-5251-4e59-a951-bae75861bde9
📒 Files selected for processing (2)
pnpr/crates/pnpr/src/server.rspnpr/crates/pnpr/tests/auth_publish.rs
Code Review by Qodo
1. Unpublish PUT seeds versions
|
|
Code review by qodo was updated up to the latest commit 668b163 |
|
Code review by qodo was updated up to the latest commit ba1a97b |
|
Code review by qodo was updated up to the latest commit ba1a97b |
|
Code review by qodo was updated up to the latest commit 0d01227 |
1 similar comment
|
Code review by qodo was updated up to the latest commit 0d01227 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main pnpm/pnpm#12647 +/- ##
==========================================
+ Coverage 88.70% 88.72% +0.02%
==========================================
Files 341 342 +1
Lines 50150 50449 +299
==========================================
+ Hits 44484 44760 +276
- Misses 5666 5689 +23 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Addressed the non-string Written by an agent (Claude Code, claude-opus-4-8). |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
pnpr/crates/pnpr/tests/auth_publish.rs (1)
283-295: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAssert storage immutability after the rejected non-string integrity update.
Line 294 checks
400, but this regression test should also verify the stored packument is unchanged after the rejectedPUT(re-GETand compareversions["1.0.0"].dist.integrityto the pre-mutation value), so write-before-reject regressions are caught.As per path instructions,
REVIEW_GUIDE.mdrequires regression tests to assert both the rejection and that “stored packument remains unchanged.”🤖 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 `@pnpr/crates/pnpr/tests/auth_publish.rs` around lines 283 - 295, The regression test in auth_publish should verify not only that the invalid PUT is rejected, but also that the stored packument remains unchanged after rejection. In the existing test around app.oneshot and Request::put("/mypkg/-rev/1-0"), capture the original integrity from the initial GET, perform the rejected update, then issue a second GET for /mypkg and assert versions["1.0.0"].dist.integrity still matches the pre-mutation value to catch any write-before-reject behavior.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.
Nitpick comments:
In `@pnpr/crates/pnpr/tests/auth_publish.rs`:
- Around line 283-295: The regression test in auth_publish should verify not
only that the invalid PUT is rejected, but also that the stored packument
remains unchanged after rejection. In the existing test around app.oneshot and
Request::put("/mypkg/-rev/1-0"), capture the original integrity from the initial
GET, perform the rejected update, then issue a second GET for /mypkg and assert
versions["1.0.0"].dist.integrity still matches the pre-mutation value to catch
any write-before-reject behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 40d8f5f9-c2de-434e-9d4b-73f5b1277b16
📒 Files selected for processing (2)
pnpr/crates/pnpr/src/server.rspnpr/crates/pnpr/tests/auth_publish.rs
🚧 Files skipped from review as they are similar to previous changes (1)
- pnpr/crates/pnpr/src/server.rs
|
Code review by qodo was updated up to the latest commit 6ec3879 |
|
Code review by qodo was updated up to the latest commit 6ec3879 |
|
Thanks @qodo — dispositions:
Written by an agent (Claude Code, claude-opus-4-8). |
Thanks — that all lines up with the changes.
If you want, I can also help turn the remaining cleanup items into a small follow-up patch list. |
Integrated-Benchmark Report (Linux)Commit: Each scenario reports direct installs and pnpr installs. Bencher consumes pacquet@HEAD and pnpr@HEAD. Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.346565579960001,
"stddev": 0.09661077543463302,
"median": 4.32805666386,
"user": 4.11870144,
"system": 2.1158453200000005,
"min": 4.243967849360001,
"max": 4.4794410543600005,
"times": [
4.46168471936,
4.47856471536,
4.37281445536,
4.33276310036,
4.4794410543600005,
4.2588451453600005,
4.25341946436,
4.243967849360001,
4.260805068360001,
4.323350227360001
]
},
{
"command": "pacquet@main",
"mean": 4.40114448666,
"stddev": 0.15271860641104498,
"median": 4.367485522360001,
"user": 4.09361764,
"system": 2.13758712,
"min": 4.17949740636,
"max": 4.64694675636,
"times": [
4.3800022513600005,
4.36304464136,
4.64694675636,
4.30678818536,
4.17949740636,
4.26333025936,
4.33849852536,
4.55517308636,
4.371926403360001,
4.60623735136
]
},
{
"command": "pnpr@HEAD",
"mean": 2.79271070246,
"stddev": 0.15115704186920115,
"median": 2.77334808586,
"user": 2.98225254,
"system": 1.8494488199999999,
"min": 2.6024116563599997,
"max": 3.03074873636,
"times": [
2.6024116563599997,
2.77573892036,
3.03074873636,
2.6764598133599997,
2.77095725136,
2.94195495036,
2.62751266236,
2.78835152036,
2.7137150483599997,
2.99925646536
]
},
{
"command": "pnpr@main",
"mean": 2.75630314916,
"stddev": 0.1445776114119976,
"median": 2.7231142678599998,
"user": 2.9839712400000002,
"system": 1.8424291199999998,
"min": 2.5845338223599996,
"max": 2.9645127093599997,
"times": [
2.9645127093599997,
2.73175523736,
2.95377566636,
2.71447329836,
2.6043922623599998,
2.84147260136,
2.5845338223599996,
2.63809990136,
2.64362799836,
2.88638799436
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.4733996421200001,
"stddev": 0.010765172255606406,
"median": 0.46739619982,
"user": 0.38627424,
"system": 0.7817538399999999,
"min": 0.46064116732000004,
"max": 0.49025967932000003,
"times": [
0.48828009732000005,
0.48084712332000007,
0.46528071732000004,
0.48184614232000006,
0.46675205632000005,
0.49025967932000003,
0.46064116732000004,
0.46626025232000007,
0.46804034332000005,
0.46578884232000006
]
},
{
"command": "pacquet@main",
"mean": 0.46671864842,
"stddev": 0.010513629412235262,
"median": 0.4663246173200001,
"user": 0.38346014000000006,
"system": 0.7721538399999999,
"min": 0.45048696632000007,
"max": 0.48035870332,
"times": [
0.48035870332,
0.46721664332000007,
0.45048696632000007,
0.45495291732000004,
0.46835091832000003,
0.46242322432000005,
0.4590385993200001,
0.47931880732000004,
0.46543259132000003,
0.47960711332000006
]
},
{
"command": "pnpr@HEAD",
"mean": 0.5638347401200001,
"stddev": 0.10261333492445367,
"median": 0.5100924533200001,
"user": 0.39812124000000004,
"system": 0.80493814,
"min": 0.4839283193200001,
"max": 0.72976507032,
"times": [
0.49294860532000007,
0.5119259043200001,
0.51894180432,
0.4839283193200001,
0.49639173132000003,
0.49503041132000003,
0.7265008903200001,
0.6746556623200001,
0.72976507032,
0.5082590023200001
]
},
{
"command": "pnpr@main",
"mean": 0.5081169325200001,
"stddev": 0.02053535712268694,
"median": 0.49942209382,
"user": 0.39203164,
"system": 0.8005542399999998,
"min": 0.49088431332000004,
"max": 0.5516847033200001,
"times": [
0.50150838332,
0.5296651733200001,
0.5516847033200001,
0.51759818132,
0.49160018732000005,
0.49169780432000004,
0.4973358043200001,
0.49196998132,
0.51722479332,
0.49088431332000004
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.54132367608,
"stddev": 0.02525244539820568,
"median": 4.54116311758,
"user": 4.1078357400000005,
"system": 2.0851306199999997,
"min": 4.50533661558,
"max": 4.5893588445799995,
"times": [
4.50533661558,
4.55733997458,
4.5893588445799995,
4.54480756158,
4.50811483658,
4.5536014075799995,
4.531055998579999,
4.52742091558,
4.55868193258,
4.53751867358
]
},
{
"command": "pacquet@main",
"mean": 4.51165700288,
"stddev": 0.061267898651578216,
"median": 4.50181906758,
"user": 4.09582764,
"system": 2.08172082,
"min": 4.44598838058,
"max": 4.65954399458,
"times": [
4.65954399458,
4.44598838058,
4.50990104658,
4.45523870058,
4.498089709579999,
4.510444715579999,
4.50146045358,
4.50217768158,
4.56147877958,
4.47224656658
]
},
{
"command": "pnpr@HEAD",
"mean": 3.0229441103800005,
"stddev": 0.2188042403307649,
"median": 2.9703919780800003,
"user": 3.1049189399999997,
"system": 1.92809442,
"min": 2.8146707285800003,
"max": 3.4852400995800004,
"times": [
3.0699628005800004,
3.07882733558,
2.8595797015800004,
3.2859257415800003,
3.4852400995800004,
2.8146707285800003,
2.8222073575800004,
2.8722433825800002,
3.0155135365800003,
2.9252704195800003
]
},
{
"command": "pnpr@main",
"mean": 3.07277976638,
"stddev": 0.09974675533392058,
"median": 3.06430803858,
"user": 3.1089805399999997,
"system": 1.9528474200000001,
"min": 2.92205175658,
"max": 3.2125284135800003,
"times": [
3.17574031458,
3.04867931958,
3.02887752158,
3.16702674458,
3.0612639945800004,
3.0673520825800002,
3.2125284135800003,
3.12217229558,
2.92205175658,
2.92210522058
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.1517544285399999,
"stddev": 0.0134097456128189,
"median": 1.15056081364,
"user": 1.32704036,
"system": 1.0154220000000003,
"min": 1.13209355564,
"max": 1.17982118064,
"times": [
1.14796945064,
1.17982118064,
1.15327427264,
1.15158502864,
1.14958265664,
1.15153897064,
1.16671205864,
1.13209355564,
1.13880643464,
1.14616067664
]
},
{
"command": "pacquet@main",
"mean": 1.16544499204,
"stddev": 0.030517494872951172,
"median": 1.1555142576400002,
"user": 1.33537106,
"system": 1.0066422,
"min": 1.12821241564,
"max": 1.23587448864,
"times": [
1.1857445606400001,
1.14450901064,
1.1527707736400001,
1.14537913064,
1.15825774164,
1.15141428164,
1.16765342064,
1.12821241564,
1.18463409664,
1.23587448864
]
},
{
"command": "pnpr@HEAD",
"mean": 1.25144632134,
"stddev": 0.06279890056923548,
"median": 1.23748042364,
"user": 0.5705080600000001,
"system": 0.9358974999999999,
"min": 1.20980299564,
"max": 1.42676296664,
"times": [
1.2446833346400001,
1.24651128464,
1.21995998964,
1.22643329964,
1.20980299564,
1.42676296664,
1.22190843664,
1.24344005864,
1.23964977064,
1.23531107664
]
},
{
"command": "pnpr@main",
"mean": 1.25052449534,
"stddev": 0.03393023493000444,
"median": 1.24008396514,
"user": 0.58055576,
"system": 0.9229513,
"min": 1.22479956864,
"max": 1.34283399664,
"times": [
1.25540677364,
1.23696251964,
1.23134754464,
1.23191834364,
1.24660440264,
1.25520387364,
1.34283399664,
1.23920348164,
1.22479956864,
1.24096444864
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.8722081949000002,
"stddev": 0.0242401066860428,
"median": 2.8734493054000003,
"user": 1.8374892199999997,
"system": 1.20889812,
"min": 2.8372889839,
"max": 2.9108541849000003,
"times": [
2.8372889839,
2.8431662189,
2.8638912199,
2.8494248069,
2.8907130269,
2.8897976619,
2.8900472349,
2.8826840139,
2.8642145969,
2.9108541849000003
]
},
{
"command": "pacquet@main",
"mean": 2.8529611282000005,
"stddev": 0.040977243340129595,
"median": 2.8434443799,
"user": 1.8163813199999996,
"system": 1.2101761199999999,
"min": 2.7997019299,
"max": 2.9449900339,
"times": [
2.8206417519,
2.8398721239,
2.8768615559,
2.8331333149,
2.8801520349,
2.8620186619,
2.8470166359,
2.8252232389,
2.7997019299,
2.9449900339
]
},
{
"command": "pnpr@HEAD",
"mean": 1.2760623726,
"stddev": 0.016339849441541845,
"median": 1.2746563099000001,
"user": 0.5738972199999999,
"system": 0.9596398199999999,
"min": 1.2444477279,
"max": 1.2975545579,
"times": [
1.2812153419,
1.2975545579,
1.2917194269,
1.2637303429,
1.2957424319,
1.2755521779,
1.2737604419,
1.2444477279,
1.2663293159,
1.2705719609
]
},
{
"command": "pnpr@main",
"mean": 1.2624021793,
"stddev": 0.02167504173299687,
"median": 1.2538569989,
"user": 0.58109912,
"system": 0.94451792,
"min": 1.2362112639,
"max": 1.3001363869,
"times": [
1.2539862779,
1.2712157169,
1.2526255779,
1.2362112639,
1.2488550139,
1.2909658849,
1.3001363869,
1.2386104499,
1.2776875009,
1.2537277199
]
}
]
} |
|
| Branch | pr/12647 |
| Testbed | pacquet |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result milliseconds (ms) (Result Δ%) | Upper Boundary milliseconds (ms) (Limit %) |
|---|---|---|---|
| isolated-linker.fresh-install.cold-cache.cold-store | 📈 view plot 🚷 view threshold | 4,541.32 ms(-5.42%)Baseline: 4,801.62 ms | 5,761.94 ms (78.82%) |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot 🚷 view threshold | 2,872.21 ms(-5.76%)Baseline: 3,047.90 ms | 3,657.48 ms (78.53%) |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot 🚷 view threshold | 1,151.75 ms(-15.31%)Baseline: 1,360.01 ms | 1,632.01 ms (70.57%) |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot 🚷 view threshold | 4,346.57 ms(-8.07%)Baseline: 4,728.02 ms | 5,673.62 ms (76.61%) |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot 🚷 view threshold | 473.40 ms(-25.97%)Baseline: 639.48 ms | 767.38 ms (61.69%) |
6ec3879 to
6d4f1a3
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@pnpr/crates/pnpr/tests/auth_publish.rs`:
- Around line 1126-1128: Strengthen the restore test in the auth publish flow by
asserting the restored integrity value matches the original one, not just that
it is a string. Capture the `versions["2.0.0"]["dist"]["integrity"]` value
before the PUT in the existing auth publish test and compare it after the GET,
so the check in `auth_publish.rs` fails if the server restores the wrong hash.
🪄 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: 23d63646-65aa-4202-a59c-b790773a93e2
📒 Files selected for processing (2)
pnpr/crates/pnpr/src/server.rspnpr/crates/pnpr/tests/auth_publish.rs
🚧 Files skipped from review as they are similar to previous changes (1)
- pnpr/crates/pnpr/src/server.rs
|
Code review by qodo was updated up to the latest commit 6d4f1a3 |
update_packument (PUT /:pkg/-rev/:rev) stripped only _attachments/_rev/_revisions and wrote the body verbatim, so a publisher with publish+unpublish rights could set versions[v].dist.integrity to a bogus SRI while the real tarball stayed valid — a permanent client-side EINTEGRITY DoS for that version, with no upload. The body name was also unchecked. Add three guards: reject a body whose name does not match the URL package; reject any change to an already-published version's dist.integrity (read under the package lock so a concurrent publish cannot race it); and reject a malformed SRI on a newly added version entry. All map to 400. The partial-unpublish flow (removing a version, leaving the rest untouched) is unaffected. Co-authored-by: Claude <[email protected]>
The Perfectionist dylint requires a trailing comma on multi-line macro invocations; add it to the two format! calls touched in update_packument. Also, reject_packument_integrity_tampering swallowed a hosted-packument JSON parse error via .ok(), which would silently disable the dist.integrity immutability gate — propagate it instead (fail closed), addressing the review. Co-authored-by: Claude <[email protected]>
… too The guard only locked dist.integrity, so a partial-unpublish PUT could still repoint an already-published version's dist.tarball basename. Served packuments preserve that basename (rewrite_tarball_urls keeps it verbatim), so a client resolving the version would fetch a missing or foreign tarball that can't match the version's immutable integrity — a per-version install DoS, the same class this guard exists to prevent, while the real tarball sits intact on disk. Extend enforce_published_version_integrity (now enforce_published_version_immutability) to treat dist.tarball like dist.integrity: reject a changed basename and restore an omitted one from the hosted packument. Factor the "dist must be an object to restore into" check into a shared require_object_dist helper. Co-authored-by: Claude <[email protected]>
|
Code review by qodo was updated up to the latest commit 5b3d169 |
|
Code review by qodo was updated up to the latest commit 5b3d169 |
enforce_published_version_immutability let the PUT body introduce new version entries. A new entry could declare a dist.tarball basename colliding with an already-published version; expected_tarball_dist fails closed on a duplicate basename, so the collision would 502 every fetch of that filename — a persistent install DoS for the existing version. Partial-unpublish only removes versions, so reject any incoming version not present in the hosted packument (a fresh body is still accepted when no hosted packument exists, with its SRIs validated). Add a regression test that adds a 9.9.9 entry colliding with 1.0.0's tarball and asserts the PUT is rejected and no version is persisted. Co-authored-by: Claude <[email protected]>
|
Code review by qodo was updated up to the latest commit 132ab4f |
…check The dist.tarball immutability check compared the incoming basename against tarball_basename of the *stored* URL, so a published version whose stored dist.tarball had no basename (e.g. a URL ending in /) was left unprotected: rewrite_tarball_urls serves such a URL under the version-derived canonical name, so a partial-unpublish PUT could still shift the effective served basename and redirect installs at a missing/foreign tarball. Compare against the *served* basename instead via a new served_tarball_basename helper that mirrors rewrite_tarball_urls' fallback (URL basename, else the version-derived canonical name). Regression test: stored URL with no basename, PUT repoints it, asserts 400. Co-authored-by: Claude <[email protected]>
|
Code review by qodo was updated up to the latest commit 4ad3fa2 |
… packument When no hosted packument existed, enforce_published_version_immutability accepted the body and update_packument wrote it as authoritative state. A caller could seed version entries with no uploaded tarballs, and because publish refuses any version already in the packument, those versions could never be legitimately published — a durable squat / DoS. Partial-unpublish only operates on an already-published package, so fail closed (400) when read_hosted_packument returns no packument. With that, every retained version is necessarily a published one, so the separate "newly added version" branch collapses into the addition rejection. Regression test PUTs to a never-published package and asserts 400 with nothing written. Co-authored-by: Claude <[email protected]>
|
Code review by qodo was updated up to the latest commit 5834cd5 |
1 similar comment
|
Code review by qodo was updated up to the latest commit 5834cd5 |
The guard had accreted a comment per finding, with the same rationale repeated in the doc comment and inline. Concentrate the why in the function doc (its contract home), drop the inline blocks that restated it, and shorten the test comments — removing the trailing "stored X must be untouched" lines that just echoed the following assert. No behavior change. Co-authored-by: Claude <[email protected]>
|
Code review by qodo was updated up to the latest commit 3fc5203 |
Looking for bugs?Check back in a few minutes. Qodo's review agents are on it. |
Summary
update_packument(PUT /:pkg/-rev/:rev, the partial-unpublish flow) stripped only_attachments/_rev/_revisionsand wrote the client body verbatim. A publisher with bothpublish and unpublish rights could therefore set
versions[v].dist.integrityto a bogus SRI whilethe real tarball on disk stayed valid — a permanent client-side
EINTEGRITYDoS for that version,with no upload required. The body
namewas also never checked against the URL.This adds three guards:
namedoesn't match the URL package (400).dist.integrity. The hosted packument is read under the package lock so a concurrent publishcan't race the check (400).
dist.integrityon a newly added version entry (400).The legitimate partial-unpublish flow (remove a version, leave the rest byte-for-byte unchanged)
is unaffected.
Squash Commit Body
Checklist
update_packument_rejects_tampering_with_a_published_version_integritypublishes a version, PUTs back a packument with a poisoned
dist.integrity, asserts 400, andconfirms the stored integrity is unchanged.
(No changeset: pnpr is not a published npm package. No pnpm-side port: pnpr-only endpoint.)
Written by an agent (Claude Code, claude-opus-4-8).
Summary by CodeRabbit
PUTpartial-unpublish now returns 400 BadRequest when the optional request-body packagenamedoesn’t match the URL package name.versions[*].dist.integrityduring partial-unpublish: differing integrity is rejected with 400 BadRequest; if omitted, the hosted integrity is restored.dist.integrityvalues (including non-string ornull) with 400 BadRequest.dist.integrity, plus assertions that previously stored integrity remains unchanged.