Skip to content

fix(ci): Restore before Stryker and fail when it drops a project - #306

Merged
bitbiter-dev merged 1 commit into
masterfrom
fix/stryker-cold-restore
Oct 24, 2026
Merged

bitbiter-dev merged 1 commit into
masterfrom
fix/stryker-cold-restore

Conversation

@bitbiter-dev

Copy link
Copy Markdown
Owner

Summary

When nothing is restored yet, Stryker's analysis runs several NuGet restores in parallel. If one of them fails, Stryker leaves that project unmutated, logs only a warning, and still scores the rest. Both workflows now run Stryker through a script that restores first and fails the run when Stryker logs that warning.

 Mutation (ci.yml) / Mutation divergence sweeps
-  working-directory: src
-  dotnet stryker --output ../mutation
+  scripts/stryker-sweep.sh --output ../mutation
+    dotnet restore Anichron.slnx
+    dotnet stryker "$@" | tee log
+    log contains "Analysis of project … failed"  → exit 1
+    otherwise                                    → Stryker's exit status

mutation-guard.sh now refuses any workflow that calls dotnet stryker directly. The new script is described in docs/mutation-testing.md and listed among the guard rules in CLAUDE.md.

Evidence

  • Before: Mutation divergence run #6 logged Analysis of project Anichron.Worker/Anichron.Worker.csproj failed for frameworks net10.0. in the CI-concurrency sweep. That sweep tested 961 mutants and the single-threaded sweep tested 1595, so compare failed. The master gate at e014c80 (run) lost Worker the same way and passed at 100% with 846 mutants, where the runs around it tested about 1,400.
    After: scripts/stryker-sweep.test.sh (stubbed dotnet):
    clean log, stryker exit 0          → 0, restore runs before stryker, args passed through
    clean log, stryker exit 2          → 2
    "Analysis of project X failed"     → 1, names X
    test project "succeeded but
      simulated build failed"          → 0 (not a dropped project)
    restore fails                      → 1, stryker never runs
    
    A new mutation-guard.test.sh case checks that a workflow running dotnet stryker directly fails the guard. scripts/mutation-guard.sh passes on this branch.
  • Pending: Mutation divergence run #7 on this branch should show Found project …/Anichron.Worker.csproj to mutate in both sweeps and the same number of mutants tested in each. It may still fail compare by one: chore(test): Single-threaded Stryker sweep reported a covered BurstRepository mutant as survived #305 is a separate case where the single-threaded sweep missed a kill.

Merge Danger

Door: two-way

Revert the commit and the workflows call dotnet stryker directly again.

Blast Radius: CI-only

The Mutation job gains a restore step of a few seconds. A run where Stryker drops a project now fails the gate instead of passing on a partial score, so a red Mutation job may come from this check rather than from a surviving mutant. The ::error:: annotation names the project.

🤖 Generated with Claude Code

On a runner with nothing restored, Stryker's analysis restores several
projects in parallel; when one restore fails, it leaves that project
unmutated with only a warning. Anichron.Worker was dropped this way in
mutation divergence run #6 (961 vs 1595 mutants) and in the master
mutation gate at e014c80, which passed at 100% with 846 mutants.

Both workflows now run Stryker through scripts/stryker-sweep.sh, which
restores the solution first and fails on "Analysis of project ... failed".
mutation-guard.sh refuses a workflow that calls dotnet stryker directly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bitbiter-dev

Copy link
Copy Markdown
Owner Author

Divergence run #7 on this branch: both sweeps found Anichron.Worker and each tested 1595 mutants (run #6: 961 vs 1595). The comparison still fails by one, 1595 vs 1594, and the cause is the BurstRepository mutant tracked in #305, not this PR. This PR's own Mutation job also tested 1595 mutants and scored 100%.

@bitbiter-dev
bitbiter-dev merged commit e19c04f into master Oct 24, 2026
12 of 13 checks passed
@bitbiter-dev
bitbiter-dev deleted the fix/stryker-cold-restore branch October 24, 2026 05:35
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.

1 participant