Skip to content

Comments

fix: resolve .gomuignore and Not Viable mutation issues#46

Merged
sivchari merged 1 commit intomainfrom
fix-gomuignore-not-viable-bugs
Feb 20, 2026
Merged

fix: resolve .gomuignore and Not Viable mutation issues#46
sivchari merged 1 commit intomainfrom
fix-gomuignore-not-viable-bugs

Conversation

@sivchari
Copy link
Owner

Summary

  • Fix .gomuignore patterns not being applied during incremental analysis
  • Fix 95% Not Viable mutation rate caused by single-file compilation
  • Fix --incremental CLI flag being ignored
  • Re-enable mutation-testing quality gate (threshold: 80%)

Changes

.gomuignore fix

Previously, ignore patterns were only applied in GetAllGoFiles(), but GetChangedFiles() (used during incremental analysis) did not check ignore patterns. This caused files like cmd/gomu/main.go to be processed even when cmd/ was in .gomuignore.

Not Viable fix

The compilation check was using go build <file.go> which only compiles a single file. When that file depends on other files in the same package, compilation fails. Changed to go build . with overlay to properly resolve all package dependencies.

Incremental flag fix

The incremental option was hardcoded to true in IncrementalAnalyzer, ignoring the CLI --incremental flag.

Results

  • Not Viable rate: ~95% → ~12%
  • .gomuignore patterns now work correctly in all scenarios
  • Quality gate re-enabled with 80% threshold

Test Plan

  • All existing tests pass
  • Manual testing with gomu run ./examples/ shows improved results
  • Manual testing confirms cmd/ directory is properly ignored

- Apply .gomuignore patterns to GetChangedFiles in git integration
  Previously, ignore patterns were only applied in GetAllGoFiles,
  causing incremental analysis to process ignored files

- Fix compilation check to build entire package instead of single file
  Using `go build <file.go>` fails when the file depends on other
  package members. Changed to `go build .` with overlay to resolve
  all package dependencies correctly

- Pass incremental option to IncrementalAnalyzer properly
  The incremental flag was hardcoded to true, ignoring CLI option

- Re-enable mutation-testing quality gate (threshold: 80%)

These fixes reduce Not Viable mutation rate from ~95% to ~12%
and ensure .gomuignore patterns work in all scenarios.
@sivchari sivchari force-pushed the fix-gomuignore-not-viable-bugs branch from 715c58f to 7182e6b Compare February 20, 2026 05:52
@github-actions
Copy link
Contributor

🧬 Mutation Testing Results

Quality Gate: PASSED

Overall Mutation Score: 21.1%
Total Mutants: 494
Killed: 104

Files with Mutations

File Score Mutants Killed
...work/gomu/gomu/internal/analysis/incremental.go 20.4% 54 11
...ner/work/gomu/gomu/internal/execution/engine.go 29.2% 65 19
/home/runner/work/gomu/gomu/pkg/gomu/engine.go 21.4% 299 64
.../runner/work/gomu/gomu/internal/analysis/git.go 13.2% 76 10

Generated by gomu mutation testing

@sivchari sivchari merged commit 887a133 into main Feb 20, 2026
3 checks passed
@sivchari sivchari deleted the fix-gomuignore-not-viable-bugs branch February 20, 2026 06:11
This was referenced Feb 20, 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.

1 participant