Repository navigation
fix: balance habit mutation shards - #799
Merged
Merged
Conversation
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes Reviewed the mutation-shard split and its selector tests, including workflow argument handling and pinned Stryker span semantics.
- Balanced Habit shards: Replaces the combined Habit/StreakFreeze shard with three disjoint Habit character-span scopes, retaining StreakFreeze in the final shard and covering boundary-crossing mutants and future file growth.
- Selection coverage: Preserves project-wide domain selection and adds scope, boundary, and file-growth assertions. All 25 selector tests passed locally.
- Runtime validation: The workflow, thresholds, and timeout remain unchanged. Actual new-shard runtimes remain for CI to measure; full mutation execution was not rerun locally.
gpt-6.1-sol | 𝕏
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




The combined habit/freeze mutation job can exhaust its 45 minute limit when Habit.cs changes. Split it into three Stryker character-span shards in
.github/scripts/mutation-matrix.mjs, with selection and coverage checks in.github/scripts/mutation-matrix.test.mjs.The first two shards include nested prefixes and exclude the preceding prefix; the final shard includes the whole file and excludes the second prefix. Because Stryker requires full span containment, mutants crossing a boundary move to the following shard. The final shard retains StreakFreeze.cs and covers Habit.cs growth beyond the current file length. The workflow, thresholds and 45 minute timeout remain unchanged.
Closes thomasluizon/orbit-tickets#1572
Measurement and supported interface
Inspected the successful rerun of orbit-api#793, including its job log and
mutation-report-pull_request-domain-habit-freezeartifact. Reproduce with:The mutation phase ran from 20:34:43 to 21:04:58, about 30 minutes after roughly 8 minutes of setup, compilation and coverage. Habit.cs supplied all 423 executed mutants (333 killed, 59 survived, 31 timed out), plus 7 without coverage. StreakFreeze.cs supplied no executed mutants: 30 were removed by the since filter and 3 failed compilation. A file-only split would leave the slow work together.
Using the report's actual
files,source,mutants,location.start,location.endandstatusvalues, checked every Habit.cs and StreakFreeze.cs mutant against the emitted matrix's inclusion and exclusion patterns. All 546 report mutants have exactly one owner, including ignored and compile-error entries. The 430 compiling, non-ignored Habit.cs mutants divide as follows:Character boundaries 15181 and 25215 fall before GetRemainingCompletions and Update in the measured source. These balance mutant counts and observed timeouts; the report does not provide individual mutant durations. New shard runtimes remain for CI to measure.
Ran
dotnet tool restoreanddotnet stryker --helpfor pinned 4.16.0. The installed NuGet manifest identifies source commitf9109e24c615a7030a3b33e5532c665c974e4ec5. Cross-checked character spans, full containment and exclusion precedence against that commit's FilePattern.cs, FilePatternMutantFilter.cs and FilePatternTests.cs. Range values are source character positions, not mutant IDs or line numbers.Assumptions
Test evidence
node --test .github/scripts/mutation-matrix.test.mjspassed all 19 existing tests with the slow combined shard still present.a change to Habit.cs selects every domain shardandnightly and manual runs keep all shards and their mutation scopes without input.--stdin, including each scoped domain file, domain tests, configuration, shared changes, renames and deletions.dotnet build Orbit.slnx: exit 0, zero errors. Generated OpenAPI files were unchanged.dotnet test tests/Orbit.Domain.Tests --no-build --no-restore: exit 0, 767 passed.dotnet test tests/Orbit.Application.Tests --no-build --no-restore: exit 0, 5219 passed.dotnet test tests/Orbit.Analyzers.Tests --no-build --no-restore: exit 0, 40 passed.dotnet test tests/Orbit.Infrastructure.Tests --no-build --no-restore: exit 0, 3770 passed. All four .NET test projects passed.