Assert the comparison that decides whether an entry moved [#44] - #204
Merged
iderex merged 1 commit intoAug 26, 2026
Conversation
The refresh reports each repository as NEW, MOVED, GONE or unchanged, and what decides MOVED is one function comparing four fields. Nothing asserted that function. The only case reaching it moves two fields at once, so a comparison that had stopped reading one of them still answered MOVED there and the suite stayed green. The failure that prevents is a change to a record being announced as unchanged, which is the one line somebody reads instead of diffing the file. Found by re-taking the mutation run this issue records. Between 440c545 and ad8b25c the package's efficacy fell from 100.00% to 88.10% with one commit touching it, and four of the five survivors were the four field comparisons: negating any one of them left every test passing. The new case compares an entry against itself and against five neighbours that differ in exactly one thing. Negating a comparison makes an entry differ from itself, so the self case reds on all four; the neighbours name which field went unread. The length term also bounds the loop below it, and negating it indexes past the shorter slice. The fifth survivor is a boundary on `r.Finished > 0` at the same refusal. The three guards above it leave every entry with a count that is not negative and no more releases stating no generation than were published, so the only inputs the boundary changes the verdict for are refused two guards earlier and no record distinguishes the two spellings. It is left alive rather than chased. Signed-off-by: Nils Lehnen <30603423+iderex@users.noreply.github.com>
iderex
deleted the
tests/the-comparison-that-keeps-the-record-honest-is-asserted-field-by-field
branch
August 26, 2026 23:25
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.
Under #44. It does not close it: what that issue still waits on is where a
mutation run lives, which is a call rather than something a reading settles,
and this change adds no leg to the gate.
What was wrong
The refresh verb reports every repository as NEW, MOVED, GONE or unchanged,
and what decides MOVED is
same, comparing four fields. Its own comment saysit exists to keep that comparison honest. Nothing asserted it.
The only case that reached it moved two fields at once, so a comparison that
had stopped reading one field still answered MOVED there and the suite stayed
green. What that costs is the line somebody reads instead of diffing the
record: a repository whose count moved, announced as unchanged.
How it was found
By re-taking the mutation run #44 records, rather than by reading the code.
The tool, the coefficient and the clone outside the working tree are the ones
that issue already argues for, and the binary still reports
devrather thanthe tag it was built from:
At
440c545, which is where the score on #44 was last taken:At
ad8b25c, the mainline this branch is off:One commit touches the package between those two:
The five, and four of them are the four field comparisons:
All runs 2026-08-26, in a clone outside the working tree because the tool
rewrites source files where it finds them.
What the change does
One case, comparing an entry against itself and against five neighbours that
differ in exactly one thing.
Negating any of the four comparisons turns the inequality into an equality,
which makes an entry differ from itself, so the self comparison reds on all
four; the neighbour names which field went unread. Each mutation applied by
hand at the commit being pushed, one at a time, with the tree restored
between:
The fourth is worth reading rather than skipping. The length term is not a
shortcut: it bounds the loop under it, so negating it walks past the end of
the shorter slice. It reds by assertion first and by that panic second.
The score with the case in, in the same clone at the same commit:
Run 2026-08-26. One mutant also moves out of
Not covered, because nothingreached
samedirectly before.The survivor that is left, and why it is left
CONDITIONALS_BOUNDARY at releases.go:139:17is the boundary on the count offinished releases in the refusal about a finished release with no server
generation. Three guards stand above it:
So an entry reaching that line has a count that is not negative, a count of
releases stating no generation that is not negative, and no more of the
second than of the first. The only inputs the boundary changes the verdict
for are those with no finished release, and there the other two guards force
the second count to zero as well, so the last term reads zero against zero
either way. That is a reading of those four lines rather than a measurement:
the suite staying green under the mutation is consistent with it and proves
nothing on its own.
Chasing it would mean changing the refusal to suit the tool, which is the
wrong direction for a package whose guards are the point.
The gate at the commit being pushed
One file, one topic, no production code touched.
No second reader
This change carries no second reader. The evidence in place of one is the
four mutations above, each applied at this commit and each producing a red
run naming the field it removed, plus the before and after scores from the
same tool in the same clone.