Skip to content

fix(coverage): distinguish 'nothing tracked' from 'nothing covered' - #1172

Merged
Chemaclass merged 1 commit into
mainfrom
fix/1171-coverage-nothing-tracked
Aug 13, 2026
Merged

fix(coverage): distinguish 'nothing tracked' from 'nothing covered'#1172
Chemaclass merged 1 commit into
mainfrom
fix/1171-coverage-nothing-tracked

Conversation

@Chemaclass

Copy link
Copy Markdown
Member

🤔 Background

Related #1171

A mistyped --coverage-paths (or one matching only comments) yields
Total: 0/0 and the gate reports:

Coverage 0% is below minimum 80%

That 0% is arithmetic, not a measurement — nothing was found to measure. The
message sends the reader to their tests when the cause is the paths, and in CI
it fails for a reason the output gives no way to act on.

💡 Changes

A mistyped --coverage-paths yields Total: 0/0 and the gate reported
'Coverage 0% is below minimum 80%'. That 0% is arithmetic, not a measurement:
nothing was found to measure. The message sends the reader to their tests when
the cause is the paths, and in CI it fails for a reason the output cannot act
on.

Report the two cases apart, and keep failing either way -- a misconfigured run
quietly satisfying an 80% gate is worse than either message.

The gate could not see the executable total because get_percentage echoes, so
every caller wraps it in $( ) and a return slot set inside dies with that
subshell -- the same boundary as #1145 and #1147. Totals now come from a
slot-setting helper the gate calls directly; get_percentage stays the echoing
wrapper its callers expect.

Closes #1171
@Chemaclass Chemaclass added the bug Something isn't working label Aug 13, 2026
@Chemaclass Chemaclass self-assigned this Aug 13, 2026
@Chemaclass
Chemaclass merged commit 494a275 into main Aug 13, 2026
37 checks passed
@Chemaclass
Chemaclass deleted the fix/1171-coverage-nothing-tracked branch August 13, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant