Skip to content

docs(mutation-testing): record Stryker.NET test-case-filter keeps NoCoverage under perTest - #11078

Merged
kyle-sexton merged 4 commits into
mainfrom
host-run/9687-stryker-net-probe
Oct 30, 2026
Merged

kyle-sexton merged 4 commits into
mainfrom
host-run/9687-stryker-net-probe

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Closes #9687

Summary

Records the Stryker.NET probe result in plugins/mutation-testing/skills/audit/context/tool-test-restriction.md: with coverage-analysis perTest, test-case-filter applies in the initial coverage run, and a mutant reached only by excluded tests reports NoCoverage. The row's no-coverage column moves from unknown to yes, with the version (5.0.0), probe date (2026-10-29) and a recheck trigger. Audit SKILL.md already lets that column choose the tool's own restriction, so it needs no edit.

Fix

  • Stryker.NET row: observed behavior, yes, Stryker.NET 5.0.0, probe date, recheck trigger; the Option cell notes that test-case-filter is a config-file key (5.0.0 has no CLI flag for it).
  • Changelog fragment for mutation-testing (patch).

Verification

Probe on Linux, .NET SDK 10.0.403, against a throwaway copy of plugins/mutation-testing/scripts/fixtures/dotnet-test-selection (library Shop, test projects Shop.Tests and Shop.Specs). The copy was retargeted from net8.0 to net10.0 because the host has no .NET 8 runtime. Tool pinned in a local manifest inside the copy:

dotnet new tool-manifest
dotnet tool install dotnet-stryker --version 5.0.0
# per configuration, from the named directory:
dotnet stryker -f stryker-config.json -O result

Each config file:

{ "stryker-config": {
  "coverage-analysis": "perTest",
  "test-case-filter": "<filter, omitted when none>",
  "test-projects": ["<projects>"],
  "reporters": ["json", "cleartext"],
  "verbosity": "debug"
} }

Mutants: Add a + b to a - b (L5), Discount price - (price * rate) to price + (price * rate) (L7) and price * rate to price / rate (L7).

Config Run from test-projects test-case-filter Tests found (initial run) Killed Survived NoCoverage
A tests/Shop.Tests Shop.Tests none 5 3 0 0
B tests/Shop.Tests Shop.Tests FullyQualifiedName~CalculatorTestsExtra 2 2 0 1 (Add)
C src/Shop both none 9 3 0 0
D src/Shop both FullyQualifiedName~CalculatorTestsExtra 2 2 0 1 (Add)
E src/Shop Shop.Specs FullyQualifiedName~DiscountSpecs 2 2 0 1 (Add)
F src/Shop Shop.Specs none 4 2 1 (Add) 0
  • The filter applies in the initial (coverage) run: the tests-found count drops (5 to 2, 9 to 2, 4 to 2), and coveredBy in the JSON report lists only matching tests.
  • A mutant reached only by an excluded test reports NoCoverage: E vs F is the discriminating pair. Add is reached in Shop.Specs only by OtherSpecs; unfiltered it is Survived (covered by 1 test), filtered out it is NoCoverage (covered by 0).
  • Per-project scoping with a shared library: naming one test project counts only that project's tests for coverage and kills (C's Discount mutants list tests from both projects; F's list only Shop.Specs tests). With both projects and a filter matching tests in one of them (D), the other project contributes no tests, and Stryker.NET logs a warning that the project "did not report any test" (suggesting a test adapter problem) while the run still exits 0.

Done-when checks on the committed head:

  • awk -F'|' '/stryker-net/ {print $6}' plugins/mutation-testing/skills/audit/context/tool-test-restriction.md prints yes.
  • grep -E 'stryker-net.*[0-9]+\.[0-9]+\.[0-9]+.*2026-[0-9]{2}-[0-9]{2}' ... prints the row.
  • bash scripts/affected-tests.sh --run exits 0 (no suites selected for these files).
  • bash scripts/check-affected.sh --tests exits 0: 14 passed, 2 skipped.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 2 commits October 29, 2026 18:21
…overage under perTest

Probe of Stryker.NET 5.0.0 on the dotnet-test-selection fixture: the
filter applies in the initial coverage run, so a mutant reached only by
excluded tests reports NoCoverage. The tool-test-restriction row now
reads yes with version, probe date and recheck trigger.

Refs: #9687

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 29, 2026 22:30
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T22:34:31.721209Z cff34f3 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed f32f98eeb7bc2241b276b4d6f0c071da72a1b6e3: 0 finding(s), 0 as inline comments.

Incremental security review of f32f98e. It covers the two files changed since cff34f3: the changelog fragment and plugins/mutation-testing/skills/audit/context/tool-test-restriction.md. I did not read the PR context file or dotnet-test-selection.sh, and I did not run the skip-gate checks for a closed PR or an earlier review of this head.

What changed. The change is documentation only. It adds a "Running Stryker.NET on a test set" section that tells the audit skill how to run Stryker.NET on a restricted test set. The skill builds test-projects and a test-case-filter from dotnet-test-selection.sh output and writes them to an untracked copy of the Stryker config beside the original. It passes that copy with --config-file and deletes it when the run ends, so the user's own config is never edited. The change also updates the stryker-net table row and its source link.

Checks.

  • Trust controls: none of the trust-control paths is touched. There is no change to the trusted-actor list, token scopes, the kill switch, merge holds, .github/actions/, or any workflow.
  • Manifests: no plugin.json or marketplace.json is changed. No manifest <field> lines apply.
  • Instruction surface: the change adds guidance and does not delete, narrow or soften any standing rule. The "never edit the user's config file" rule is new and protective.
  • Injection surface: the filter terms come from the repository's own test set through a repo script. The text says each term ends in . so it matches exact class names, and that a non-zero script exit refuses the run. Stryker already runs the project's tests, so the config copy adds no new code-execution surface.
  • Leftover copy: the temporary config copy could keep the original's settings, but the text requires deleting it however the run ends. A leftover copy would be a robustness issue, not a security one.

No security findings.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on cff34f35779bfe8f2c89d704a860de95e2e52c14; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed f32f98eeb7bc2241b276b4d6f0c071da72a1b6e3: 3 finding(s), 2 as inline comments.

Incremental review of the new "Running Stryker.NET on a test set" section and the updated stryker-net row. I read the section against plugins/mutation-testing/scripts/dotnet-test-selection.sh and skills/audit/SKILL.md. I ran nothing; the probe results are author-claimed and unverified by me. The procedure is coherent. Three accuracy gaps need fixing, all inline: one claim the recorded probe cannot support, one claim the script contradicts, and one unstated step in the translation from the script's output. The bump level (patch) fits a docs-only change. The earlier-reviewed files are unchanged, so I did not re-review them.

critical-findings: 1

Findings not posted inline (their path, line or side is malformed):

  • plugins/mutation-testing/skills/audit/context/tool-test-restriction.md:44: Unstated step when reading the script's lines. Each line is '<project>' --filter '<expr>' with both parts shell-quoted, and a ' inside a value is written '\'' (script lines 125-128 and 199). The section says to take "each line's project" and "--filter expressions" but not to remove that quoting before writing them into JSON. An agent that copies the tokens verbatim puts literal single quotes into test-projects and test-case-filter, so Stryker would find no project or no test. Add one clause: strip the shell quoting and undo '\'' before writing the values.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cff34f3577

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

kyle-sexton and others added 2 commits October 29, 2026 20:54
…filter

The tool-test-restriction row read yes but named no mapping from test
paths to the filter. A new section builds test-projects and
test-case-filter from dotnet-test-selection.sh output, writes them into a
copy of the Stryker config under .work/, and passes it with
--config-file, leaving the user's config untouched. The row's Source now
links the #test-case-filter-string section.

Refs: #9687

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…riginal

Writing the copy beside the user's config keeps every relative path in it
resolving as before, whichever base Stryker.NET uses. Adds the
cross-project filter caveat and a recheck trigger for the options the
section relies on.

Refs: #9687

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 30, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 2 inline finding(s) on f32f98eeb7bc2241b276b4d6f0c071da72a1b6e3; the summary is in this lane's pull request comment.

claude-lane: claude-review

Merged via the queue into main with commit 800a858 Oct 30, 2026
40 checks passed
@kyle-sexton
kyle-sexton deleted the host-run/9687-stryker-net-probe branch October 30, 2026 01:03
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.

docs(mutation-testing): probe Stryker.NET test-case-filter with perTest coverage and record it

1 participant