Skip to content

fix(testing): let cleanup's mutation gate find a C test's production files - #11027

Merged
melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-11004-40934469103-1
Oct 29, 2026
Merged

melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-11004-40934469103-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #11004

Summary

Opened by the work-resolve-issue lane. The run's own summary:

Most of the C# path already worked when this ran: setup proposes dotnet test {tests}, the audit runs it once per project through dotnet-test-selection.sh, and compare-records.sh compares the before and after records mutant by mutant. What was missing was in cleanup itself. Its gate-blind check and its Gate: block candidate list read the production files a test imports, and a C# using names a namespace, never a file. Both now read the files holding the code a test reaches, and Gate: block lists every changed test when none of them reaches the file. A new gated eval runs the batch on the cleanup-dotnet fixture with dotnet test {tests} and expects Gate: pass.

Not verified

  • The new dotnet_gate_runs eval was not executed. It needs a .NET SDK, both plugins loaded, and a real cleanup run, which this lane cannot provide. The C# compile and pass claims were checked by reading the code, not by building it.
  • Tidy's ai-slop pass ran its rubric by reading only. The lane's Bash cannot run detect.sh, so the deterministic detector and its semantic-diff guard did not run. CI's purged-em-dashes and related gates cover the deterministic rules.
  • check-affected listed CI-only gates that were not run here, including orphaned-fixtures, evals-schema, cant-fail-scan and line-citations. They are left to the PR's CI.
  • The changelog fragment was written by hand: new-changelog-fragment refused on the detached HEAD. check-changelog-fragments accepts its name and content.
  • Changes are left uncommitted, as the runner's instructions require; the runner turns the working tree into the commit.

Fix

  • plugins/testing/skills/cleanup/SKILL.md: step 5 defines a test's production files as the files holding the code it reaches (direct calls, helpers, interfaces, dependency injection), read from the calls, not the imports. Step 6 says the replay compares the records mutant by mutant, and Gate: block
  • plugins/testing/skills/cleanup/context/classifier-brief.md: hands over the production files each test reaches, not the files it imports.
  • plugins/testing/skills/cleanup/evals/evals.json: new dotnet_gate_runs case (C# xUnit project, dotnet test {tests}, record, replay, Gate: pass). The lost_kill_blocks wording now says 'reaches' instead of 'imports'.
  • plugins/testing/skills/cleanup/evals/fixtures/cleanup-dotnet/EXPECTED.md: covers both modes and adds a Gated run section (filter line, mapping, K0, production files, Gate: pass).
  • plugins/testing/skills/cleanup/evals/fixtures/cleanup-dotnet/Shop/Shop.csproj: new, net8.0 with Microsoft.Extensions.DependencyInjection 8.0.1.
  • plugins/testing/skills/cleanup/evals/fixtures/cleanup-dotnet/Shop.Tests/Shop.Tests.csproj: new xUnit test project, with the package versions the mutation-testing dotnet fixture uses.
  • plugins/testing/skills/cleanup/evals/fixtures/cleanup-dotnet/Shop.Tests/PriceFeedTests.cs.fixture: new test file, copied in by the gated eval only. It calls PriceFeed directly with no using Shop;.
  • plugins/testing/skills/cleanup/evals/fixtures/cleanup-dotnet/.gitignore: new; ignores bin/ and obj/ so a build does not dirty the tree for step 0.
  • plugins/testing/skills/cleanup/evals/fixtures/mutation-testing-dotnet.md: new mutation config with the keys setup apply writes and test-command dotnet test {tests}.
  • plugins/testing/skills/cleanup/evals/fixtures/cleanup/EXPECTED.md: the lost-kill candidate is the test that 'reaches' shop/pricing.py.
  • .changes/testing/feat-11004-cleanup-dotnet-gate-5c1e9a27.md: new patch changelog fragment for the testing plugin.

Verification

The runner ran each check from the base copy against 537d77e:

  • scripts/check-changelog-fragments.sh --check: passed

The run reports:

  • read https: //www .nuget.org/packages/Microsoft.Extensions.DependencyInjection/8.0.1: version 8.0.1 exists and lists net8.0 as compatible
  • check-changelog-fragments: all 2 fragments valid (run before and after tidy and after the review fixes)
  • check-affected: 11 passed, 7 skipped, over 11 changed files (run three times, last after the review fixes)
  • check-evals-quality plugins/testing/skills/cleanup/evals/evals.json: PASS, 0 warnings
  • fresh-context review subagent over the whole diff: confirmed the dotnet filter line, the shop.tests slug, the mapping, the K0 kill, the rule-throw-only-oracle id, Gate: pass, and that the cannot-fail-only evals still hold. Its 8 findings (a per-test relation the Mapped: line does not carry, a Gate:
  • tidy (code-tidying:tidy-diff): ran all four passes over the change's lines and made one edit, to the changelog fragment
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/40934469103

Left out: the items under Not verified.

Related

#11004

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

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

Incremental security review of 0993aba against 537d77e: no security issues found.

The change adds one eval case, dotnet_lost_kill_blocks, to plugins/testing/skills/cleanup/evals/evals.json. It also adds a "Lost kill" section to plugins/testing/skills/cleanup/evals/fixtures/cleanup-dotnet/EXPECTED.md. Both files are eval data and fixture documentation. Neither is a plugin manifest, a standing instruction (CLAUDE.md, AGENTS.md, a skill or agent body, a hook), a trust control, or code that runs in a trusted context. The eval prompt describes a local test-batch scenario that reverts and commits nothing. The files entries are relative fixture paths and handle no secrets, tokens or external input.

Instruction-surface lens: nothing is deleted, narrowed or softened. The diff only adds expectations.

Manifest items: none touched (manifest <field>: pass for all; no plugin.json or marketplace.json change in this increment).

The PR context contains no embedded instructions aimed at the lane.

Spend: none. The change adds no billable resource, and the eval is not run by the lane.

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 537d77e388d3433a7453cd3111c294bbd745b2b8; 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 0993aba5ef9b04198f350d32026dda442dac34aa: 0 finding(s), 0 as inline comments.

Incremental review of 0993aba (since 537d77e): the new dotnet_lost_kill_blocks eval in evals.json and its "Lost kill" section in cleanup-dotnet/EXPECTED.md. No findings.

I read both changes against the fixture files and SKILL.md steps 5 and 6. I did not run the eval, which needs a .NET SDK and both plugins loaded.

  • Mutant claim holds. The Rejects_options_without_a_url change builds PriceFeed(Options) with a URL, so no test now builds a PriceFeed without one. That leaves the constructor statement at Shop/ServiceRegistration.cs:17 (_endpoint = options.PriceFeedUrl ?? throw ...) undetected. WiringTests and the other PriceFeedTests all pass a URL, and Feed_is_created only asserts non-null.
  • PriceOf claim holds. Prices_a_sku_by_its_length, Price_feed_prices_two_letter_sku and Licensed_feed_prices_a_sku still detect the PriceOf mutants. The doc names the latter two but omits the first, which is harmless.
  • Gate-blind marks are consistent. Wiring_is_sane (Assert.True(true)) reaches no production file. Rejects_options_without_a_url reaches Shop/ServiceRegistration.cs through the constructor call even though PriceFeedTests.cs has no using Shop;. Both match the "read the calls, not the imports" rule at SKILL.md:202-206.
  • Candidate list is consistent. SKILL.md:226-229 lists the batch's changed tests whose production files include the surviving path, and every changed test only when none does. Here Rejects_options_without_a_url reaches the file and Wiring_is_sane does not, so the eval's one-candidate expectation holds. Wiring_is_sane is excluded even though WiringTests.cs has using Shop;.
  • Fixture references resolve. Every file in the eval's files list exists in the PR. The line citation :17 points at the statement's first line (the statement spans 17-18), which agrees with the existing "lines 17-18" text in the Gated run section.

I checked no closing-issue criteria beyond the single done-when item on #11004. This change adds the Gate: block side of that item (the replay comparing kills per mutant), and the Gate: pass side is covered by dotnet_gate_runs from the earlier review.

No spend beyond the usual lane runs. The change touches no trusted path.

Lane-Activity: pr-unblock/address-feedback
Lane-Thread: PRRT_kwDOTCGFQM6xtta1
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 0993aba5ef9b04198f350d32026dda442dac34aa. The lanes clear this reason on their own; the next scheduled run judges it again.

pr-merge's gate refuses its verifier verdict (verify:missing)

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 1 of max 4 on 0993aba.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 0993aba5ef9b04198f350d32026dda442dac34aa.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit eb4aa99 Oct 29, 2026
42 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-11004-40934469103-1 branch October 29, 2026 19:37
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.

feat\(testing\): make cleanup, audit and mutation-testing work end to end on a large .NET repo - part 1 of 7

0 participants