Repository navigation
Conversation
PR Summary by QodoImprove cache-race test cleanup to avoid SIGABRT and show mockito expectation failures
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe cache-race tests centralize raced-mirror deletion in ChangesCache-race test cleanup
Estimated code review effort: 1 (Trivial) | ~5 minutes Assessment against linked issues
Possibly related PRs
Suggested labels: Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Confidence Score: 5/5Test-only Rust change that makes cleanup idempotent and improves failure diagnostics; no production code paths are touched. The change is confined entirely to the test module, replaces an unsafe panic-on-server-thread pattern with a well-structured helper, adds a targeted unit test for the new behavior, and does not alter any observable production behavior. No files require special attention. Reviews (2): Last reviewed commit: "test(resolver): cover idempotent mirror ..." | Re-trigger Greptile |
Code Review by Qodo
Context used✅ Compliance rules (platform):
18 rules 1.
|
PR Code Suggestions ✨Warning
Explore these optional code suggestions:
|
|||||||||
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 `@pnpm/crates/resolving-npm-resolver/src/fetch_full_metadata_cached/tests.rs`:
- Around line 430-435: Add a focused regression test near remove_raced_mirror
that calls it with an already-missing file and verifies cleanup succeeds without
panicking. Retain the existing duplicate-request reporting assertions, including
expect(1) and assert_async(), so the test proves both idempotent removal and
duplicate-request handling.
🪄 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: 5e218aa1-d3b1-4734-b3cd-cbb3fa783420
📒 Files selected for processing (1)
pnpm/crates/resolving-npm-resolver/src/fetch_full_metadata_cached/tests.rs
Micro-Benchmark ResultsLinux |
|
The follow-up in commit Written by an agent (Codex, GPT-5). |
|
Code review by qodo was updated up to the latest commit 20b0d7b |
PR Code Suggestions ✨Warning
No code suggestions found for the PR.
|
Addressed by commit 20b0d7b19e; CodeRabbit verified the regression test and the review thread is resolved.
Written by an agent (Codex, GPT-5).
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13131 +/- ##
=======================================
Coverage 85.65% 85.65%
=======================================
Files 505 505
Lines 83565 83565
=======================================
Hits 71580 71580
Misses 11985 11985 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Integrated-Benchmark Report (Linux)Commit: Each scenario reports direct installs and pnpr installs. Bencher consumes pacquet@HEAD and pnpr@HEAD. The tables below show mean ± σ; Bencher thresholds on the minimum latency, which is far less perturbed by shared-runner contention (noise only adds time). Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.45710408056,
"stddev": 0.11035918044042572,
"median": 2.4137692904600003,
"user": 1.6181397399999997,
"system": 1.3109582999999998,
"min": 2.34578903246,
"max": 2.65685250046,
"times": [
2.5079224724599998,
2.34578903246,
2.44716333746,
2.37178006446,
2.37790315546,
2.5961293464599997,
2.35551313746,
2.65685250046,
2.38037524346,
2.53161251546
]
},
{
"command": "pacquet@main",
"mean": 2.54783265856,
"stddev": 0.16856114077284873,
"median": 2.5559609319599996,
"user": 1.6328159399999997,
"system": 1.2938452,
"min": 2.33500456546,
"max": 2.78707149746,
"times": [
2.35721559046,
2.50387245146,
2.6080494124599998,
2.62905890046,
2.33500456546,
2.3959342494599998,
2.41251129446,
2.78707149746,
2.74311616046,
2.70649246346
]
},
{
"command": "pnpr@HEAD",
"mean": 1.5931727290599997,
"stddev": 0.13036084965454647,
"median": 1.6231437714599999,
"user": 1.1795743399999998,
"system": 1.1465198,
"min": 1.34628468846,
"max": 1.75758666946,
"times": [
1.59684914246,
1.43981808246,
1.67412555146,
1.34628468846,
1.61267762546,
1.70465887646,
1.75758666946,
1.48249490646,
1.68362183046,
1.6336099174599998
]
},
{
"command": "pnpr@main",
"mean": 1.57645987926,
"stddev": 0.1419179863331845,
"median": 1.62309839696,
"user": 1.18187534,
"system": 1.1343028,
"min": 1.3717504384599999,
"max": 1.75071794546,
"times": [
1.6603637244599998,
1.68629343346,
1.64737193646,
1.5783807324599999,
1.38604516346,
1.3717504384599999,
1.3911234854599999,
1.75071794546,
1.69372707546,
1.59882485746
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.24704451966000002,
"stddev": 0.00604899244930203,
"median": 0.24663335096000003,
"user": 0.20479816,
"system": 0.49774298000000006,
"min": 0.23993485896000002,
"max": 0.25895372996,
"times": [
0.24908079196000002,
0.23993485896000002,
0.24109756696,
0.24350503396000003,
0.25193212196,
0.24561542796000002,
0.24097082396000002,
0.24765127396000003,
0.25895372996,
0.25170356696
]
},
{
"command": "pacquet@main",
"mean": 0.24539647416000002,
"stddev": 0.005939666209792577,
"median": 0.24641973146,
"user": 0.18981836,
"system": 0.50909528,
"min": 0.23752069396000003,
"max": 0.25200521196,
"times": [
0.25200521196,
0.23752069396000003,
0.23977230796000001,
0.23877681196000003,
0.25121840896,
0.24367076896000003,
0.25035158896,
0.24916869396000002,
0.24024148096000003,
0.25123877396
]
},
{
"command": "pnpr@HEAD",
"mean": 0.25755704226000004,
"stddev": 0.006842075136104812,
"median": 0.25663242696,
"user": 0.20339946000000003,
"system": 0.50123908,
"min": 0.24706235796000003,
"max": 0.27094900196,
"times": [
0.26480618095999997,
0.24706235796000003,
0.25516926096,
0.25110096896,
0.27094900196,
0.25955590096,
0.25480811795999997,
0.25389115896,
0.25809559296,
0.26013188096
]
},
{
"command": "pnpr@main",
"mean": 0.26353814636000006,
"stddev": 0.0055469145087969985,
"median": 0.26371374446,
"user": 0.20089466000000003,
"system": 0.51502848,
"min": 0.25521241996,
"max": 0.27293184596,
"times": [
0.26549969196,
0.25521241996,
0.25754264696,
0.26766195296,
0.26884077895999997,
0.26192779696,
0.25934351095999997,
0.26056138596,
0.27293184596,
0.26585943296
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.67364207366,
"stddev": 0.017570557393472377,
"median": 2.67555366366,
"user": 1.7617386199999998,
"system": 1.2531513200000002,
"min": 2.64706885866,
"max": 2.70580002666,
"times": [
2.67554067466,
2.67716832966,
2.64706885866,
2.66553281366,
2.70580002666,
2.65176306266,
2.69259836266,
2.66517744866,
2.68020450666,
2.67556665266
]
},
{
"command": "pacquet@main",
"mean": 2.6673436443600003,
"stddev": 0.0164611348444295,
"median": 2.66889444116,
"user": 1.7405592200000002,
"system": 1.2704193199999998,
"min": 2.64070733066,
"max": 2.6891513866600003,
"times": [
2.64436234766,
2.6891513866600003,
2.6765702566600003,
2.67041456466,
2.6643285326600004,
2.64070733066,
2.65707864266,
2.66737431766,
2.68889624466,
2.67455281966
]
},
{
"command": "pnpr@HEAD",
"mean": 1.5443442683600002,
"stddev": 0.11633842513543671,
"median": 1.50936074616,
"user": 1.1358657199999997,
"system": 1.1273599200000002,
"min": 1.38284790266,
"max": 1.7993584026600002,
"times": [
1.4644335476600001,
1.5894071036600002,
1.4950335026600001,
1.7993584026600002,
1.38284790266,
1.6159892446600002,
1.4776862856600002,
1.4774009806600001,
1.61759772366,
1.52368798966
]
},
{
"command": "pnpr@main",
"mean": 1.5389281903599998,
"stddev": 0.15883882374627173,
"median": 1.4802986421600002,
"user": 1.1611363200000002,
"system": 1.0983795200000002,
"min": 1.3908076506600002,
"max": 1.7956564146600003,
"times": [
1.7295632516600001,
1.4698834666600002,
1.39946221566,
1.51371567766,
1.7956564146600003,
1.42880756266,
1.49071381766,
1.3908076506600002,
1.7574768666600002,
1.41319497966
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.5408250634000001,
"stddev": 0.007590161248313111,
"median": 0.5384592043,
"user": 0.6421789600000001,
"system": 0.6656913799999999,
"min": 0.5317695053000001,
"max": 0.5540323473000001,
"times": [
0.5380800623,
0.5475517783000001,
0.5317695053000001,
0.5374323633000001,
0.5322315313000001,
0.5494603453000001,
0.5540323473000001,
0.5348723333000001,
0.5439820213000001,
0.5388383463
]
},
{
"command": "pacquet@main",
"mean": 0.5281157097,
"stddev": 0.01068813120000328,
"median": 0.5274304788000002,
"user": 0.63397426,
"system": 0.66171428,
"min": 0.5124456603,
"max": 0.5451733573,
"times": [
0.5252022703000001,
0.5124456603,
0.5296586873000001,
0.5167756133000001,
0.5191557643000001,
0.5451733573,
0.5403820783000001,
0.5361803623000001,
0.5227831373,
0.5334001663000001
]
},
{
"command": "pnpr@HEAD",
"mean": 0.29075003639999997,
"stddev": 0.006372413053124424,
"median": 0.29140423930000003,
"user": 0.16630546000000002,
"system": 0.50626758,
"min": 0.2817633483,
"max": 0.3009087633,
"times": [
0.2925887593,
0.29460278830000003,
0.28641798230000004,
0.2817633483,
0.2980914263,
0.2902197193,
0.2847954943,
0.3009087633,
0.2840990163,
0.2940130663
]
},
{
"command": "pnpr@main",
"mean": 0.28613371590000003,
"stddev": 0.00739540847528356,
"median": 0.2871593128,
"user": 0.18177766,
"system": 0.48890038000000013,
"min": 0.2757246423,
"max": 0.2959565333,
"times": [
0.2850204893,
0.2776028963,
0.2959565333,
0.29537818930000004,
0.2911332783,
0.2892981363,
0.2905787403,
0.2786486513,
0.2757246423,
0.28199560230000004
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.8414850106400003,
"stddev": 0.010940096677161905,
"median": 1.83896309084,
"user": 0.88750228,
"system": 0.7414741,
"min": 1.8315671663400002,
"max": 1.86562239634,
"times": [
1.8333057033400002,
1.8520966203400002,
1.84301786834,
1.83388325434,
1.8444767803400002,
1.8315671663400002,
1.8316669443400002,
1.8349083133400002,
1.86562239634,
1.84430505934
]
},
{
"command": "pacquet@main",
"mean": 1.8341626787399998,
"stddev": 0.008567113267583684,
"median": 1.8337815003400002,
"user": 0.88277138,
"system": 0.721547,
"min": 1.8199790663400002,
"max": 1.8454439093400001,
"times": [
1.8199790663400002,
1.8235977413400002,
1.83345698234,
1.82948846234,
1.8341060183400002,
1.8389009773400002,
1.8454439093400001,
1.8305122873400002,
1.84442509534,
1.8417162473400002
]
},
{
"command": "pnpr@HEAD",
"mean": 0.28607405063999997,
"stddev": 0.004774306390332034,
"median": 0.28562933784,
"user": 0.18844268,
"system": 0.48551790000000006,
"min": 0.27937926034,
"max": 0.29622684934,
"times": [
0.29622684934,
0.28306154734,
0.28805616434,
0.28061932634000003,
0.28554334134,
0.28853000934,
0.28493620834,
0.27937926034,
0.28867246534,
0.28571533434
]
},
{
"command": "pnpr@main",
"mean": 0.29020919693999997,
"stddev": 0.0056430016263674335,
"median": 0.29018983684,
"user": 0.16505328000000002,
"system": 0.5148568,
"min": 0.28114229534,
"max": 0.30272510434,
"times": [
0.29446647134,
0.28691707034,
0.28787300234,
0.30272510434,
0.29000057534,
0.29037909834000003,
0.28114229534,
0.29073851134,
0.29112298534000003,
0.28672685534000003
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.3284746668,
"stddev": 0.0042455548441346705,
"median": 0.32880310860000006,
"user": 0.32419842,
"system": 0.06208173999999998,
"min": 0.3217125516,
"max": 0.33574799860000004,
"times": [
0.3294156126,
0.32630777060000005,
0.3270539786,
0.3217125516,
0.32957061760000006,
0.3287205146,
0.3234461806,
0.33574799860000004,
0.32888570260000005,
0.33388574060000004
]
},
{
"command": "pacquet@main",
"mean": 0.33409803610000005,
"stddev": 0.007494547766743555,
"median": 0.33336002210000004,
"user": 0.32366101999999997,
"system": 0.06457063999999998,
"min": 0.32502199060000003,
"max": 0.3464012986,
"times": [
0.3464012986,
0.33656725860000003,
0.32502199060000003,
0.3357771346,
0.32806035060000005,
0.33618557460000004,
0.34588539360000004,
0.33094290960000006,
0.32759398460000005,
0.32854446560000006
]
},
{
"command": "pnpr@HEAD",
"mean": 0.08719408681212121,
"stddev": 0.002520342894769713,
"median": 0.0865554776,
"user": 0.02029343212121212,
"system": 0.00974097212121212,
"min": 0.0830583426,
"max": 0.09284486460000001,
"times": [
0.0849543536,
0.0870873166,
0.09036074960000001,
0.0890276816,
0.0842532166,
0.09132652760000001,
0.08590783260000001,
0.0868987046,
0.08614842360000001,
0.0863347316,
0.08785026060000001,
0.0859983676,
0.0861378346,
0.0870031416,
0.0865966516,
0.08557823660000001,
0.08570610960000001,
0.09284486460000001,
0.08387047060000001,
0.0887553246,
0.0839387456,
0.0863006746,
0.0886994366,
0.0830583426,
0.0889834956,
0.08421204160000001,
0.0879571876,
0.08495561060000001,
0.0865554776,
0.0917603886,
0.0860832926,
0.0910367906,
0.0912225806
]
},
{
"command": "pnpr@main",
"mean": 0.08910198634193549,
"stddev": 0.0034430402771975428,
"median": 0.0885200876,
"user": 0.02154776838709678,
"system": 0.010477024516129032,
"min": 0.08493330460000001,
"max": 0.09918796060000001,
"times": [
0.0893170286,
0.09183629360000001,
0.08561887160000001,
0.0910705826,
0.08596178360000001,
0.0895867736,
0.0875330356,
0.08950660260000001,
0.09199835260000001,
0.0861734366,
0.08493330460000001,
0.0951775636,
0.0900405516,
0.0885200876,
0.08610903660000001,
0.08739251460000001,
0.0872008766,
0.0955153536,
0.08666709660000001,
0.09918796060000001,
0.0874663246,
0.08533873460000001,
0.08576417360000001,
0.08593151360000001,
0.09223855460000001,
0.0913079536,
0.09212128060000001,
0.08901108460000001,
0.0865256976,
0.08595339760000001,
0.09115575460000001
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.53621844026,
"stddev": 0.14260998709179804,
"median": 4.4568074729600005,
"user": 1.78741336,
"system": 1.4028431399999999,
"min": 4.41926541946,
"max": 4.82783673446,
"times": [
4.466554775460001,
4.66459825746,
4.44706017046,
4.41926541946,
4.57691055646,
4.82783673446,
4.42037042546,
4.67268433846,
4.44379945146,
4.42310427346
]
},
{
"command": "pacquet@main",
"mean": 4.54637558956,
"stddev": 0.16733904546808415,
"median": 4.4481119624600005,
"user": 1.7965807599999999,
"system": 1.4171887399999998,
"min": 4.41419435546,
"max": 4.8525697264600005,
"times": [
4.8525697264600005,
4.41419435546,
4.42853205146,
4.54423535946,
4.45566131246,
4.44056261246,
4.65370872846,
4.43608669646,
4.42777182646,
4.81043322646
]
},
{
"command": "pnpr@HEAD",
"mean": 3.57311188546,
"stddev": 0.14668311921683683,
"median": 3.52322397396,
"user": 1.23347566,
"system": 1.31769944,
"min": 3.4480780704600003,
"max": 3.83585109646,
"times": [
3.83585109646,
3.56767224746,
3.46402800846,
3.8307813954600003,
3.4480780704600003,
3.57838860446,
3.46810606746,
3.58860998346,
3.47877570046,
3.4708276804600002
]
},
{
"command": "pnpr@main",
"mean": 3.510084177259999,
"stddev": 0.07072656385798434,
"median": 3.49095857946,
"user": 1.25125066,
"system": 1.2547503399999997,
"min": 3.4296412804600003,
"max": 3.6556230334600004,
"times": [
3.49944006746,
3.46743484446,
3.6058037144600004,
3.4824770914600003,
3.4296412804600003,
3.46082291046,
3.52841385546,
3.6556230334600004,
3.45776602246,
3.5134189524600004
]
}
]
} |
|
| Branch | pr/13131 |
| Testbed | pnpr |
⚠️ WARNING: No Threshold found!Without a Threshold, no Alerts will ever be generated.
Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the--ci-only-thresholdsflag.
Click to view all benchmark results
| Benchmark | Latency | milliseconds (ms) |
|---|---|---|
| isolated-linker.fresh-install.cold-cache.cold-store | 📈 view plot | 1,382.85 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 279.38 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 281.76 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 83.06 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,346.28 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,448.08 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 247.06 ms |
Summary
.expect(1)assertion instead of panicking on the server thread and aborting with SIGABRT.NotFound.Squash Commit Body
Checklist
pnpm/port, or the description notes what still needs porting.Written by an agent (Codex, GPT-5).
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by CodeRabbit