alunduil / alunduil/zfs-replicate

The nightly mutation sweep spends the runner's cores without losing verdict attribution

Aberta
#676 0 comentários 0 reações 0 responsáveis Ver no GitHub
enhancement
Linguagem predominante
Python
Estrelas
24
Forks
6
Merge médio
3h 11min
PRs com merge (30d)
49

Descrição

## User story

As a **maintainer watching the mutation score**, I want **the nightly sweep to use more than one core** so that **the run keeps finishing inside its timeout as the suite and the mutant count grow**.

## Current workaround

`daily.yml` runs `mutmut run --max-children 1`, one mutant at a time, each running the suite serially. The job carries a 120-minute cap described in the workflow as headroom for a slow runner. Nothing shortens the sweep today.

## Alternatives considered

mutmut's own parallel runner is out. #674 measured it mis-attributing child exit codes here: `cli/options.py` survivors swung 102, 110, 113 and 138 across four identical parallel runs against a stable 192 serial, and a mutant that always survives alone reported killed in parallel. `--max-children 1` is a correctness setting, not a resource limit, and should stay one until that is fixed upstream.

That leaves parallelism inside each mutant's test run. `pytest-xdist` gives it: one mutant at a time, so every verdict still belongs to the mutant that produced it, while `-n auto` spreads that mutant's suite across the runner's cores through `pytest_add_cli_args`.

The measurement has to decide it. #675 added `pytest-xdist`, measured `-n auto` at 7.9s against 6.5s serial on the pull request suite, and removed it again: at this size the workers cost more to start than they save. A mutmut sweep multiplies that per-mutant delta by the mutant count, so the sign of the delta matters more than its size, and it may well stay negative until the suite is much larger.

## Acceptance criteria draft

- [ ] A timed sweep on the runner compares `-n auto` against serial, at the same mutant selection, and the numbers go in the issue.
- [ ] If parallel wins, `pytest-xdist` returns as a `mutation` group dependency, `-n auto` reaches pytest through mutmut's `pytest_add_cli_args`, and `--max-children 1` stays.
- [ ] The score after the change matches the serial score for the same tree, confirming attribution survived.
- [ ] If parallel loses, this closes with the numbers recorded, so the next person does not re-derive them.

## Additional context

- #674 built the nightly job and measured mutmut's parallel runner.
- #675 added and then removed `pytest-xdist`, with the 7.9s/6.5s measurement.

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.