Skip to content

[Fix] Mutation warnings appear twice after drafts become ready - #1645

Merged
edelauna merged 1 commit into
mainfrom
fix/skip-draft-mutation-runs
Sep 15, 2026
Merged

edelauna merged 1 commit into
mainfrom
fix/skip-draft-mutation-runs

Conversation

@zoomote

@zoomote zoomote Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

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

What changed

Changed-code mutation testing now skips pull-request jobs while the PR is a draft. It starts when the PR becomes ready and continues to run for reviewable opens, new commits, reopens, and merge-queue checks.

Focused workflow tests model the draft-open to ready transition and preserve the supported reviewable event paths.

Why this change was made

PR #1644 showed GitHub retaining annotations from both the draft-open run and the ready-for-review run for the same head SHA. Within-run warning deduplication cannot remove annotations belonging to an earlier workflow run.

Impact

Draft PR creation no longer emits mutation annotations that GitHub can display again beside the ready-for-review results. Mutation enforcement remains unchanged once a PR is reviewable and in the merge queue.

@coderabbitai

coderabbitai Bot commented Sep 15, 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: 0cf888f1-fb76-4311-b4de-7355a80cbbd4

📥 Commits

Reviewing files that changed from the base of the PR and between 99025b1 and 2f943ba.

📒 Files selected for processing (2)
  • .github/workflows/mutation-testing.yml
  • scripts/stryker-diff.test.mjs

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

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

⚙️ CodeRabbit configuration file

Files:

  • scripts/stryker-diff.test.mjs
Require full commit SHA pins, least-privilege permissions, safe expression and shell interpolation, and trusted metadata handling.

⚙️ CodeRabbit configuration file

Files:

  • .github/workflows/mutation-testing.yml
Act as an adversarial second-opinion reviewer.

⚙️ CodeRabbit configuration file

Files:

  • scripts/stryker-diff.test.mjs

📝 Summary

Summary by CodeRabbit

  • Bug Fixes

    • Mutation testing now runs for merge queue checks and non-draft pull requests.
    • Draft pull requests are excluded until they become ready for review.
  • Tests

    • Added coverage for supported pull request events, draft-state handling, and merge queue execution.

Walkthrough

The mutation-diff job now skips draft pull requests while running for merge queue events. Tests verify the workflow trigger types, draft filtering, non-draft pull request actions, and merge queue execution.

Changes

Mutation testing workflow

Layer / File(s) Summary
Mutation testing draft guard
.github/workflows/mutation-testing.yml, scripts/stryker-diff.test.mjs
The mutation-diff job now requires a non-draft pull request or a merge_group event. Tests share workflow loading and verify the configured triggers and event filtering.

Priority: ⬇️ Low

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

Change: Bug fix

Suggested reviewers: taltas

Merge Risk: ⚪ Minimal · up to 2f943

The workflow and tests cover draft, reviewable pull-request, and merge-queue execution without identified merge-blocking risk.

🚥 Pre-merge checks | ✅ 7 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains what changed, why the change was needed, and the expected impact. It does not provide the required approved GitHub Issue link, detailed Test Procedure, pre-submission checklis… Add an approved issue reference under “Related GitHub Issue,” document exact test commands and verification steps under “Test Procedure,” complete the “Pre-Submission Checklist,” and state whether documentation updates are required.
✅ 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 The changed job-level draft guard has focused workflow coverage. The test verifies the exact if expression and the existing pull-request event types. It models the three relevant cases: draft pull r…
Security Boundaries ✅ Passed No changed path meets the security failure conditions. The only workflow change adds a job guard that skips mutation-diff when github.event.pull_request.draft is true and still runs for `merge_gro…
Persistence Integrity ✅ Passed No changed persistence path exists. The pull request adds only a job-level condition to skip mutation-diff for draft pull requests and adds tests for that condition. The workflow's existing artifact…
Lifecycle Resource Cleanup ✅ Passed PASS. The pull request adds only a job-level draft guard and test helpers. The changed workflow path skips mutation-diff for draft pull requests and runs it for merge_group or non-draft pull reque…
Title check ✅ Passed The title clearly identifies the main bug fix: duplicate mutation warnings after a draft pull request becomes ready.
Full details: Description check

Explanation

The description explains what changed, why the change was needed, and the expected impact. It does not provide the required approved GitHub Issue link, detailed Test Procedure, pre-submission checklist, or documentation assessment.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/skip-draft-mutation-runs

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 15, 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 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions github-actions Bot added the awaiting-ready CodeRabbit approved; waiting for the draft to be marked ready label Sep 15, 2026
@edelauna
edelauna marked this pull request as ready for review September 15, 2026 21:39
@edelauna
edelauna enabled auto-merge September 15, 2026 21:39
@github-actions github-actions Bot removed the awaiting-ready CodeRabbit approved; waiting for the draft to be marked ready label Sep 15, 2026
@edelauna
edelauna added this pull request to the merge queue Sep 15, 2026
Merged via the queue into main with commit 072b6f3 Sep 15, 2026
29 checks passed
@edelauna
edelauna deleted the fix/skip-draft-mutation-runs branch September 15, 2026 21:51
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