Repository navigation
feat: check quality and target in the regression gate - #39
Merged
Merged
Conversation
The gate compared bytes only, so a codec could pass as smaller by settling at a lower quality within the search tolerance, and a changed target would compare unrelated numbers without warning. The baseline now records each codec's achieved ssimulacra2 score, and the check fails on a drop of more than 0.5 points or a target that differs from the baseline's; the workflow defines the target once for both steps. The CSV writer quotes fields and the parser honours quotes, so an image name with a comma no longer breaks the results. The baseline is regenerated from the latest amd64 CI run, and the key separator in regression.js is now an escape instead of a raw NUL byte, so git diffs it as text.
Codec comparison ✅ no size or quality regression📥 Download the codec report (unzip and open Size check |
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.
Summary
Closes the three regression-gate items on the ROADMAP.
QUALITY, even if the file is smallerbaseline.jsonnow stores{ bytes, ssimulacra2 }per image and codec. It is regenerated from the latestmaingate run'sresults.csv(amd64, like CI); bytes change only in the AVIF and HEIC pairs the trixie move had already shifted (≤0.41%).regression.ymldefinesTARGETonce for the comparison and the check; the comment reads "no size or quality regression".check-regression.jsgains--quality-tolerance, applies--targetin check mode, and prints quality next to size.regression.jsonmainheld a raw NUL byte as its key separator, so git treated the file as binary and never showed its diffs. It is now the\u0000escape: same behaviour, plain text.Test plan
regression.test.js(7 failed before the change);node --test51 pass, 0 skippedQUALITY, exit code 1compare-codecsrun on an image namedsunset, beach.pngwrites a quoted field that parses back correctly