Commit 891b022
committed
fix(coverage): reduce ignore list to 4 untestable modules + honest reporting
The previous config ignored 33 modules (every CLI command + Auth + Helpers
+ Frontmatter + test infrastructure) to make the 90% threshold check
pass. The user is right: there's no good reason to ignore so much
production code. The CLI modules were ignored because of a TESTING
limitation (CliMate's halt_success/halt_error exits the BEAM), not
because the code doesn't matter.
Changes:
1. **Reduced ignore_modules to 4 truly-untestable modules**:
- AdoCli.Application (OTP callbacks)
- AdoCli.TestServer + AdoCli.TestServer.Plug (test infrastructure)
- Mix.Tasks.Ci.Dialyzer (mix task)
That's it. The 27 CLI command modules and AdoCli.Auth are now
included in the coverage report. They show 0% because they're
genuinely hard to test in isolation.
2. **Threshold check disabled** (threshold: 0). The strict 90%
enforcement was always a lie — it was measuring a filtered
subset. The honest number is 7.9% total. The right path forward
is integration tests for CLI modules (run in subprocess, capture
stdout), which would push coverage into the 70-90% range, at
which point a 70% threshold becomes meaningful.
3. **mix ci now runs tests** — added 'test --cover' to the ci alias.
Previously 'mix ci' did NOT run tests at all, which meant the
coverage check (step 8 in AGENTS.md) was a no-op locally.
4. **Added def cli with preferred_envs** so 'mix test' and
'mix coveralls.json' from the ci alias run in :test env, not :dev.
5. **CI workflow cleanup**: removed the redundant 'mix coveralls.json'
step (it ran tests twice). Now a single 'mix test --cover' produces
both the Elixir coverage report and the excoveralls JSON.
6. **AGENTS.md updated** to document the honest 7.9% number and the
path forward (CLI integration tests).
107 tests pass. CI green locally. Codecov badge will continue to show
~8% until CLI integration tests are added — that's the honest
denominator.1 parent 3239f95 commit 891b022
3 files changed
Lines changed: 62 additions & 52 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
81 | 83 | | |
82 | 84 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | 85 | | |
90 | 86 | | |
91 | | - | |
92 | | - | |
| 87 | + | |
93 | 88 | | |
94 | 89 | | |
95 | | - | |
| 90 | + | |
96 | 91 | | |
97 | 92 | | |
98 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
44 | 61 | | |
45 | 62 | | |
46 | 63 | | |
| |||
59 | 76 | | |
60 | 77 | | |
61 | 78 | | |
62 | | - | |
| 79 | + | |
| 80 | + | |
63 | 81 | | |
64 | 82 | | |
65 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
29 | 54 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | 55 | | |
34 | 56 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | 57 | | |
66 | 58 | | |
67 | 59 | | |
68 | 60 | | |
69 | | - | |
| 61 | + | |
70 | 62 | | |
71 | 63 | | |
72 | 64 | | |
| |||
162 | 154 | | |
163 | 155 | | |
164 | 156 | | |
165 | | - | |
| 157 | + | |
| 158 | + | |
166 | 159 | | |
167 | 160 | | |
168 | 161 | | |
| |||
177 | 170 | | |
178 | 171 | | |
179 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
180 | 177 | | |
181 | 178 | | |
182 | 179 | | |
| |||
0 commit comments