[Chore] Require changed-code mutation tests before review - #1479
Draft
zoomote[bot] wants to merge 2 commits into
Draft
[Chore] Require changed-code mutation tests before review#1479zoomote[bot] wants to merge 2 commits into
zoomote[bot] wants to merge 2 commits into
Conversation
Contributor
Review processThis PR was opened by an automated account. A human maintainer must verify the change intent, provenance, and validation before merging.
Current step: Mark the PR ready to start CodeRabbit after required CI passes. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related GitHub Issue
Closes: N/A - requested from the linked Discord discussion.
Description
Adds a fork-safe
mutation-diffpull-request check that derives executable TypeScript/JavaScript line ranges from the PR merge base and runs StrykerJS only against those ranges. The gate covers focused Vitest suites in core, cloud, telemetry, vscode-shim, webview-ui, and the extension; unsupported or non-executable changes return an explicit not-applicable success.Any surviving or uncovered changed-code mutant fails with bounded line annotations. Each package fails closed above 500 changed executable lines or 400 generated/valid mutants, and broad or unreasoned Stryker exclusions are rejected. Mutation results are never cached, and every selected run uses
--force.Webview and extension changes use Vitest's dependency graph to discover affected tests, then prefer directly named unit specs when available before passing exact test files to Stryker. This keeps the new surfaces practical without including VS Code e2e tests. The lockfile also pins patched
qs@6.15.2, and the Stryker config remains safely importable by Knip.Test Procedure
pnpm test:mutation-cito exercise merge-base selection, executable ranges, caps, report evaluation, and exclusion policy.pnpm testfor the complete workspace suite.actionlint .github/workflows/mutation-testing.yml.Pre-Submission Checklist
Visual Snapshots
Not applicable.
Videos (interaction / animation only)
Not applicable.
Documentation Updates
Additional Notes
After this workflow lands on
main, a repository administrator must add the stablemutation-diffcontext to the required-status-check ruleset. Requiring it before the workflow exists on the default branch could leave unrelated pull requests permanently pending.CLI, types, and VS Code e2e surfaces remain explicit not-applicable paths. Webview and extension mutation runs are bounded by the existing 12-minute per-process and 30-minute workflow timeouts; multi-package PRs can therefore fail on runtime before reaching the numeric mutant cap and may need to be split.
Get in Touch
Continue in the originating Discord thread or mention
@roomoteon the pull request.