Skip to content

ci: harden the pull request analysis - #891

Merged
vbreuss merged 1 commit into
mainfrom
ci/harden-pr-analysis
Oct 18, 2026
Merged

vbreuss merged 1 commit into
mainfrom
ci/harden-pr-analysis

Conversation

@vbreuss

@vbreuss vbreuss commented Oct 18, 2026

Copy link
Copy Markdown
Member

CI-Analysis runs with repository secrets on artifacts that a pull request controls, and it trusted the pull request number, branch name and comment body in them. A pull request could therefore comment on any pull request, overwrite the mutation score of main or mention users. The pull request and the dashboard version now come from the workflow_run event alone, artifacts are checked for symbolic links, the report is validated before the upload, comment content is defused, and only comments of the pipeline are updated. The mutation job of CI-Analysis now also publishes pull request reports to the dashboard, which the comment's badge links to.

A release tag that is no valid version now fails the build instead of producing an odd package version. Stryker is pinned to 5.0.0 through the build project so that Dependabot updates it, GitVersion and ReportGenerator run on .NET 10 like in the other repositories, Sonar reads the generic coverage format, which keeps the lines of lambdas in generic classes, the mutation targets follow the names of aweXpect, and all actions are pinned to a commit. Dependabot no longer bumps Roslyn, because the analyzers and the source generator only load in compilers at least as new as the Roslyn they reference.

@vbreuss vbreuss self-assigned this Oct 18, 2026
@vbreuss
vbreuss added this pull request to stack #893 October 18, 2026 08:36
@github-actions

Copy link
Copy Markdown

Test Results

    24 files  ±0      24 suites  ±0   10m 23s ⏱️ -15s
 4 529 tests ±0   4 527 ✅ ±0  2 💤 ±0  0 ❌ ±0 
28 684 runs  ±0  28 680 ✅ ±0  4 💤 ±0  0 ❌ ±0 

Results for commit 85c1a56. ± Comparison against base commit 28ce306.

Copilot AI balanced review requested due to automatic review settings October 18, 2026 11:40
@vbreuss
vbreuss force-pushed the ci/harden-pr-analysis branch from 85c1a56 to aaea6d0 Compare October 18, 2026 11:40

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Base automatically changed from build/migrate-to-fallout to main October 18, 2026 11:40
CI-Analysis runs with repository secrets on artifacts that a pull request controls, and it trusted the pull request number, branch name and comment body in them. A pull request could therefore comment on any pull request, overwrite the mutation score of `main` or mention users. The pull request and the dashboard version now come from the `workflow_run` event alone, artifacts are checked for symbolic links, the report is validated before the upload, comment content is defused, and only comments of the pipeline are updated. The mutation job of CI-Analysis now also publishes pull request reports to the dashboard, which the comment's badge links to.

A release tag that is no valid version now fails the build instead of producing an odd package version. Stryker is pinned to 5.0.0 through the build project so that Dependabot updates it, GitVersion and ReportGenerator run on .NET 10 like in the other repositories, Sonar reads the generic coverage format, which keeps the lines of lambdas in generic classes, the mutation targets follow the names of aweXpect, and all actions are pinned to a commit. Dependabot no longer bumps Roslyn, because the analyzers and the source generator only load in compilers at least as new as the Roslyn they reference.
@vbreuss
vbreuss force-pushed the ci/harden-pr-analysis branch from aaea6d0 to cda6efa Compare October 18, 2026 11:41
@vbreuss
vbreuss merged commit 03d4d27 into main Oct 18, 2026
14 checks passed
@vbreuss
vbreuss deleted the ci/harden-pr-analysis branch October 18, 2026 11:42
@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

👽 Mutation Results

Mutation testing badge

Mockolate

Details
File Score Killed Survived Timeout No Coverage Ignored Compile Errors Runtime Errors Total Detected Total Undetected Total Mutants

The final mutation score is NaN%

Coverage Thresholds: high:80 low:60 break:0

@github-actions

Copy link
Copy Markdown

🚀 Benchmark Results

Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.303
[Host] : .NET 10.0.13 (10.0.13, 10.0.1326.50504), X64 RyuJIT x86-64-v3

Job=InProcess Toolchain=InProcessEmitToolchain IterationCount=15
LaunchCount=1 WarmupCount=10

Method N Mean Error StdDev Ratio Allocated Alloc Ratio
baseline* 1 291.2 ns 8.78 ns 8.21 ns 0.80 1.93 KB 1.00
Mockolate 1 365.9 ns 12.10 ns 11.32 ns 1.00 1.93 KB 1.00
Imposter 1 538.4 ns 14.06 ns 12.46 ns 1.47 3.96 KB 2.05
TUnitMocks 1 481.1 ns 7.54 ns 6.69 ns 1.32 2.02 KB 1.05
Moq 1 187,995.6 ns 640.84 ns 568.08 ns 514.30 14.73 KB 7.63
NSubstitute 1 6,432.5 ns 69.94 ns 65.42 ns 17.60 9.12 KB 4.72
FakeItEasy 1 6,126.8 ns 78.16 ns 73.11 ns 16.76 8.05 KB 4.17
baseline* 10 535.8 ns 5.49 ns 5.14 ns 0.82 2.14 KB 1.00
Mockolate 10 653.0 ns 10.23 ns 9.57 ns 1.00 2.14 KB 1.00
Imposter 10 919.9 ns 31.74 ns 29.69 ns 1.41 4.8 KB 2.24
TUnitMocks 10 1,407.0 ns 16.94 ns 15.02 ns 2.16 3.73 KB 1.74
Moq 10 192,361.2 ns 1,121.59 ns 936.58 ns 294.63 18.64 KB 8.71
NSubstitute 10 9,606.1 ns 54.98 ns 45.91 ns 14.71 12.07 KB 5.64
FakeItEasy 10 10,012.4 ns 116.45 ns 108.93 ns 15.34 15.42 KB 7.20
Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
AMD EPYC 7763 3.12GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.303
[Host] : .NET 10.0.13 (10.0.13, 10.0.1326.50504), X64 RyuJIT x86-64-v3

Job=InProcess Toolchain=InProcessEmitToolchain IterationCount=15
LaunchCount=1 WarmupCount=10

Event Mean Error StdDev Ratio Allocated Alloc Ratio
baseline* 236.4 ns 2.00 ns 1.87 ns 0.79 1.7 KB 1.00
Mockolate 300.3 ns 5.91 ns 5.53 ns 1.00 1.7 KB 1.00
Imposter 884.0 ns 11.70 ns 10.37 ns 2.94 7.18 KB 4.22
TUnitMocks 194.7 ns 2.84 ns 2.51 ns 0.65 1.34 KB 0.79
Moq 15,681.7 ns 64.18 ns 56.90 ns 52.23 12.51 KB 7.35
NSubstitute 6,008.6 ns 28.41 ns 25.18 ns 20.01 9.05 KB 5.31
FakeItEasy 219,661.6 ns 2,455.24 ns 2,176.50 ns 731.68 15.26 KB 8.96
Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.303
[Host] : .NET 10.0.13 (10.0.13, 10.0.1326.50504), X64 RyuJIT x86-64-v3

Job=InProcess Toolchain=InProcessEmitToolchain IterationCount=15
LaunchCount=1 WarmupCount=10

Callback Mean Error StdDev Ratio Allocated Alloc Ratio
baseline* 362.1 ns 8.31 ns 7.77 ns 1.10 1.57 KB 1.00
Mockolate 328.1 ns 7.99 ns 7.08 ns 1.00 1.57 KB 1.00
Imposter 438.5 ns 12.92 ns 11.45 ns 1.34 2.37 KB 1.51
TUnitMocks 491.2 ns 14.78 ns 13.83 ns 1.50 2 KB 1.27
Moq 98,176.5 ns 442.81 ns 414.21 ns 299.34 8.88 KB 5.66
NSubstitute 4,725.5 ns 63.13 ns 59.05 ns 14.41 7.71 KB 4.91
FakeItEasy 4,667.8 ns 25.55 ns 22.65 ns 14.23 6.81 KB 4.33
Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
AMD EPYC 7763 2.59GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.303
[Host] : .NET 10.0.13 (10.0.13, 10.0.1326.50504), X64 RyuJIT x86-64-v3

Job=InProcess Toolchain=InProcessEmitToolchain IterationCount=15
LaunchCount=1 WarmupCount=10

Indexer N Mean Error StdDev Ratio Allocated Alloc Ratio
baseline* 1 1,058.5 ns 26.48 ns 23.47 ns 0.96 3.77 KB 1.00
Mockolate 1 1,104.0 ns 35.06 ns 32.80 ns 1.00 3.77 KB 1.00
Imposter 1 820.3 ns 19.49 ns 17.28 ns 0.74 4.99 KB 1.33
Moq 1 217,796.0 ns 862.93 ns 764.97 ns 197.44 20.45 KB 5.43
NSubstitute 1 10,215.6 ns 118.01 ns 110.39 ns 9.26 12.84 KB 3.41
FakeItEasy 1 11,639.6 ns 118.84 ns 111.17 ns 10.55 13.63 KB 3.62
baseline* 10 2,596.8 ns 17.14 ns 16.03 ns 1.01 4.82 KB 1.00
Mockolate 10 2,576.4 ns 51.59 ns 48.26 ns 1.00 4.82 KB 1.00
Imposter 10 1,527.6 ns 6.76 ns 5.65 ns 0.59 6.47 KB 1.34
Moq 10 229,545.8 ns 698.34 ns 653.23 ns 89.12 29.97 KB 6.22
NSubstitute 10 24,348.3 ns 73.14 ns 68.42 ns 9.45 25.63 KB 5.32
FakeItEasy 10 24,915.5 ns 289.75 ns 256.86 ns 9.67 32.97 KB 6.84
Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
INTEL XEON PLATINUM 8573C 2.30GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.303
[Host] : .NET 10.0.13 (10.0.13, 10.0.1326.50504), X64 RyuJIT x86-64-v4

Job=InProcess Toolchain=InProcessEmitToolchain IterationCount=15
LaunchCount=1 WarmupCount=10

CreateMock Mean Error StdDev Ratio Allocated Alloc Ratio
baseline* 9.887 ns 0.1868 ns 0.1656 ns 0.39 160 B 1.00
Mockolate 25.29 ns 0.208 ns 0.184 ns 1.00 160 B 1.00
Imposter 392.52 ns 2.729 ns 2.553 ns 15.52 2240 B 14.00
TUnitMocks 46.24 ns 0.162 ns 0.152 ns 1.83 200 B 1.25
Moq 1,216.55 ns 3.566 ns 2.978 ns 48.11 2096 B 13.10
NSubstitute 1,983.48 ns 13.707 ns 12.151 ns 78.45 5048 B 31.55
FakeItEasy 1,471.86 ns 5.581 ns 5.220 ns 58.21 2759 B 17.24
Details

BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.5 LTS (Noble Numbat)
AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores
.NET SDK 10.0.303
[Host] : .NET 10.0.13 (10.0.13, 10.0.1326.50504), X64 RyuJIT x86-64-v3

Job=InProcess Toolchain=InProcessEmitToolchain IterationCount=15
LaunchCount=1 WarmupCount=10

Property N Mean Error StdDev Ratio Allocated Alloc Ratio
baseline* 1 531.7 ns 21.36 ns 19.98 ns 0.87 2.41 KB 1.00
Mockolate 1 608.8 ns 15.25 ns 14.27 ns 1.00 2.41 KB 1.00
Imposter 1 468.4 ns 2.48 ns 2.07 ns 0.77 2.98 KB 1.23
TUnitMocks 1 454.1 ns 1.87 ns 1.66 ns 0.75 1.64 KB 0.68
Moq 1 11,699.2 ns 51.39 ns 45.56 ns 19.23 10.27 KB 4.25
NSubstitute 1 8,028.3 ns 68.05 ns 63.66 ns 13.19 11.45 KB 4.74
FakeItEasy 1 8,599.2 ns 48.34 ns 40.36 ns 14.13 11.24 KB 4.66
baseline* 10 1,008.5 ns 5.49 ns 4.86 ns 0.99 2.91 KB 1.00
Mockolate 10 1,019.9 ns 10.72 ns 10.03 ns 1.00 2.91 KB 1.00
Imposter 10 640.4 ns 2.74 ns 2.56 ns 0.63 3.26 KB 1.12
TUnitMocks 10 1,618.7 ns 16.85 ns 15.76 ns 1.59 3.94 KB 1.35
Moq 10 18,884.4 ns 58.38 ns 48.75 ns 18.52 17.03 KB 5.86
NSubstitute 10 17,511.3 ns 77.46 ns 68.66 ns 17.17 21.08 KB 7.25
FakeItEasy 10 19,892.4 ns 90.04 ns 84.22 ns 19.51 30.81 KB 10.60

baseline* rows show the corresponding Mockolate benchmark from the most recent successful main branch build with results, for regression comparison.

github-actions Bot added a commit that referenced this pull request Oct 18, 2026
github-actions Bot added a commit that referenced this pull request Oct 18, 2026
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.

2 participants