You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
chore(overrides): three behaviour-neutral tidy-ups in the OA008 detector and version utils #1256
Good first issue. Three small tidy-ups in the OA008 detector and one shared helper, all behaviour-neutral. Found while reviewing #1240; none of them is a bug.
1. Dead branch in src/overrides/detectors/oa008-materialized.ts
The multi-bucket message path contains copyCount === 1 ? "does" : "do". That branch is unreachable: reaching the multi-bucket path requires two populated buckets, which requires two distinct versions, which requires at least two copies. The singular form can never be produced there.
2. POSITION_LABEL is defined and then bypassed
The file defines a POSITION_LABEL map for "below the range" / "above the range" / "outside the accepted intervals", then the multi-bucket path rebuilds the same three strings inline with a ternary chain to capitalize them. So the mapping exists in two places and can drift.
3. satisfiesRange duplicates positionAgainstRange in src/utils/version.ts
satisfiesRange(v, r) is now exactly equivalent to positionAgainstRange(v, r) === "satisfies", and repeats the same five-line normalization preamble.
This one is worth a little care. In the detector, the catch-all else outside.push(version) absorbs both "satisfies" and null, so if these two functions ever diverge, a copy gets silently mislabelled as "outside the accepted intervals" rather than erroring. Expressing one in terms of the other makes that drift impossible.
How to know it worked
All three must be behaviour-neutral. The OA008 message text and the classification results should be identical before and after.
npm test stays green, currently 2127 tests
spot-check a few OA008 messages by hand and confirm the strings are unchanged
hello, I’d like to work on this issue. I’ll keep the changes behaviour-neutral and limited to the three tidy-ups described here, then run the full verification sequence before opening the PR.
Activity
fix(overrides): describe OA008 range mismatches accurately (#1240)
idrivehtbusiness commentedon Sep 30, 2026
hello, I’d like to work on this issue. I’ll keep the changes behaviour-neutral and limited to the three tidy-ups described here, then run the full verification sequence before opening the PR.