# Changelog

## Score

- CAI 66 → 57 (-8.7)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

## Lenses

- Code Health 75 → 75 (+0.1)
- Architecture 94 → 94 (+0.0)
- Maturity 65 → 65 (+0.0)
- Readiness 72 → 72 (+0.0)
- Security 59 → 41 (-18.7)
- Performance 90 → 90 (+0.0)

## Resolved (6)

- Ambiguous naming for data accessors. `phone_data`, `data_by_country_codes`, and `phone_ext_data` all appear to expose internal data structures. The naming convention is inconsistent (`phone_data` vs `data_by_...` vs `phone_ext_...`). It is unclear if these are meant for public consumption or internal use. If public, they should follow a consistent naming pattern (e.g., `get_phone_data`, `get_country_data`).
- Documentation: no architecture or design documentation
- Duplicate validation logic across Core and Phone types. Core provides class-level validation methods that accept a phone string, while Phone provides instance-level methods. While technically distinct (class vs instance), the naming `valid?`/`invalid?` is identical, which can confuse users about whether they are calling a static utility or an instance method. More critically, `Phonelib.Core.valid_for_country?` and `Phonelib.Phone.valid_for_country?` create a parallel API surface where the user must choose between the 'Core' entry point and the 'Phone' object entry point for the same logical operation.
- PhoneAnalyzer.detect_and_parse (cognitive 17) (lib/phonelib/phone_analyzer.rb)
- Repeated repair: lib/validators/phone_validator.rb (lib/validators/phone_validator.rb)
- Semantic overlap between `Core.parse` and `PhoneAnalyzer.analyze`. Both accept a phone string and an optional country and likely return similar structured data or a Phone object. The distinction between 'parsing' (converting string to object) and 'analyzing' (determining properties) is blurred here. If `Core.parse` returns a `Phone` object, `PhoneAnalyzer.analyze` seems redundant unless it returns a different, more detailed structure. If it returns the same structure, it is a duplicate operation with a confusingly different name.

## New (1)

- Critical vulnerability: [GHSA redacted] (Gemfile.lock)

## Changes since last survey

- 9 commits — 6 feature/other, 3 fixes

## By area

- (repo) — 4 commits
- lib/phonelib — 3 commits
- (root) — 1 commit
- data/extended_data.dat — 1 commit

## Notable commits

- fix: Merge pull request #370 from dajiaohuang/fix/origin-idd-context-20261015
- fix: Merge pull request #371 from dajiaohuang/fix/detailed-input-constraints-20261015
- fix: Merge pull request #372 from dajiaohuang/fix/preserve-i18n-translations-20261016
- change: Merge pull request #374 from czj/perf/regexp-and-allocations
- change: Reduce allocations and regexp work when parsing numbers
- change: bumped version
- change: fixing issue #373
- change: performance improvement for issue #375
- change: updated data

## Architecture

- Unchanged — 0 containers · 1 contexts · 0 edges
