Repository navigation
Conversation
The engine signature check read npm's packument through its own body loop. A TLS-intercepting proxy that sends the packument with neither Content-Length nor chunked framing and closes the connection without a close_notify alert made rustls report an error there, so `pnpm self-update` failed with ERR_PNPM_PNPM_ENGINE_IDENTITY_UNVERIFIABLE. #16708 fixed the same close for the resolver's metadata reads. `read_limited_self_delimiting_body` adds the size cap this trust-critical path needs to that tolerant read, and the signature check uses it. A framed body cut short by the close still fails. Closes #17763 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Micro-Benchmark ResultsLinux |
Same-run regression checkHEAD 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.
Same-run syscall checkEach install runs 2 more times per revision, untimed, under
Integrated-Benchmark Report (Linux)Commit: Compared against main at: Regular scenarios report direct and pnpr installs. The peer-heavy resolver scenario compares current Rust, main Rust, and TypeScript pnpm; the linked, injected, and Cargo 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
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.80493839438,
"stddev": 0.06789538397310471,
"median": 2.80263356698,
"user": 3.0278175,
"system": 2.0205081999999996,
"min": 2.69119693748,
"max": 2.90293509648
},
{
"command": "pacquet@main",
"mean": 2.79946875818,
"stddev": 0.05796237700057965,
"median": 2.79665369548,
"user": 3.0049535999999994,
"system": 1.9938379999999996,
"min": 2.67151767748,
"max": 2.87370500948
},
{
"command": "pnpr@HEAD",
"mean": 1.6082034531800002,
"stddev": 0.14224042934535858,
"median": 1.6437706679800002,
"user": 2.5125728,
"system": 1.8631718,
"min": 1.43628184248,
"max": 1.82845676848
},
{
"command": "pnpr@main",
"mean": 1.59156963358,
"stddev": 0.12838744137237734,
"median": 1.55727163798,
"user": 2.5112821,
"system": 1.6934404,
"min": 1.4266282134800001,
"max": 1.8001843454800002
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.36268493772000004,
"stddev": 0.04810659169769155,
"median": 0.36131842032000006,
"user": 0.41449825999999995,
"system": 0.7598653200000001,
"min": 0.26887106432,
"max": 0.44576044032000006
},
{
"command": "pacquet@main",
"mean": 0.32957177862000003,
"stddev": 0.02801614792802183,
"median": 0.3219282588200001,
"user": 0.36551906000000006,
"system": 0.73658952,
"min": 0.29343209032000006,
"max": 0.39162428132000004
},
{
"command": "pnpr@HEAD",
"mean": 0.31366636802,
"stddev": 0.03179433928608513,
"median": 0.31704236732,
"user": 0.35554096,
"system": 0.67451382,
"min": 0.27032800132000007,
"max": 0.35968466232000007
},
{
"command": "pnpr@main",
"mean": 0.3994000789200001,
"stddev": 0.05088527174376576,
"median": 0.4073582223200001,
"user": 0.44027965999999996,
"system": 0.8227946200000001,
"min": 0.32217726732000007,
"max": 0.49839903432000005
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.011660144835714287,
"stddev": 0.001478833474412268,
"median": 0.0114531168,
"user": 0.006576649795918368,
"system": 0.006064582857142854,
"min": 0.009521632300000001,
"max": 0.0188619823
},
{
"command": "pacquet@main",
"mean": 0.012269432390476207,
"stddev": 0.0017426539383894374,
"median": 0.0121471323,
"user": 0.007534417142857141,
"system": 0.005929008571428569,
"min": 0.0092765113,
"max": 0.0171929623
},
{
"command": "pnpr@HEAD",
"mean": 0.011509662457446808,
"stddev": 0.001289327466080188,
"median": 0.0113678023,
"user": 0.006640608936170217,
"system": 0.005978901617021273,
"min": 0.0090865713,
"max": 0.0155869323
},
{
"command": "pnpr@main",
"mean": 0.010892715164754097,
"stddev": 0.001090927283464264,
"median": 0.0108339618,
"user": 0.00647942229508197,
"system": 0.005434096393442627,
"min": 0.0088309513,
"max": 0.014293341300000002
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.009961163055714286,
"stddev": 0.0005821089446368388,
"median": 0.009914236520000001,
"user": 0.005190445714285714,
"system": 0.005798581785714287,
"min": 0.00908141652,
"max": 0.01484440652
},
{
"command": "pacquet@main",
"mean": 0.00951120808170213,
"stddev": 0.0004390092813799439,
"median": 0.00947082852,
"user": 0.005342377021276595,
"system": 0.005216506553191489,
"min": 0.00876612652,
"max": 0.01220984152
},
{
"command": "pnpr@HEAD",
"mean": 0.009372746148318588,
"stddev": 0.00036189979556882734,
"median": 0.009351894520000001,
"user": 0.005589013982300887,
"system": 0.004805293539823005,
"min": 0.008601072520000001,
"max": 0.01130471452
},
{
"command": "pnpr@main",
"mean": 0.00934142132786026,
"stddev": 0.000589511298236475,
"median": 0.00927704352,
"user": 0.00552162218340611,
"system": 0.0048425809606986924,
"min": 0.00837503452,
"max": 0.015247014520000001
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.6116776476800005,
"stddev": 0.06216433666000672,
"median": 2.60850356278,
"user": 2.69855022,
"system": 1.6615082600000002,
"min": 2.49544418378,
"max": 2.69335135778
},
{
"command": "pacquet@main",
"mean": 2.55463173138,
"stddev": 0.0438089511458962,
"median": 2.54686275128,
"user": 2.42564882,
"system": 1.61763926,
"min": 2.4827560117800003,
"max": 2.62047420078
},
{
"command": "pnpr@HEAD",
"mean": 1.6444791894799997,
"stddev": 0.08421820698204788,
"median": 1.63782061178,
"user": 2.02362872,
"system": 1.49627016,
"min": 1.47440389078,
"max": 1.76791716378
},
{
"command": "pnpr@main",
"mean": 1.57776386438,
"stddev": 0.14945386631571173,
"median": 1.5660282322799999,
"user": 1.97890262,
"system": 1.4566438599999998,
"min": 1.40389801578,
"max": 1.81679530278
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.44791200974,
"stddev": 0.013376547605027139,
"median": 0.45031169134000004,
"user": 0.62897118,
"system": 0.9049130600000002,
"min": 0.42617473884,
"max": 0.46680233584
},
{
"command": "pacquet@main",
"mean": 0.44711235843999997,
"stddev": 0.009556074905762896,
"median": 0.44409094434000007,
"user": 0.6184807799999998,
"system": 0.9152243600000001,
"min": 0.43203792484000003,
"max": 0.46325718284000006
},
{
"command": "pnpr@HEAD",
"mean": 0.2792192083400001,
"stddev": 0.011135432695065775,
"median": 0.27686587784000005,
"user": 0.23115027999999999,
"system": 0.5444091600000001,
"min": 0.26676948584000004,
"max": 0.30013042584000005
},
{
"command": "pnpr@main",
"mean": 0.29624631194,
"stddev": 0.026100255400869556,
"median": 0.28654834484,
"user": 0.27279218,
"system": 0.5673615599999999,
"min": 0.27233819184,
"max": 0.36035084384000005
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.64359096542,
"stddev": 0.012799600571484843,
"median": 1.6424098635200002,
"user": 0.91499884,
"system": 0.8410070199999999,
"min": 1.6260299955200002,
"max": 1.6649134205200002
},
{
"command": "pacquet@main",
"mean": 1.6354236231200001,
"stddev": 0.01880240728704345,
"median": 1.6389766565200001,
"user": 0.8763059400000002,
"system": 0.86341292,
"min": 1.5970771395200003,
"max": 1.66214328652
},
{
"command": "pnpr@HEAD",
"mean": 0.29595162981999995,
"stddev": 0.004620834538931495,
"median": 0.29550540202,
"user": 0.26696344,
"system": 0.56885832,
"min": 0.28943869552,
"max": 0.30396601752
},
{
"command": "pnpr@main",
"mean": 0.30213018052,
"stddev": 0.01456491685417918,
"median": 0.29850522852,
"user": 0.28925693999999996,
"system": 0.5706207200000001,
"min": 0.28661395652,
"max": 0.33837699752
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.30152423961999997,
"stddev": 0.018078029100229483,
"median": 0.29502238912,
"user": 0.31504074000000004,
"system": 0.3595242799999999,
"min": 0.28354103262,
"max": 0.33611870262
},
{
"command": "pacquet@main",
"mean": 0.30048648982000004,
"stddev": 0.013266503601060489,
"median": 0.29711016462,
"user": 0.30686884,
"system": 0.38239478,
"min": 0.28349528762000004,
"max": 0.32281450462
},
{
"command": "pnpr@HEAD",
"mean": 0.10178523417172415,
"stddev": 0.0047406141264999,
"median": 0.10292051062000002,
"user": 0.04427636413793103,
"system": 0.031022576551724138,
"min": 0.09309568262000001,
"max": 0.10907018762000001
},
{
"command": "pnpr@main",
"mean": 0.09842298112000002,
"stddev": 0.004672101346523435,
"median": 0.09887493312000001,
"user": 0.039254104285714284,
"system": 0.03117328714285714,
"min": 0.09015996562000002,
"max": 0.10894474262
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.24712733959777783,
"stddev": 0.014419781500919954,
"median": 0.25383185982,
"user": 0.2907719177777778,
"system": 0.04141176888888889,
"min": 0.22804137282000003,
"max": 0.26602912182000005
},
{
"command": "pacquet@main",
"mean": 0.24786782804222224,
"stddev": 0.018846782072261956,
"median": 0.24155837882000003,
"user": 0.2740283622222222,
"system": 0.04579810222222222,
"min": 0.22886344482,
"max": 0.28667528382
},
{
"command": "pnpm@HEAD",
"mean": 4.674811688375556,
"stddev": 0.2978877023171929,
"median": 4.58862386782,
"user": 7.302195139999999,
"system": 0.41083888,
"min": 4.323323551820001,
"max": 5.330110585820001
}
]
}Scenario: Isolated linker: linked-workspace resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.09327399177500001,
"stddev": 0.005750408702346452,
"median": 0.0924920269,
"user": 0.083941425,
"system": 0.0527077225,
"min": 0.0844032494,
"max": 0.1025674064
},
{
"command": "pacquet@main",
"mean": 0.08818764296666666,
"stddev": 0.006773071131202449,
"median": 0.08493318990000001,
"user": 0.0822423,
"system": 0.047644826666666674,
"min": 0.0816732674,
"max": 0.10273851640000001
}
]
}Scenario: Isolated linker: injected workspace repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.10537614379076922,
"stddev": 0.006896269153083652,
"median": 0.10333914806,
"user": 0.03922548307692307,
"system": 0.07496519846153846,
"min": 0.09342403906,
"max": 0.12212441906
},
{
"command": "pacquet@main",
"mean": 0.10030172168962961,
"stddev": 0.0085394133784312,
"median": 0.09774910506000001,
"user": 0.03664650444444445,
"system": 0.07138995629629628,
"min": 0.08871068306,
"max": 0.12426339206
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.821546211799999,
"stddev": 0.17914212126098344,
"median": 4.7965840672999995,
"user": 2.7299903799999994,
"system": 1.8074434199999998,
"min": 4.6192455023,
"max": 5.1460389433
},
{
"command": "pacquet@main",
"mean": 4.6880708354,
"stddev": 0.17798301123972854,
"median": 4.6448699193,
"user": 2.64478498,
"system": 1.7657010199999998,
"min": 4.5339524933,
"max": 5.1510195442999995
},
{
"command": "pnpr@HEAD",
"mean": 3.6016321383999994,
"stddev": 0.05245587219917416,
"median": 3.5944447533,
"user": 2.12421008,
"system": 1.5669779199999998,
"min": 3.5312291062999996,
"max": 3.6920973192999997
},
{
"command": "pnpr@main",
"mean": 3.653122809,
"stddev": 0.12847274046165344,
"median": 3.6230317892999997,
"user": 2.0957189799999996,
"system": 1.51692302,
"min": 3.5408050083,
"max": 3.9098843693
}
]
}Scenario: GVS linker: fresh restore, hot cache + hot storeSame 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.
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.15098887875411762,
"stddev": 0.006598193214893845,
"median": 0.15097013946,
"user": 0.18399976588235292,
"system": 0.15075376117647057,
"min": 0.14099088346,
"max": 0.16789965546000002
},
{
"command": "pacquet@main",
"mean": 0.14477635781294118,
"stddev": 0.012490772972815414,
"median": 0.14953790046,
"user": 0.17630788352941174,
"system": 0.13461493764705884,
"min": 0.12504648046,
"max": 0.17175397746
},
{
"command": "pnpr@HEAD",
"mean": 0.17934803071000005,
"stddev": 0.01740885263637928,
"median": 0.17858179696,
"user": 0.213465935,
"system": 0.15503857000000001,
"min": 0.15613353146,
"max": 0.22435180046
},
{
"command": "pnpr@main",
"mean": 0.18985490987666667,
"stddev": 0.008971638830705004,
"median": 0.18982539896,
"user": 0.22304964333333333,
"system": 0.16216340333333332,
"min": 0.17392657146,
"max": 0.21164274346
}
]
}Scenario: Store only: unlocked direct deps, cold cache + hot storeStore-only install (
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.2374576629,
"stddev": 0.06138225169845708,
"median": 1.2411650032,
"user": 0.51054712,
"system": 0.23697132,
"min": 1.1548461392,
"max": 1.3095712072
},
{
"command": "pacquet@main",
"mean": 1.2604589256000003,
"stddev": 0.0497631091709523,
"median": 1.2705555767,
"user": 0.5389302199999999,
"system": 0.25883222,
"min": 1.1706018582,
"max": 1.3291170832
}
]
}Scenario: Cargo: repeat install, hot cache + hot storeFrozen repeat install of a Cargo workspace (
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.03286106813142856,
"stddev": 0.00324916267014234,
"median": 0.03248032456,
"user": 0.023344206530612244,
"system": 0.01845410612244898,
"min": 0.02860468206,
"max": 0.04490423506
},
{
"command": "pacquet@main",
"mean": 0.035804778490232565,
"stddev": 0.0032647475628842966,
"median": 0.036621373060000004,
"user": 0.02592161255813952,
"system": 0.019498346511627906,
"min": 0.02754527906,
"max": 0.040721396060000005
}
]
} |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17765 +/- ##
==========================================
+ Coverage 92.96% 92.99% +0.02%
==========================================
Files 2119 2123 +4
Lines 272471 272841 +370
==========================================
+ Hits 253297 253721 +424
+ Misses 19174 19120 -54 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
PR Summary by QodoAccept unclean TLS closes during self-update signature checks
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
Code Review by Qodo
1.
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
[Medium impact] The PR appears safe to merge; the previous finding is fully addressed. Reviews (2) · Last reviewed commit: "fix(self-update): reject an oversized pa..." · Reviewed by Greptile |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Qodo finding 1 (self-update reads known-oversized bodies) is the same as the Greptile thread. Fixed in 1ecd7b6, which restores the early Written by an agent (Claude Code, claude-opus-5-5). |
|
Code review by qodo was updated up to the latest commit 1ecd7b6 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Summary
Closes #17763.
pnpm self-updatebehind a TLS-intercepting proxy failed withERR_PNPM_PNPM_ENGINE_IDENTITY_UNVERIFIABLE ... https://registry.npmjs.org/pnpm: error decoding response body. The cause is the same as in #16704. The proxy sends the packument with noContent-Lengthand no chunked framing, then ends it by closing the connection without a TLSclose_notifyalert. #16708 made the resolver's metadata reads accept that close, which is why the version resolution in the report succeeded. The engine signature check reads npm's packument through its own capped body loop, and that loop still failed on the close.pnpm_networknow hasread_limited_self_delimiting_body, which puts the size cap ofread_limited_bodyon the tolerant read ofread_self_delimiting_body. The signature check uses it. A framed body cut short by the close still fails, and a cut-short unframed body fails the JSON parse.pnpm v11 is unaffected because Node.js treats the close as the end of the body.
I could not reproduce this behind the reporter's proxy. The new
unclean_tls_closetests use a local rustls server that closes withoutclose_notify. Whenread_limited_self_delimiting_bodyis changed back to the framed behavior, the close-delimited test fails.Squash Commit Body
Checklist
already linked to it solves it.
are implemented in every affected version.
Written by an agent (Claude Code, claude-opus-5-5).
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by CodeRabbit
pnpm self-updateand switching to the version specified bypackageManagernow work with proxies that close TLS connections without aclose_notifyalert.