Skip to content

perf(ci): deal the fuzz smoke across a matrix instead of walking it on one runner#401

Merged
ion-alpha-dev merged 1 commit into
mainfrom
fuzz-shard-smoke
Jul 13, 2026
Merged

perf(ci): deal the fuzz smoke across a matrix instead of walking it on one runner#401
ion-alpha-dev merged 1 commit into
mainfrom
fuzz-shard-smoke

Conversation

@ion-alpha-dev

Copy link
Copy Markdown
Collaborator

What

The Fuzz smoke job now runs as a four-way matrix, passing FUZZ_SHARD=<k>/4 to dev/fuzz, and names its crasher artifact per shard.

Why

go test -fuzz accepts exactly one target per invocation, so the fuzz budget is paid per target and a single runner walking the list pays the sum of every target's budget. A push to main takes the full sweep by design: around ninety targets at five seconds each, plus each one's compile and baseline-coverage cost. That measured 10m34s on the last merge, and every merge pays it.

The targets are independent, and dev/fuzz already knows how to slice them: FUZZ_SHARD=<k>/<n> deals them out round-robin, deliberately not in contiguous blocks, because a package's targets sit next to each other in the list and tend to cost alike, so blocks would pile the slow ones into one shard. The nightly has been running this way already. This brings the same treatment to CI: the same fuzz-seconds, roughly a quarter of the wall clock.

A pull request is barely affected either way, since dev/fuzz already scopes a PR's run to the targets its diff can break, and a shard with nothing in its slice exits immediately.

fail-fast: false, because a crasher in one slice says nothing about the others, and finding two bugs in one run beats finding the first one twice.

The artifact rename is not cosmetic. The upload rejects a name another job in the same run already used, so under a matrix the fixed name would mean the second shard to find a crasher silently loses its reproducing input, which is the one thing this job exists to preserve.

How to verify

The budget per target (FUZZTIME=5s) and the set of targets covered are unchanged: four shards still cover every target between them. A crasher in any shard still fails the job, and CI success still gates on fuzz, which under a matrix aggregates every shard's result.

Locally, FUZZ_SHARD=1/4 ./dev/fuzz prints the slice it selected and the total it was drawn from.

Notes

The budget itself is untouched. Making the sweep cheaper by fuzzing less would defeat the point of having it.

@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

…n one runner

go test -fuzz takes one target per invocation, so the budget is paid per target and one runner pays the sum of them. A push to main takes the full sweep by design, which measured 10m34s. The targets are independent, and dev/fuzz already deals them out round-robin under FUZZ_SHARD, which the nightly has been using. Use it here too: same fuzz-seconds, roughly a quarter of the wall clock.

The crasher artifact is now named per shard. The upload rejects a name another job in the same run already used, so under a matrix a fixed name would mean the second shard to find a crasher silently loses its reproducing input, which is the one thing this job exists to keep.
@ion-alpha-dev ion-alpha-dev merged commit 119b631 into main Jul 13, 2026
1 check passed
@ion-alpha-dev ion-alpha-dev deleted the fuzz-shard-smoke branch July 13, 2026 03:18
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant