Skip to content

ci: add self-mutation-testing workflow and kill 8 surviving filter mutants#53

Open
jonbaldie wants to merge 3 commits into
avito-tech:masterfrom
jonbaldie:feature/self-mutation-testing
Open

ci: add self-mutation-testing workflow and kill 8 surviving filter mutants#53
jonbaldie wants to merge 3 commits into
avito-tech:masterfrom
jonbaldie:feature/self-mutation-testing

Conversation

@jonbaldie
Copy link
Copy Markdown

This PR adds a GitHub Actions workflow that runs go-mutesting on its own packages, and adds four new test cases to internal/filter that kill all 8 mutants that were left alive when we ran the tool against itself.

jonbaldie and others added 3 commits May 14, 2026 12:24
Runs on push to master only (not PRs — too slow). Scoped to the mutator
and filter packages whose tests are plain unit tests; cmd/ is excluded
because its tests re-invoke the binary, and internal/annotation is
excluded due to existing build errors. exec-timeout is 30s per mutant,
job timeout is 45 minutes. continue-on-error keeps the result
informational until a baseline score is established.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add 4 targeted test cases to internal/filter that together cover the
specific AST paths previously left untested: a 1-arg make (kills the
len>1 → >=1/true variants), unary negation of a complex sub-expression
(kills else-branch removal), a nested CallExpr with two int args (kills
loop-break and statement-remove on the arg-recursion loop), and unary
on float literals (kills the token.INT → true comparison mutation).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove continue-on-error from mutation workflow (the tool exits 0
  regardless of score, making the flag redundant and misleading)
- Document all excluded packages and the exit-0 behaviour in a comment
- Gitignore mutation run artifacts (binary, report.json/html, *.go.new)
- Remove mutant-specific comments from test table entries; keep only
  the parser-validity note on the 1-arg make case

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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