app: exclude embed_templates wrappers and the release-only Application

Raises the measured total 86.17% -> 86.79% without touching a test, because the
excluded modules hold no behavior a test can observe:

- FirehoseWeb.{Blog,UserRegistration,UserSettings}HTML are `use` +
  `embed_templates` only; every function in them is macro-generated. Their
  TEMPLATES are already exercised through the controller tests.
- Firehose.Application: start/2 is proven by the suite booting at all, and
  config_change/3 runs only on a release hot upgrade.

Deliberately NOT excluded, despite being embed_templates wrappers:
FirehoseWeb.PageHTML (blog_label/1, post_base_path/1) and
FirehoseWeb.UserSessionHTML (local_mail_adapter?/0) carry real private logic, so
their sub-100% coverage is a behavior gap for the controller/auth yak, not macro
noise.

Also drops the now-dead Firehose.Checks.NoConnShadowing entry: lib_dev/ is no
longer compiled, so it is not measurable. Floor stays 86 (86.79 rounds down).
This commit is contained in:
Willem van den Ende
2026-10-26 20:02:45 +00:00
parent 9730987846
commit 4b4d0c491c
+28 -7
View File
@@ -114,9 +114,11 @@ defmodule Firehose.MixProject do
# not the floor. # not the floor.
# #
# Measured 2026-10-26 (PostgreSQL on localhost:5432, exclusions below): # Measured 2026-10-26 (PostgreSQL on localhost:5432, exclusions below):
# 86.17%, identical via `mix test --cover` and via # 86.79% after the last exclusion revision (86.17% before excluding the
# `mix test --cover --export-coverage default` + `mix test.coverage`, and # embed_templates wrappers and Firehose.Application), identical via
# stable across seeds. Floor is the integer below that. # `mix test --cover` and via `mix test --cover --export-coverage default` +
# `mix test.coverage`, and stable across seeds. Floor is the integer below
# that — so a floor of 86 means "at least 86.00%".
# #
# `test.coverage` deletes stale exports before sampling: `mix test.coverage` # `test.coverage` deletes stale exports before sampling: `mix test.coverage`
# imports *every* .coverdata it finds, so leftover exports from earlier runs # imports *every* .coverdata it finds, so leftover exports from earlier runs
@@ -133,15 +135,31 @@ defmodule Firehose.MixProject do
# FirehoseWeb.ErrorJSON Phoenix.Controller.status_message_from_template/1 # FirehoseWeb.ErrorJSON Phoenix.Controller.status_message_from_template/1
# * FirehoseWeb the `use FirehoseWeb` macro: imports and aliases # * FirehoseWeb the `use FirehoseWeb` macro: imports and aliases
# only, nothing that executes # only, nothing that executes
# * embed_templates wrappers FirehoseWeb.BlogHTML,
# FirehoseWeb.UserRegistrationHTML,
# FirehoseWeb.UserSettingsHTML: each is `use` +
# `embed_templates`, so every function in them is
# generated by the macro. Their TEMPLATES are
# exercised through the controller tests; the
# wrapper modules hold no hand-written code.
# NOTE: PageHTML and UserSessionHTML are
# deliberately NOT excluded — both carry private
# helpers with real logic (blog_label,
# post_base_path, local_mail_adapter?), so their
# gaps are behavior gaps, not macro noise.
# * Firehose.Application start/2 is proven by the suite booting at all (a
# broken supervision tree fails every test), and
# config_change/3 only runs on a release hot
# upgrade, which no test can reach.
# * Firehose.Release production release tasks (`mix ecto.migrate` on # * Firehose.Release production release tasks (`mix ecto.migrate` on
# Dokku); the suite never runs them # Dokku); the suite never runs them
# * Firehose.Checks.NoConnShadowing
# lib_dev credo check, exercised by `mix credo`
# and not by tests
# * test scaffolding Firehose.DataCase, FirehoseWeb.ConnCase, # * test scaffolding Firehose.DataCase, FirehoseWeb.ConnCase,
# Firehose.AccountsFixtures, Firehose.Test.FakeBlog: # Firehose.AccountsFixtures, Firehose.Test.FakeBlog:
# fixtures measure the tests, not the app # fixtures measure the tests, not the app
# #
# `Firehose.Checks.NoConnShadowing` needs no entry: lib_dev/ is no longer in
# elixirc_paths (credo loads it from source), so it is not measurable here.
#
# Everything else counts — CoreComponents, controllers, LiveViews included: # Everything else counts — CoreComponents, controllers, LiveViews included:
# that is where the behavior-test work shows up as a higher floor. # that is where the behavior-test work shows up as a higher floor.
defp test_coverage do defp test_coverage do
@@ -151,11 +169,14 @@ defmodule Firehose.MixProject do
Firehose.Repo, Firehose.Repo,
Firehose.Mailer, Firehose.Mailer,
Firehose.Release, Firehose.Release,
Firehose.Application,
FirehoseWeb, FirehoseWeb,
FirehoseWeb.Telemetry, FirehoseWeb.Telemetry,
FirehoseWeb.ErrorHTML, FirehoseWeb.ErrorHTML,
FirehoseWeb.ErrorJSON, FirehoseWeb.ErrorJSON,
Firehose.Checks.NoConnShadowing, FirehoseWeb.BlogHTML,
FirehoseWeb.UserRegistrationHTML,
FirehoseWeb.UserSettingsHTML,
Firehose.DataCase, Firehose.DataCase,
FirehoseWeb.ConnCase, FirehoseWeb.ConnCase,
Firehose.AccountsFixtures, Firehose.AccountsFixtures,