🧪 test(archive,index): close the surviving mutants - #2256
Merged
Conversation
A full-crate mutation run left 45 survivors. Most were boundaries the suite approached but never landed on: a chunk starting at the member's end, a read window ending exactly at the inspection limit, a container stack at the depth limit, a nested container at the size limit, a central directory at its byte budget, an end-of-central-directory record carrying its declared comment, and an entry whose extra field and comment the walk has to step over. The rest marked spellings where the operator carried no meaning, which the campaign treats as code to fix rather than mutants to excuse. Disjoint bits make `|` and `^` indistinguishable in the readable-flags mask, so it is now the literal it always denoted. A trimmed text chunk ends inside the member, so its successor is unconditional and the guard that recomputed it is gone. A seeked zip read at offset zero performs the same read as the streaming path, so the `offset > 0` guard chose between identical results. The range reader's five seek arms reduce to one saturating_add_signed and a shared clamp, which also fixes `SeekFrom::Current` with a positive offset having taken the absolute value of a value already known non-negative. Slice-versus-spill selection for a nested container was asserted only through its output bytes, which both paths produce. The new tests mount in source.rs and read the resolved source's path, start and length, so the choice itself is observable, including that an encrypted stored member is copied rather than sliced. Refs #1893
A full-crate mutation run left eight survivors and four timeouts. The negative cache accounted for most: nothing pinned its eight-mebibyte budget, nothing admitted an entry at exactly that budget, and the wall-clock entry point was driven only by a deadline already past, so its maintenance sweep never had to tell a live entry from an expired one. Three timeouts and one survivor came from spellings where the operator decided nothing. The flight gate published a join counter that no subscriber reads, since a subscriber waits for the next join rather than counting them; a unit watch channel says that, and drops an increment that under `*=` never advances. composed_indexes drove its own cursor into a `while let`, which the same mutation turns into a loop that never terminates. Walking a range instead says the cursor only moves forward, and any mutation of it changes what the function returns rather than whether it returns. Refs #1893
Merging this PR will not alter performance
Comparing Footnotes
|
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.
Full-crate mutation runs over
peryx-archiveandperyx-indexreported 45 and 12 surviving mutants, each one a place where the code could behave another way and no test would notice. The third crate in this batch,peryx-test-support, generates no mutants:.cargo/mutants.tomlhas excluded it since #2165, because a behaviour change in the shared harness either breaks a test that depends on it or reaches nothing.Most survivors sat on boundaries the suites approached without landing on, so closing them meant driving the exact value. A chunk starting at a member's end, a read window ending on the inspection limit, a container stack at the depth limit and a container at the size limit, a central directory at its byte budget, an end-of-central-directory record carrying its declared comment, an entry whose extra field and comment the directory walk steps over, and a negative-cache entry that weighs its budget to the byte.
The rest marked spellings where the operator decided nothing, and the standing ruling for this campaign is to change such code until the choice carries meaning. Disjoint bits make
|and^indistinguishable inREADABLE_FLAGS, so it is now the literal it always denoted. A trimmed text chunk ends inside its member, so its successor is unconditional. A seeked zip read at offset zero performs the same read as the streaming path it guarded against.FileRangeReader's five seek arms reduce to onesaturating_add_signedand a shared clamp, which fixesSeekFrom::Currentwith a positive offset taking the absolute value of a number already known non-negative. The flight gate published a join count no subscriber reads, since a subscriber waits for the next join instead of counting them, so the channel now carries the event alone.composed_indexesdrove a hand-rolled cursor whose mutation to*=produced a loop with no exit; walking a range says the cursor only moves forward, so any mutation of it changes what the function returns rather than whether it returns.Choosing between slicing a stored nested container in place and spilling a compressed one to a temporary file showed up only in the bytes both paths produce. A test module mounted in
source.rsnow reads the resolved source's path, start and length, and pins that an encrypted stored member takes the copy path.Refs #1893