Skip to content

test: keep large payloads out of mutant test output - #51

Merged
roxblnfk merged 2 commits into
4.xfrom
test/infection-memory
Oct 12, 2026
Merged

roxblnfk merged 2 commits into
4.xfrom
test/infection-memory

Conversation

@roxblnfk

@roxblnfk roxblnfk commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

🔍 What was changed

  • The 65 MB echo tests (testLongRawBody, testLongRawBodyAsync) no longer let the payload reach a test failure: a ServiceException raised during the call is rethrown with its message cut to 512 bytes, and the MultiRPC variants build their relay pool from SocketRelays instead of a connection string.
  • The mutation workflow uploads runtime/infection.log as an artifact, also for failed or cancelled runs.

Why?

  • The full Stryker report keeps every mutant's test output in memory, and five mutants produced almost all of it: AbstractRPC.php:63 (IfNegation), Frame.php:108 (IncrementInteger) and Frame.php:156 (DecrementInteger, BitwiseAnd) turn the echoed response into a ServiceException that quotes the whole body; Relay.php:28 (Identical) makes Relay::create() return the STDIN/STDOUT relay, so the request is written to the test process's own stdout.
  • Captured output went from 2.6 GB to 72 MB over 493 mutants; Infection's peak memory from 11.77 GB to 0.26 GB with --log-verbosity=all, 0.11 GB with the default verbosity. Escaped mutants and Covered MSI are unchanged (41, 91%).

Checklist

  • How was this tested:
    • Mutation workflow run in this PR, with a temporary step ranking mutants by output size
    • Mutants applied by hand and measured locally: testLongRawBody output 302 MB → 12 KB
    • Stryker report sending: only on push to 4.x, to be checked after merge

@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 433088e2-fdf6-44df-b6d9-e37cad928d4b

📥 Commits

Reviewing files that changed from the base of the PR and between ed18cc9 and c450e6e.


📒 Files selected for processing (4)
  • .github/workflows/mutation.yml
  • tests/Goridge/MultiRPC.php
  • tests/Goridge/RPC.php
  • tests/Goridge/Support/LargePayload.php

 ______________________________________________________________________________________________________________________________________________________________________________________________________________
< Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves. - Alan Kay >
 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR

🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

The log carries the output of escaped and timed-out mutants; keeping it after a failed or cancelled run lets the next memory or timeout problem be diagnosed without rerunning.

Assisted-By: Claude Opus 5.5
Infection keeps every mutant's test output in memory for the Stryker report. The 65 MB echo tests put the payload there twice over: a ServiceException quotes the whole response body, and a mutant that makes Relay::create() pick the STDIN/STDOUT pipes writes the request to the process's own stdout. Five mutants produced 2.6 GB of the 2.65 GB captured output.

Assisted-By: Claude Opus 5.5
@roxblnfk
roxblnfk force-pushed the test/infection-memory branch 3 times, most recently from 1a032b7 to c450e6e Compare October 12, 2026 12:20
@roxblnfk roxblnfk changed the title test: keep mutant test output small for the Stryker report test: keep large payloads out of mutant test output Oct 12, 2026
@roxblnfk
roxblnfk marked this pull request as ready for review October 12, 2026 12:48
@roxblnfk
roxblnfk requested a review from a team October 12, 2026 12:48
@roxblnfk
roxblnfk merged commit e903420 into 4.x Oct 12, 2026
14 of 15 checks passed
@roxblnfk
roxblnfk deleted the test/infection-memory branch October 12, 2026 12:48
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