lint-init classifier: cover non-Max numeric keys and resolve stock defaults from target rubocop #133

Open
opened 2026-07-26 18:22:48 +00:00 by jared · 1 comment
Owner

Known gaps

Found during slice-1 verification on 2026-07-26 (commit 49e0985). Both currently failing SAFE (landing entries in unknown rather than falsely in redundant):

1. Non-Max numeric keys not recognized

raised_max? only inspects the literal "Max" key. A delta that loosens a different numeric key — e.g. Metrics/ParameterLists: MaxOptionalParameters: 15 against rubocop's stock 3 — is a real loosening but is classified as unknown instead of loosening.

Full coverage requires recognising every numeric key where higher means looser, per cop.

2. Stock defaults from invoking rubocop, not target project's

Stock defaults are read via RuboCop::ConfigLoader.default_configuration from whichever rubocop the INVOKING process loads, not the rubocop the target project pins in its own Gemfile/gemspec. A target pinned to a different rubocop version with different stock defaults would be classified against the wrong baseline.

Locally, 1.88.2 / 1.88.0 / 1.86.2 / 1.81.7 are all installed, so this is reachable in practice.

Context

The classifier applies nothing — it prints advice to a human — so neither gap can corrupt a project's config on its own. The risk is misleading advice rather than silent corruption.

Follow-up to lint-init slice 1. Reference: ADR-0066.

## Known gaps Found during slice-1 verification on 2026-07-26 (commit 49e0985). Both currently failing SAFE (landing entries in `unknown` rather than falsely in `redundant`): ### 1. Non-Max numeric keys not recognized `raised_max?` only inspects the literal `"Max"` key. A delta that loosens a different numeric key — e.g. `Metrics/ParameterLists: MaxOptionalParameters: 15` against rubocop's stock `3` — is a real loosening but is classified as `unknown` instead of `loosening`. Full coverage requires recognising every numeric key where higher means looser, per cop. ### 2. Stock defaults from invoking rubocop, not target project's Stock defaults are read via `RuboCop::ConfigLoader.default_configuration` from whichever rubocop the INVOKING process loads, not the rubocop the target project pins in its own Gemfile/gemspec. A target pinned to a different rubocop version with different stock defaults would be classified against the wrong baseline. Locally, 1.88.2 / 1.88.0 / 1.86.2 / 1.81.7 are all installed, so this is reachable in practice. ## Context The classifier applies nothing — it prints advice to a human — so neither gap can corrupt a project's config on its own. The risk is misleading advice rather than silent corruption. Follow-up to lint-init slice 1. Reference: ADR-0066.
Author
Owner

Frozen in the 2026-08-16 backlog reset — see #419 for the expiry procedure. Do not work unless a live run rediscovers this issue.

Frozen in the 2026-08-16 backlog reset — see #419 for the expiry procedure. Do not work unless a live run rediscovers this issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#133
No description provided.