Skip to content

馃И test(oci): accept a monolithic blob at the size limit - #2257

Merged
gaborbernat merged 1 commit into
mainfrom
test/mutants-oci-1893-b
Sep 9, 2026
Merged

馃И test(oci): accept a monolithic blob at the size limit#2257
gaborbernat merged 1 commit into
mainfrom
test/mutants-oci-1893-b

Conversation

@gaborbernat

Copy link
Copy Markdown
Member

The second peryx-ecosystem-oci batch for #1893 takes registry/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 current cargo mutants run 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 a let chain, where || is not grammar.

One mutant lived. A monolithic blob upload compares the body against max_artifact_size with >, 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

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.
@gaborbernat gaborbernat added the enhancement New feature or request label Sep 9, 2026
@gaborbernat
gaborbernat merged commit 07dd9e8 into main Sep 9, 2026
19 checks passed
@gaborbernat
gaborbernat deleted the test/mutants-oci-1893-b branch September 9, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant