Skip to content

Cut the mutation testing timeout from 60s to 20s - #6

Merged
Paururo merged 2 commits into
mainfrom
fix/mutants-timeout
Aug 22, 2026
Merged

Cut the mutation testing timeout from 60s to 20s#6
Paururo merged 2 commits into
mainfrom
fix/mutants-timeout

Conversation

@Paururo

@Paururo Paururo commented Aug 22, 2026

Copy link
Copy Markdown
Member

Came out of validating PR #5: the mutation run on main failed, and it was not the actions bump.

Twenty mutants in the parser turn a byte scanner's pos += 1 into -= or *=, which loops forever. That is expected and cargo-mutants reports them as timeouts rather than survivors, but at the configured minute each they cost twenty minutes of a run that should take twelve, and they do not spread evenly across the shards. Five landed consecutively in shard 2, which died at exit 143 with its report never uploaded.

The unit tests finish in half a second, so 20s is still more than thirty times the headroom they need, and it brings the whole set of timeouts under seven minutes.

Checked locally on two shards: the same mutants are caught, and the ones that loop still time out rather than being reported as survivors.

Twenty mutants in the parser turn a byte scanner's `pos += 1` into `-=`
or `*=`, which loops forever. That is expected and they are reported as
timeouts, but at a minute each they cost twenty minutes of a run that
should take twelve, and they do not spread evenly: the run on 2026-08-22
had five land consecutively in shard 2 and the job died at exit 143 with
the report never uploaded.

The unit tests finish in half a second, so twenty seconds is still more
than thirty times the headroom they need, and it brings the whole set of
timeouts under seven minutes.
The pull request that tuned the mutation timeouts touched only
.cargo/mutants.toml and arrived with no label, because nothing in the
config matched it. That is the failure this file already warns about a
few lines down, in the comment explaining why the ci rule is .github/**
rather than a list of the files in it.

cargo-mutants' scope and timeouts are test configuration, so .cargo/**
joins the tests label.
@github-actions github-actions Bot added the ci Workflows, checks and repository automation label Aug 22, 2026
@Paururo
Paururo merged commit 1d88a13 into main Aug 22, 2026
8 checks passed
@Paururo
Paururo deleted the fix/mutants-timeout branch August 22, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Workflows, checks and repository automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant