build(jacoco): scope coverage to the JVM-testable surface (exclude Compose UI / framework / debug) #290

Closed
opened 2026-07-04 05:44:23 +00:00 by JMR-dev · 0 comments
JMR-dev commented 2026-07-04 05:44:23 +00:00 (Migrated from github.com)

From the Phase-2 audit: the jacoco classDirectories filter only strips generated/ComposableSingletons*, so Compose @Composable screens (3,704 uncovered lines), Android framework entry points, DI modules, and the src/debug cold-open probe all sit in the coverage denominator — dragging the reported figure to ~50% even though the hand-written JVM-testable logic is ~87%. A JVM-coverage metric can't approach 95% while un-unit-testable UI/framework is counted.

Change (app/build.gradle.kts): extend the jacoco exclusion list so the metric reflects the JVM-testable surface — exclude at least: **/ui/** Composables (or the whole ui UI-render packages), Android framework entry points (*Activity, *Service, *Worker, Application, *BackupAgent), DI modules (**/di/**), and **/data/local/coldopen/** (the src/debug probe — not production). Keep logic packages (repos, VMs, mappers, DAOs' logic, utils, policies) IN scope. Report the new overall % (should be ~87% pre-gap-fill, → ~95%+ after the gap tickets).

Prerequisite for a meaningful #251 ratchet gate. Coordinator reviews the exclusion list (it defines what "95%" measures).

From the Phase-2 audit: the jacoco `classDirectories` filter only strips generated/`ComposableSingletons*`, so **Compose `@Composable` screens (3,704 uncovered lines), Android framework entry points, DI modules, and the `src/debug` cold-open probe all sit in the coverage denominator** — dragging the reported figure to ~50% even though the hand-written JVM-testable logic is ~87%. A JVM-coverage metric can't approach 95% while un-unit-testable UI/framework is counted. **Change (`app/build.gradle.kts`):** extend the jacoco exclusion list so the metric reflects the JVM-testable surface — exclude at least: `**/ui/**` Composables (or the whole `ui` UI-render packages), Android framework entry points (`*Activity`, `*Service`, `*Worker`, `Application`, `*BackupAgent`), DI modules (`**/di/**`), and `**/data/local/coldopen/**` (the `src/debug` probe — not production). Keep logic packages (repos, VMs, mappers, DAOs' logic, utils, policies) IN scope. Report the new overall % (should be ~87% pre-gap-fill, → ~95%+ after the gap tickets). Prerequisite for a meaningful **#251** ratchet gate. Coordinator reviews the exclusion list (it defines what "95%" measures).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: JMR-dev/LibreMail#290