# Changelog

## Score

- CAI 59 → 59 (+0.7)

## Lenses

- Code Health 52 → 52 (+0.0)
- Architecture 86 → 84 (-1.9)
- Maturity 55 → 58 (+3.0)
- Readiness 61 → 61 (+0.0)
- Security 93 → 93 (+0.0)
- Performance 80 → 80 (+0.0)

## Resolved (5)

- Inconsistent naming for getter vs setter methods. `Mail.delivery_method()` and `Mail.retriever_method()` appear to be getters (no arguments). However, `Configuration.delivery_method(method, settings)` and `Configuration.retriever_method(method, settings)` appear to be setters or configuration methods (taking arguments). In Ruby, it is common to use the same name for both getter and setter (with optional arguments) or use `get_`/`set_` prefixes. Here, the distinction is implicit based on arity, which can be confusing. Additionally, `delivery_method` and `retriever_method` are parallel concepts but named differently, which is fine, but the getter/setter pattern is inconsistent across the `Mail` class (getters) and `Configuration` class (setters/configurers).
- Inconsistent naming for observer vs interceptor patterns. `register_observer`/`inform_observers` and `register_interceptor`/`inform_interceptors` are parallel but use different verbs ('inform' vs 'register'). While 'observer' and 'interceptor' are distinct concepts, the method names `inform_observers` and `inform_interceptors` are consistent with each other, but the registration methods `register_observer` and `register_interceptor` are also consistent. However, the use of 'inform' for notification is less common than 'notify' or 'call'. More importantly, `Mail.delivery_interceptors()` returns a list, while `Mail.register_interceptor` adds one. This is consistent. The main issue is the potential confusion between 'observer' and 'interceptor' if their behaviors are similar, but assuming they are distinct, the naming is acceptable. However, `inform_observers` and `inform_interceptors` could be unified to `notify_observers` and `notify_interceptors` for better standard terminology.
- Inconsistent naming for retrieval operations. `Mail.find` suggests finding a single item or a collection, but `Mail.first`, `Mail.last`, and `Mail.all` exist separately. In many ORMs and collection APIs, `find` is often synonymous with `first` or `find_by`. Having `find`, `first`, `last`, and `all` creates ambiguity: does `find` return the first match? A specific match by ID? A collection? `find_and_delete` is also distinct but follows a different naming convention (verb-and-verb) compared to the noun-like `first`/`last`.
- Redundant and inconsistent delivery entry points. `Mail.deliver` is a class-level convenience method that likely creates a new Message instance and delivers it. `Message.deliver` and `Message.deliver!` are instance methods. The existence of `Mail.deliver` alongside the instance methods creates confusion about whether to use the class method or instantiate a Message first. Furthermore, `deliver` vs `deliver!` implies a difference in error handling (e.g., raising vs returning), but this distinction is not immediately clear from the signature alone without documentation, and having both at the instance level while the class level has only one is inconsistent.
- Workflow token permissions not restricted

## New (7)

- Orphaned file (lib/mail/fields.rb)
- Orphaned file (lib/mail/fields/common_address_field.rb)
- Orphaned file (lib/mail/matchers/has_sent_mail.rb)
- Orphaned file (lib/mail/network/retriever_methods/imap.rb)
- Orphaned file (lib/mail/parsers/content_transfer_encoding_parser.rb)
- Orphaned file (lib/mail/parsers/mime_version_parser.rb)
- Workflow token permissions not restricted (.github/workflows/test.yml)
