Apply command line options with --resolve-all-configs #2769
All Vouch review confidence checks passed
Residual risk 0.37 = Change Risk (0.66) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.66 · 191 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.315
Sensitive Paths
sensitive_paths
0.066
Real PR Conversation Timeline
1 comments
"Review active on #2769"
general
weight: 0.35
nk-batman21
With
--resolve-all-configs, each file's config is built only from its nearest config file, so options given on the command line are dropped (--checkand--diffstill work becausemain()handles them itself). Files without a config file get plain defaults. This is easy to hit in a monorepo with per-project config files and shared pre-commit args such as["--resolve-all-configs", "--profile=black"]: the profile is silently ignored.For example, with
pkg/pyproject.tomlcontaining[tool.isort]/line_length = 100andpkg/a.pycontainingfrom os import path, sep,isort --force-single-line-imports pkg/a.pysplits the import, butisort --force-single-line-imports --resolve-all-configs pkg/a.pyleaves it on one line.--profile,--line-lengthand--verboseare ignored the same way (the missing verbose output is the first question in #2045).This passes the command line options to
find_all_configs, which applies them on top of every config file it finds and on the default used for files without one. It follows #2119 by hotpxl and adds the test that was asked for there. Unlike #2119,settings_pathandsettings_fileare not passed on:settings_pathdefaults to the first file's directory, so passing it would load that project's config for files in every other project. The new test covers that case too.Refs #2045 (the
src_pathspart of that issue is separate).Ran:
coverage run -m pytest tests/unit/(the new test fails without the change) and thetox -e lintcommands.