tools: restore the line a background sweep left mutated (Refs #2161) - #2666
Merged
Conversation
`if d > 26` on master should be `if d >= 26`. A full `tri gates mutate` sweep was running in the background when I staged with `git add -A`, and the mutant it was holding at that instant went into the commit and through the merge. Behaviour is unaffected -- this is the mutant proved equivalent over 525_918 points, and the line's own `# mutant-equivalent:` comment says so. That is what makes it worth fixing rather than shrugging at: the code stopped matching the comment directly above it while every test stayed green. Skill section 122: the dirty-tree guard protects the run, not the operator. `git add -A` cannot tell a mutant from an edit, and `target/.tri-mutating` was sitting right there unread.
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
PR DashboardGenerated at: 2026-08-24 04:43:51 UTC
Summary
Seal Status
|
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.
if d > 26on master should beif d >= 26.A full
tri gates mutatesweep was running in the background when I staged withgit add -A, and the mutant it was holding at that instant went into the commit, into the pull request, through 30 green checks, and onto master.Behaviour is unaffected — this is the mutant proved equivalent over 525,918 points two ticks ago, and the line's own
# mutant-equivalent:comment says exactly that.That is what makes it worth fixing rather than shrugging at: the code stopped matching the comment directly above it and every test stayed green, which is the precise condition under which a wrong line survives indefinitely.
The guard protects the run, not the operator
mutate's dirty-tree refusal answers "is the tree clean before I start?". Nobody was asking "is a sweep running while I stage?", andgit add -Acannot tell a mutant from an edit.Three defences, cheapest first:
-A, while a sweep runs.target/.tri-mutating— it exists for exactly this and was sitting right there.Third self-inflicted git loss this session (§119 has the other two) and the only one that reached master. Same shape each time: a command whose blast radius is the whole tree, run while my attention was on one file.
The detector was not a test — it was
mutaterefusing to start on a dirty tree the next time I ran it, one tick late.§122.
Refs #2161