Context
Today the coverage floor gate measures the activated surface only:
lib/packages/** (services, repositories, signers, utils)
lib/screens/**/cubit(s)/** and lib/screens/**/bloc/**
*.g.dart (Drift codegen) is explicitly removed from the scoped tracefile. Widget files (lib/screens/**/*_page.dart, lib/widgets/**) are exercised via testWidgets specs but not counted in line coverage — see README.md "Coverage scope" and docs/testing.md "Tier 0".
Current scoped coverage: 90.8 % (post wave 1 uplift, PR #538/#539).
Question
Is the activated-surface scope the final long-term convention, or should it eventually be widened to cover the rest of lib/ (widgets, routes, themes, bootstrap, generated localizations)?
Trade-offs
Pro full-lib measurement
- Single number to point at
- Catches UI files that have zero render-level test (today these are invisible in the gate)
- Forces every new screen to ship at least a smoke
testWidgets spec
Contra
- ~50 % of widget code is layout (padding, sizing, theming) — line coverage there says "rendered once", not "behaviour verified". Mixing it with cubit/service coverage dilutes the signal.
lib/main.dart and routing entrypoints never execute under flutter test
lib/generated/ (localization codegen) would need the same coverage:ignore-style exclusion as *.g.dart
- Headline % would drop ~15-20 pp on the first measurement, so the floor would need a one-off lowering — easy to misread as a regression
Options
- Keep activated surface (status quo) — accept that "98 %" means "98 % of behaviour-bearing code", not "98 % of
lib/". Tracks well with the Tier model in docs/testing.md.
- Add a second, advisory metric — measure full
lib/ (with *.g.dart + lib/generated/** excluded) and surface it in the CI summary, but keep the floor gate on the activated surface. Best of both worlds, more YAML.
- Switch the gate to full
lib/ — broaden scope, accept the dilution, raise widget-test discipline.
Recommendation: option 2 if anyone wants the wider visibility, otherwise option 1.
Related
Context
Today the coverage floor gate measures the activated surface only:
lib/packages/**(services, repositories, signers, utils)lib/screens/**/cubit(s)/**andlib/screens/**/bloc/***.g.dart(Drift codegen) is explicitly removed from the scoped tracefile. Widget files (lib/screens/**/*_page.dart,lib/widgets/**) are exercised viatestWidgetsspecs but not counted in line coverage — seeREADME.md"Coverage scope" anddocs/testing.md"Tier 0".Current scoped coverage: 90.8 % (post wave 1 uplift, PR #538/#539).
Question
Is the activated-surface scope the final long-term convention, or should it eventually be widened to cover the rest of
lib/(widgets, routes, themes, bootstrap, generated localizations)?Trade-offs
Pro full-lib measurement
testWidgetsspecContra
lib/main.dartand routing entrypoints never execute underflutter testlib/generated/(localization codegen) would need the samecoverage:ignore-style exclusion as*.g.dartOptions
lib/". Tracks well with the Tier model indocs/testing.md.lib/(with*.g.dart+lib/generated/**excluded) and surface it in the CI summary, but keep the floor gate on the activated surface. Best of both worlds, more YAML.lib/— broaden scope, accept the dilution, raise widget-test discipline.Recommendation: option 2 if anyone wants the wider visibility, otherwise option 1.
Related
README.md— "Coverage scope" / "Coverage infrastructure roadmap"docs/testing.md— "## CI".github/workflows/pull-request.yaml—lcov --extract+lcov --remove '*.g.dart'