Add mutation testing gate to pull request CI - #4
Merged
Merged
Conversation
A new CI job runs `kimera ci --since` against the PR's base branch, so any surviving mutant on a changed line fails the build. kimera 0.1.1 fixes the Linux boot crash (`require "english"`) and runs its children with KIMERA=1. spec_helper now skips the coverage floor under it: a partial run always trips the floor, which failed passing runs with SimpleCov's exit 2. The CI step sets KIMERA=1 itself, since 0.1.1 sets it only for --isolated children and the warm run loads spec_helper in-process. The job passes --no-fail-on-no-coverage, as .kimera.yml already chose: SimpleCov's 100% floor already fails untested lines, and kimera reports cli/flag.rb's methods as uncovered because it cannot overlay a Data.define block. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y6Lnj5JfWu4bi6PCYQAc5s
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 mutation testing step to the CI pipeline using kimera, which validates that code changes are adequately tested by mutating the modified lines and ensuring the test suite catches the mutations.
Key changes
mutationjob that runs only on pull requests, checking that any mutants introduced in changed lines are killed by the test suiteKIMERAenvironment variable is set, since mutation testing on partial code changes would otherwise fail the coverage requirementImplementation details
The mutation job:
fetch-depth: 0) to enable diffing against the base branchkimera ci --since origin/${{ github.base_ref }}to mutate only lines changed in the PRKIMERA=1to disable SimpleCov's coverage floor, which would be inappropriate for partial code coverage analysishttps://claude.ai/code/session_01Y6Lnj5JfWu4bi6PCYQAc5s