refactor: use overlay-based mutation for crash-safe testing#43
Merged
refactor: use overlay-based mutation for crash-safe testing#43
Conversation
Replace file-based mutation approach with Go's -overlay flag to ensure original source files are never modified during mutation testing. Key changes: - Add OverlayMutator that creates temporary mutated files and overlay.json - Update Engine to use overlay for compilation checks and test runs - Remove SourceMutator and file lock mechanism (no longer needed) - Enable true parallel execution without file contention - Update README.md to reflect current CLI-based configuration Benefits: - Crash-safe: original files remain intact even if process is killed - True parallelism: each mutation uses isolated overlay files - Simpler: no file locks or rollback logic required
- Add missing whitespace for wsl_v5 linter in multiple files - Replace deprecated homebrew_casks.binary property - Replace deprecated conflicts.formula with conflicts.cask
Contributor
🧬 Mutation Testing Results✅ Quality Gate: PASSED Overall Mutation Score: 15.2% Files with Mutations
Generated by gomu mutation testing |
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
-overlayflag to ensure original source files are never modified during mutation testingSourceMutatorand file lock mechanism in favor ofOverlayMutatorthat creates isolated temporary filesChanges
New Files
internal/execution/overlay.go- OverlayMutator implementation using Go's overlay featureinternal/execution/overlay_test.go- Comprehensive tests for overlay functionalityModified Files
internal/execution/engine.go- Updated to use overlay for compilation and test executioninternal/execution/engine_test.go- Updated tests for overlay-based engineREADME.md- Updated to match actual CLI implementationRemoved Files
internal/execution/mutator.go- Old file-based mutation approachinternal/execution/mutator_test.go- Tests for removed mutatorBenefits
Test plan
-raceflagTestOverlayParallelExecution) verifies concurrent safety