Skip to content

Release v0.2.0: Promote test to main#8

Merged
Its-donkey merged 22 commits intomainfrom
test
Jan 27, 2026
Merged

Release v0.2.0: Promote test to main#8
Its-donkey merged 22 commits intomainfrom
test

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Jan 27, 2026

Summary

Automated promotion of test branch to main.

Version: v0.2.0
Release type: minor

Test plan

  • All tests pass on test branch
  • Review changes before merging

🤖 Generated with GitHub Actions

@github-actions
Copy link
Contributor Author

Mutation Testing

Mutation testing completed.

📎 Download the HTML report from the workflow artifacts for detailed results.

CI now commits mutation-report.html back to the repo after mutation
testing completes on pushes to main. Uses [skip ci] to prevent loops.
Adds explanatory descriptions for Killed, Survived, Timeout, Error,
and Skipped statuses to help users understand what each means.
- Add StatusNaked for mutations in code with no test coverage
- Coverage is always gathered to identify naked mutants
- --coverage-filter=true: Shows naked mutations (skips testing them)
- --coverage-filter=false: Tests all mutations normally
- Update HTML report with Naked styling (purple) and legend
- Update mutation score formula to exclude naked mutations
Kills mutation that changes SetLite from "lite" to "".
These string values are used in CLI parsing and config files.
Re-enables diff-based mutation testing in CI to only test changed
files rather than the entire codebase on every run.
- executor: Add StatusNaked to TestMutantStatus_Values
- executor: Add TestMutantStatus_StringValues for exact string values
- executor: Add TestExecuteWithEmptySources to test len(sources) > 0 guard
- config: Add coverage_filter YAML parsing test
- cli: Add coverage-filter flag name and description tests
- Test runCmd recognizes --coverage-filter flag name
- Add reflection test for coverage_filter yaml struct tag
- Export WriteTerminal function for testing
- Add SetCoverageDataForTesting for injecting mock coverage data
- Add tests for naked result Duration=0 and Output string
- Add tests for coverage filter enabled/disabled behavior
- Add tests for progress callback argument validation
- Refactor statusToClass/statusToText to use variables (kills return_remove mutations)
- Refactor WriteTerminal to use variable for error (kills call_silence mutations)
Extract the coverage-filter flag description to an exported constant
so tests can verify the actual value used in production code.
- TestExecute_EmptySourcesNoCoverageGathering: verifies empty sources
  skips coverage gathering (kills len(sources) > 0 mutations)
- TestExecute_NonEmptySourcesTriggersCoverageCheck: verifies non-empty
  sources triggers coverage check
- TestExecute_NilProgressCallback: verifies nil progress callback doesn't
  panic (kills e.progress != nil -> true mutation)
- TestExecute_ProgressCallbackCalledForNakedResults: verifies callback
  is called when set
- TestStatusToClass_UnknownStatus: verifies empty string fallback for
  unknown status (kills "" -> "mutated" mutation)
- TestExecute_MultipleNakedResults_ProgressLoop: verifies all naked
  results trigger progress callback (kills break mutation)
- TestExecute_ProgressTotal_WithMixedResults: verifies total calculation
  with both covered and uncovered mutations
- TestExecute_ProgressTotal_OnlyNaked: verifies total when all mutations
  are naked (kills arithmetic mutations on total calculation)
Change TestExecute_ProgressTotal_WithMixedResults to use 1 covered + 3
uncovered mutations instead of 2+2. This kills the mutation:
  len(mutations) + len(uncoveredResults) -> len(mutations) * len(uncoveredResults)

With 2+2=4 vs 2*2=4, the mutation gives the same result.
With 1+3=4 vs 1*3=3, the mutation gives a different result and fails the test.
Add executor_integration_test.go with build tag //go:build integration
to exercise code paths that require real Go modules and files:
- Coverage gathering with real source files (len(sources) > 0)
- Empty vs non-empty sources behavior
- Progress callback with mixed covered/uncovered mutations

These tests help kill mutations on executor.go lines 215, 408-413.
Remove diff-base filtering to get complete mutation testing
on cli, config, executor, and reporter files for comparison
with go-mutesting results.
Combine --files with --diff-base origin/main to test mutations
only on changed lines within the 4 core files.
Tests kill mutations across reporter.go including:
- Format constants and struct tags
- New function initialization
- Terminal output formatting and empty lines
- JSON indentation with SetIndent
- HTML file stats counting (killed/survived)
- HTML file sorting and score calculation

Achieves 98.6% mutation score with only 4 equivalent
mutations remaining (untestable by design).
Adds options to run mutation testing manually with:
- Custom target (e.g., ./internal/reporter/reporter.go)
- Full scan mode (without diff-base)

Enables running complete mutation scans on specific files.
- CHANGELOG: Add [Unreleased] section with recent changes
  - Comprehensive reporter tests (98.6% mutation score)
  - Manual CI workflow dispatch
  - Code review documentation
  - StatusNaked handling fix

- README: Add coverage filter feature and example

- docs/roadmap: Mark completed features
  - Environment variables, full diff, per-package thresholds
  - Coverage-based filtering, manual CI dispatch
  - Add performance optimizations to roadmap

- docs/cli-reference: Add coverage filter examples

- docs/configuration: Add coverage filter section with CI examples

- docs/output-formats: Add Naked status and mutation statuses table

- docs/ci-integration: Add coverage filter best practice section
@github-actions
Copy link
Contributor Author

Mutation Testing

Mutation testing completed.

📎 Download the HTML report from the workflow artifacts for detailed results.

@Its-donkey Its-donkey merged commit 27e94de into main Jan 27, 2026
9 checks passed
@Its-donkey Its-donkey deleted the test branch January 27, 2026 03:21
@Its-donkey Its-donkey restored the test branch January 27, 2026 03:22
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