# Changelog

## Score

- CAI 65 → 60 (-4.4)
- Rubric changed (rubric-2026.10.1 → rubric-2026.10.5) — scores are not directly comparable.

## Lenses

- Code Health 95 → 73 (-21.9)
- Architecture 91 → 91 (+0.0)
- Maturity 54 → 52 (-2.0)
- Readiness 56 → 56 (+0.0)
- Security 94 → 86 (-8.1)

## Resolved (5)

- Ambiguous naming convention for file paths vs content. In both CoverageFile and ProfdataCoverageFile, there are methods named `source_file_pathname` and `source_file`. It is unclear if `source_file` returns the path string or the file content/contents, especially since `source_data()` also exists. This creates confusion about whether the suffix `_pathname` is necessary or if `source_file` implies path.
- Both types expose `all_lines()`. Given the different underlying data sources (gcno vs profdata), it is highly likely these methods return different objects or structures. Without clear interface contracts, this is a fragile consistency. However, the bigger issue is the duplication of intent between `CoverageFile` and `ProfdataCoverageFile` which seem to be two implementations of the same concept (a coverage file) but with different internal logic and slightly divergent APIs (e.g., `line_number_in_line` signature differs).
- Duplicate method names across different output formatters. While this is a common pattern in strategy patterns, the presence of `create_empty_xml_report` in both and `store_report` in both suggests a potential opportunity for a shared base class or interface to reduce code duplication and ensure consistent behavior.
- Duplicate method names across distinct types that likely return different data structures or formats. While the names are consistent, the underlying implementation details (gcov vs profdata) suggest these might need distinct interfaces or clear documentation, but more critically, `Slather.CoverageFile` has `raw_data()` and `cleaned_gcov_data()` while `ProfdataCoverageFile` has `raw_data()` and `cleaned_gcov_data()`. The naming `cleaned_gcov_data` on a profdata file is semantically misleading.
- Inconsistent method naming for similar operations. Some services use `post()` to send data, while others use `store_report()` to save it locally. It is unclear if `store_report` is a prerequisite for `post` or if they are independent. The naming `store_report` vs `post` is inconsistent across the CoverageService implementations.

## New (10)

- Duplicate intent across similar types. `Slather.CoverageFile` and `Slather.ProfdataCoverageFile` share identical method signatures for `line_coverage_data` and `branch_coverage_data`. While they may handle different underlying formats (gcov vs profdata), the public API surface exposes redundant method names for the same logical operation (getting line/branch coverage). Additionally, `ProfdataCoverageFile` has `branch_region_data` which has no counterpart in `CoverageFile`, creating an asymmetry.
- Inconsistent method naming for report generation. `CoberturaXmlOutput` and `SonarqubeXmlOutput` use `create_xml_report`, while `HtmlOutput` uses `create_html_reports` (plural) and `create_html_from_file` (singular). The naming convention varies between 'create_[format]_report' and 'create_[format]s'.
- Inconsistent method naming for storing reports. Some output types use `store_report`, while others (like `HtmlOutput`) do not have this method, instead using `create_html_reports`. This suggests `store_report` is for saving to disk/cloud, while `create_*` is for generation. However, the lack of `store_report` in `HtmlOutput` and `SimpleOutput` makes the API inconsistent for the 'save' operation.
- Inconsistent naming convention for data retrieval methods. Some methods return a path (pathname), some return raw content (data), and some return processed coverage metrics. However, `source_file()` vs `source_file_pathname()` is ambiguous: does one return the string path and the other the file object? Similarly, `raw_data()` vs `source_data()` vs `gcov_data()` suggests overlapping or unclear distinctions between raw file content, parsed GCov format, and internal raw representation.
- Orphaned file (lib/slather/command/coverage_command.rb)
- Orphaned file (lib/slather/coverage_file.rb)
- Orphaned file (lib/slather/coverage_info.rb)
- Orphaned file (lib/slather/coverage_service/cobertura_xml_output.rb)
- Orphaned file (lib/slather/coverage_service/coveralls.rb)
- Orphaned file (lib/slather/coverage_service/html_output.rb)

## Changes since last survey

- 9 commits — 7 feature/other, 2 fixes

## By area

- (repo) — 3 commits
- (root) — 3 commits
- lib/slather — 3 commits

## Notable commits

- fix: Bump nokogiri minimum version to 1.19.4 to fix security advisories
- fix: Merge pull request #587 from MirekNalepa/fix/profdata-coverage-dir
- change: Merge pull request #584 from michel-moreau/master
- change: Merge pull request #585 from carloskvasir/bump-nokogiri-security
- change: Restore scheme coverage directory lookup in profdata_coverage_dir
- change: Slather 2.8.6
- change: Slather 2.8.7
- change: Update changelog
- change: Update changelog
