Repository navigation
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. CodeRabbit Verify
|
Nothing new recorded
TS CI / Test / ubuntu (24.0.0, 2) / Node 24 / chunk 2/3 · nothing new
How to read thisbash › curl ← ancestry as captured, then the process that acted └─ example[.]com ← what it reached Recorded by Garnet · Add it to your CI ↗ |
Micro-Benchmark ResultsLinux |
This comment has been minimized.
This comment has been minimized.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #17591 +/- ##
=======================================
Coverage 92.75% 92.75%
=======================================
Files 2033 2033
Lines 262192 262192
=======================================
+ Hits 243192 243198 +6
+ Misses 19000 18994 -6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.27586701164,
"stddev": 0.08447022160455829,
"median": 2.25454197844,
"user": 1.6087502400000002,
"system": 1.2284551599999998,
"min": 2.18696432744,
"max": 2.42779988344
},
{
"command": "pacquet@main",
"mean": 2.4029612527400004,
"stddev": 0.12807066989030358,
"median": 2.40258051744,
"user": 1.6403762399999997,
"system": 1.19337706,
"min": 2.22616989644,
"max": 2.57090368744
},
{
"command": "pnpr@HEAD",
"mean": 1.36964342044,
"stddev": 0.12931570203362625,
"median": 1.3386941009400002,
"user": 1.5438561399999997,
"system": 1.2119872600000001,
"min": 1.2452906534400001,
"max": 1.6323868394400003
},
{
"command": "pnpr@main",
"mean": 1.3862503823400003,
"stddev": 0.12357784942531246,
"median": 1.3880650109400001,
"user": 1.58091594,
"system": 1.15266006,
"min": 1.2397960434400002,
"max": 1.5657976784400003
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.24796132436,
"stddev": 0.008419591194876255,
"median": 0.24702216786,
"user": 0.28949803999999996,
"system": 0.5958119199999999,
"min": 0.23746381236000003,
"max": 0.26324515236
},
{
"command": "pacquet@main",
"mean": 0.25176543246000005,
"stddev": 0.010278546971131203,
"median": 0.25146405486,
"user": 0.27308744,
"system": 0.63022102,
"min": 0.23854599536000004,
"max": 0.27045268036000003
},
{
"command": "pnpr@HEAD",
"mean": 0.2541027718600001,
"stddev": 0.01050049904063482,
"median": 0.25356625036,
"user": 0.27530194,
"system": 0.56303342,
"min": 0.23906451636000003,
"max": 0.27499795236
},
{
"command": "pnpr@main",
"mean": 0.24842653386000008,
"stddev": 0.007917824737935201,
"median": 0.24498099736,
"user": 0.28324463999999994,
"system": 0.5500331199999999,
"min": 0.24031028036000002,
"max": 0.26085708536
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.007545101093695654,
"stddev": 0.0007638293661536549,
"median": 0.007404821360000001,
"user": 0.004890732608695652,
"system": 0.003357228695652172,
"min": 0.00697016586,
"max": 0.015135446860000002
},
{
"command": "pacquet@main",
"mean": 0.007307785875974437,
"stddev": 0.00022292170870885606,
"median": 0.00727296986,
"user": 0.00453506741214057,
"system": 0.0034509504792332264,
"min": 0.0069087598600000005,
"max": 0.008700876860000002
},
{
"command": "pnpr@HEAD",
"mean": 0.007379330264891305,
"stddev": 0.0002888011905775023,
"median": 0.00732703736,
"user": 0.004819365760869565,
"system": 0.0032325584239130444,
"min": 0.00688304186,
"max": 0.009226093860000001
},
{
"command": "pnpr@main",
"mean": 0.007355381402613631,
"stddev": 0.0002482479140817297,
"median": 0.00732786436,
"user": 0.0046366204545454535,
"system": 0.0034029310795454545,
"min": 0.00695579186,
"max": 0.009213542860000002
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.00787066738142348,
"stddev": 0.0003355964371096063,
"median": 0.007783394780000001,
"user": 0.004467013096085407,
"system": 0.004148228612099641,
"min": 0.007382081780000001,
"max": 0.00944809578
},
{
"command": "pacquet@main",
"mean": 0.007596395747426702,
"stddev": 0.0004272913574775019,
"median": 0.007517504780000002,
"user": 0.004999048729641693,
"system": 0.003263017328990226,
"min": 0.007124326780000001,
"max": 0.01124800878
},
{
"command": "pnpr@HEAD",
"mean": 0.007610122071262139,
"stddev": 0.0002916080444508587,
"median": 0.00756195978,
"user": 0.004533102006472491,
"system": 0.003726399482200646,
"min": 0.00715932178,
"max": 0.010647330780000002
},
{
"command": "pnpr@main",
"mean": 0.007614699065714292,
"stddev": 0.0002918749246887816,
"median": 0.007566572780000001,
"user": 0.004801994285714287,
"system": 0.003475820544217685,
"min": 0.00713349278,
"max": 0.01030601878
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.5842492891399997,
"stddev": 0.03649156988186126,
"median": 2.58916539974,
"user": 2.50273972,
"system": 1.7626021199999997,
"min": 2.53519442324,
"max": 2.64068944824
},
{
"command": "pacquet@main",
"mean": 2.5843764478399995,
"stddev": 0.01478594203479297,
"median": 2.58494891374,
"user": 2.5051971199999996,
"system": 1.70201952,
"min": 2.55909702024,
"max": 2.61498117924
},
{
"command": "pnpr@HEAD",
"mean": 1.6086397312400003,
"stddev": 0.16227935733637633,
"median": 1.66553439224,
"user": 1.9662470200000002,
"system": 1.5191147199999997,
"min": 1.4148911692400001,
"max": 1.7995169212400002
},
{
"command": "pnpr@main",
"mean": 1.50044277204,
"stddev": 0.0921801023609065,
"median": 1.4997824467400003,
"user": 1.9233690199999998,
"system": 1.4287721199999999,
"min": 1.3694568412400001,
"max": 1.7056647452400002
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.6437274296600001,
"stddev": 0.020232253628720335,
"median": 0.6492542168600001,
"user": 0.97249934,
"system": 1.40457418,
"min": 0.6163442483600001,
"max": 0.6704145973600001
},
{
"command": "pacquet@main",
"mean": 0.6690636776600001,
"stddev": 0.0472093409947614,
"median": 0.65901503036,
"user": 0.9880226400000002,
"system": 1.44837618,
"min": 0.60047451236,
"max": 0.74240698136
},
{
"command": "pnpr@HEAD",
"mean": 0.36877358316000003,
"stddev": 0.0133297891551546,
"median": 0.36598034886,
"user": 0.3709384399999999,
"system": 0.7129574799999999,
"min": 0.35307876836,
"max": 0.39326859736
},
{
"command": "pnpr@main",
"mean": 0.36943301846,
"stddev": 0.02221475154817578,
"median": 0.37665164086,
"user": 0.37604874,
"system": 0.73869178,
"min": 0.32622036836,
"max": 0.39279229636
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.69186146582,
"stddev": 0.039389547285507344,
"median": 1.69258587222,
"user": 1.02538536,
"system": 0.9790917199999998,
"min": 1.63104119172,
"max": 1.7722426177200001
},
{
"command": "pacquet@main",
"mean": 1.6974981184200004,
"stddev": 0.024228202417557937,
"median": 1.68903083672,
"user": 1.05757196,
"system": 1.0171591199999999,
"min": 1.66820717272,
"max": 1.74735786472
},
{
"command": "pnpr@HEAD",
"mean": 0.32370427972000004,
"stddev": 0.015727963971801335,
"median": 0.32292765372,
"user": 0.31778285999999994,
"system": 0.6188087199999999,
"min": 0.30252264572000004,
"max": 0.34840878372
},
{
"command": "pnpr@main",
"mean": 0.3140925117200001,
"stddev": 0.008614112913011987,
"median": 0.31518198472000003,
"user": 0.2912016599999999,
"system": 0.6306966199999999,
"min": 0.30423053672,
"max": 0.33034504272000004
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.26742300428666665,
"stddev": 0.014984102792703565,
"median": 0.26910336962000003,
"user": 0.27722163333333333,
"system": 0.29890484999999994,
"min": 0.22950792862000002,
"max": 0.28465452562
},
{
"command": "pacquet@main",
"mean": 0.27539048132,
"stddev": 0.014924000692562934,
"median": 0.27276940161999996,
"user": 0.2749298,
"system": 0.3276668,
"min": 0.25409751662,
"max": 0.29979389062
},
{
"command": "pnpr@HEAD",
"mean": 0.09471958208666667,
"stddev": 0.0030503021835640324,
"median": 0.09462487512000001,
"user": 0.0376784,
"system": 0.025025029999999997,
"min": 0.08857232662,
"max": 0.10379491662000001
},
{
"command": "pnpr@main",
"mean": 0.09633131882000004,
"stddev": 0.0033028684969161675,
"median": 0.09575008762000001,
"user": 0.04041403333333334,
"system": 0.02371729333333333,
"min": 0.09106324362,
"max": 0.10481703662
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.25653830228888885,
"stddev": 0.020358577886889304,
"median": 0.25001763540000005,
"user": 0.29072967555555557,
"system": 0.07187637777777778,
"min": 0.22886768540000002,
"max": 0.3021486004
},
{
"command": "pacquet@main",
"mean": 0.26214366117777776,
"stddev": 0.00818116102650697,
"median": 0.26501014540000006,
"user": 0.3047302311111111,
"system": 0.05563726666666666,
"min": 0.24550266340000002,
"max": 0.27269269240000005
},
{
"command": "pnpm@HEAD",
"mean": 4.312698202733333,
"stddev": 0.32614602416018873,
"median": 4.2232914214,
"user": 6.682798453333332,
"system": 0.4327840444444444,
"min": 3.9029597114,
"max": 4.9626056034
}
]
}Scenario: Isolated linker: linked-workspace resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.1053218683036364,
"stddev": 0.011457097118245945,
"median": 0.10440875494000001,
"user": 0.09643612181818183,
"system": 0.054820021818181804,
"min": 0.08724635494,
"max": 0.12871658394000002
},
{
"command": "pacquet@main",
"mean": 0.10187919209384615,
"stddev": 0.010023790187136615,
"median": 0.10272377044,
"user": 0.09582417076923075,
"system": 0.05168299384615384,
"min": 0.08600250394,
"max": 0.12539865494000002
}
]
}Scenario: Isolated linker: injected workspace repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.0981255247648276,
"stddev": 0.005499841724448653,
"median": 0.09734027142000001,
"user": 0.0366361675862069,
"system": 0.06955889103448275,
"min": 0.08983130042000001,
"max": 0.11150773542000002
},
{
"command": "pacquet@main",
"mean": 0.09878172705333335,
"stddev": 0.006848240155304706,
"median": 0.09775073242000001,
"user": 0.03599840666666666,
"system": 0.07102372666666665,
"min": 0.08989310542000001,
"max": 0.11787354842000002
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.6274521138,
"stddev": 0.19578919317476157,
"median": 4.5515433649000006,
"user": 2.11174644,
"system": 1.6334415199999999,
"min": 4.400056198400001,
"max": 4.899437460400001
},
{
"command": "pacquet@main",
"mean": 4.580693095,
"stddev": 0.1704548700157253,
"median": 4.5214064599,
"user": 2.1709390399999995,
"system": 1.6619525200000003,
"min": 4.4106555354,
"max": 4.8728036314
},
{
"command": "pnpr@HEAD",
"mean": 3.761503897800001,
"stddev": 0.10202093168900501,
"median": 3.7285874999000006,
"user": 2.50332394,
"system": 1.9562541199999999,
"min": 3.6431841774000002,
"max": 3.9271948314000005
},
{
"command": "pnpr@main",
"mean": 3.661188759900001,
"stddev": 0.06534183274699733,
"median": 3.6376814454,
"user": 2.2435270400000005,
"system": 1.8099922199999998,
"min": 3.5761250484000002,
"max": 3.7615550384
}
]
}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.16842743749333336,
"stddev": 0.00998594210764692,
"median": 0.16837092656000002,
"user": 0.21131523333333332,
"system": 0.17140223333333332,
"min": 0.14649978356,
"max": 0.18903273156000003
},
{
"command": "pacquet@main",
"mean": 0.1552120877952941,
"stddev": 0.016451250643244566,
"median": 0.15443718056000003,
"user": 0.19666811176470583,
"system": 0.1584845823529412,
"min": 0.13156965656000003,
"max": 0.19509585056
},
{
"command": "pnpr@HEAD",
"mean": 0.16913587589333337,
"stddev": 0.0075132558513633435,
"median": 0.16937915756000002,
"user": 0.20769876666666665,
"system": 0.14773483333333332,
"min": 0.15690334056000002,
"max": 0.18883138256
},
{
"command": "pnpr@main",
"mean": 0.17458478329333335,
"stddev": 0.00988573810926329,
"median": 0.17225972656000002,
"user": 0.2145151,
"system": 0.15061556666666664,
"min": 0.16253134856,
"max": 0.19555131056000002
}
]
}Scenario: Store only: unlocked direct deps, cold cache + hot storeStore-only install (
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.33807733684,
"stddev": 0.04995884744510989,
"median": 1.32433467844,
"user": 0.7287893,
"system": 0.32238266000000004,
"min": 1.28467295744,
"max": 1.4329041954400001
},
{
"command": "pacquet@main",
"mean": 1.3276052119400004,
"stddev": 0.06030879110087609,
"median": 1.32381277694,
"user": 0.6937816000000001,
"system": 0.32919425999999996,
"min": 1.2180138604400002,
"max": 1.4329243524400002
}
]
}Scenario: Cargo: repeat install, hot cache + hot storeFrozen repeat install of a Cargo workspace (
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.030943618331034466,
"stddev": 0.002713457472994319,
"median": 0.030292534400000005,
"user": 0.023054851724137924,
"system": 0.016194708965517248,
"min": 0.027682412400000002,
"max": 0.0445441274
},
{
"command": "pacquet@main",
"mean": 0.03215297213469388,
"stddev": 0.0025125346744219617,
"median": 0.03156965590000001,
"user": 0.023781759183673458,
"system": 0.017011266122448975,
"min": 0.027946332400000003,
"max": 0.042360596400000006
}
]
} |
8c51510 to
9f1dddf
Compare
339fcf1 to
764228e
Compare
9f1dddf to
d00e0e1
Compare
764228e to
a410d70
Compare
a47456c to
fda88ab
Compare
a410d70 to
afb829e
Compare
fda88ab to
ad8dae1
Compare
afb829e to
257fd96
Compare
This comment has been minimized.
This comment has been minimized.
257fd96 to
70d6df2
Compare
0bc3e52 to
e1ededc
Compare
70d6df2 to
ba5e3a3
Compare
This comment has been minimized.
This comment has been minimized.
ba5e3a3 to
090bfb1
Compare
e1ededc to
a4a9303
Compare
090bfb1 to
e94b0b5
Compare
a4a9303 to
2c444ee
Compare
e94b0b5 to
aafc1a7
Compare
5fe5144 to
e14cc6b
Compare
08bf58d to
dd75a74
Compare
e14cc6b to
817b252
Compare
dd75a74 to
9964d53
Compare
03715de to
ae221cc
Compare
db41ff7 to
65c1dbc
Compare
ae221cc to
92f7d71
Compare
65c1dbc to
63c0955
Compare
1545499 to
cab8b8c
Compare
63c0955 to
88fcffa
Compare
cab8b8c to
efadc9b
Compare
pnpr links libsql's SQLite for the embedded replica, and rusqlite brought a second bundled SQLite that defines the same symbols. The build linked only while libsql's archive came first on the link line, so pnpr-libsql loaded pnpr-error ahead of libsql to keep that order, and rusqlite, built against SQLite 3.51 headers, then ran on libsql's 3.45 code. Every crate that used rusqlite now uses libsql-rusqlite, rusqlite's API over libsql's SQLite, from the same libsql revision. That includes pnpm-store-dir, whose store index pnpr's resolver opens, so rusqlite and libsqlite3-sys leave the dependency graph and pnpr-libsql drops its link-order workaround. The fork has no `Connection::total_changes`, so the store-index tests read `total_changes()` through SQL. libsql-ffi applies WASI flags only for the `wasm32-wasi` target, so the wasm builds pass the flags rusqlite's build added for every WASI target through `LIBSQLITE3_FLAGS`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
efadc9b to
d0e8bd5
Compare
|
Status: the stack below has merged, and this PR now targets Whether the pnpm CLI's store index moves to libsql's SQLite. Single SQLite in pnpr needs
Everything else is done: Rust CI and TS CI pass on all three platforms at d0e8bd5, rusqlite and libsqlite3-sys are out of Written by an agent (Claude Code, claude-opus-5-5). |
|
Parked as a draft. This works, but moving everything onto one SQLite costs the pnpm CLI more than it gains pnpr:
pnpr links today through the documented dependency-order workaround in Revisit this when one of these happens:
Written by an agent (Claude Code, claude-opus-5-5). |
|
Closing. The problem is still on main, but this approach now costs more than when it was parked:
Duplicate SQLite symbols already fail the link in Rust CI, as they did on #18278. A one-SQLite binary check would only repeat that, so none is added. This is tracked for a revisit if libsql rebases onto a current SQLite, pnpr stops opening the store index through rusqlite, or the current workaround breaks. Written by an agent (Claude Code, claude-opus-5-5). |
Summary
Follow-up to the SQL metadata stack (#17577, #17578, #17580, #17583, #17585, all merged). Related to pnpm/tasks#244.
pnpr links libsql's SQLite (
libsql-ffi, SQLite 3.45.1 with libsql's changes) for the embedded replica. rusqlite brought a second bundled SQLite (libsqlite3-sys, 3.51.3) that defines the samesqlite3_*symbols. A build linked only while libsql's archive came first on the link line, which is whypnpr-libsqlloadedpnpr-error(and the rusqlite itsserverfeature brings) ahead of libsql. In the linked pnpr binary, rusqlite, compiled against 3.51.3 headers, already ran on libsql's 3.45.1 code.This PR makes
libsql-rusqlite, rusqlite's API over libsql's SQLite from the same libsql revision, the only SQLite crate in the workspace:pnpr-error,pnpr-auth,pnpr-storage, andpnpruselibsql-rusqlite. Its library is namedrusqlite, so no source changes.pnpm-store-dirmoves too. pnpr's resolver opens aStoreDir, so its store index is in pnpr's binary. With only the pnpr crates moved, the pnpr binary pulls both SQLite objects and fails on duplicate symbols.rusqliteandlibsqlite3-sysleaveCargo.lock, andpnpr-libsqldrops its link-order workaround. The pnpr binary contains one SQLite source id.Connection::total_changes, so the store-index tests readtotal_changes()through SQL.libsql-ffiapplies WASI flags only for thewasm32-wasitarget. The wasm builds pass the flags rusqlite's build added for every WASI target throughLIBSQLITE3_FLAGS(pnpm/wasm/sqlite-flags.mjs).Open: this changes the pnpm CLI's SQLite
Because
pnpm-store-diris shared, the pnpm CLI's store index moves from SQLite 3.51.3 to libsql's 3.45.1 fork. That needs a decision before this leaves draft:mmap, which upstream SQLite compiles out under WASI. The flags above are not enough;bundled/src/sqlite3.cfails onPROT_READ/MAP_SHARED. Fixing it needs a change to libsql-ffi in the pnpm/libsql fork.LIBSQL_CHECKPOINT_ONLY_FULL, which aborts a checkpoint unless it can checkpoint the whole WAL. A reader holding an old snapshot blocks autocheckpoints, so the store index's WAL can grow under concurrent installs.The alternatives keep the pnpm CLI on rusqlite but do not give pnpr a single SQLite: a
pnpm-store-dirfeature that picks its SQLite crate is unified on in every workspace-wide build, which puts both SQLite archives back into those test binaries.Squash Commit Body
Checklist
already linked to it solves it.
pnpm changeset) if this PR changes any publishedpackage. Keep it short and written for pnpm users — it becomes a release note.
Tests:
pnpm test:rustover everypnpr-*crate pluspnpm-registry-mockandpnpm-store-dir(2129 passed). Rust CI and TS CI pass on all three platforms; only the WebContainers job, which builds pnpm for wasm, fails, as described above.pnpm/wasm/build.mjs --checkwith WASI SDK 34 fails in libsql-ffi as described above. No changeset yet: whether the pnpm CLI's SQLite change needs a release note depends on the open decision.Written by an agent (Claude Code, claude-opus-5-5).
🤖 Generated with Claude Code