馃И test(oci): accept a monolithic blob at the size limit - #2257
Merged
Conversation
The size limit is bracketed by a two-byte body that lands and a six-byte body that is refused, and both hold whether the check reads as over the limit or at it. A four-byte body against a limit of four is the one that decides it, and nothing sent one: the chunked path has that case, the monolithic path did not. The over and under cases fold into the same table as the new one, since all three ask the same question of the same route. A `cargo mutants` run over `registry/uploads.rs` settled its other 52 mutants: 32 caught and 20 that cannot build, all `&&` inside `let` chains.
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.
The second
peryx-ecosystem-ocibatch for #1893 takesregistry/uploads.rs, the file whose two identity checks decide whether one repository can drive another's upload session or resume a chunk past its own bytes. A currentcargo mutantsrun over the file settles all 53 of its mutants. 馃К Existing cases catch 32, including both columns of the session identity check and all three of the chunk range check, and 20 cannot build because they flip an&&inside aletchain, where||is not grammar.One mutant lived. A monolithic blob upload compares the body against
max_artifact_sizewith>, and the suite drove that comparison with a two-byte body and a six-byte body against a limit of four. A body of exactly four bytes is the only input that separates>from>=, and no case sent one: the chunked path had its at-limit case while the monolithic path did not, which is the shape #1893 has now recorded twice. The over and under cases fold into one table with the new at-limit row, since all three ask the same route the same question.Refs #1893