Skip to content

Add real auxiliary and grid files to the test corpus - #2

Merged
Booyaka101 merged 1 commit into
mainfrom
corpus-real-auxiliaries
Sep 22, 2026
Merged

Booyaka101 merged 1 commit into
mainfrom
corpus-real-auxiliaries

Conversation

@Booyaka101

Copy link
Copy Markdown
Owner

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 changes src/.

circle_auxl_two_targets.avif and circle_custom_properties.avif carry a real alpha auxiliary, colors-animated-8bpc-depth-exif-xmp.avif a real depth one. Those are the files most easily mistaken for a gain map, since the Apple rule keys on an auxC aux_type. The custom-properties file is the interesting one: unknown boxes sit in ipco and shift the 1-based property_index every ipma entry is written against, so resolving the aux type at all proves the index walk held.

color_grid_gainmap_different_grid.avif is a tmap whose 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.jpg is a real XMP packet terminated by a NUL byte, where reporting none has 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_type return nothing fails all three.

test_cli.py was 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 in test_corpus.py, which is already pinned against SOURCES.md. The README scan transcript is regenerated from the real command rather than hand-edited.

141 tests pass, ruff check clean, and the sdist still ships the corpus.

🤖 Generated with Claude Code

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>
@Booyaka101
Booyaka101 merged commit 8b7fab2 into main Sep 22, 2026
12 checks passed
@Booyaka101
Booyaka101 deleted the corpus-real-auxiliaries branch September 22, 2026 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant