Repository navigation
refactor: limit Rust source files to 400 lines and tests to 800 - #14804
Conversation
Split production modules by responsibility and tests by scenario across pnpm and pnpr. Preserve APIs and test binaries, extract Node signing keys into data assets, and update imports and documentation links. Related to #14562.
|
Too many files changed for review (1319 files, 100 file limit). |
|
Important Review skippedToo many files! This PR contains 1316 files, which is 1016 over the limit of 300. To get a review, reduce the PR to 300 files or fewer by splitting it into smaller PRs or changing its base branch. Usage-priced reviews support at most 300 files. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (1316)
You can disable this status message by setting the |
PR Summary by QodoSplit Rust modules and tests to enforce file-length limits
AI Description
Diagram
High-Level Assessment
Files changed (115)
|
Micro-Benchmark ResultsLinux |
Qualify the error kind in the extracted directory-sync fallback. Explicitly discard debug-only workspace resolution options in release builds.
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Import Unix-only atomics in the workspace-directory module that uses them. Restrict the Windows test helper import to tests and remove a stale metadata trait import.
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #14804 +/- ##
==========================================
+ Coverage 90.78% 90.80% +0.02%
==========================================
Files 801 1236 +435
Lines 159560 160132 +572
==========================================
+ Hits 144852 145408 +556
- Misses 14708 14724 +16 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Code Review by Qodo
1. Registry package ships without a bump
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Match imports to existing Unix-only test and fixture conditions. Restore the Windows rollback test's PathBuf import and remove stale platform-specific parent imports.
|
Code review by qodo was updated up to the latest commit 1c9d862 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Integrated-Benchmark Report (Linux)Commit: Regular scenarios report direct and pnpr installs. The peer-heavy resolver scenario compares current Rust, main Rust, and TypeScript pnpm. 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.72647450932,
"stddev": 0.17184641156738695,
"median": 2.69954694142,
"user": 2.29172196,
"system": 2.3275818200000002,
"min": 2.46760966142,
"max": 3.02014557242
},
{
"command": "pacquet@main",
"mean": 2.67996295002,
"stddev": 0.09173302138158922,
"median": 2.68815784342,
"user": 2.24839286,
"system": 2.20496842,
"min": 2.54524109542,
"max": 2.82876675142
},
{
"command": "pnpr@HEAD",
"mean": 1.51511069372,
"stddev": 0.1139308984629318,
"median": 1.50798215442,
"user": 1.7417417599999996,
"system": 1.8591202199999999,
"min": 1.3361085204199998,
"max": 1.68290975442
},
{
"command": "pnpr@main",
"mean": 1.53242232922,
"stddev": 0.13926632795421115,
"median": 1.4889704954199998,
"user": 1.9125731600000002,
"system": 2.0416310199999996,
"min": 1.38725089542,
"max": 1.82179547942
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.33440607604000006,
"stddev": 0.03158779179201512,
"median": 0.3437537070400001,
"user": 0.39043676,
"system": 0.71802398,
"min": 0.27815033604000006,
"max": 0.37260318304000006
},
{
"command": "pacquet@main",
"mean": 0.3341479995400001,
"stddev": 0.04248322909138725,
"median": 0.32819301154,
"user": 0.3619038600000001,
"system": 0.7697779799999999,
"min": 0.26600603404000006,
"max": 0.41732235904000003
},
{
"command": "pnpr@HEAD",
"mean": 0.35551462514000004,
"stddev": 0.03185945916001366,
"median": 0.35180402554000006,
"user": 0.37169906,
"system": 0.7617455799999998,
"min": 0.30752675404,
"max": 0.40735010004000005
},
{
"command": "pnpr@main",
"mean": 0.32536886374000007,
"stddev": 0.026518898521541837,
"median": 0.32384144354,
"user": 0.34422846,
"system": 0.7147309799999999,
"min": 0.28880024404000004,
"max": 0.37093412804000003
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.007488784083765694,
"stddev": 0.0008515405019881302,
"median": 0.007328236180000001,
"user": 0.004503961422594143,
"system": 0.003521965857740586,
"min": 0.006001986180000001,
"max": 0.01126212218
},
{
"command": "pacquet@main",
"mean": 0.0062888586325139635,
"stddev": 0.0005405061650218623,
"median": 0.006187629680000001,
"user": 0.003869972513966481,
"system": 0.002872370167597765,
"min": 0.00538990718,
"max": 0.009764191180000001
},
{
"command": "pnpr@HEAD",
"mean": 0.006678470354242429,
"stddev": 0.0014983251524507877,
"median": 0.00612820868,
"user": 0.003989742222222219,
"system": 0.003120031818181817,
"min": 0.005381892180000001,
"max": 0.015084069180000001
},
{
"command": "pnpr@main",
"mean": 0.011972939626215139,
"stddev": 0.002210227175179488,
"median": 0.011742795180000001,
"user": 0.006960251075697212,
"system": 0.005701828685258962,
"min": 0.00718598918,
"max": 0.01884695318
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.006945341051260513,
"stddev": 0.0010293686974123953,
"median": 0.006638169400000001,
"user": 0.0043940658823529415,
"system": 0.0029463473949579828,
"min": 0.0057801869,
"max": 0.0125219089
},
{
"command": "pacquet@main",
"mean": 0.0082105645790831,
"stddev": 0.001033343551995022,
"median": 0.0083027259,
"user": 0.004723832779369625,
"system": 0.003975151747851003,
"min": 0.005884793900000001,
"max": 0.0105179159
},
{
"command": "pnpr@HEAD",
"mean": 0.007027596657679185,
"stddev": 0.0007599343275214547,
"median": 0.007007691900000001,
"user": 0.004156046006825939,
"system": 0.0032771201365187725,
"min": 0.005767263900000001,
"max": 0.0097621369
},
{
"command": "pnpr@main",
"mean": 0.007877780979881649,
"stddev": 0.0011926427430098475,
"median": 0.0080701579,
"user": 0.004784605562130175,
"system": 0.003580692781065088,
"min": 0.005710926900000001,
"max": 0.0106503649
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.90602863908,
"stddev": 0.17977964304286415,
"median": 2.86290614548,
"user": 2.8854774199999995,
"system": 2.3696498799999994,
"min": 2.6875200064800002,
"max": 3.24105242248
},
{
"command": "pacquet@main",
"mean": 2.9812845379799997,
"stddev": 0.2250261448450974,
"median": 2.96675818248,
"user": 2.9902842199999995,
"system": 2.3922053799999996,
"min": 2.67511744148,
"max": 3.28154702448
},
{
"command": "pnpr@HEAD",
"mean": 1.6014780368800001,
"stddev": 0.11063304707720242,
"median": 1.6225178369800002,
"user": 1.5561977200000001,
"system": 1.7718476799999998,
"min": 1.44328321648,
"max": 1.7759560704800001
},
{
"command": "pnpr@main",
"mean": 1.7126434336799998,
"stddev": 0.12089094794584748,
"median": 1.68860746998,
"user": 1.84655602,
"system": 2.1731250799999997,
"min": 1.5395395144800001,
"max": 1.9469977624800001
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.34699932126,
"stddev": 0.04457824702959682,
"median": 0.32783756246,
"user": 0.5221699799999999,
"system": 0.8339443599999999,
"min": 0.30900250696,
"max": 0.43805570196
},
{
"command": "pacquet@main",
"mean": 0.34203197775999994,
"stddev": 0.022242299769670335,
"median": 0.33811013096,
"user": 0.5301117799999999,
"system": 0.7985834599999999,
"min": 0.31351366896,
"max": 0.37671506896
},
{
"command": "pnpr@HEAD",
"mean": 0.29577950736,
"stddev": 0.03388061490045793,
"median": 0.28930028346000003,
"user": 0.24673277999999996,
"system": 0.5174045599999999,
"min": 0.26329192696,
"max": 0.37703512496
},
{
"command": "pnpr@main",
"mean": 0.29632004236,
"stddev": 0.03227675915789343,
"median": 0.30925550296000004,
"user": 0.23905607999999998,
"system": 0.5463144599999998,
"min": 0.24593645696000002,
"max": 0.33552645596
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.81945711546,
"stddev": 0.07600840596794968,
"median": 1.81414971596,
"user": 1.36256348,
"system": 1.26570674,
"min": 1.72040438096,
"max": 1.93953112796
},
{
"command": "pacquet@main",
"mean": 1.84324931336,
"stddev": 0.08756067094126607,
"median": 1.8660864529599999,
"user": 1.39790628,
"system": 1.2401707400000002,
"min": 1.72465636496,
"max": 1.94617225396
},
{
"command": "pnpr@HEAD",
"mean": 0.37596006855999997,
"stddev": 0.03702101911003372,
"median": 0.36172355996000005,
"user": 0.33690158,
"system": 0.6446970399999999,
"min": 0.34083491696,
"max": 0.44405487296
},
{
"command": "pnpr@main",
"mean": 0.38857780646,
"stddev": 0.02604911882295314,
"median": 0.37675960046,
"user": 0.36200418,
"system": 0.6894362400000001,
"min": 0.36071716596000003,
"max": 0.43754463096
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.31167225086000006,
"stddev": 0.02895723034867947,
"median": 0.30421691526000005,
"user": 0.34004310000000004,
"system": 0.12353104,
"min": 0.27454355226000005,
"max": 0.3573878722600001
},
{
"command": "pacquet@main",
"mean": 0.31672376386000006,
"stddev": 0.03364311498606632,
"median": 0.31245385526,
"user": 0.34322210000000003,
"system": 0.12591623999999996,
"min": 0.28005426426,
"max": 0.37562842126000007
},
{
"command": "pnpr@HEAD",
"mean": 0.11301964039043477,
"stddev": 0.006729649999364525,
"median": 0.11165635426000001,
"user": 0.053181130434782606,
"system": 0.02276434434782609,
"min": 0.09935044626,
"max": 0.12400819526000001
},
{
"command": "pnpr@main",
"mean": 0.11030294122153846,
"stddev": 0.004471638958928554,
"median": 0.10876388826,
"user": 0.05220646153846153,
"system": 0.019743463076923075,
"min": 0.10117763326,
"max": 0.11861850326000001
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.6995309547977777,
"stddev": 0.09649862693431284,
"median": 0.7309738600200001,
"user": 0.7141351222222221,
"system": 0.17258143555555558,
"min": 0.55288639202,
"max": 0.8146086840200001
},
{
"command": "pacquet@main",
"mean": 0.7583628593533334,
"stddev": 0.03410273184886981,
"median": 0.7540362850200001,
"user": 0.8001461222222221,
"system": 0.15362988,
"min": 0.71091018902,
"max": 0.8031107500200001
},
{
"command": "pnpm@HEAD",
"mean": 3.5625883339088893,
"stddev": 0.4576220821112634,
"median": 3.49783206102,
"user": 5.594053122222223,
"system": 0.2607722133333333,
"min": 3.05154760402,
"max": 4.62738461802
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.97386162744,
"stddev": 0.3538139558250065,
"median": 4.92270697904,
"user": 2.5165193400000003,
"system": 2.31077522,
"min": 4.49130253054,
"max": 5.51106297954
},
{
"command": "pacquet@main",
"mean": 4.93103303064,
"stddev": 0.18794316990119364,
"median": 4.93227507854,
"user": 2.57369734,
"system": 2.3644217199999993,
"min": 4.62554772554,
"max": 5.22713965154
},
{
"command": "pnpr@HEAD",
"mean": 3.69106900514,
"stddev": 0.15705477815496102,
"median": 3.63917685704,
"user": 2.10751874,
"system": 2.1049705199999997,
"min": 3.51109438454,
"max": 4.03181598454
},
{
"command": "pnpr@main",
"mean": 3.61419476624,
"stddev": 0.15997185719516424,
"median": 3.56495428104,
"user": 1.8626519399999997,
"system": 1.9156266199999998,
"min": 3.41826817154,
"max": 3.9168571975399997
}
]
}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.13711942054500004,
"stddev": 0.008104363824848181,
"median": 0.13788749992000002,
"user": 0.1733549875,
"system": 0.16341069249999998,
"min": 0.12503684892000003,
"max": 0.15190166692
},
{
"command": "pacquet@main",
"mean": 0.14549827492,
"stddev": 0.012263973734392907,
"median": 0.14372101692000003,
"user": 0.17404650588235293,
"system": 0.18221635058823527,
"min": 0.12689883492,
"max": 0.16924039692000004
},
{
"command": "pnpr@HEAD",
"mean": 0.1506462976075,
"stddev": 0.007531540991817368,
"median": 0.14958919292,
"user": 0.17565236250000002,
"system": 0.16720938000000002,
"min": 0.13928357692,
"max": 0.16622473492000003
},
{
"command": "pnpr@main",
"mean": 0.15677926342000004,
"stddev": 0.011295259709883739,
"median": 0.15229179842,
"user": 0.18466218888888888,
"system": 0.1781570466666667,
"min": 0.14251123192,
"max": 0.18261410792000002
}
]
} |
…14807) Give wildcard matching and GitHub Actions dependency handling independent crate boundaries. Preserve config's matcher reexport and keep CLI opt-in policy separate from workflow processing. Replace duplicate literal-star matchers in global listing and versioning with the shared compiled matcher, preserving each caller's negation and empty-selector behavior. Remove configuration from workspace filtering's production dependency graph and move YAML dependencies out of the CLI. Validate planned workflow edits against freshly read action text after asynchronous Git lookups. Reject stale ranges without overwriting the changed workflow. Redact homepage credentials and restrict GitHub server URLs to HTTPS or loopback HTTP in both CLI versions, with regression tests and a shared release note. Follow-up to #14804.
…#14804) Split Rust production modules and test suites across the repository to keep production files within 400 code lines and test files within 800. Group modules by responsibility and test scenarios while retaining public APIs and existing test binaries. Move Node release public keys into individual data assets and update their generator. Preserve key bytes, fingerprints, and ordering. Update module imports, documentation links, and snapshot locations after extraction. Document the limits and verify them with the proposed upstream rule's lexer without depending on an unmerged lint. Related to pnpm#14562.
…npm#14807) Give wildcard matching and GitHub Actions dependency handling independent crate boundaries. Preserve config's matcher reexport and keep CLI opt-in policy separate from workflow processing. Replace duplicate literal-star matchers in global listing and versioning with the shared compiled matcher, preserving each caller's negation and empty-selector behavior. Remove configuration from workspace filtering's production dependency graph and move YAML dependencies out of the CLI. Validate planned workflow edits against freshly read action text after asynchronous Git lookups. Reject stale ranges without overwriting the changed workflow. Redact homepage credentials and restrict GitHub server URLs to HTTPS or loopback HTTP in both CLI versions, with regression tests and a shared release note. Follow-up to pnpm#14804.
…#14804) Split Rust production modules and test suites across the repository to keep production files within 400 code lines and test files within 800. Group modules by responsibility and test scenarios while retaining public APIs and existing test binaries. Move Node release public keys into individual data assets and update their generator. Preserve key bytes, fingerprints, and ordering. Update module imports, documentation links, and snapshot locations after extraction. Document the limits and verify them with the proposed upstream rule's lexer without depending on an unmerged lint. Related to pnpm#14562.
…npm#14807) Give wildcard matching and GitHub Actions dependency handling independent crate boundaries. Preserve config's matcher reexport and keep CLI opt-in policy separate from workflow processing. Replace duplicate literal-star matchers in global listing and versioning with the shared compiled matcher, preserving each caller's negation and empty-selector behavior. Remove configuration from workspace filtering's production dependency graph and move YAML dependencies out of the CLI. Validate planned workflow edits against freshly read action text after asynchronous Git lookups. Reject stale ranges without overwriting the changed workflow. Redact homepage credentials and restrict GitHub server URLs to HTTPS or loopback HTTP in both CLI versions, with regression tests and a shared release note. Follow-up to pnpm#14804.
Summary
Split Rust source files across pnpm and pnpr into cohesive modules, with a maximum of 400 code lines for production files and 800 for test files. Preserve public APIs, behavior, and existing test binaries while grouping tests by scenario.
Counts exclude blank and comment-only lines and include multiline string contents. All Rust files were checked with the lexer from the proposed upstream
overly_long_filerule. This PR documents the limits; enabling the lint remains pending its upstream merge.Node release public keys now live in individual
.ascassets, with their bytes and ordering preserved. The key-update generator writes these assets.Related to #14562.
Validation:
just ready: 11,109 tests passed, 13 existing tests skipped; formatting, Clippy, and other checks passed.No changeset: this is an internal, behavior-preserving refactor, exempt under the review guide.
Squash Commit Body
Checklist
Written by an agent (Codex, GPT-6).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.