Skip to content

fix(changed): a change with nothing mutable in it is not a failure - #15

Merged
Disble merged 1 commit into
mainfrom
fix/a-change-with-no-mutants
Aug 30, 2026
Merged

fix(changed): a change with nothing mutable in it is not a failure#15
Disble merged 1 commit into
mainfrom
fix/a-change-with-no-mutants

Conversation

@Disble

@Disble Disble commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Found by this repository's own gate the day after it went green, on the commit
that added -v:

scope since v0.9.0: 1 file(s), 1 with byte ranges
⨯ Score:    -1.00 (minimum: 0.50)

One added switch case. A scope of one file. Zero mutants. And a red run
that had found nothing wrong with anything.

The two answers that looked the same

The score calculator reports -1 for an empty run, which is below every
threshold — so "the scope produced nothing to judge" and "the suite failed"
arrived as the same number.

Run and RunStaged keep the refusal: a repository or an index that yields no
mutants is a scope somebody configured wrong, and that is worth failing on. A
diff is not. A new switch case, a comment, a rename are all legitimately
unmutatable, and failing a gate for one is failing a change for being correct.

The part that would have been missed

The count is read through an optional interface, the way RemoveAll and the
gated counters already are — and the reporter decorators have to forward it.
Without that the count is unreadable exactly when the stack is deepest, which is
the gated run that raised this in the first place. That is backlog entry 12's
class, caught again, so it is pinned by a test over gated, verbose, and
gated-over-verbose.

The end-to-end case runs both stacks too, because the plain one would have passed
either way and proved nothing.

Checks

  • Full suite, livetree counters, lint 0 issues.
  • mutantsPerReleaseOnThisRepository 785 → 789.

Found by this repository's own gate the day after it went green, on the commit
that added `-v`: one `switch` case, a scope of one file, ZERO mutants, and a red
run that had found nothing wrong with anything.

    scope since v0.9.0: 1 file(s), 1 with byte ranges
    ⨯ Score:    -1.00 (minimum: 0.50)

The calculator reports -1 for an empty run, which is below every threshold, so
a scope that produced no mutants and a suite that failed were the same answer.
Run and RunStaged keep that refusal -- a repository or an index that yields
nothing is a scope somebody configured wrong. A diff is not: a new switch case,
a comment, a rename are all legitimately unmutatable, and failing a gate for one
is failing a change for being correct.

The count is read through an optional interface, the way RemoveAll and the
gated counters already are. The reporter decorators forward it, and that is the
part that would have been missed: without forwarding, the count is unreadable
exactly when the stack is deepest -- the gated run that raised this. Backlog
entry 12's class, caught again, and pinned by a test over gated, verbose, and
gated-over-verbose.

The end-to-end case runs both stacks, because the plain one would have passed
either way.

mutantsPerReleaseOnThisRepository 785 to 789.
@Disble Disble added the bug Something isn't working label Aug 30, 2026
@sonarqubecloud

Copy link
Copy Markdown

@Disble
Disble merged commit ec1a3a3 into main Aug 30, 2026
8 checks passed
@Disble
Disble deleted the fix/a-change-with-no-mutants branch August 30, 2026 21:59
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