From bcf23fa074ea1486cdb0557a3e1608d16af9d4ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Sat, 12 Sep 2026 15:51:57 +0200 Subject: [PATCH 1/7] Run Stryker across unit test projects Upgrade to Stryker.NET 5 solution mode and cover the production projects exercised by all unit test projects. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .config/dotnet-tools.json | 2 +- .../workflows/mutation-test-improver.lock.yml | 2 +- .github/workflows/mutation-test-improver.md | 6 +-- .github/workflows/mutation-testing.yml | 7 +-- Directory.Build.props | 5 +- MutationTesting.slnx | 49 +++++++++++++++++++ docs/dev-guide.md | 10 ++-- ...stryker-config.json => stryker-config.json | 8 +-- test/Directory.Build.targets | 1 + 9 files changed, 70 insertions(+), 20 deletions(-) create mode 100644 MutationTesting.slnx rename test/UnitTests/Microsoft.Testing.Platform.ServerMode.Client.Sources.UnitTests/stryker-config.json => stryker-config.json (69%) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index bb3c9bced7..8f2869860d 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -10,7 +10,7 @@ "rollForward": false }, "dotnet-stryker": { - "version": "4.16.0", + "version": "5.0.0", "commands": [ "dotnet-stryker" ], diff --git a/.github/workflows/mutation-test-improver.lock.yml b/.github/workflows/mutation-test-improver.lock.yml index eaa6007cab..37eec11222 100644 --- a/.github/workflows/mutation-test-improver.lock.yml +++ b/.github/workflows/mutation-test-improver.lock.yml @@ -1,4 +1,4 @@ -# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"32929f6a8a156bee957e068efd4dc5750ff1a4d3626e2a39e157f0e784bcbfc5","body_hash":"6c99ecafe31af8d15bfdfff93ce62b2844c59154fe96dbceeb65936a4119a0e8","compiler_version":"v0.86.2","strict":true,"agent_id":"copilot","detection_agent_id":"copilot","detection_agent_model":"detection","engine_versions":{"copilot":"1.0.79"}} +# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"32929f6a8a156bee957e068efd4dc5750ff1a4d3626e2a39e157f0e784bcbfc5","body_hash":"99a42acd6177b55146f94acfdab16a4f46e0cf2a3d994cf39ae4bf0a3605188f","compiler_version":"v0.86.2","strict":true,"agent_id":"copilot","detection_agent_id":"copilot","detection_agent_model":"detection","engine_versions":{"copilot":"1.0.79"}} # gh-aw-manifest: {"version":1,"secrets":["GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/cache/restore","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/cache/save","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/checkout","sha":"3d3c42e5aac5ba805825da76410c181273ba90b1","version":"v7.0.1"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"820762786026740c76f36085b0efc47a31fe5020","version":"v7.0.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"6aab9e5b5c91c615506061f09bedd81a23babe3c","version":"v0.86.2"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.27.44","digest":"sha256:0d727725c737b58c7bdf51f640cffb928385ec46517e0917c7f1a02f1bada8b4","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.27.44@sha256:0d727725c737b58c7bdf51f640cffb928385ec46517e0917c7f1a02f1bada8b4"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.44","digest":"sha256:b50fbadba138f6e9aba94aca09711335c489bb3b15861220cb66f6092e042dc7","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.44@sha256:b50fbadba138f6e9aba94aca09711335c489bb3b15861220cb66f6092e042dc7"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.27.44","digest":"sha256:83e48bbe12c634be8c228a576832fe45f66c529ac3659db92bddbcf2eeb6d627","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.27.44@sha256:83e48bbe12c634be8c228a576832fe45f66c529ac3659db92bddbcf2eeb6d627"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.4.9","digest":"sha256:e5a1569aeaf41820fa7bdee3e94468cae448133cdbf00119ad24f5b74db1ab9f","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.4.9@sha256:e5a1569aeaf41820fa7bdee3e94468cae448133cdbf00119ad24f5b74db1ab9f"},{"image":"ghcr.io/github/gh-aw-node","digest":"sha256:0d9f1fb5fd6610c0ac1f5194a38e45a8a1e81f8a390d5142d8e4e6f26a4b3196","pinned_image":"ghcr.io/github/gh-aw-node@sha256:0d9f1fb5fd6610c0ac1f5194a38e45a8a1e81f8a390d5142d8e4e6f26a4b3196"},{"image":"ghcr.io/github/github-mcp-server:v1.9.0","digest":"sha256:881b53d6f75f69bdbc1b5b10fc2f1361717c19054143b3a8529fb5c32061a50e","pinned_image":"ghcr.io/github/github-mcp-server:v1.9.0@sha256:881b53d6f75f69bdbc1b5b10fc2f1361717c19054143b3a8529fb5c32061a50e"}]} # This file was automatically generated by gh-aw (v0.86.2). DO NOT EDIT. To debug this workflow, load the skill at https://github.com/github/gh-aw/blob/main/debug.md # diff --git a/.github/workflows/mutation-test-improver.md b/.github/workflows/mutation-test-improver.md index 83ff808c41..4118899481 100644 --- a/.github/workflows/mutation-test-improver.md +++ b/.github/workflows/mutation-test-improver.md @@ -114,7 +114,7 @@ Always be: ## Scope -Mutation testing currently only covers `Client/**/*.cs` in `src/Platform/Microsoft.Testing.Platform.ServerMode.Client.Sources`, driven by `test/UnitTests/Microsoft.Testing.Platform.ServerMode.Client.Sources.UnitTests/stryker-config.json` and run daily by [`.github/workflows/mutation-testing.yml`](../workflows/mutation-testing.yml). **Do not** widen `mutate:` scope, add new mutated projects, or change thresholds — those are maintainer decisions. If you believe the scope should grow, say so in the "Suggested Actions" section of the monthly report rather than doing it yourself. +Mutation testing covers the production projects exercised by the unit-test projects in `MutationTesting.slnx`, driven by the root `stryker-config.json` and run daily by [`.github/workflows/mutation-testing.yml`](../workflows/mutation-testing.yml). **Do not** widen the solution, mutate scope, or thresholds — those are maintainer decisions. If you believe the scope should grow, say so in the "Suggested Actions" section of the monthly report rather than doing it yourself. ## Persistent state @@ -163,9 +163,9 @@ For **at most 2** of the remaining highest-value `Survived` or `NoCoverage` muta 3. Read the mutated file and surrounding context to understand the intended behavior and what the specific mutation (e.g. a boundary flip, boolean negation, removed block) would break. 4. If you cannot confidently explain the intended behavior, skip this mutant — do not guess. 5. If the mutant looks behaviorally equivalent (the mutated code cannot be distinguished from the original by any observable behavior), record it in the monthly report as a known equivalent mutant with your reasoning, and skip it. -6. Otherwise, find (or create) the corresponding test file under `test/UnitTests/Microsoft.Testing.Platform.ServerMode.Client.Sources.UnitTests` and add a focused test asserting the exact behavior the mutant would violate. Match the project's existing test framework and assertion style (check its `BannedSymbols.txt` if present, otherwise mirror neighboring tests). +6. Otherwise, find (or create) the corresponding test file under the unit-test project associated with the mutated production project and add a focused test asserting the exact behavior the mutant would violate. Match that project's existing test framework and assertion style (check its `BannedSymbols.txt` if present, otherwise mirror neighboring tests). 7. Build and run the unit test project with `$GITHUB_WORKSPACE/.dotnet/dotnet` to confirm the new test compiles and passes against the original (unmutated) code. -8. **Verify the fix**: re-run `$GITHUB_WORKSPACE/.dotnet/dotnet tool restore` then, from `test/UnitTests/Microsoft.Testing.Platform.ServerMode.Client.Sources.UnitTests` with `MutationTesting=true`, run `$GITHUB_WORKSPACE/.dotnet/dotnet stryker --output ../../../artifacts/mutation-testing-verify --skip-version-check`. Confirm the targeted mutant's status flipped to `Killed` in the new report. +8. **Verify the fix**: re-run `$GITHUB_WORKSPACE/.dotnet/dotnet tool restore`, then from the repository root run `MutationTesting=true $GITHUB_WORKSPACE/.dotnet/dotnet stryker --output artifacts/mutation-testing-verify --skip-version-check`. Confirm the targeted mutant's status flipped to `Killed` in the new report. - Count each Stryker invocation against the workflow's total verification budget. If the budget is exhausted, stop attempting fixes and continue to Step 5. - If it did not flip, don't force it — try at most one more angle only when verification budget remains; otherwise abandon this mutant, record the attempt outcome in the monthly report, restore the test worktree to remove the abandoned edits, and move to the next candidate. 9. For each mutant you successfully kill, emit a safe-output request for a small draft PR from a fresh branch (`mutation-test-improver/`) with: diff --git a/.github/workflows/mutation-testing.yml b/.github/workflows/mutation-testing.yml index f6935d3ad7..a165f71370 100644 --- a/.github/workflows/mutation-testing.yml +++ b/.github/workflows/mutation-testing.yml @@ -2,9 +2,7 @@ name: Mutation testing on: schedule: - # Runs daily (rather than weekly) so the mutation-test-improver workflow has fresh - # data every day to act on. Stryker only mutates the small, focused Client sources - # scope, so the added runner cost of daily execution is small in absolute terms. + # Runs daily so the mutation-test-improver workflow has fresh data to act on. - cron: '0 5 * * *' workflow_dispatch: @@ -19,7 +17,7 @@ jobs: stryker: name: Run Stryker.NET runs-on: ubuntu-latest - timeout-minutes: 90 + timeout-minutes: 360 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -31,7 +29,6 @@ jobs: run: ./.dotnet/dotnet tool restore - name: Run mutation tests - working-directory: test/UnitTests/Microsoft.Testing.Platform.ServerMode.Client.Sources.UnitTests env: MutationTesting: true run: | diff --git a/Directory.Build.props b/Directory.Build.props index 57d6588367..f02b3f855c 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -24,6 +24,7 @@ + true Microsoft - Open + + Open + $(OpenPublicKey) diff --git a/MutationTesting.slnx b/MutationTesting.slnx new file mode 100644 index 0000000000..aca937f601 --- /dev/null +++ b/MutationTesting.slnx @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/dev-guide.md b/docs/dev-guide.md index ae9d3f3db6..e590c35494 100644 --- a/docs/dev-guide.md +++ b/docs/dev-guide.md @@ -164,26 +164,24 @@ Note that `-test` allows to run the unit tests and `-integrationTest` allows to ### Mutation testing -The repository uses [Stryker.NET](https://stryker-mutator.io/docs/stryker-net/introduction/) to mutation-test the server-mode client sources. Restore the pinned local tool and run it from the configured unit-test project: +The repository uses [Stryker.NET](https://stryker-mutator.io/docs/stryker-net/introduction/) to mutation-test the production projects covered by the unit-test projects in `MutationTesting.slnx`. Restore the pinned local tool and run it from the repository root: On Windows PowerShell: ```powershell dotnet tool restore -Set-Location test/UnitTests/Microsoft.Testing.Platform.ServerMode.Client.Sources.UnitTests $env:MutationTesting = "true" -dotnet stryker --output ../../../artifacts/mutation-testing +dotnet stryker --output artifacts/mutation-testing ``` On Linux and macOS: ```shell dotnet tool restore -cd test/UnitTests/Microsoft.Testing.Platform.ServerMode.Client.Sources.UnitTests -MutationTesting=true dotnet stryker --output ../../../artifacts/mutation-testing +MutationTesting=true dotnet stryker --output artifacts/mutation-testing ``` -The opt-in property selects Arcade's open strong-name key for the mutated assembly because Stryker's in-memory compiler cannot complete Microsoft delay signing. +The opt-in property runs unit-test projects on `net8.0` and selects Arcade's open strong-name key for mutated assemblies and their friend assemblies because Stryker's in-memory compiler cannot complete Microsoft delay signing. The HTML and JSON reports are written to `artifacts/mutation-testing`. The [mutation testing workflow](../.github/workflows/mutation-testing.yml) also runs daily (so the mutation-test-improver workflow always has fresh data) and can be started manually; it publishes the mutation score and a killed/survived/timeout breakdown to the run's job summary, and uploads the full HTML/JSON report as the `mutation-testing-report` artifact. diff --git a/test/UnitTests/Microsoft.Testing.Platform.ServerMode.Client.Sources.UnitTests/stryker-config.json b/stryker-config.json similarity index 69% rename from test/UnitTests/Microsoft.Testing.Platform.ServerMode.Client.Sources.UnitTests/stryker-config.json rename to stryker-config.json index 342ac4a9c4..3d5237363f 100644 --- a/test/UnitTests/Microsoft.Testing.Platform.ServerMode.Client.Sources.UnitTests/stryker-config.json +++ b/stryker-config.json @@ -1,11 +1,13 @@ { "stryker-config": { - "project": "Microsoft.Testing.Platform.ServerMode.Client.Sources.csproj", - "target-framework": "net8.0", + "solution": "MutationTesting.slnx", "test-runner": "mtp", "mutation-level": "Standard", "mutate": [ - "Client/**/*.cs" + "!**/obj/**", + "!**/*.g.cs", + "!**/*.generated.cs", + "!**/*.Generated.cs" ], "reporters": [ "html", diff --git a/test/Directory.Build.targets b/test/Directory.Build.targets index 99039b744c..04d5ee9e9b 100644 --- a/test/Directory.Build.targets +++ b/test/Directory.Build.targets @@ -4,6 +4,7 @@ + net8.0 false false $(PlatformTarget) From ee5d9d84205bd04836dd6fcf480df79f582b2dcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Sat, 12 Sep 2026 16:00:23 +0200 Subject: [PATCH 2/7] Fix mutation improver scope Allow fixes across all unit test projects and bound Stryker verification to the selected production project and source file. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/mutation-test-improver.lock.yml | 10 +++++----- .github/workflows/mutation-test-improver.md | 8 +++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/mutation-test-improver.lock.yml b/.github/workflows/mutation-test-improver.lock.yml index 37eec11222..dabcd4b265 100644 --- a/.github/workflows/mutation-test-improver.lock.yml +++ b/.github/workflows/mutation-test-improver.lock.yml @@ -1,4 +1,4 @@ -# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"32929f6a8a156bee957e068efd4dc5750ff1a4d3626e2a39e157f0e784bcbfc5","body_hash":"99a42acd6177b55146f94acfdab16a4f46e0cf2a3d994cf39ae4bf0a3605188f","compiler_version":"v0.86.2","strict":true,"agent_id":"copilot","detection_agent_id":"copilot","detection_agent_model":"detection","engine_versions":{"copilot":"1.0.79"}} +# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"1d0c96cd81876d9bdb4869feb9b4bfb6b95423b3ba25a88daa6d3448e6bd51fe","body_hash":"6afadbd2752e3db460249e4872dbb6c7d454619c8d81f0b15517b3570c84305b","compiler_version":"v0.86.2","strict":true,"agent_id":"copilot","detection_agent_id":"copilot","detection_agent_model":"detection","engine_versions":{"copilot":"1.0.79"}} # gh-aw-manifest: {"version":1,"secrets":["GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/cache/restore","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/cache/save","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/checkout","sha":"3d3c42e5aac5ba805825da76410c181273ba90b1","version":"v7.0.1"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"820762786026740c76f36085b0efc47a31fe5020","version":"v7.0.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"6aab9e5b5c91c615506061f09bedd81a23babe3c","version":"v0.86.2"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.27.44","digest":"sha256:0d727725c737b58c7bdf51f640cffb928385ec46517e0917c7f1a02f1bada8b4","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.27.44@sha256:0d727725c737b58c7bdf51f640cffb928385ec46517e0917c7f1a02f1bada8b4"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.44","digest":"sha256:b50fbadba138f6e9aba94aca09711335c489bb3b15861220cb66f6092e042dc7","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.44@sha256:b50fbadba138f6e9aba94aca09711335c489bb3b15861220cb66f6092e042dc7"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.27.44","digest":"sha256:83e48bbe12c634be8c228a576832fe45f66c529ac3659db92bddbcf2eeb6d627","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.27.44@sha256:83e48bbe12c634be8c228a576832fe45f66c529ac3659db92bddbcf2eeb6d627"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.4.9","digest":"sha256:e5a1569aeaf41820fa7bdee3e94468cae448133cdbf00119ad24f5b74db1ab9f","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.4.9@sha256:e5a1569aeaf41820fa7bdee3e94468cae448133cdbf00119ad24f5b74db1ab9f"},{"image":"ghcr.io/github/gh-aw-node","digest":"sha256:0d9f1fb5fd6610c0ac1f5194a38e45a8a1e81f8a390d5142d8e4e6f26a4b3196","pinned_image":"ghcr.io/github/gh-aw-node@sha256:0d9f1fb5fd6610c0ac1f5194a38e45a8a1e81f8a390d5142d8e4e6f26a4b3196"},{"image":"ghcr.io/github/github-mcp-server:v1.9.0","digest":"sha256:881b53d6f75f69bdbc1b5b10fc2f1361717c19054143b3a8529fb5c32061a50e","pinned_image":"ghcr.io/github/github-mcp-server:v1.9.0@sha256:881b53d6f75f69bdbc1b5b10fc2f1361717c19054143b3a8529fb5c32061a50e"}]} # This file was automatically generated by gh-aw (v0.86.2). DO NOT EDIT. To debug this workflow, load the skill at https://github.com/github/gh-aw/blob/main/debug.md # @@ -531,9 +531,9 @@ jobs: mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs" mkdir -p /tmp/gh-aw/safeoutputs mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs - cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_f08249b05e7071e9_EOF' - {"create_issue":{"allowed_fields":["Type"],"labels":["type/automation","type/test-gap"],"max":1,"title_prefix":"[mutation-test-improver] "},"create_pull_request":{"allowed_files":["test/UnitTests/Microsoft.Testing.Platform.ServerMode.Client.Sources.UnitTests/*.cs","test/UnitTests/Microsoft.Testing.Platform.ServerMode.Client.Sources.UnitTests/**/*.cs"],"draft":true,"labels":["type/automation","type/test-gap"],"max":2,"max_patch_files":100,"max_patch_size":4096,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md"],"protected_files_policy":"fallback-to-issue","title_prefix":"[mutation-test-improver] "},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"false"},"push_to_pull_request_branch":{"allowed_files":["test/UnitTests/Microsoft.Testing.Platform.ServerMode.Client.Sources.UnitTests/*.cs","test/UnitTests/Microsoft.Testing.Platform.ServerMode.Client.Sources.UnitTests/**/*.cs"],"if_no_changes":"warn","max":2,"max_patch_size":4096,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md"],"target":"*","title_prefix":"[mutation-test-improver] "},"report_incomplete":{},"update_issue":{"allow_body":true,"max":1,"required_labels":["type/automation","type/test-gap"],"required_title_prefix":"[mutation-test-improver] Monthly Report ","target":"*"}} - GH_AW_SAFE_OUTPUTS_CONFIG_f08249b05e7071e9_EOF + cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_b80dd19913098589_EOF' + {"create_issue":{"allowed_fields":["Type"],"labels":["type/automation","type/test-gap"],"max":1,"title_prefix":"[mutation-test-improver] "},"create_pull_request":{"allowed_files":["test/UnitTests/**/*.cs"],"draft":true,"labels":["type/automation","type/test-gap"],"max":2,"max_patch_files":100,"max_patch_size":4096,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md"],"protected_files_policy":"fallback-to-issue","title_prefix":"[mutation-test-improver] "},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"false"},"push_to_pull_request_branch":{"allowed_files":["test/UnitTests/**/*.cs"],"if_no_changes":"warn","max":2,"max_patch_size":4096,"protect_top_level_dot_folders":true,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","README.md","CONTRIBUTING.md","CHANGELOG.md","SECURITY.md","CODE_OF_CONDUCT.md","AGENTS.md"],"target":"*","title_prefix":"[mutation-test-improver] "},"report_incomplete":{},"update_issue":{"allow_body":true,"max":1,"required_labels":["type/automation","type/test-gap"],"required_title_prefix":"[mutation-test-improver] Monthly Report ","target":"*"}} + GH_AW_SAFE_OUTPUTS_CONFIG_b80dd19913098589_EOF - name: Generate Safe Outputs Tools env: GH_AW_TOOLS_META_JSON: | @@ -1812,7 +1812,7 @@ jobs: GH_AW_ALLOWED_DOMAINS: "*.blob.core.windows.net,*.vsblob.vsassets.io,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.nuget.org,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,azuresearch-usnc.nuget.org,azuresearch-ussc.nuget.org,builds.dotnet.microsoft.com,ci.dot.net,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,dc.services.visualstudio.com,dist.nuget.org,dot.net,dotnet.microsoft.com,dotnetcli.blob.core.windows.net,github.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,nuget.org,nuget.pkg.github.com,nugetregistryv2prod.blob.core.windows.net,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,oneocsp.microsoft.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,pkgs.dev.azure.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com,www.googleapis.com,www.microsoft.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} - GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_issue\":{\"allowed_fields\":[\"Type\"],\"labels\":[\"type/automation\",\"type/test-gap\"],\"max\":1,\"title_prefix\":\"[mutation-test-improver] \"},\"create_pull_request\":{\"allowed_files\":[\"test/UnitTests/Microsoft.Testing.Platform.ServerMode.Client.Sources.UnitTests/*.cs\",\"test/UnitTests/Microsoft.Testing.Platform.ServerMode.Client.Sources.UnitTests/**/*.cs\"],\"draft\":true,\"labels\":[\"type/automation\",\"type/test-gap\"],\"max\":2,\"max_patch_files\":100,\"max_patch_size\":4096,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\"],\"protected_files_policy\":\"fallback-to-issue\",\"title_prefix\":\"[mutation-test-improver] \"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"false\"},\"push_to_pull_request_branch\":{\"allowed_files\":[\"test/UnitTests/Microsoft.Testing.Platform.ServerMode.Client.Sources.UnitTests/*.cs\",\"test/UnitTests/Microsoft.Testing.Platform.ServerMode.Client.Sources.UnitTests/**/*.cs\"],\"if_no_changes\":\"warn\",\"max\":2,\"max_patch_size\":4096,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\"],\"target\":\"*\",\"title_prefix\":\"[mutation-test-improver] \"},\"report_incomplete\":{},\"update_issue\":{\"allow_body\":true,\"max\":1,\"required_labels\":[\"type/automation\",\"type/test-gap\"],\"required_title_prefix\":\"[mutation-test-improver] Monthly Report \",\"target\":\"*\"}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_issue\":{\"allowed_fields\":[\"Type\"],\"labels\":[\"type/automation\",\"type/test-gap\"],\"max\":1,\"title_prefix\":\"[mutation-test-improver] \"},\"create_pull_request\":{\"allowed_files\":[\"test/UnitTests/**/*.cs\"],\"draft\":true,\"labels\":[\"type/automation\",\"type/test-gap\"],\"max\":2,\"max_patch_files\":100,\"max_patch_size\":4096,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\"],\"protected_files_policy\":\"fallback-to-issue\",\"title_prefix\":\"[mutation-test-improver] \"},\"create_report_incomplete_issue\":{},\"missing_data\":{},\"missing_tool\":{},\"noop\":{\"max\":1,\"report-as-issue\":\"false\"},\"push_to_pull_request_branch\":{\"allowed_files\":[\"test/UnitTests/**/*.cs\"],\"if_no_changes\":\"warn\",\"max\":2,\"max_patch_size\":4096,\"protect_top_level_dot_folders\":true,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CODEOWNERS\",\"DESIGN.md\",\"README.md\",\"CONTRIBUTING.md\",\"CHANGELOG.md\",\"SECURITY.md\",\"CODE_OF_CONDUCT.md\",\"AGENTS.md\"],\"target\":\"*\",\"title_prefix\":\"[mutation-test-improver] \"},\"report_incomplete\":{},\"update_issue\":{\"allow_body\":true,\"max\":1,\"required_labels\":[\"type/automation\",\"type/test-gap\"],\"required_title_prefix\":\"[mutation-test-improver] Monthly Report \",\"target\":\"*\"}}" GH_AW_CI_TRIGGER_TOKEN: ${{ secrets.GH_AW_CI_TRIGGER_TOKEN }} with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/mutation-test-improver.md b/.github/workflows/mutation-test-improver.md index 4118899481..eb772fffe0 100644 --- a/.github/workflows/mutation-test-improver.md +++ b/.github/workflows/mutation-test-improver.md @@ -84,15 +84,13 @@ safe-outputs: labels: [type/automation, type/test-gap] max: 2 allowed-files: - - test/UnitTests/Microsoft.Testing.Platform.ServerMode.Client.Sources.UnitTests/*.cs - - test/UnitTests/Microsoft.Testing.Platform.ServerMode.Client.Sources.UnitTests/**/*.cs + - test/UnitTests/**/*.cs protected-files: fallback-to-issue push-to-pull-request-branch: target: "*" required-title-prefix: "[mutation-test-improver] " allowed-files: - - test/UnitTests/Microsoft.Testing.Platform.ServerMode.Client.Sources.UnitTests/*.cs - - test/UnitTests/Microsoft.Testing.Platform.ServerMode.Client.Sources.UnitTests/**/*.cs + - test/UnitTests/**/*.cs max: 2 tools: @@ -165,7 +163,7 @@ For **at most 2** of the remaining highest-value `Survived` or `NoCoverage` muta 5. If the mutant looks behaviorally equivalent (the mutated code cannot be distinguished from the original by any observable behavior), record it in the monthly report as a known equivalent mutant with your reasoning, and skip it. 6. Otherwise, find (or create) the corresponding test file under the unit-test project associated with the mutated production project and add a focused test asserting the exact behavior the mutant would violate. Match that project's existing test framework and assertion style (check its `BannedSymbols.txt` if present, otherwise mirror neighboring tests). 7. Build and run the unit test project with `$GITHUB_WORKSPACE/.dotnet/dotnet` to confirm the new test compiles and passes against the original (unmutated) code. -8. **Verify the fix**: re-run `$GITHUB_WORKSPACE/.dotnet/dotnet tool restore`, then from the repository root run `MutationTesting=true $GITHUB_WORKSPACE/.dotnet/dotnet stryker --output artifacts/mutation-testing-verify --skip-version-check`. Confirm the targeted mutant's status flipped to `Killed` in the new report. +8. **Verify the fix**: re-run `$GITHUB_WORKSPACE/.dotnet/dotnet tool restore`, identify the mutated production project's `.csproj` file name and the mutated source path relative to that project, then from the repository root run `MutationTesting=true $GITHUB_WORKSPACE/.dotnet/dotnet stryker --project "" --mutate "" --output artifacts/mutation-testing-verify --skip-version-check`. Confirm the targeted mutant's status flipped to `Killed` in the new report. - Count each Stryker invocation against the workflow's total verification budget. If the budget is exhausted, stop attempting fixes and continue to Step 5. - If it did not flip, don't force it — try at most one more angle only when verification budget remains; otherwise abandon this mutant, record the attempt outcome in the monthly report, restore the test worktree to remove the abandoned edits, and move to the next candidate. 9. For each mutant you successfully kill, emit a safe-output request for a small draft PR from a fresh branch (`mutation-test-improver/`) with: From 06a6b43bb161596c7a2ccc761dd9261148df901c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Sat, 12 Sep 2026 16:24:42 +0200 Subject: [PATCH 3/7] Use mirrored Stryker version Keep solution-mode mutation testing on Stryker 4.16.0, which is available from the repository's CI feeds. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 8f2869860d..bb3c9bced7 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -10,7 +10,7 @@ "rollForward": false }, "dotnet-stryker": { - "version": "5.0.0", + "version": "4.16.0", "commands": [ "dotnet-stryker" ], From 001c7db6e0d311e5f1629e0f8aff6f356f0ec309 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Sat, 12 Sep 2026 16:29:13 +0200 Subject: [PATCH 4/7] Revert "Use mirrored Stryker version" This reverts commit 06a6b43bb161596c7a2ccc761dd9261148df901c. --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index bb3c9bced7..8f2869860d 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -10,7 +10,7 @@ "rollForward": false }, "dotnet-stryker": { - "version": "4.16.0", + "version": "5.0.0", "commands": [ "dotnet-stryker" ], From ac7c25910fe0719dd2a2a2636725d541f6a00ef5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Sat, 12 Sep 2026 16:58:44 +0200 Subject: [PATCH 5/7] Isolate Stryker tool restore Keep Stryker.NET 5 in a dedicated manifest so normal repository builds restore only mirrored tools, while mutation workflows restore Stryker from nuget.org. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .config/dotnet-tools.json | 7 ------- .config/stryker/NuGet.config | 12 ++++++++++++ .config/stryker/dotnet-tools.json | 13 +++++++++++++ .github/workflows/mutation-test-improver.lock.yml | 2 +- .github/workflows/mutation-test-improver.md | 2 +- .github/workflows/mutation-testing.yml | 7 ++++--- docs/dev-guide.md | 10 ++++++---- 7 files changed, 37 insertions(+), 16 deletions(-) create mode 100644 .config/stryker/NuGet.config create mode 100644 .config/stryker/dotnet-tools.json diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 8f2869860d..11e200e957 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -8,13 +8,6 @@ "dotnet-coverage" ], "rollForward": false - }, - "dotnet-stryker": { - "version": "5.0.0", - "commands": [ - "dotnet-stryker" - ], - "rollForward": false } } } diff --git a/.config/stryker/NuGet.config b/.config/stryker/NuGet.config new file mode 100644 index 0000000000..64251b5b9c --- /dev/null +++ b/.config/stryker/NuGet.config @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/.config/stryker/dotnet-tools.json b/.config/stryker/dotnet-tools.json new file mode 100644 index 0000000000..6da5949fda --- /dev/null +++ b/.config/stryker/dotnet-tools.json @@ -0,0 +1,13 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "dotnet-stryker": { + "version": "5.0.0", + "commands": [ + "dotnet-stryker" + ], + "rollForward": false + } + } +} diff --git a/.github/workflows/mutation-test-improver.lock.yml b/.github/workflows/mutation-test-improver.lock.yml index dabcd4b265..a369b443ad 100644 --- a/.github/workflows/mutation-test-improver.lock.yml +++ b/.github/workflows/mutation-test-improver.lock.yml @@ -1,4 +1,4 @@ -# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"1d0c96cd81876d9bdb4869feb9b4bfb6b95423b3ba25a88daa6d3448e6bd51fe","body_hash":"6afadbd2752e3db460249e4872dbb6c7d454619c8d81f0b15517b3570c84305b","compiler_version":"v0.86.2","strict":true,"agent_id":"copilot","detection_agent_id":"copilot","detection_agent_model":"detection","engine_versions":{"copilot":"1.0.79"}} +# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"1d0c96cd81876d9bdb4869feb9b4bfb6b95423b3ba25a88daa6d3448e6bd51fe","body_hash":"9ac4b8542bbf7010cffac48dca1a6bee7052ae5d974454c8452b5bf2f17bcab8","compiler_version":"v0.86.2","strict":true,"agent_id":"copilot","detection_agent_id":"copilot","detection_agent_model":"detection","engine_versions":{"copilot":"1.0.79"}} # gh-aw-manifest: {"version":1,"secrets":["GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/cache/restore","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/cache/save","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/checkout","sha":"3d3c42e5aac5ba805825da76410c181273ba90b1","version":"v7.0.1"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"820762786026740c76f36085b0efc47a31fe5020","version":"v7.0.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"6aab9e5b5c91c615506061f09bedd81a23babe3c","version":"v0.86.2"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.27.44","digest":"sha256:0d727725c737b58c7bdf51f640cffb928385ec46517e0917c7f1a02f1bada8b4","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.27.44@sha256:0d727725c737b58c7bdf51f640cffb928385ec46517e0917c7f1a02f1bada8b4"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.44","digest":"sha256:b50fbadba138f6e9aba94aca09711335c489bb3b15861220cb66f6092e042dc7","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.44@sha256:b50fbadba138f6e9aba94aca09711335c489bb3b15861220cb66f6092e042dc7"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.27.44","digest":"sha256:83e48bbe12c634be8c228a576832fe45f66c529ac3659db92bddbcf2eeb6d627","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.27.44@sha256:83e48bbe12c634be8c228a576832fe45f66c529ac3659db92bddbcf2eeb6d627"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.4.9","digest":"sha256:e5a1569aeaf41820fa7bdee3e94468cae448133cdbf00119ad24f5b74db1ab9f","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.4.9@sha256:e5a1569aeaf41820fa7bdee3e94468cae448133cdbf00119ad24f5b74db1ab9f"},{"image":"ghcr.io/github/gh-aw-node","digest":"sha256:0d9f1fb5fd6610c0ac1f5194a38e45a8a1e81f8a390d5142d8e4e6f26a4b3196","pinned_image":"ghcr.io/github/gh-aw-node@sha256:0d9f1fb5fd6610c0ac1f5194a38e45a8a1e81f8a390d5142d8e4e6f26a4b3196"},{"image":"ghcr.io/github/github-mcp-server:v1.9.0","digest":"sha256:881b53d6f75f69bdbc1b5b10fc2f1361717c19054143b3a8529fb5c32061a50e","pinned_image":"ghcr.io/github/github-mcp-server:v1.9.0@sha256:881b53d6f75f69bdbc1b5b10fc2f1361717c19054143b3a8529fb5c32061a50e"}]} # This file was automatically generated by gh-aw (v0.86.2). DO NOT EDIT. To debug this workflow, load the skill at https://github.com/github/gh-aw/blob/main/debug.md # diff --git a/.github/workflows/mutation-test-improver.md b/.github/workflows/mutation-test-improver.md index eb772fffe0..5d91814ce4 100644 --- a/.github/workflows/mutation-test-improver.md +++ b/.github/workflows/mutation-test-improver.md @@ -163,7 +163,7 @@ For **at most 2** of the remaining highest-value `Survived` or `NoCoverage` muta 5. If the mutant looks behaviorally equivalent (the mutated code cannot be distinguished from the original by any observable behavior), record it in the monthly report as a known equivalent mutant with your reasoning, and skip it. 6. Otherwise, find (or create) the corresponding test file under the unit-test project associated with the mutated production project and add a focused test asserting the exact behavior the mutant would violate. Match that project's existing test framework and assertion style (check its `BannedSymbols.txt` if present, otherwise mirror neighboring tests). 7. Build and run the unit test project with `$GITHUB_WORKSPACE/.dotnet/dotnet` to confirm the new test compiles and passes against the original (unmutated) code. -8. **Verify the fix**: re-run `$GITHUB_WORKSPACE/.dotnet/dotnet tool restore`, identify the mutated production project's `.csproj` file name and the mutated source path relative to that project, then from the repository root run `MutationTesting=true $GITHUB_WORKSPACE/.dotnet/dotnet stryker --project "" --mutate "" --output artifacts/mutation-testing-verify --skip-version-check`. Confirm the targeted mutant's status flipped to `Killed` in the new report. +8. **Verify the fix**: restore Stryker with `$GITHUB_WORKSPACE/.dotnet/dotnet tool restore --tool-manifest .config/stryker/dotnet-tools.json --configfile .config/stryker/NuGet.config`, identify the mutated production project's `.csproj` file name and the mutated source path relative to that project, then from `$GITHUB_WORKSPACE/.config/stryker` run `MutationTesting=true $GITHUB_WORKSPACE/.dotnet/dotnet stryker --config-file "$GITHUB_WORKSPACE/stryker-config.json" --solution "$GITHUB_WORKSPACE/MutationTesting.slnx" --project "" --mutate "" --output "$GITHUB_WORKSPACE/artifacts/mutation-testing-verify" --skip-version-check`. Confirm the targeted mutant's status flipped to `Killed` in the new report. - Count each Stryker invocation against the workflow's total verification budget. If the budget is exhausted, stop attempting fixes and continue to Step 5. - If it did not flip, don't force it — try at most one more angle only when verification budget remains; otherwise abandon this mutant, record the attempt outcome in the monthly report, restore the test worktree to remove the abandoned edits, and move to the next candidate. 9. For each mutant you successfully kill, emit a safe-output request for a small draft PR from a fresh branch (`mutation-test-improver/`) with: diff --git a/.github/workflows/mutation-testing.yml b/.github/workflows/mutation-testing.yml index a165f71370..ed71102bfe 100644 --- a/.github/workflows/mutation-testing.yml +++ b/.github/workflows/mutation-testing.yml @@ -25,16 +25,17 @@ jobs: - name: Build repository run: ./build.sh --binaryLog - - name: Restore local tools - run: ./.dotnet/dotnet tool restore + - name: Restore Stryker.NET + run: ./.dotnet/dotnet tool restore --tool-manifest .config/stryker/dotnet-tools.json --configfile .config/stryker/NuGet.config - name: Run mutation tests + working-directory: .config/stryker env: MutationTesting: true run: | set -o pipefail mkdir -p "$GITHUB_WORKSPACE/artifacts/mutation-testing" - "$GITHUB_WORKSPACE/.dotnet/dotnet" stryker --output "$GITHUB_WORKSPACE/artifacts/mutation-testing" --skip-version-check | tee "$GITHUB_WORKSPACE/artifacts/mutation-testing/stryker-console.log" + "$GITHUB_WORKSPACE/.dotnet/dotnet" stryker --config-file "$GITHUB_WORKSPACE/stryker-config.json" --solution "$GITHUB_WORKSPACE/MutationTesting.slnx" --output "$GITHUB_WORKSPACE/artifacts/mutation-testing" --skip-version-check | tee "$GITHUB_WORKSPACE/artifacts/mutation-testing/stryker-console.log" - name: Summarize mutation testing results if: ${{ always() }} diff --git a/docs/dev-guide.md b/docs/dev-guide.md index e590c35494..65a9a3c44d 100644 --- a/docs/dev-guide.md +++ b/docs/dev-guide.md @@ -169,16 +169,18 @@ The repository uses [Stryker.NET](https://stryker-mutator.io/docs/stryker-net/in On Windows PowerShell: ```powershell -dotnet tool restore +dotnet tool restore --tool-manifest .config/stryker/dotnet-tools.json --configfile .config/stryker/NuGet.config $env:MutationTesting = "true" -dotnet stryker --output artifacts/mutation-testing +Push-Location .config/stryker +dotnet stryker --config-file ../../stryker-config.json --solution ../../MutationTesting.slnx --output ../../artifacts/mutation-testing +Pop-Location ``` On Linux and macOS: ```shell -dotnet tool restore -MutationTesting=true dotnet stryker --output artifacts/mutation-testing +dotnet tool restore --tool-manifest .config/stryker/dotnet-tools.json --configfile .config/stryker/NuGet.config +(cd .config/stryker && MutationTesting=true dotnet stryker --config-file ../../stryker-config.json --solution ../../MutationTesting.slnx --output ../../artifacts/mutation-testing) ``` The opt-in property runs unit-test projects on `net8.0` and selects Arcade's open strong-name key for mutated assemblies and their friend assemblies because Stryker's in-memory compiler cannot complete Microsoft delay signing. From 99060ef4f75ac9ce4759451cc531f141102903ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Sat, 12 Sep 2026 17:10:17 +0200 Subject: [PATCH 6/7] Include TRX abstractions in mutation testing Add the transitively referenced TRX abstractions project so its directly tested sources participate in solution-mode mutation testing. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- MutationTesting.slnx | 1 + 1 file changed, 1 insertion(+) diff --git a/MutationTesting.slnx b/MutationTesting.slnx index aca937f601..285a4ae474 100644 --- a/MutationTesting.slnx +++ b/MutationTesting.slnx @@ -14,6 +14,7 @@ + From daf9d96f0c062153fb872a1f9f9b923cbd768b4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Sat, 12 Sep 2026 18:05:15 +0200 Subject: [PATCH 7/7] Specify solution for Windows tests Avoid dotnet test ambiguity now that mutation testing adds a second root solution file. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- eng/pipelines/steps/test-windows-configuration-tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eng/pipelines/steps/test-windows-configuration-tests.yml b/eng/pipelines/steps/test-windows-configuration-tests.yml index 6eaf9ac5ac..f909c066b2 100644 --- a/eng/pipelines/steps/test-windows-configuration-tests.yml +++ b/eng/pipelines/steps/test-windows-configuration-tests.yml @@ -27,7 +27,7 @@ steps: - ${{ if eq(parameters.enableAffectedTests, false) }}: - script: | echo ##vso[task.setvariable variable=PublishCoverageReport]true - dotnet test -c $(_BuildConfig) --no-build -bl:$(BUILD.SOURCESDIRECTORY)\artifacts\TestResults\$(_BuildConfig)\TestStep.binlog -p:UsingDotNetTest=true -p:TestingPlatformCaptureOutput=false --show-test-results failed + dotnet test --solution TestFx.slnx -c $(_BuildConfig) --no-build -bl:$(BUILD.SOURCESDIRECTORY)\artifacts\TestResults\$(_BuildConfig)\TestStep.binlog -p:UsingDotNetTest=true -p:TestingPlatformCaptureOutput=false --show-test-results failed name: Test displayName: Test condition: and(succeeded(), eq(variables._BuildConfig, 'Release'), ne(variables._XmlDocsOnly, 'true')) @@ -52,7 +52,7 @@ steps: - script: | echo ##vso[task.setvariable variable=PublishCoverageReport]true - dotnet test -c $(_BuildConfig) --no-build -bl:$(BUILD.SOURCESDIRECTORY)\artifacts\TestResults\$(_BuildConfig)\TestStep.binlog -p:UsingDotNetTest=true -p:TestingPlatformCaptureOutput=false --show-test-results failed --collect-test-map + dotnet test --solution TestFx.slnx -c $(_BuildConfig) --no-build -bl:$(BUILD.SOURCESDIRECTORY)\artifacts\TestResults\$(_BuildConfig)\TestStep.binlog -p:UsingDotNetTest=true -p:TestingPlatformCaptureOutput=false --show-test-results failed --collect-test-map name: Test displayName: Test and collect affected-test map condition: and(succeeded(), eq(variables._BuildConfig, 'Release'), ne(variables._XmlDocsOnly, 'true')) @@ -72,7 +72,7 @@ steps: condition: and(succeeded(), eq(variables._BuildConfig, 'Release'), ne(variables._XmlDocsOnly, 'true'), eq(variables['Build.Reason'], 'PullRequest')) - pwsh: | - dotnet test -c $(_BuildConfig) --no-build -bl:$(BUILD.SOURCESDIRECTORY)\artifacts\TestResults\$(_BuildConfig)\TestStep.binlog -p:UsingDotNetTest=true -p:TestingPlatformCaptureOutput=false --show-test-results failed --affected-tests + dotnet test --solution TestFx.slnx -c $(_BuildConfig) --no-build -bl:$(BUILD.SOURCESDIRECTORY)\artifacts\TestResults\$(_BuildConfig)\TestStep.binlog -p:UsingDotNetTest=true -p:TestingPlatformCaptureOutput=false --show-test-results failed --affected-tests $exitCode = $LASTEXITCODE if ($exitCode -eq 0) { Write-Host "##vso[task.setvariable variable=AffectedTestsSucceeded]true" @@ -104,7 +104,7 @@ steps: Remove-Item -Force } - dotnet test -c $(_BuildConfig) --no-build -bl:$(BUILD.SOURCESDIRECTORY)\artifacts\TestResults\$(_BuildConfig)\TestStep.binlog -p:UsingDotNetTest=true -p:TestingPlatformCaptureOutput=false --show-test-results failed + dotnet test --solution TestFx.slnx -c $(_BuildConfig) --no-build -bl:$(BUILD.SOURCESDIRECTORY)\artifacts\TestResults\$(_BuildConfig)\TestStep.binlog -p:UsingDotNetTest=true -p:TestingPlatformCaptureOutput=false --show-test-results failed exit $LASTEXITCODE name: Test displayName: Test (affected-test fallback)