Repository navigation
Add real auxiliary and grid files to the test corpus - #2
Merged
Merged
Conversation
The lab turned up libavif samples that cover paths only synthetic bytes reached before. Five of them are small enough to commit. Two carry a real alpha auxiliary and one a real depth auxiliary. Those are the files most easily mistaken for a gain map, since Apple's rule keys on an auxC aux_type, and one of them hides the association behind custom ipco properties that shift the 1-based ipma property_index. A tmap over two grids resolves to item 28, well past the 1/3/4 a plain two-item file produces, so it pins the item id lookup on ids that are not effectively hardcoded. The last is a real XMP packet terminated by a NUL byte, where reporting `none` has to mean we read the packet rather than failed to parse it. test_cli.py listed the corpus names a second time, so scanning the folder now checks against the table test_corpus.py already pins against SOURCES.md, and the README scan transcript is regenerated from the real command. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Five libavif samples that cover detection paths only synthetic bytes reached before. All small, all BSD-2-Clause, all documented in
SOURCES.md. Nothing here changessrc/.circle_auxl_two_targets.avifandcircle_custom_properties.avifcarry a real alpha auxiliary,colors-animated-8bpc-depth-exif-xmp.avifa real depth one. Those are the files most easily mistaken for a gain map, since the Apple rule keys on an auxCaux_type. The custom-properties file is the interesting one: unknown boxes sit inipcoand shift the 1-basedproperty_indexeveryipmaentry is written against, so resolving the aux type at all proves the index walk held.color_grid_gainmap_different_grid.avifis atmapwhose base and gain map are both grids, resolving to item 28 rather than the 1/3/4 a plain two-item file produces.paris_xmp_trailing_null.jpgis a real XMP packet terminated by a NUL byte, where reportingnonehas to mean we read the packet, not that parsing fell over before we looked.The three auxiliary tests are one parametrized test rather than three near-copies. I checked they aren't vacuous: making
items_with_aux_typereturn nothing fails all three.test_cli.pywas carrying a second hardcoded copy of the corpus file names, which would need editing every time the corpus grows. It now checks the folder scan against the table intest_corpus.py, which is already pinned againstSOURCES.md. The README scan transcript is regenerated from the real command rather than hand-edited.141 tests pass,
ruff checkclean, and the sdist still ships the corpus.🤖 Generated with Claude Code