Repository navigation
fix(config): report the keys dropped from the global config.yaml (pacquet) - #13864
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Warning Review limit reached
Next review available in: 1 minute Limit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
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 (3)
🚧 Files skipped from review as they are similar to previous changes (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe Rust global configuration loader now warns about unsupported and kebab-case keys. Tests cover warning content, source paths, camelCase loading, null handling, warning order, and workspace-only guidance. A pacquet patch changeset documents the behavior. ChangesGlobal configuration diagnostics
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This localized change adds warnings for ignored global configuration keys without changing supported configuration behavior; no actionable merge-blocking risk remains beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant GlobalConfigYaml
participant WorkspaceSettings
participant warn_about_dropped_keys
participant DiagnosticOutput
GlobalConfigYaml->>WorkspaceSettings: Load YAML and retain source path
WorkspaceSettings->>warn_about_dropped_keys: Inspect present top-level keys
warn_about_dropped_keys->>DiagnosticOutput: Emit unsupported-key and kebab-case warnings
Assessment against linked issues
Possibly related PRs
Suggested labels: Suggested reviewers: ✨ Finishing Touches🧪 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 |
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Reviews (6): Last reviewed commit: "docs(config): keep the dropped-key ratio..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pnpm/crates/config/src/tests.rs`:
- Around line 3402-3453: Extend the global configuration tests around
global_config_yaml_kebab_case_key_is_reported and
global_config_yaml_keys_it_cannot_set_are_reported to cover an explicit null key
that produces no warning. Add a mixed-key fixture containing ignored
workspace-only/unknown keys and a kebab-case key, then assert the exact warning
messages and their pnpm-defined ordering.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 49ad1cea-8725-43f6-bfa6-815362247a7f
📒 Files selected for processing (3)
.changeset/pacquet-global-config-yaml-ignored-keys.mdpnpm/crates/config/src/tests.rspnpm/crates/config/src/workspace_yaml.rs
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13864 +/- ##
=======================================
Coverage 88.19% 88.19%
=======================================
Files 646 647 +1
Lines 107162 107226 +64
=======================================
+ Hits 94509 94573 +64
Misses 12653 12653 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.5816233274,
"stddev": 0.12005395413802357,
"median": 2.5821192672,
"user": 2.3123262,
"system": 2.0966949799999997,
"min": 2.4413336152,
"max": 2.7331847571999996
},
{
"command": "pacquet@main",
"mean": 2.5325033643999997,
"stddev": 0.1548127142045491,
"median": 2.5044214432,
"user": 2.1157098999999997,
"system": 1.9395903799999998,
"min": 2.3720344921999996,
"max": 2.8238866961999998
},
{
"command": "pnpr@HEAD",
"mean": 1.5062053260000001,
"stddev": 0.13521257589402014,
"median": 1.4938404517000001,
"user": 1.7347291999999999,
"system": 1.56399038,
"min": 1.3222106632000001,
"max": 1.6807306262000001
},
{
"command": "pnpr@main",
"mean": 1.4798493961,
"stddev": 0.1332677804797087,
"median": 1.4669899197,
"user": 1.8109904000000003,
"system": 1.7344986799999997,
"min": 1.3251226462,
"max": 1.6738454142
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.35516118237999994,
"stddev": 0.01650939728742662,
"median": 0.35385742628,
"user": 0.29768524,
"system": 0.61237588,
"min": 0.33031840028,
"max": 0.38071613528
},
{
"command": "pacquet@main",
"mean": 0.32211972748,
"stddev": 0.018541382434822267,
"median": 0.32160501128,
"user": 0.26870654000000005,
"system": 0.57463208,
"min": 0.29661357328,
"max": 0.35760660128
},
{
"command": "pnpr@HEAD",
"mean": 0.34267281578,
"stddev": 0.02184423048180449,
"median": 0.34054914327999997,
"user": 0.26653743999999996,
"system": 0.59954538,
"min": 0.30835560728,
"max": 0.37662568228
},
{
"command": "pnpr@main",
"mean": 0.31873677558,
"stddev": 0.02993013674927027,
"median": 0.31622008928,
"user": 0.25275294,
"system": 0.5669189800000001,
"min": 0.28087708228,
"max": 0.36001852428000003
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.014225977825976103,
"stddev": 0.002473652172637339,
"median": 0.014229836320000001,
"user": 0.008092639681274902,
"system": 0.006210435856573708,
"min": 0.008710257320000001,
"max": 0.02086296932
},
{
"command": "pacquet@main",
"mean": 0.014976328253333341,
"stddev": 0.0025140504062511723,
"median": 0.01495326332,
"user": 0.007780869090909094,
"system": 0.007237855272727274,
"min": 0.009407012320000002,
"max": 0.02153763632
},
{
"command": "pnpr@HEAD",
"mean": 0.015620960843489934,
"stddev": 0.002192818440965425,
"median": 0.016006913320000003,
"user": 0.008762029798657716,
"system": 0.006926724026845637,
"min": 0.010799964320000001,
"max": 0.020597915320000004
},
{
"command": "pnpr@main",
"mean": 0.014907810567474747,
"stddev": 0.0023350671713341315,
"median": 0.01473330032,
"user": 0.007887110505050502,
"system": 0.007097371313131311,
"min": 0.010932193320000002,
"max": 0.02048138332
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.016605794787272726,
"stddev": 0.002979343581505295,
"median": 0.01644759306,
"user": 0.009360955303030296,
"system": 0.0072182884848484875,
"min": 0.01063475506,
"max": 0.024353485060000003
},
{
"command": "pacquet@main",
"mean": 0.016555863030149248,
"stddev": 0.0030361575507913217,
"median": 0.016068367060000005,
"user": 0.009465301492537315,
"system": 0.007098321194029852,
"min": 0.01117660306,
"max": 0.026354684060000005
},
{
"command": "pnpr@HEAD",
"mean": 0.014829567235572525,
"stddev": 0.0027786803863516017,
"median": 0.01417152906,
"user": 0.008024595419847326,
"system": 0.006871034503816792,
"min": 0.01048686106,
"max": 0.024123066060000004
},
{
"command": "pnpr@main",
"mean": 0.015230714568771935,
"stddev": 0.0018596548438345839,
"median": 0.015532281060000002,
"user": 0.008573977192982451,
"system": 0.006757556959064327,
"min": 0.010965299060000001,
"max": 0.01957631606
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 3.02346596756,
"stddev": 0.10410972451892686,
"median": 3.0155515203600003,
"user": 2.7040399799999997,
"system": 2.0211596399999996,
"min": 2.89405925436,
"max": 3.1593942803600004
},
{
"command": "pacquet@main",
"mean": 2.89935501186,
"stddev": 0.060516964432974184,
"median": 2.8802692393600005,
"user": 2.48131698,
"system": 1.8528100399999996,
"min": 2.82915797436,
"max": 3.00450263536
},
{
"command": "pnpr@HEAD",
"mean": 1.62043961446,
"stddev": 0.11396570593049464,
"median": 1.60708430036,
"user": 1.7963433800000002,
"system": 1.8261089400000003,
"min": 1.47973923236,
"max": 1.79668391536
},
{
"command": "pnpr@main",
"mean": 1.6515384910600002,
"stddev": 0.10538279278422362,
"median": 1.6542626523600001,
"user": 1.8330638799999996,
"system": 1.85087854,
"min": 1.50230086136,
"max": 1.79679347436
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.47747712519999996,
"stddev": 0.029112065071177064,
"median": 0.48594287049999996,
"user": 0.5788098799999999,
"system": 0.76164222,
"min": 0.4251987255,
"max": 0.5114932275
},
{
"command": "pacquet@main",
"mean": 0.47576016700000007,
"stddev": 0.03478645766836832,
"median": 0.48188465999999996,
"user": 0.54656918,
"system": 0.7443245199999999,
"min": 0.4098690735,
"max": 0.5324606745
},
{
"command": "pnpr@HEAD",
"mean": 0.36722542980000006,
"stddev": 0.0202633850828222,
"median": 0.370059052,
"user": 0.25601347999999996,
"system": 0.5673320199999999,
"min": 0.3293743755,
"max": 0.3891543295
},
{
"command": "pnpr@main",
"mean": 0.378721661,
"stddev": 0.04238045585652244,
"median": 0.3641791645,
"user": 0.25132798,
"system": 0.6106236199999999,
"min": 0.3263519905,
"max": 0.4539970865
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.03827670262,
"stddev": 0.03777729966241088,
"median": 2.02880985172,
"user": 1.0537879599999997,
"system": 0.9767175,
"min": 1.9844582812200002,
"max": 2.09605549322
},
{
"command": "pacquet@main",
"mean": 2.07018595732,
"stddev": 0.07638177138087411,
"median": 2.06246811922,
"user": 1.0656379599999999,
"system": 1.0009064,
"min": 1.9718515952200002,
"max": 2.23638250122
},
{
"command": "pnpr@HEAD",
"mean": 0.37787330562000004,
"stddev": 0.014556263172419334,
"median": 0.37921041572,
"user": 0.25177516,
"system": 0.5981958999999999,
"min": 0.35799628622,
"max": 0.39793937722
},
{
"command": "pnpr@main",
"mean": 0.38210376802,
"stddev": 0.01844988945831256,
"median": 0.38021298372,
"user": 0.27425166,
"system": 0.5847548999999999,
"min": 0.35479347622,
"max": 0.42281129122
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.2838397007290909,
"stddev": 0.02699990710961776,
"median": 0.28893448282000006,
"user": 0.23913481636363632,
"system": 0.10271898727272727,
"min": 0.24364608982,
"max": 0.34266871282000005
},
{
"command": "pacquet@main",
"mean": 0.30108469032,
"stddev": 0.041828345138993264,
"median": 0.31252725532000003,
"user": 0.25591288,
"system": 0.09609205999999999,
"min": 0.23704516182000002,
"max": 0.36122883882000006
},
{
"command": "pnpr@HEAD",
"mean": 0.11694765693538461,
"stddev": 0.006744793116131705,
"median": 0.11716944082000001,
"user": 0.03717183384615385,
"system": 0.021201721538461536,
"min": 0.10494081682,
"max": 0.13041254882
},
{
"command": "pnpr@main",
"mean": 0.12229718739142854,
"stddev": 0.008803786244808666,
"median": 0.12039568282000002,
"user": 0.03972146571428571,
"system": 0.022005783809523807,
"min": 0.11024128682,
"max": 0.14607980882
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.6430748994666665,
"stddev": 0.1179849042149622,
"median": 0.5830553608,
"user": 0.6306204511111111,
"system": 0.1553505844444444,
"min": 0.5091347578,
"max": 0.8450713928
},
{
"command": "pacquet@main",
"mean": 0.7893309108,
"stddev": 0.08382243095845975,
"median": 0.8117590528,
"user": 0.7733145622222223,
"system": 0.20164580666666665,
"min": 0.5941700088,
"max": 0.9008365528
},
{
"command": "pnpm@HEAD",
"mean": 3.881708367688889,
"stddev": 0.24550143154130274,
"median": 3.7835990378,
"user": 5.78149734,
"system": 0.43272369555555557,
"min": 3.6541000948,
"max": 4.3429737418
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.6874526602,
"stddev": 0.19037248558115905,
"median": 4.704154166,
"user": 2.2614689199999995,
"system": 2.01633228,
"min": 4.400333654000001,
"max": 4.91037994
},
{
"command": "pacquet@main",
"mean": 4.463990222200001,
"stddev": 0.11523669588522768,
"median": 4.4318950795,
"user": 2.02771562,
"system": 1.8643686799999997,
"min": 4.337653368000001,
"max": 4.709195139
},
{
"command": "pnpr@HEAD",
"mean": 3.5581465437000004,
"stddev": 0.07535097257101019,
"median": 3.549159853,
"user": 2.10648182,
"system": 1.9600423800000002,
"min": 3.46139655,
"max": 3.705856351
},
{
"command": "pnpr@main",
"mean": 3.5889485849,
"stddev": 0.07725635741227016,
"median": 3.590490034,
"user": 2.11983502,
"system": 1.97385458,
"min": 3.4646806569999997,
"max": 3.7256526979999998
}
]
}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. Comparable to that scenario head-to-head.
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.2149535247833333,
"stddev": 0.012456528998054278,
"median": 0.2122548307,
"user": 0.24986811999999994,
"system": 0.2525608733333334,
"min": 0.2005261227,
"max": 0.2404288977
},
{
"command": "pacquet@main",
"mean": 0.2215871055,
"stddev": 0.01287978464386506,
"median": 0.22041830969999998,
"user": 0.26243052,
"system": 0.23287014,
"min": 0.1991307627,
"max": 0.2467979457
},
{
"command": "pnpr@HEAD",
"mean": 0.2361828368818182,
"stddev": 0.012901547260708225,
"median": 0.2367547617,
"user": 0.2647909836363636,
"system": 0.2465954490909091,
"min": 0.2096226817,
"max": 0.2518200167
},
{
"command": "pnpr@main",
"mean": 0.23655086024545452,
"stddev": 0.016601842830815356,
"median": 0.2417406487,
"user": 0.2634629836363636,
"system": 0.2573348127272727,
"min": 0.2133073817,
"max": 0.2578286127
}
]
} |
712ebcd to
6932dae
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Code Review by Qodo
1. Redundant case conversions
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
pnpm splits the dropped-key warning for the global config.yaml in two: keys movable to a project's pnpm-workspace.yaml keep the move-there advice, while keys no configuration file may set are reported with the route pnpm offers instead (pnpm config set --global, the --dir flag, or "This is not a pnpm setting"). pacquet folded both into the move-there message; port the refusal list and the routes so the texts match. A dropped camelCase key pnpm's isConfigFileKey accepts now stays silent instead of getting the move-there advice: pnpm honors it in that file, so that advice was wrong, and the fix for such a key is to honor it too, not to report it. Co-Authored-By: Claude Fable 5 <[email protected]>
…fiers The constants deliberately carry their config.reader names, so a backticked mention of the upstream name resolves to the local item and trips perfectionist::bare-identifier-reference. Name the source file instead of restating the identifier. Co-Authored-By: Claude Fable 5 <[email protected]>
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
The doc on warn_about_dropped_keys narrated the three warning categories the buckets and the tests already show, and the silence test restated the rationale that doc carries. Trim the narration and point the test at the doc. Co-Authored-By: Claude Fable 5 <[email protected]>
|
Code review by qodo was updated up to the latest commit eaa5b3f |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
|
Code review by qodo was updated up to the latest commit 934ea11 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Summary
pacquet parses the global
config.yamlintoWorkspaceSettings, whose fields are camelCase and which does not usedeny_unknown_fields, and then zeroes the workspace-only fields. Both passes are silent, so a key the file cannot carry and a key spelled in kebab-case do nothing at all and say nothing about it:The TypeScript CLI reports both cases against the same file, the second one as of #13862. pacquet now emits the same warnings, with the same texts, so the parity tests can compare them:
pnpm splits the first case further: a key no configuration file may set — machine locations, the current run's directories, credentials, and the reader's own bookkeeping — is reported in a third message with the route pnpm offers for it instead of the move-to-workspace advice. pacquet ports that refusal list and
whereRefusedKeyBelongs's routes (asrefused_keys) so those texts match too:Which keys were dropped is read back off the settings after the clearing pass, not from a second list of key names that would drift from the struct: a key serde did not recognize is missing from the serialized settings, and a key the clearing pass zeroed is null there. A key written as an explicit null is skipped, since nothing was dropped in that case either way. A dropped camelCase key pnpm's
isConfigFileKeyaccepts (globalBinDirand friends, which pacquet does not read from this file yet) stays silent: pnpm honors it there, so the fix is to honor it too, and until then a warning would diverge from pnpm's output on the same file.One gap this leaves open on purpose: pacquet honors a handful of keys from that file which pnpm's
isConfigFileKeyrejects (workspaceConcurrency,maxSockets,audit, and a few more). Those stay silent, because warning that a setting was ignored while still honoring it reads worse than saying nothing. Closing that gap changes what the file does rather than what it reports, so it wants its own change and its own tests.Closes #13863
Squash Commit Body
Checklist
already linked to it solves it.
pnpm/port, or the description notes what still needs porting.pnpm changeset) if this PR changes any publishedpackage. Keep it short and written for pnpm users — it becomes a release note.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit