fix(config): give a deprecation notice from anywhere along a rename chain - #893
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
Greptile SummaryThe PR centralizes rename-chain deprecation lookup in
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (4): Last reviewed commit: "fix(config): give a deprecation notice f..." | Re-trigger Greptile |
8db197c to
d166168
Compare
d166168 to
be1433f
Compare
Instruction counts
No instruction-count regression above 1%. Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run. Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes. Shadow comparisonParsing
|
Pull Request is not mergeable
Pull Request is not mergeable
…hain Found by writing the corpus vector for a rule the page already stated. `explain` walked the chain of renames looking for a notice — `a` renamed to `b`, and `b` the one that says to use `c` — and the merge read the notice off the declaration the user wrote. So `config explain threads` told a user to stop using a key that running the CLI said nothing about, and the quieter of the two is the one a CLI actually surfaces. One walker now, on `Registry`, called by both. The message still names the key that was written, since that is the line in the file they would go and edit.
be1433f to
a09162b
Compare
A bug found by writing the corpus vector for a rule #882 already
stated on the page.
explainwalked the chain of renames looking for a deprecation notice —arenamed tob, andbthe one carrying the notice that says to use
c— with a comment explaining why. The merge read thenotice off the declaration the user wrote. So:
The quieter of the two is the one a CLI actually surfaces, so the user is told to stop using the key
only if they happen to ask about it.
Same shape as most of this stack's findings: one rule, two implementations. Fixed by moving the
walker onto
Registryand having both callers ask it, rather than teaching the second one to agree.The message still names the key that was written —
threads is deprecated: Use jobs instead.—because that is the line in the file they would go and edit, not the one the notice happens to be
attached to.
Verification
A test at the merge and the corpus vector that found it. Mutating the walk back to "read the
declaration written" fails both.
AI-assisted — Tool: Claude Code; model: anthropic/claude-opus-5; version: unavailable.
Note
Low Risk
Targeted behavior fix in config resolution and explain output; covered by new tests and corpus vectors, with no auth or security surface.
Overview
Unifies deprecation discovery so
config explainand config merge behave the same when a notice sits on an intermediate rename (e.g.threads→concurrency→jobs, with deprecation onconcurrency).The rename-chain walker moves from a private helper in
explaintoRegistry::deprecation.explainandresolveboth call it. Merge no longer readsdeprecatedonly off the declaration for the key the user wrote, which meant CLIs could stay silent whileconfig explainstill showed a deprecation.Warnings still use the written key (
threads is deprecated: …) so messages point at the line in the file users would edit.Adds a merge unit test and corpus vector
a-notice-anywhere-along-a-chain-is-reportedin04-renames.kdl.Reviewed by Cursor Bugbot for commit a09162b. Bugbot is set up for automated code reviews on this repo. Configure here.