Repository navigation
test(workspace): check dot-directory pruning on the walk the CLI uses - #16254
Conversation
The dot-pruning unit tests called discovery with no managed directories, so they only exercised the prebuilt ignore template. The CLI always passes managed directories, which sends every walk through the rebuilt ignore list instead. #15262 dropped the dot-component pattern from that list and every test still passed, which is how #16250 shipped in 12.7.0. find_project_names now discovers with and without a managed directory and asserts both give the same projects, so every case that goes through it covers both ignore lists. Both lists are now built by compile_walk_ignores, so the rule that adds the dot-component pattern lives in one place. A CLI test runs `pnpm -r run` over a `**` workspace with a project under `.cache`. Reverting #16252 fails the CLI test and the existing dot-pruning unit tests. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: pnpm/pnpm/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review. 📝 WalkthroughWalkthroughThe change centralizes workspace walk-ignore construction and adds workspace and CLI tests for project discovery when dot directories and managed directories are involved. ChangesWorkspace project discovery
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Suggested labels: Merge Risk: ⚪ Minimal · up to The ignore-list change and its discovery tests present no identified merge-blocking risk; merge after normal checks. ✨ 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 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16254 +/- ##
==========================================
- Coverage 92.09% 92.09% -0.01%
==========================================
Files 1489 1489
Lines 201065 201068 +3
==========================================
+ Hits 185173 185175 +2
- Misses 15892 15893 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
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; the linked-workspace scenario compares 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.4504733550599997,
"stddev": 0.1304608429682913,
"median": 2.38509802096,
"user": 1.66188082,
"system": 1.8574558199999998,
"min": 2.31881033646,
"max": 2.74392811246
},
{
"command": "pacquet@main",
"mean": 2.46923946176,
"stddev": 0.14330029466255392,
"median": 2.41895952946,
"user": 1.5619031199999998,
"system": 1.8027628199999994,
"min": 2.31297471146,
"max": 2.66934775546
},
{
"command": "pnpr@HEAD",
"mean": 1.47687968736,
"stddev": 0.14238993285121315,
"median": 1.4437204444599998,
"user": 1.3897720199999999,
"system": 1.67651662,
"min": 1.33540102146,
"max": 1.70458453046
},
{
"command": "pnpr@main",
"mean": 1.49702420066,
"stddev": 0.15095898221109216,
"median": 1.4839765254600001,
"user": 1.30632602,
"system": 1.6168066199999998,
"min": 1.33468933246,
"max": 1.70438440146
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.23451184768000002,
"stddev": 0.005841928284055605,
"median": 0.23724438938000003,
"user": 0.24842244000000005,
"system": 0.58544208,
"min": 0.22003733238000003,
"max": 0.23955713538000004
},
{
"command": "pacquet@main",
"mean": 0.28549919747999997,
"stddev": 0.08120215533537185,
"median": 0.23451939538000002,
"user": 0.30628464,
"system": 0.69393158,
"min": 0.21066246938000002,
"max": 0.40999102238
},
{
"command": "pnpr@HEAD",
"mean": 0.24989428648,
"stddev": 0.0049324008618506065,
"median": 0.25036158387999996,
"user": 0.26400684,
"system": 0.59551668,
"min": 0.23907502438000003,
"max": 0.25694994338
},
{
"command": "pnpr@main",
"mean": 0.24809369898000005,
"stddev": 0.011633722980137881,
"median": 0.25012963838,
"user": 0.24985544,
"system": 0.5920619799999998,
"min": 0.22147211438000003,
"max": 0.26397608538
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.008247474579783394,
"stddev": 0.0010210152616517518,
"median": 0.0080373208,
"user": 0.004919939061371837,
"system": 0.003745056317689528,
"min": 0.0068059898,
"max": 0.0128506728
},
{
"command": "pacquet@main",
"mean": 0.009020831476012462,
"stddev": 0.0008192500861144725,
"median": 0.009005457800000002,
"user": 0.005193849719626164,
"system": 0.004325304049844238,
"min": 0.0073456528,
"max": 0.012877537800000002
},
{
"command": "pnpr@HEAD",
"mean": 0.008810007135793363,
"stddev": 0.000806953341056191,
"median": 0.0087319488,
"user": 0.005217242656826571,
"system": 0.004078873062730627,
"min": 0.007293244800000001,
"max": 0.0122737138
},
{
"command": "pnpr@main",
"mean": 0.008361187295652177,
"stddev": 0.0008160896075931891,
"median": 0.0082017718,
"user": 0.0048220295652173905,
"system": 0.004005034782608696,
"min": 0.0070410408,
"max": 0.011640834800000001
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.010343353859090913,
"stddev": 0.00297942929983169,
"median": 0.0089147718,
"user": 0.005587686363636363,
"system": 0.00537272290909091,
"min": 0.0077064323,
"max": 0.0223505293
},
{
"command": "pacquet@main",
"mean": 0.015050785860000002,
"stddev": 0.003299549472330537,
"median": 0.0149068033,
"user": 0.007824696,
"system": 0.008079863679999999,
"min": 0.009952505300000001,
"max": 0.028433445300000002
},
{
"command": "pnpr@HEAD",
"mean": 0.01652714588787879,
"stddev": 0.0031453289724248314,
"median": 0.0160193583,
"user": 0.008979951515151519,
"system": 0.008457396848484849,
"min": 0.0111262783,
"max": 0.027293001300000005
},
{
"command": "pnpr@main",
"mean": 0.015340398549999999,
"stddev": 0.0038131560697613667,
"median": 0.0150546103,
"user": 0.007475717741935481,
"system": 0.008793072258064515,
"min": 0.0086447443,
"max": 0.030933754300000005
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.52969667552,
"stddev": 0.06945680013898431,
"median": 2.50143379752,
"user": 1.86839758,
"system": 1.5600606999999997,
"min": 2.4802778175199998,
"max": 2.7156564185199996
},
{
"command": "pacquet@main",
"mean": 2.5065826750199998,
"stddev": 0.01885786439472662,
"median": 2.4998149985199998,
"user": 1.7472684800000002,
"system": 1.5019478999999998,
"min": 2.4845489555199998,
"max": 2.54198399452
},
{
"command": "pnpr@HEAD",
"mean": 1.5119399662200002,
"stddev": 0.11443040972549463,
"median": 1.4749230505200002,
"user": 1.06404758,
"system": 1.1771079,
"min": 1.39703063652,
"max": 1.7747644105200002
},
{
"command": "pnpr@main",
"mean": 1.5284444118200002,
"stddev": 0.12375671582169295,
"median": 1.53926360452,
"user": 1.0509047800000002,
"system": 1.1814469,
"min": 1.3998470115200001,
"max": 1.7363496575200001
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.49399153094,
"stddev": 0.037744621855934024,
"median": 0.49229239814000003,
"user": 0.68841158,
"system": 0.7388848199999999,
"min": 0.44575260964,
"max": 0.57851116264
},
{
"command": "pacquet@main",
"mean": 0.49589575844,
"stddev": 0.021178464898686373,
"median": 0.49427498664,
"user": 0.6692980799999999,
"system": 0.7562440199999999,
"min": 0.47208361364,
"max": 0.53183712464
},
{
"command": "pnpr@HEAD",
"mean": 0.30606977644,
"stddev": 0.009297320823703584,
"median": 0.30800305214,
"user": 0.25823678,
"system": 0.60507802,
"min": 0.28835023664000003,
"max": 0.31880651364
},
{
"command": "pnpr@main",
"mean": 0.29842408894,
"stddev": 0.010431556301436664,
"median": 0.29970521714,
"user": 0.24969048000000002,
"system": 0.56730252,
"min": 0.28331439964,
"max": 0.31669921464
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.6258693340600001,
"stddev": 0.020235375258391877,
"median": 1.63331237916,
"user": 0.8274035599999999,
"system": 0.83351884,
"min": 1.59463634466,
"max": 1.65079138866
},
{
"command": "pacquet@main",
"mean": 1.62324067156,
"stddev": 0.02275533619188159,
"median": 1.6196606181600002,
"user": 0.8610197599999999,
"system": 0.8106955399999999,
"min": 1.58212464366,
"max": 1.65287904266
},
{
"command": "pnpr@HEAD",
"mean": 0.29766718395999997,
"stddev": 0.008970415970153417,
"median": 0.29766582516000006,
"user": 0.25366626000000003,
"system": 0.5717468400000001,
"min": 0.28474360766,
"max": 0.31000995866000003
},
{
"command": "pnpr@main",
"mean": 0.28843168086000004,
"stddev": 0.006404441881544278,
"median": 0.28751410116000004,
"user": 0.23370075999999998,
"system": 0.5593058399999999,
"min": 0.28220037466000003,
"max": 0.30110278466
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.2499767049466667,
"stddev": 0.012274171451519619,
"median": 0.24810560728000003,
"user": 0.24557061666666666,
"system": 0.08780359,
"min": 0.22841226228000003,
"max": 0.27510679528000004
},
{
"command": "pacquet@main",
"mean": 0.2509846369163636,
"stddev": 0.023040859648560168,
"median": 0.25436122528,
"user": 0.24064247272727268,
"system": 0.08103093090909091,
"min": 0.20457610428,
"max": 0.28958494428000003
},
{
"command": "pnpr@HEAD",
"mean": 0.09349322001333336,
"stddev": 0.002136091730547958,
"median": 0.09369358878,
"user": 0.03390016666666666,
"system": 0.015472439999999995,
"min": 0.08791154328,
"max": 0.09678951228
},
{
"command": "pnpr@main",
"mean": 0.09258251992516131,
"stddev": 0.0030413176504727195,
"median": 0.09210920028000001,
"user": 0.032063425806451606,
"system": 0.01651232387096774,
"min": 0.08665414428000001,
"max": 0.10203157028000001
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.0379601934422222,
"stddev": 0.10951183949751418,
"median": 1.07417620922,
"user": 1.075317168888889,
"system": 0.3245633511111111,
"min": 0.82835856722,
"max": 1.16422003822
},
{
"command": "pacquet@main",
"mean": 1.0266773532200002,
"stddev": 0.15739805242832605,
"median": 1.0922293842200002,
"user": 1.0830619466666667,
"system": 0.34753924,
"min": 0.67860341822,
"max": 1.15458920422
},
{
"command": "pnpm@HEAD",
"mean": 3.2951183555533334,
"stddev": 0.08334419835799005,
"median": 3.29354404022,
"user": 4.9324789466666665,
"system": 0.23035768444444443,
"min": 3.18333926922,
"max": 3.46858004022
}
]
}Scenario: Isolated linker: linked-workspace resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.19034764723333333,
"stddev": 0.005696355087817445,
"median": 0.18806619630000002,
"user": 0.14432535999999999,
"system": 0.08021831333333333,
"min": 0.1834742153,
"max": 0.20057412630000002
},
{
"command": "pacquet@main",
"mean": 0.1910770556125,
"stddev": 0.005509428311127265,
"median": 0.19287059780000002,
"user": 0.15511626,
"system": 0.07140737999999999,
"min": 0.18082768230000001,
"max": 0.2002976673
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.477375182379999,
"stddev": 0.12509544896773608,
"median": 4.48129732658,
"user": 1.4141876,
"system": 1.3718750400000002,
"min": 4.33051134358,
"max": 4.6766043355799995
},
{
"command": "pacquet@main",
"mean": 4.436873436079999,
"stddev": 0.18428878409555938,
"median": 4.33623806708,
"user": 1.3715794,
"system": 1.3312055399999996,
"min": 4.285625394579999,
"max": 4.717831278579999
},
{
"command": "pnpr@HEAD",
"mean": 3.4618915890799995,
"stddev": 0.10506220472980568,
"median": 3.43083348408,
"user": 1.2903784999999999,
"system": 1.2939009399999999,
"min": 3.36557696258,
"max": 3.66034481658
},
{
"command": "pnpr@main",
"mean": 3.5043104132800003,
"stddev": 0.13287030072093606,
"median": 3.48357704958,
"user": 1.2488465000000002,
"system": 1.31064524,
"min": 3.37546324358,
"max": 3.76877668858
}
]
}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.1233994489325,
"stddev": 0.006697926451080886,
"median": 0.12235276162000001,
"user": 0.1548077175,
"system": 0.13604465249999997,
"min": 0.11683836412000001,
"max": 0.14463574512000002
},
{
"command": "pacquet@main",
"mean": 0.12290567207238096,
"stddev": 0.004360294292023298,
"median": 0.12371050912,
"user": 0.1492638276190476,
"system": 0.13792343523809522,
"min": 0.11450013512000001,
"max": 0.13206998712
},
{
"command": "pnpr@HEAD",
"mean": 0.13498070306444443,
"stddev": 0.0061152746737954435,
"median": 0.13360476212,
"user": 0.15879105777777777,
"system": 0.1400824511111111,
"min": 0.12530390912,
"max": 0.15224270412000002
},
{
"command": "pnpr@main",
"mean": 0.13125105722526317,
"stddev": 0.003668270078114414,
"median": 0.13166694012000002,
"user": 0.16038978,
"system": 0.13639923473684212,
"min": 0.12495395312000002,
"max": 0.13737527212
}
]
} |
PR Summary by QodoCover dot-directory pruning on managed workspace walks
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo
1. A test comment misstates unit coverage
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Summary
Follow-up to #16252. The dot-pruning unit tests called discovery with no managed directories, so they only exercised the prebuilt ignore template. The CLI always passes managed directories, which sends every walk through the rebuilt ignore list. #15262 dropped the dot-component pattern from that list with every test still green, and #16250 shipped in 12.7.0.
find_project_names(the helper behind the dot-pruning, negation and symlink unit tests) now discovers with and without a managed directory and asserts both agree.compile_walk_ignores, so the rule that addsDOT_COMPONENT_IGNORE_PATTERNlives in one place.recursive_run_skips_projects_under_dot_directories:pnpm -r run buildoverpackages: ['**']must not run a project under.cache.Verified by reverting the fix from #16252: the CLI test,
non_terminal_star_does_not_match_dotted_directories,normalizes_literal_and_glob_patternsand the test from #16252 fail (nextest stopped at the first failures). With the fix,pnpm-workspaceand therun_recursivesuite pass (225 tests), and scoped clippy, dylint and rustfmt are clean.No changeset: no user-visible change.
Squash Commit Body
Checklist
Written by an agent (Claude Code, claude-opus-5-5).
🤖 Generated with Claude Code
Summary by CodeRabbit
.cache.node_modulesis ignored during project discovery.