Test that a stub decoder reaches the scan, the ladder and export

FR-RAW-2's "without changing callers" needs a test that would fail if a
caller named the concrete decoder; passing a real RAW through rawler
cannot tell the two apart, because both routes give the same answer.

The decoder_seam tests hand a stub decoder, for a container no real
decoder reads, to the catalog scan (read_metadata_only over a folder
backend), the preview ladder (the remote two-stage fetch, an import's
thumbnail and the viewer's no-GPU fallback) and export (open_for_export,
skipped without an adapter). Each assertion is on something only the
stub produces: its camera and date, a header fetched at its 64-byte
budget rather than HEADER_BYTES, preview and sensor sizes turned by its
orientation. Switching collect_metadata or make_thumbnail back to the
free functions fails two of the three tests.

The develop test_support module is widened to the crate so the export
test shares the one headless GPU context the other tests use. The
requirements note for FR-RAW-2 now records the trait as built and the
second decoder as not.
This commit is contained in:
2026-09-24 21:33:14 -04:00
parent 414094bd38
commit 733a033274
4 changed files with 290 additions and 5 deletions
+2
View File
@@ -22,6 +22,8 @@
mod activity;
mod bursts;
mod collections_ui;
#[cfg(test)]
mod decoder_seam;
mod derived_sync;
mod develop;
mod develop_ui;