Skip to content

ci(mutation): cap the test binaries' memory so the job completes - #20

Merged
chetto1983 merged 3 commits into
masterfrom
claude/modernizzazione-design-5y4lwf
Nov 7, 2026
Merged

chetto1983 merged 3 commits into
masterfrom
claude/modernizzazione-design-5y4lwf

Conversation

@chetto1983

Copy link
Copy Markdown
Owner

What & why

The cargo-mutants job was killed ("received a shutdown signal") before any result, in every run checked (7 to 12). The cause is memory, not disk (the runner had 86 GB free): mutants that make FrameReader::next_frame, complete_len or Master::receive hand back frames at once make a read loop spin and grow the tests' traffic log until memory runs out.

Excluding them one by one did not converge (the full local run found three more after the first two), so test binaries now run under a 4 GiB address-space cap through cargo's target runner (scripts/memory-capped.sh); builds are not capped. A runaway mutant then fails its allocation and counts as caught. The exclusions added earlier on this branch are dropped again, and the disk prints go.

Type

  • chore / ci / build

Checklist

  • No file exceeds 600 LOC (npm run file-size)
  • Prettier on the workflow
  • Rust/frontend gates: N/A, no source change

Notes for reviewers

Measured 2026-11-07, locally, same command as CI (-j 2 --timeout 60 --copy-target=true, CARGO_PROFILE_DEV_DEBUG=0):

  • Without the cap, each runaway mutant: 14.8 GB to under 2 GB available in 25-30 s.
  • With the cap: unmutated baseline passes; the 7 runaway mutants caught in 62 s.
  • Full suite with the cap: 224 mutants in 14 min: 197 caught, 0 missed, 4 timeouts, 23 unviable, exit code 3 (accepted by the gate), memory never under 12.4 GB.

Not shown: the 3 Master::receive runaway mutants are caught by the failed allocation; I did not check whether an assertion would catch them first. The CI runner is the first test of the cap on GitHub's image.


Generated by Claude Code

…'s memory

The cargo-mutants job was stopped by the runner ("received a shutdown
signal") in every master run checked (7 to 12), 9 to 20 minutes in. The
disk was not the cause, as the last change assumed: the runner had 86 GB
free. Memory was. The three mutants that make FrameReader::next_frame
return Ok(vec![]), Ok(vec![0]) or Ok(vec![1]) at once fail four frame_io
unit tests each (checked by applying them by hand), but the slave's read
loop in the same test binary spins on the frames it is handed and grows
until memory runs out: from 14 GB to under 2 GB available in about 30 s,
measured for each of the three. With -j 2 on a 16 GB runner the kernel
then kills the runner itself.

They are excluded with that reason, like the other analysed exclusions;
221 mutants remain. The workflow comment no longer blames the disk; the
build without debug info stays (1.7 GB of target instead of 4.0 GB).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Rdii6QU3MVeyCefPEk5AL
The full local run stopped on memory while this mutant ran. Measured alone
(2026-11-07): available memory fell from 14.8 GB to 1.8 GB in 26 s, because an
empty frame leaves the buffer unchanged and the slave's read loop is handed one
empty frame after another. Applied by hand it fails 10 of the 11 frame_io unit
tests, so the exclusion hides no gap. Ok(None) and Ok(Some(1)) were measured
too: both caught, memory flat.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Rdii6QU3MVeyCefPEk5AL
…way mutants

Mutants that make FrameReader::next_frame, complete_len or Master::receive hand
back frames at once make a read loop spin and grow the tests' traffic log until
memory runs out. Excluding them one by one did not end: the full local run found
three more (Master::receive) after the first two exclusions, with 66 mutants
still untested. Measured 2026-11-07: each such mutant takes available memory
from 14.8 GB to under 2 GB in 25-30 s.

Test binaries now run under a 4 GiB address-space cap through cargo's target
runner (scripts/memory-capped.sh); builds are not capped. With it the unmutated
tests pass and all 7 runaway mutants are caught, by a failed allocation, in 62 s,
with memory never under 12.6 GB. The two exclusions are dropped, so those
mutants are tested again. The disk prints go: the disk was not the cause, the
runner had 86 GB free.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Rdii6QU3MVeyCefPEk5AL
@coderabbitai

coderabbitai Bot commented Nov 7, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: dd5d5624-83f0-4964-9bee-51db8fd16d35
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

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

@chetto1983
chetto1983 merged commit f90306c into master Nov 7, 2026
19 checks passed
@chetto1983
chetto1983 deleted the claude/modernizzazione-design-5y4lwf branch November 11, 2026 08:26
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.

2 participants