ci: add self-mutation-testing workflow and kill 8 surviving filter mutants#53
Open
jonbaldie wants to merge 3 commits into
Open
ci: add self-mutation-testing workflow and kill 8 surviving filter mutants#53jonbaldie wants to merge 3 commits into
jonbaldie wants to merge 3 commits into
Conversation
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>
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.
This PR adds a GitHub Actions workflow that runs go-mutesting on its own packages, and adds four new test cases to
internal/filterthat kill all 8 mutants that were left alive when we ran the tool against itself.