Repository navigation
fix(pacquet): serialize same-name injected importer deps as plain file: refs - #12924
Conversation
…e: refs An injected workspace dep's dep path is <name>@file:<path>(peers). With real_name unset (directory resolutions learn their name from the manifest), the peered shape missed the bare file: strip in importer_dep_version and fell through to the <name>@<ref> alias form — which pnpm v11 reserves for renamed deps, writing the plain file:<path>(peers) ref when the alias equals the package name. The self-aliased form double-prefixes every consumer that composes alias@version into a snapshot key: Bit's lockfile-to-graph converter crashed on it (teambit/bit#10293's remaining deps-graph e2e cluster), and v11 readers would mis-key the same way. Renamed aliases keep the alias form; a unit test pins both shapes. Co-Authored-By: Claude Fable 5 <[email protected]>
|
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)
📝 WalkthroughWalkthroughThe dependency graph conversion now maps same-name injected workspace ChangesInjected workspace dependency lockfile mapping
Estimated code review effort: 2 (Simple) | ~10 minutes 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 |
PR Summary by QodoFix lockfile serialization for same-name injected workspace file refs
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
18 rules 1. Avoidable suffix stringification
|
PR Code Suggestions ✨Warning
Explore these optional code suggestions:
|
||||||||||||
Micro-Benchmark ResultsLinux |
…ract
The comments on the same-name injected-dep branch narrated the fixed
bug ("used to fall through", "would fall through") — past
implementation shape the comments guideline routes to the commit
message. Rephrase both as statements of what the code guarantees now;
the test doc also stops re-narrating the implementation mechanics the
asserts already pin.
Co-Authored-By: Claude Fable 5 <[email protected]>
|
Code review by qodo was updated up to the latest commit 07e04c3 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR.
|
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.2347676432,
"stddev": 0.1699426916269442,
"median": 4.2470107948999996,
"user": 3.8922328999999998,
"system": 3.5936026199999995,
"min": 3.9829022729,
"max": 4.4773396409,
"times": [
4.2454078099,
3.9829022729,
4.3386027009,
4.4069502219,
4.4773396409,
4.2486137799,
4.0259204959,
4.0349312349,
4.2366615199,
4.3503467549
]
},
{
"command": "pacquet@main",
"mean": 4.0905397274999995,
"stddev": 0.057211712863796435,
"median": 4.0889209699,
"user": 3.9224104000000004,
"system": 3.55378802,
"min": 3.9954099509,
"max": 4.1898992729,
"times": [
4.1116851499000004,
4.0978335359,
4.1394582769,
4.0800084039,
4.1386506539,
4.1898992729,
4.0405687879,
4.0687195599,
3.9954099509,
4.0431636829
]
},
{
"command": "pnpr@HEAD",
"mean": 2.1731786098,
"stddev": 0.11139415192281543,
"median": 2.1613515038999997,
"user": 2.6918574000000004,
"system": 3.10775442,
"min": 2.0127361139,
"max": 2.3902254109000003,
"times": [
2.1142464079,
2.0715325269,
2.1053925729,
2.2084565999,
2.2420008449,
2.0127361139,
2.2169982849,
2.2633340559,
2.3902254109000003,
2.1068632799
]
},
{
"command": "pnpr@main",
"mean": 2.1651490376,
"stddev": 0.13818765087523632,
"median": 2.1170781949000004,
"user": 2.7003943,
"system": 3.0952591200000006,
"min": 1.9931631649000001,
"max": 2.3832109049,
"times": [
2.3832109049,
2.0766471769,
1.9931631649000001,
2.0888892219,
2.0608952229,
2.0474603639,
2.1452671679,
2.3327664569,
2.1935143919,
2.3296763039
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.6914231568400001,
"stddev": 0.012550912222701587,
"median": 0.6869220873399999,
"user": 0.41058669999999997,
"system": 1.3787876799999998,
"min": 0.67771629134,
"max": 0.70972905134,
"times": [
0.6833961763399999,
0.70234544334,
0.68033929034,
0.70534293734,
0.69044799834,
0.70972905134,
0.70360346634,
0.68322507734,
0.67771629134,
0.67808583634
]
},
{
"command": "pacquet@main",
"mean": 0.70674143554,
"stddev": 0.09628737442552901,
"median": 0.6786946363399999,
"user": 0.4126295,
"system": 1.3660818799999999,
"min": 0.65175048234,
"max": 0.97460308834,
"times": [
0.71499507134,
0.65175048234,
0.69933673034,
0.65491942134,
0.66277322734,
0.66974932234,
0.68763995034,
0.66397737534,
0.68766968634,
0.97460308834
]
},
{
"command": "pnpr@HEAD",
"mean": 0.7443174347400001,
"stddev": 0.07667875615551838,
"median": 0.72985172634,
"user": 0.4319512,
"system": 1.3838487800000001,
"min": 0.69709628134,
"max": 0.95708451734,
"times": [
0.74438923334,
0.73020085534,
0.69709628134,
0.70395973734,
0.71309264334,
0.72950259734,
0.69751141634,
0.73090742034,
0.95708451734,
0.73942964534
]
},
{
"command": "pnpr@main",
"mean": 0.7536533901400001,
"stddev": 0.0380998671048713,
"median": 0.73627200284,
"user": 0.42478499999999997,
"system": 1.38971768,
"min": 0.70174982834,
"max": 0.83340780634,
"times": [
0.76532883034,
0.70174982834,
0.73654703234,
0.73539695034,
0.73418978934,
0.73190752234,
0.73599697334,
0.83340780634,
0.76386148034,
0.79814768834
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.339633704820001,
"stddev": 0.03855826532185596,
"median": 4.34371196942,
"user": 3.8671927599999996,
"system": 3.48555398,
"min": 4.2668053629200005,
"max": 4.41304970792,
"times": [
4.32217714092,
4.2668053629200005,
4.41304970792,
4.314881890920001,
4.35158490392,
4.35524019292,
4.33583903492,
4.36560576992,
4.31739500892,
4.35375803492
]
},
{
"command": "pacquet@main",
"mean": 4.3425235120200005,
"stddev": 0.039831978088414134,
"median": 4.342217419920001,
"user": 3.86792376,
"system": 3.4478687800000003,
"min": 4.27235210192,
"max": 4.41290007292,
"times": [
4.35495919292,
4.41290007292,
4.353203890920001,
4.32041140992,
4.27235210192,
4.32470539292,
4.30974346992,
4.3847819899200005,
4.33123094892,
4.360946649920001
]
},
{
"command": "pnpr@HEAD",
"mean": 2.21537623382,
"stddev": 0.0955581200683984,
"median": 2.2084268399199996,
"user": 2.5296765599999995,
"system": 2.99126768,
"min": 2.06245819792,
"max": 2.38180261492,
"times": [
2.14959655492,
2.38180261492,
2.21529779192,
2.06245819792,
2.3420392139199997,
2.15902855492,
2.2015558879199997,
2.2527317559199997,
2.24515996992,
2.1440917959199997
]
},
{
"command": "pnpr@main",
"mean": 2.1766260694199993,
"stddev": 0.13257789030589667,
"median": 2.12908695492,
"user": 2.54093746,
"system": 2.98180918,
"min": 2.0751958729199997,
"max": 2.49902483692,
"times": [
2.0751958729199997,
2.0900109039199997,
2.29580035392,
2.08659195092,
2.0832890419199996,
2.49902483692,
2.17331019392,
2.12160053092,
2.1365733789199997,
2.2048636299199997
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.4288119647800002,
"stddev": 0.012422601133273042,
"median": 1.43181182468,
"user": 1.42779672,
"system": 1.7297457799999996,
"min": 1.4024989026799999,
"max": 1.44476201168,
"times": [
1.41594801668,
1.43242958868,
1.43585497768,
1.43119406068,
1.4024989026799999,
1.44095731168,
1.44476201168,
1.43328885168,
1.42243185168,
1.42875407468
]
},
{
"command": "pacquet@main",
"mean": 1.47651304008,
"stddev": 0.08807159060186222,
"median": 1.4547356331799999,
"user": 1.4321388199999996,
"system": 1.7593058799999999,
"min": 1.4167650866800001,
"max": 1.72263385268,
"times": [
1.43765273768,
1.4167650866800001,
1.72263385268,
1.47307559168,
1.4514631736799999,
1.44192738268,
1.46661899668,
1.46090184068,
1.45800809268,
1.43608364568
]
},
{
"command": "pnpr@HEAD",
"mean": 0.6939585959800001,
"stddev": 0.012533040358059664,
"median": 0.69078442218,
"user": 0.37197572,
"system": 1.3074740799999998,
"min": 0.68054378668,
"max": 0.71912541968,
"times": [
0.68054378668,
0.69379979768,
0.70873038168,
0.68211571068,
0.68638155268,
0.71912541968,
0.69241137468,
0.68915746968,
0.7025722656800001,
0.6847482006800001
]
},
{
"command": "pnpr@main",
"mean": 0.6940033342799999,
"stddev": 0.03088367345014379,
"median": 0.6854494546800001,
"user": 0.37208791999999996,
"system": 1.30816768,
"min": 0.67660240468,
"max": 0.7794077486800001,
"times": [
0.7002711206800001,
0.6792374236800001,
0.68496158768,
0.67685424468,
0.67853691468,
0.6901677846800001,
0.68593732168,
0.67660240468,
0.7794077486800001,
0.68805679168
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 3.1581018501600004,
"stddev": 0.051346289508623785,
"median": 3.14149092846,
"user": 1.88621694,
"system": 2.05629442,
"min": 3.11260080046,
"max": 3.27004834346,
"times": [
3.12425025646,
3.2157617694600003,
3.15711937446,
3.12345290246,
3.11260080046,
3.12586248246,
3.11329867946,
3.27004834346,
3.16049533846,
3.17812855446
]
},
{
"command": "pacquet@main",
"mean": 3.14832802486,
"stddev": 0.033964469127597215,
"median": 3.1395558764600002,
"user": 1.8987634399999997,
"system": 2.01569732,
"min": 3.11805120546,
"max": 3.23592475946,
"times": [
3.13936871846,
3.13974303446,
3.11805120546,
3.15377156946,
3.12880645546,
3.13155335746,
3.12659005546,
3.23592475946,
3.14074168646,
3.1687294064600002
]
},
{
"command": "pnpr@HEAD",
"mean": 0.70883595636,
"stddev": 0.013646436431616255,
"median": 0.71271759296,
"user": 0.36917874,
"system": 1.32112352,
"min": 0.6894711924600001,
"max": 0.7268531514600001,
"times": [
0.6978287174600001,
0.69147115146,
0.71707321546,
0.6894711924600001,
0.7268531514600001,
0.7111244294600001,
0.6975121284600001,
0.7143107564600001,
0.7192535804600001,
0.72346124046
]
},
{
"command": "pnpr@main",
"mean": 0.6931774510600002,
"stddev": 0.01593771618209017,
"median": 0.6894502044600002,
"user": 0.38032824,
"system": 1.29878362,
"min": 0.6808999914600001,
"max": 0.7362494664600001,
"times": [
0.6808999914600001,
0.68214254346,
0.6925516904600001,
0.69329542046,
0.68295144346,
0.68891207046,
0.69587147546,
0.7362494664600001,
0.6891495674600001,
0.6897508414600001
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.6790669401,
"stddev": 0.007420137439787416,
"median": 0.6813912884,
"user": 0.64890264,
"system": 0.15138533999999998,
"min": 0.6605827164,
"max": 0.6863146574,
"times": [
0.6742780274,
0.6850684894,
0.6863146574,
0.6829032544,
0.6767905664,
0.6795674214,
0.6823816914,
0.6809247514,
0.6818578254000001,
0.6605827164
]
},
{
"command": "pacquet@main",
"mean": 0.6784590761,
"stddev": 0.010029797237391381,
"median": 0.6797293499,
"user": 0.64430794,
"system": 0.15691703999999998,
"min": 0.6584990414,
"max": 0.6943449874000001,
"times": [
0.6943449874000001,
0.6584990414,
0.6854094654,
0.6757984774,
0.6863579114,
0.6822183574,
0.6788529314,
0.6739020004,
0.6686018204,
0.6806057684
]
},
{
"command": "pnpr@HEAD",
"mean": 0.10806345728,
"stddev": 0.0012313631967808178,
"median": 0.1078646624,
"user": 0.028193219999999998,
"system": 0.020033200000000004,
"min": 0.10652775440000001,
"max": 0.1113635994,
"times": [
0.1066076354,
0.1078621874,
0.10851607840000001,
0.1082866754,
0.1072984364,
0.10789877540000001,
0.1073319184,
0.1080149654,
0.10718170540000001,
0.1078646624,
0.1097979214,
0.1068508524,
0.1088680214,
0.10652775440000001,
0.1073557524,
0.1073031554,
0.1071958534,
0.1082959334,
0.1095325924,
0.1113635994,
0.1107019374,
0.10673899640000001,
0.1083613714,
0.1073063644,
0.1085232864
]
},
{
"command": "pnpr@main",
"mean": 0.10788114676,
"stddev": 0.0007806707485795407,
"median": 0.1077956764,
"user": 0.028050699999999994,
"system": 0.01993496,
"min": 0.1063768344,
"max": 0.1101363134,
"times": [
0.1101363134,
0.1063768344,
0.1073032184,
0.1085657664,
0.1073882684,
0.1067996704,
0.10844560040000001,
0.1076012704,
0.1081429004,
0.1076654684,
0.1082121404,
0.1082486094,
0.1068037584,
0.1086336374,
0.1083481434,
0.1076839284,
0.1069518874,
0.1077956764,
0.1077791054,
0.1083650484,
0.1087069324,
0.1074522294,
0.1080418024,
0.1074038454,
0.1081766134
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 6.952087890179999,
"stddev": 0.19243113019760405,
"median": 6.90518311698,
"user": 4.092297479999999,
"system": 3.8694227399999996,
"min": 6.79647153298,
"max": 7.4015597819800005,
"times": [
6.79819087798,
6.84730494798,
6.94305748998,
6.87822962798,
6.93213660598,
7.16333102598,
6.95611648698,
7.4015597819800005,
6.804480523980001,
6.79647153298
]
},
{
"command": "pacquet@main",
"mean": 6.946496826880001,
"stddev": 0.11203245787895025,
"median": 6.971124079480001,
"user": 4.103005779999998,
"system": 3.8745256399999994,
"min": 6.80395187498,
"max": 7.14099260598,
"times": [
7.14099260598,
6.84673086698,
7.04621520498,
6.9541588689800005,
6.9880892899800005,
6.810922890980001,
7.00883506298,
7.00489588498,
6.80395187498,
6.86017571798
]
},
{
"command": "pnpr@HEAD",
"mean": 5.06384425378,
"stddev": 0.10248320700197114,
"median": 5.0865337874800005,
"user": 2.8167762799999996,
"system": 3.3121385399999994,
"min": 4.92332257498,
"max": 5.19555852698,
"times": [
5.159597803980001,
4.96231718398,
4.92332257498,
5.09177175898,
5.19555852698,
4.93153608498,
5.1228920569800005,
4.99854308298,
5.08129581598,
5.17160764798
]
},
{
"command": "pnpr@main",
"mean": 5.00885076048,
"stddev": 0.07511937714335044,
"median": 4.998401164980001,
"user": 2.80652778,
"system": 3.35515214,
"min": 4.91117512698,
"max": 5.14138882398,
"times": [
4.99578589498,
5.13330035598,
4.99018189498,
5.14138882398,
5.00101643498,
5.00352431998,
4.91117512698,
4.9322595189800005,
4.9675644099800005,
5.01231082398
]
}
]
} |
|
| Branch | pr/12924 |
| 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 | 2,215.38 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 708.84 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 693.96 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 108.06 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 2,173.18 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 5,063.84 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 744.32 ms |
…r deps The inject_workspace_packages e2e tests pinned the importer-section refs in the <name>@file:<path>(peers) alias form. That form is now reserved for renamed deps; when the alias equals the package name the lockfile records the plain file:<path>(peers) ref, matching pnpm v11. Co-Authored-By: Claude Fable 5 <[email protected]>
|
Code review by qodo was updated up to the latest commit 2190e49 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR.
|
|
Code review by qodo was updated up to the latest commit 3b4b81d |
PR Code Suggestions ✨Warning
No code suggestions found for the PR.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12924 +/- ##
==========================================
+ Coverage 85.43% 85.45% +0.01%
==========================================
Files 474 474
Lines 74546 74553 +7
==========================================
+ Hits 63691 63706 +15
+ Misses 10855 10847 -8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Carries the plain file: importer-ref serialization fix (pnpm/pnpm#12924), which resolves the bit tag crash in the lockfile-to-graph converter (Cannot read properties of undefined) under BIT_FEATURES=deps-graph. Co-Authored-By: Claude Fable 5 <[email protected]>
An injected workspace dep's dep path is
<name>@file:<path>(peers). Withreal_nameunset (directory resolutions learn their name from the fetched manifest), the peered shape missed the barefile:strip inimporter_dep_versionand fell through to the<name>@<ref>alias form. pnpm v11 reserves that form for renamed deps and writes the plainfile:<path>(peers)ref when the alias equals the package name.The self-aliased form double-prefixes every consumer that composes
alias@versioninto a snapshot key — Bit's lockfile-to-graph converter crashed on it (Cannot read properties of undefined), which is the remainingBIT_FEATURES=deps-graphe2e failure cluster on teambit/bit#10293 after@pnpm/napi12.0.0-alpha.6.<name>@<ref>form; a unit test pins both shapes.deps-graphe2e with a locally built binding: thebit tagcrash is gone and the suite proceeds. (Its later assertions then reach pacquet's missing lockfile-resolution-reuse — the pre-existing gap tracked inplans/LOCKFILE_RESOLUTION_REUSE.md— which is unrelated to this serialization fix.)Written by an agent (Claude Code, claude-fable-5).
Summary by CodeRabbit
Bug Fixes
file:<pkg>reference instead of an alias-prefixed form.Tests