Repository navigation
Conversation
|
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 (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe workspace manifest writer now detects sequence indentation and uses it when rendering updated sequences. Exclude-list pruning and appending have test coverage for indentation variants and YAML document boundaries. A CLI regression test checks pruning with a zero-indented exclude list. ChangesWorkspace manifest sequence indentation
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~12 minutes Change: Bug fix · Severity of issue fixed: Medium Assessment against linked issues
Suggested labels: Merge Risk: ⚪ Minimal · up to The change preserves indentation for the covered pruning and append paths, with no actionable merge risk identified. ✨ 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✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #15580 +/- ##
=======================================
Coverage 91.83% 91.83%
=======================================
Files 1442 1442
Lines 194577 194645 +68
=======================================
+ Hits 178687 178757 +70
+ Misses 15890 15888 -2 ☔ 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.4375890483400005,
"stddev": 0.11370713510294626,
"median": 2.4450291702399998,
"user": 1.54676848,
"system": 1.44228832,
"min": 2.28403487874,
"max": 2.63397990674
},
{
"command": "pacquet@main",
"mean": 2.45216974274,
"stddev": 0.1414860324299063,
"median": 2.40121623724,
"user": 1.6835953799999999,
"system": 1.53861742,
"min": 2.3013197187400003,
"max": 2.6736149577400004
},
{
"command": "pnpr@HEAD",
"mean": 1.47371380734,
"stddev": 0.1336359250639517,
"median": 1.47656383774,
"user": 1.19631308,
"system": 1.21755202,
"min": 1.2846226927400002,
"max": 1.6731689367400002
},
{
"command": "pnpr@main",
"mean": 1.5100255318400002,
"stddev": 0.17409136321725383,
"median": 1.50152176724,
"user": 1.31325898,
"system": 1.3642130199999998,
"min": 1.30931651174,
"max": 1.7203964177400002
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.29551592168,
"stddev": 0.007216788591607696,
"median": 0.29660013558,
"user": 0.30865724,
"system": 0.7649151199999997,
"min": 0.28468919508,
"max": 0.30726731708
},
{
"command": "pacquet@main",
"mean": 0.28210124168,
"stddev": 0.008453152037823604,
"median": 0.28080161058,
"user": 0.30291094,
"system": 0.7539334199999999,
"min": 0.27225389408,
"max": 0.29316279308
},
{
"command": "pnpr@HEAD",
"mean": 0.37429200048,
"stddev": 0.08391489084846877,
"median": 0.32961171158,
"user": 0.38161133999999997,
"system": 0.9194714199999998,
"min": 0.29740952208,
"max": 0.5143415730800001
},
{
"command": "pnpr@main",
"mean": 0.31310056898000005,
"stddev": 0.009446880627059001,
"median": 0.31269781108,
"user": 0.31968714,
"system": 0.7925767199999999,
"min": 0.30271715308,
"max": 0.33342165708
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.010002577746130272,
"stddev": 0.0009913274520730602,
"median": 0.009995733340000002,
"user": 0.005743253793103448,
"system": 0.004938571800766288,
"min": 0.008053643340000001,
"max": 0.013226046340000002
},
{
"command": "pacquet@main",
"mean": 0.009731328419245289,
"stddev": 0.0006919643825002007,
"median": 0.009618007340000002,
"user": 0.005388270792452829,
"system": 0.005044622037735848,
"min": 0.00827365134,
"max": 0.012623509340000002
},
{
"command": "pnpr@HEAD",
"mean": 0.010125248214551975,
"stddev": 0.0009269085083070196,
"median": 0.009932934340000001,
"user": 0.005986424802867383,
"system": 0.004866957419354841,
"min": 0.008255631340000001,
"max": 0.013788145340000002
},
{
"command": "pnpr@main",
"mean": 0.009859610370508483,
"stddev": 0.001012883290885589,
"median": 0.00966554434,
"user": 0.005923243389830506,
"system": 0.004605154440677968,
"min": 0.00810114334,
"max": 0.013159219340000002
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.013201867599433979,
"stddev": 0.0021965759100542066,
"median": 0.012734563340000001,
"user": 0.007788858867924528,
"system": 0.0062325949056603784,
"min": 0.00904387234,
"max": 0.02254408834
},
{
"command": "pacquet@main",
"mean": 0.016284318427837844,
"stddev": 0.00407510360218778,
"median": 0.015500160340000001,
"user": 0.00946596162162162,
"system": 0.007645000810810812,
"min": 0.00973155134,
"max": 0.031924006340000005
},
{
"command": "pnpr@HEAD",
"mean": 0.018185737445263157,
"stddev": 0.005564630876152453,
"median": 0.01707137434,
"user": 0.009662366315789473,
"system": 0.009241167578947367,
"min": 0.009859390340000001,
"max": 0.036950355340000005
},
{
"command": "pnpr@main",
"mean": 0.012500825352500003,
"stddev": 0.0026496520432074764,
"median": 0.012330770340000002,
"user": 0.007915308749999999,
"system": 0.005381823750000002,
"min": 0.00790923634,
"max": 0.02482621634
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.73458254624,
"stddev": 0.11125245485367002,
"median": 2.69567806824,
"user": 2.5272928599999998,
"system": 2.2527440999999992,
"min": 2.60443901374,
"max": 2.8927865757399998
},
{
"command": "pacquet@main",
"mean": 2.7008670497400002,
"stddev": 0.06462122064146066,
"median": 2.67260360124,
"user": 2.523444659999999,
"system": 2.1333743000000003,
"min": 2.64878154074,
"max": 2.83204262274
},
{
"command": "pnpr@HEAD",
"mean": 1.64887016104,
"stddev": 0.13334232111459746,
"median": 1.65952530224,
"user": 1.46885166,
"system": 1.8021129999999999,
"min": 1.48931017174,
"max": 1.79810003974
},
{
"command": "pnpr@main",
"mean": 1.61161758654,
"stddev": 0.08198263332471226,
"median": 1.5973803207400001,
"user": 1.67223656,
"system": 1.8005657,
"min": 1.50518546074,
"max": 1.77973160774
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.6673387536800002,
"stddev": 0.10716345284325617,
"median": 0.6311560771800001,
"user": 0.9889273999999999,
"system": 1.0487856599999998,
"min": 0.5737885816800001,
"max": 0.9494078826800001
},
{
"command": "pacquet@main",
"mean": 0.5972370585800001,
"stddev": 0.055885161582197175,
"median": 0.5936147921800001,
"user": 0.8768182999999998,
"system": 0.95244276,
"min": 0.5310387246800001,
"max": 0.6813443636800001
},
{
"command": "pnpr@HEAD",
"mean": 0.3494998743800001,
"stddev": 0.010413015242084623,
"median": 0.34719337618,
"user": 0.3042573,
"system": 0.64651006,
"min": 0.33627599668,
"max": 0.36717241768000003
},
{
"command": "pnpr@main",
"mean": 0.36570070858000003,
"stddev": 0.03666073714609945,
"median": 0.35782111668000005,
"user": 0.32192879999999996,
"system": 0.65976696,
"min": 0.31166916168000003,
"max": 0.42534074168
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.78666027732,
"stddev": 0.0651205408606344,
"median": 1.7754726667200003,
"user": 1.20766422,
"system": 1.05354528,
"min": 1.70412905672,
"max": 1.9018162517200001
},
{
"command": "pacquet@main",
"mean": 1.7251009933200003,
"stddev": 0.06040939409805053,
"median": 1.7208430092200002,
"user": 1.0868861200000002,
"system": 0.91859158,
"min": 1.6428513297200003,
"max": 1.8556783207200003
},
{
"command": "pnpr@HEAD",
"mean": 0.34328867152000003,
"stddev": 0.017939694699729926,
"median": 0.34115407622000005,
"user": 0.2994496199999999,
"system": 0.62568858,
"min": 0.32376206372,
"max": 0.38368392872
},
{
"command": "pnpr@main",
"mean": 0.32154463221999996,
"stddev": 0.012272927630734846,
"median": 0.32000082972,
"user": 0.27197282,
"system": 0.5955107799999999,
"min": 0.29817815372,
"max": 0.33756156472000004
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.31500604252,
"stddev": 0.016158549906303332,
"median": 0.31253718602,
"user": 0.35142671999999997,
"system": 0.09602356,
"min": 0.29389174002,
"max": 0.34401191002
},
{
"command": "pacquet@main",
"mean": 0.28403995771999996,
"stddev": 0.019707953682313425,
"median": 0.29004681652,
"user": 0.31354582,
"system": 0.08677875999999998,
"min": 0.25407432702,
"max": 0.31471280902
},
{
"command": "pnpr@HEAD",
"mean": 0.11174807656166669,
"stddev": 0.005641856269582239,
"median": 0.11115974652,
"user": 0.047519428333333336,
"system": 0.02124766,
"min": 0.10430308502,
"max": 0.12330314602
},
{
"command": "pnpr@main",
"mean": 0.10933504574000003,
"stddev": 0.004512115130234384,
"median": 0.10938437802,
"user": 0.048210579999999996,
"system": 0.017497479999999996,
"min": 0.09913915702000001,
"max": 0.11854016902000002
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.4076495946933332,
"stddev": 0.2227270337974871,
"median": 1.3786286723599999,
"user": 1.3709470333333331,
"system": 0.3014074111111111,
"min": 1.16989238136,
"max": 1.82298078736
},
{
"command": "pacquet@main",
"mean": 1.3940220290266667,
"stddev": 0.43330547066812425,
"median": 1.15053261336,
"user": 1.3526715888888887,
"system": 0.32876930000000004,
"min": 0.91066269436,
"max": 2.1171752053599997
},
{
"command": "pnpm@HEAD",
"mean": 6.228636088359999,
"stddev": 0.8578013380344809,
"median": 6.49246198436,
"user": 8.57008781111111,
"system": 0.5812415222222221,
"min": 4.99179492336,
"max": 7.46782582836
}
]
}Scenario: Isolated linker: linked-workspace resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.28155894902000006,
"stddev": 0.027696164723918396,
"median": 0.27560007412000004,
"user": 0.23019938,
"system": 0.11285962000000001,
"min": 0.24791188412,
"max": 0.33197486912
},
{
"command": "pacquet@main",
"mean": 0.29663720062000004,
"stddev": 0.05524761076792911,
"median": 0.26598172912000007,
"user": 0.24993327999999998,
"system": 0.11247681999999999,
"min": 0.24834128012,
"max": 0.39347746212000007
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.45027467432,
"stddev": 0.03713125412591538,
"median": 4.430870818620001,
"user": 1.7418336599999997,
"system": 1.60343284,
"min": 4.40690772362,
"max": 4.51559751362
},
{
"command": "pacquet@main",
"mean": 4.48859709512,
"stddev": 0.17077128292375665,
"median": 4.38647798862,
"user": 1.7014841599999997,
"system": 1.59848014,
"min": 4.33412245162,
"max": 4.82263872862
},
{
"command": "pnpr@HEAD",
"mean": 3.5034567893200004,
"stddev": 0.07707845616610108,
"median": 3.50028405262,
"user": 1.60039706,
"system": 1.5044820399999996,
"min": 3.37974824462,
"max": 3.65542727662
},
{
"command": "pnpr@main",
"mean": 3.56444946652,
"stddev": 0.1284300999269577,
"median": 3.49353994462,
"user": 1.8645137600000001,
"system": 1.69148164,
"min": 3.45794998562,
"max": 3.76399353462
}
]
}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.17992246584000002,
"stddev": 0.018377182083330466,
"median": 0.17467685624,
"user": 0.2203531133333333,
"system": 0.20101666666666668,
"min": 0.16151094524,
"max": 0.21933419124000003
},
{
"command": "pacquet@main",
"mean": 0.17471890167750004,
"stddev": 0.01383396217848675,
"median": 0.17594085824000003,
"user": 0.21104503000000002,
"system": 0.21304336250000003,
"min": 0.15738630324000003,
"max": 0.21501042524000002
},
{
"command": "pnpr@HEAD",
"mean": 0.20094104870153848,
"stddev": 0.022480295964661404,
"median": 0.19065968024000002,
"user": 0.22282670307692304,
"system": 0.22754249230769227,
"min": 0.17942415024000002,
"max": 0.26078529524
},
{
"command": "pnpr@main",
"mean": 0.19204595224,
"stddev": 0.015903455617060552,
"median": 0.19584796874000004,
"user": 0.2215725657142857,
"system": 0.20652829999999997,
"min": 0.16314239424000002,
"max": 0.21671603024000002
}
]
} |
PR Summary by QodoPreserve YAML list indentation when pruning workspace exclusions
AI Description
Diagram
High-Level Assessment
Files changed (8)
|
Code Review by Qodo
1.
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Code review by qodo was updated up to the latest commit 4e0aa08 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
…ers (#15571) Stop block scans at column-zero non-sequence lines, preserving document boundaries such as '...' and trailing footers.
|
Code review by qodo was updated up to the latest commit d5d8ebb |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
…pnpm#15571) (pnpm#15580) Closes pnpm#15571. When running `pnpm install` in a repository with `minimumReleaseAgeExcludePrune: true` (or `trustPolicyExcludePrune: true`), if `pnpm-workspace.yaml` contained list items indented without leading spaces (0-indent, e.g. `- item`), `top_level_span` and `item_layout` stopped scanning at the first 0-indent item because they treated any line with structural indentation 0 as the next top-level key. This caused: 1. `reconcile_sequence_items` to fail and fall back to `replace_exclude_sequence`, which hardcoded 2-space indentation. 2. `top_level_span` to terminate before the 0-indent items, leaving all old items behind in the file and inserting a duplicate indented entry, resulting in invalid YAML syntax errors. This PR: - Distinguishes top-level mapping keys from block-sequence items at indent 0 (`is_top_level_key`). - Detects existing list item indentation (`detect_sequence_indent`) so both 0-indent `- item` and indented ` - item` (or custom indentation) are preserved when pruning or appending entries. - Removes 0-indent blocks cleanly when emptied without orphaning lines. - Adds regression unit and CLI integration tests.
Summary
Closes #15571.
When running
pnpm installin a repository withminimumReleaseAgeExcludePrune: true(ortrustPolicyExcludePrune: true), ifpnpm-workspace.yamlcontained list items indented without leading spaces (0-indent, e.g.- item),top_level_spananditem_layoutstopped scanning at the first 0-indent item because they treated any line with structural indentation 0 as the next top-level key. This caused:reconcile_sequence_itemsto fail and fall back toreplace_exclude_sequence, which hardcoded 2-space indentation.top_level_spanto terminate before the 0-indent items, leaving all old items behind in the file and inserting a duplicate indented entry, resulting in invalid YAML syntax errors.This PR:
is_top_level_key).detect_sequence_indent) so both 0-indent- itemand indented- item(or custom indentation) are preserved when pruning or appending entries.Checklist
[✓] I checked the referenced issue and verified that none of the PRs already linked to it solves it.
[✓] New features are implemented only in the Rust pnpm v12 CLI. Bug fixes are implemented in every affected version.
[✓] Added a changeset (
pnpm changeset) if this PR changes any published package.[✓] Added or updated tests.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
minimumReleaseAgeExcludeentries preserves existing list indentation, including zero-, two-, and four-space styles.