feat(mutation): per-operation score breakdown and --min-score CI gate#76
Merged
Conversation
…ionScores in Run()
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.
Summary
operation_scoresin JSON,## Per-Operation Mutation Scoretable in Markdown and HTML): groups results bysource.spec_pathfromindex.json, aggregates killed/survivors per API operation, sorts weakest-first. Badges: ⚠ below 70%, ✓ at 100%; HTML rows color-coded (light red / light green).--min-scoreCI gate: float64 flag (0.0–1.0, default 0 = disabled); exits 6 with a red violation list if any operation scores below the threshold. Validation rejects values outside [0, 1] before the run starts.Operationfield inCaseMutationResultis additive;OperationScoresinMutationRunusesomitempty.New files
internal/mutation/score.go—ComputeOperationScoresinternal/mutation/score_test.go— 4 unit tests (basic, empty, unknown fallback, tiebreak)Modified files
internal/mutation/types.go—OperationScoretype,CaseMutationResult.Operation,MutationRun.OperationScoresinternal/mutation/engine.go— readssource.spec_path, populatesOperation, callsComputeOperationScoresinternal/mutation/render.go—renderOperationTable(Markdown),renderOperationTableHTML(HTML)internal/mutation/render_test.go— 3 new render testscmd/mutate.go—--min-scoreflag, validation, gate logicscripts/acceptance.sh— AT-410–AT-416Test Plan
go test ./... -count=1— all packages passbash scripts/acceptance.sh— 272/272 passedmutate --helpstill shows--casesflagmutation-report.mdcontainsPer-Operationafter a runmutation-report.jsoncontainsoperation_scores--min-scoreappears inmutate --help--min-score 1.5returns error before running--min-score 0(default) does not change exit behavior--min-score 0.99exits 6 and prints violation list when an operation scores below threshold