Skip to content

[Improve] Make mutation warnings easier to review - #1619

Merged
edelauna merged 2 commits into
mainfrom
improve/deduplicate-mutation-annotations-3dmuxphmo3gmd
Sep 12, 2026
Merged

[Improve] Make mutation warnings easier to review#1619
edelauna merged 2 commits into
mainfrom
improve/deduplicate-mutation-annotations-3dmuxphmo3gmd

Conversation

@zoomote

@zoomote zoomote Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

​Created by Roomote. Follow up by mentioning @roomote, in the web UI, or in Discord.

What changed

Mutation testing now emits at most one Files changed warning per source location. When several mutants share a line, the warning reports the grouped count and one representative example; each message includes its file and line so repeated mutant types remain distinguishable in logs.

Survivor and no-coverage package aggregates are no longer emitted as separate workflow warnings when the detailed location annotations already communicate those findings. The job summary and mutation report artifact continue to list every mutant.

Focused coverage executes successful manifest runs for both Advisory findings and Passed results, and locks annotation input immutability, deterministic representative selection, and singleton formatting. The runtime path uses the same defaults as before; the added injection points are test-only seams.

Why this change was made

The advisory mutation output introduced by #1610 produced repeated, indistinguishable warnings on #1614. Consolidating the annotation surface preserves useful review signals without flooding Files changed or hiding detailed evidence.

Impact

Mutation findings remain advisory. The existing executable-line cap and failures that prevent trustworthy scope calculation remain the only blocking behavior.

Related: #1610, #1614.

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: f17141fc-4b3c-498b-8f85-21208e91428f

📥 Commits

Reviewing files that changed from the base of the PR and between 5e40fae and ab080ad.

📒 Files selected for processing (2)
  • scripts/stryker-diff.mjs
  • scripts/stryker-diff.test.mjs

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.

📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (2)
Check strict typing and exhaustive behavior across normal, boundary, error, cancellation, retry, and compatibility paths.

⚙️ CodeRabbit configuration file

Files:

  • scripts/stryker-diff.test.mjs
  • scripts/stryker-diff.mjs
Act as an adversarial second-opinion reviewer.

⚙️ CodeRabbit configuration file

Files:

  • scripts/stryker-diff.test.mjs
  • scripts/stryker-diff.mjs
🔇 Additional comments (2)
scripts/stryker-diff.mjs (1)

463-493: LGTM!

Also applies to: 668-676, 692-692, 722-724, 744-744

scripts/stryker-diff.test.mjs (1)

533-558: LGTM!

Also applies to: 560-566, 645-688


📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Consolidated multiple findings at the same source location into a single annotation with a count.
    • Removed redundant aggregate advisories for surviving or uncovered mutants.
    • Improved package status labeling when blocking findings are present.
    • Preserved source data ordering during report processing.
  • Tests
    • Added coverage for grouped annotations, source-location details, and package status reporting.
    • Updated report evaluation expectations.

Walkthrough

The Stryker diff reporting now groups annotations by mutation location, removes redundant aggregate advisories, supports injected mutation report functions, and marks rows with blocking mutants as advisory findings. Tests cover the updated behavior.

Changes

Stryker reporting behavior

Layer / File(s) Summary
Location-based mutation annotations
scripts/stryker-diff.mjs, scripts/stryker-diff.test.mjs
formatAnnotations groups blocking mutants by repository path and line, sorts a copied array, and reports grouped gaps. Tests verify grouped and singleton annotations.
Advisory and manifest result handling
scripts/stryker-diff.mjs, scripts/stryker-diff.test.mjs
evaluateReport no longer emits a redundant aggregate advisory. runManifest accepts injectable mutation and report readers and labels rows with blocking mutants as Advisory findings. Tests verify the revised output.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: taltas

Merge Risk: ⚪ Minimal · up to ab080

Mutation warnings remain advisory while detailed location annotations and manifest result rows retain the intended reporting behavior.

🚥 Pre-merge checks | ✅ 7 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the change, motivation, impact, and related issues, but it omits the required issue-link format, Test Procedure section, Pre-Submission Checklist, documentation impact, and ot… Add the required template sections. Provide an approved issue reference such as "Closes: #123", detailed test steps and environment information, completed checklist items, documentation impact, and any relevant additional notes.
✅ Passed checks (7 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Regression Evidence ✅ Passed PASS: The changed behaviors have focused unit or integration-layer coverage. formatAnnotations tests cover grouped locations, singleton formatting, representative selection, input immutability, and …
Security Boundaries ✅ Passed No changed path meets the security failure conditions. formatAnnotations only groups and formats existing mutation fields; the new location and count are emitted through the existing workflow escapi…
Persistence Integrity ✅ Passed No changed persistence failure exists. The default mutation path remains synchronous: runStryker uses spawnSync, and runManifest reads mutation.json only after the synchronous run returns. The…
Lifecycle Resource Cleanup ✅ Passed No changed lifecycle path introduces or duplicates a resource. The authoritative diff changes annotation grouping, report evaluation, and dependency injection in runManifest; it adds no listener, wa…
Title check ✅ Passed The title clearly summarizes the main change: improving mutation warning review by reducing duplicate and indistinguishable warnings.
Full details: Description check

Explanation

The description explains the change, motivation, impact, and related issues, but it omits the required issue-link format, Test Procedure section, Pre-Submission Checklist, documentation impact, and other template sections.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch improve/deduplicate-mutation-annotations-3dmuxphmo3gmd

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.

@github-actions

github-actions Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Review status

This PR was opened by an automated account. A human maintainer must verify the change intent, provenance, and validation before merging.

Current step: The required review sequence passed. Remaining merge requirements apply.

Review-state labels are managed by this workflow; do not edit them manually.

@codecov

codecov Bot commented Sep 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@edelauna

Copy link
Copy Markdown
Contributor

@CodeRabbit review

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@zoomote

zoomote Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the Regression Evidence failure in ab080ada2.

Focused tests now execute successful runManifest flows and assert Advisory findings for blocking mutants with no aggregate advisories and Passed for killed-only results. Annotation coverage proves caller order is unchanged, deterministic path/line sorting chooses the expected grouped representative including status/mutator/replacement, and singleton messages retain the location prefix. The only production change is optional dependency injection for the existing runtime defaults.

Validation passed: focused mutation tests 39/39, formatting, lint, types, full tests, and git diff --check. There were no inline CodeRabbit threads to resolve; the finding exists only in the parent pre-merge summary.

@edelauna

Copy link
Copy Markdown
Contributor

@CodeRabbit review

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@edelauna

Copy link
Copy Markdown
Contributor

@CodeRabbit review

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@edelauna
edelauna marked this pull request as ready for review September 12, 2026 14:21
@edelauna
edelauna enabled auto-merge September 12, 2026 14:22
@edelauna
edelauna added this pull request to the merge queue Sep 12, 2026
Merged via the queue into main with commit 0ea6905 Sep 12, 2026
29 of 30 checks passed
@edelauna
edelauna deleted the improve/deduplicate-mutation-annotations-3dmuxphmo3gmd branch September 12, 2026 14:31
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