Skip to content

fix: handle mutation child errors and processes option - #42

Open
wheesnoza wants to merge 1 commit into
pestphp:5.xfrom
wheesnoza:fix/parallel-processes-and-child-errors
Open

fix: handle mutation child errors and processes option#42
wheesnoza wants to merge 1 commit into
pestphp:5.xfrom
wheesnoza:fix/parallel-processes-and-child-errors

Conversation

@wheesnoza

Copy link
Copy Markdown

This PR proposes a small fix for two related behaviours around mutation parallel execution. I am opening it to confirm whether these behaviours are intentional, but both currently seem to make mutation results less reliable.

--parallel is removed from the initial test run so mutation testing can collect coverage before running mutations itself. --processes, however, is still forwarded to that initial run. When --parallel is removed but --processes remains, the initial run can fail before mutation testing starts.

Mutation child processes also treat every non-successful exit as a tested mutation. That makes assertion failures and runtime errors indistinguishable, so a child process error can be counted as a killed mutation and inflate the score.

What changed

ProcessesOption is now removed from the forwarded initial test-run arguments after being read into the mutation configuration.
Mutation child processes now distinguish assertion failures from execution errors. Exit code 1 is still reported as tested, while other non-successful exits are reported as errored.
The new errored result is wired through the result enum, counters, events, and printer output.

Testing

  • composer test

@wheesnoza
wheesnoza force-pushed the fix/parallel-processes-and-child-errors branch from 56a9783 to c90982a Compare August 21, 2026 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant