Repository navigation
Commit 3b950f2
ci(coverage): stop one red gate from hiding the eight behind it
Two coverage regressions turned up this week, and neither was found by the
gate that exists to find it. The auth-manager module sat at 82% against a
90% gate for two weeks; key rotation sat at 89.6% and passed only because
coverage rounds before it compares. Both were found by running the gate
commands by hand.
The reason they were invisible is structural, not specific to those two
modules. Steps in a job stop at the first failure, and test-unit runs nine
per-module coverage gates in sequence after the full suite. While an
earlier step in that job was failing, every gate after it simply never
ran -- so a module could lose twelve points of coverage and the gate meant
to catch it never executed to notice.
The gates share nothing but the venv. Each runs its own pytest over its
own files and reports on its own module; none consumes anything an earlier
one produces. There was never a reason for one to gate the next.
So each now carries `if: !cancelled() && steps.install.outcome ==
'success'`: run whenever the environment installed, skip only on a
cancelled run or a broken install (where all nine would be noise). Every
gate still fails the job on its own -- nothing is downgraded to a warning.
The difference is that a single run now reports all nine verdicts instead
of stopping at the first, which is what turns "the gate is red" into "the
gate is red *and* these two others slipped".
test_coverage_policy.py::test_every_coverage_gate_runs_even_after_an_earlier_one_fails
holds the shape: a gate added without the condition fails it, and so does
dropping the `id: install` the condition refers to. Proven red against the
pre-change ci.yml (1 failed, 9 passed), green after (10 passed).
Verified: ci.yml parses and all nine gates carry the condition, ruff
lint/format clean, test_coverage_policy.py passes (10 passed), docs and
audit-gate ratchets pass (25 passed).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018ybRVCaL1Lyd9d5kFTndh31 parent 9879196 commit 3b950f2
3 files changed
Lines changed: 62 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| 250 | + | |
250 | 251 | | |
251 | 252 | | |
252 | 253 | | |
| |||
264 | 265 | | |
265 | 266 | | |
266 | 267 | | |
| 268 | + | |
267 | 269 | | |
268 | 270 | | |
269 | 271 | | |
| 272 | + | |
270 | 273 | | |
271 | 274 | | |
272 | 275 | | |
| 276 | + | |
273 | 277 | | |
274 | 278 | | |
275 | 279 | | |
| 280 | + | |
276 | 281 | | |
277 | 282 | | |
278 | 283 | | |
279 | 284 | | |
280 | 285 | | |
281 | 286 | | |
282 | 287 | | |
| 288 | + | |
283 | 289 | | |
284 | 290 | | |
285 | 291 | | |
| |||
297 | 303 | | |
298 | 304 | | |
299 | 305 | | |
| 306 | + | |
300 | 307 | | |
301 | 308 | | |
302 | 309 | | |
| |||
331 | 338 | | |
332 | 339 | | |
333 | 340 | | |
| 341 | + | |
334 | 342 | | |
335 | 343 | | |
336 | 344 | | |
| |||
353 | 361 | | |
354 | 362 | | |
355 | 363 | | |
| 364 | + | |
356 | 365 | | |
357 | 366 | | |
358 | 367 | | |
| |||
362 | 371 | | |
363 | 372 | | |
364 | 373 | | |
| 374 | + | |
365 | 375 | | |
366 | 376 | | |
367 | 377 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
7 | 26 | | |
8 | 27 | | |
9 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
0 commit comments