Skip to content

Commit 636a949

Browse files
committed
test: zen compares against v2 golden, not separate baselines
Remove _zen suffix system — both backends now compare against the same checksum entry. This exposes the actual zensim scores between zen and v2 output instead of hiding differences behind separate baselines. 52 tests now fail (zen vs v2 golden). Key categories: - Score 0: alpha mismatches, color filters (Oklab vs sRGB), trim bounds - Score 16-70: JPEG decoder + CMS differences (wide-gamut ICC) - Score 70-90: CMS rounding, encoder differences - Score 90-99: near-matches (resize, encode quality) 137 tests pass — zen matches v2 within tolerance.
1 parent 89b25ba commit 636a949

File tree

9 files changed

+10
-586
lines changed

9 files changed

+10
-586
lines changed

imageflow_core/tests/integration/common/mod.rs

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -741,8 +741,8 @@ pub fn compare_encoded(
741741
let similarity = require.similarity.expect("compare_encoded requires a similarity threshold");
742742
let tol_spec = similarity.to_tolerance_spec();
743743

744-
// Run with each available backend, checking per-backend checksums.
745-
// V2 uses the bare detail name; Zen uses "detail_zen".
744+
// Run with each available backend, comparing against the SAME baseline.
745+
// V2 establishes the golden; zen must match it within tolerance.
746746
for (backend, suffix) in backends_to_test() {
747747
let mut io_vec = Vec::new();
748748
if let Some(i) = input.clone() {
@@ -782,12 +782,9 @@ pub fn compare_encoded(
782782
);
783783
}
784784

785-
// Use suffixed detail for per-backend checksums.
786-
// V2 uses the bare detail name for backwards compatibility with existing baselines.
787-
let backend_detail =
788-
if suffix == "v2" { detail.to_string() } else { format!("{detail}_{suffix}") };
789-
if !check_visual_bytes(identity, &backend_detail, &bytes, &tol_spec) {
790-
panic!("[{suffix}] visual check failed for {backend_detail}");
785+
// Both backends use the same detail name — zen is compared against the v2 golden.
786+
if !check_visual_bytes(identity, detail, &bytes, &tol_spec) {
787+
panic!("[{suffix}] visual check failed for {detail}");
791788
}
792789
}
793790
true
@@ -828,11 +825,8 @@ pub fn compare_bitmap(
828825
.get_captured_bitmap_key(capture_id)
829826
.unwrap_or_else(|| panic!("[{suffix}] no captured bitmap"));
830827

831-
// Use suffixed detail for per-backend checksums (e.g., "detail_zen").
832-
// V2 uses the bare detail name for backwards compatibility with existing baselines.
833-
let backend_detail =
834-
if suffix == "v2" { detail.to_string() } else { format!("{detail}_{suffix}") };
835-
check_visual_bitmap(identity, &backend_detail, &context, bitmap_key, tolerance);
828+
// Both backends use the same detail name — zen is compared against the v2 golden.
829+
check_visual_bitmap(identity, detail, &context, bitmap_key, tolerance);
836830
}
837831
true
838832
}

imageflow_core/tests/integration/visuals/canvas.checksums

Lines changed: 1 addition & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ tolerance off-by-one
2323
tolerance off-by-one
2424
= cozy-cloud-312b8c473b:sea x86_64-avx512 @8ca16e2d human-verified
2525
~ idle-hound-24ff914785:sea x86_64-avx512 @9ba39526 auto-accepted within tolerance (within off-by-one) vs cozy-cloud-312b8c473b:sea (zensim:98.60 (dissim 0.014))
26+
~ dim-brook-ad9bbe9f42:sea x86_64-avx512 @89b25bae auto-accepted within tolerance (within off-by-one) vs cozy-cloud-312b8c473b:sea (zensim:99.09 (dissim 0.0091), 0.03% pixels ±1, max-delta:[1,1,1], category:rounding, balanced)
2627

2728
## test_partial_region overlap_40pct
2829
tolerance off-by-one
@@ -83,75 +84,3 @@ tolerance off-by-one
8384
## test_fill_rect eeccff_hermite_400x400
8485
tolerance off-by-one
8586
= novel-box-967914e71e:sea x86_64-avx512 @8ca16e2d human-verified
86-
87-
## test_crop red_canvas_blue_strip_zen
88-
tolerance off-by-one
89-
~ snowy-bear-3784a8f0f2:sea x86_64-avx512 @2d81fc05 auto-accepted
90-
91-
## test_fill_rect_original blue_on_transparent_zen
92-
tolerance off-by-one
93-
~ meek-bear-103bc946d6:sea x86_64-avx512 @2d81fc05 auto-accepted
94-
95-
## test_partial_region overlap_40pct_zen
96-
tolerance off-by-one
97-
~ neat-hill-ca5d14c4a5:sea x86_64-avx512 @2d81fc05 auto-accepted
98-
99-
## test_pixels_region pixel_coords_zen
100-
tolerance off-by-one
101-
~ civic-marsh-9025d01eeb:sea x86_64-avx512 @2d81fc05 auto-accepted
102-
103-
## test_off_surface_region all_negative_zen
104-
tolerance off-by-one
105-
~ neat-hill-ca5d14c4a5:sea x86_64-avx512 @2d81fc05 auto-accepted
106-
107-
## test_transparent_canvas 200x200_zen
108-
tolerance off-by-one
109-
~ meek-eagle-8cb229c079:sea x86_64-avx512 @2d81fc05 auto-accepted
110-
111-
## test_expand_rect fill_expand_hermite_linear_zen
112-
tolerance off-by-one
113-
~ raw-nest-dd2079bbc7:sea x86_64-avx512 @8a02fd84 auto-accepted
114-
115-
## test_fill_rect eeccff_hermite_400x400_zen
116-
tolerance off-by-one
117-
~ novel-box-967914e71e:sea x86_64-avx512 @2d81fc05 auto-accepted
118-
119-
## test_detect_whitespace blue_on_transparent_zen
120-
tolerance off-by-one
121-
~ meek-bear-103bc946d6:sea x86_64-avx512 @2d81fc05 auto-accepted
122-
123-
## test_round_corners_custom_pixels semitransparent_mixed_radii_zen
124-
tolerance off-by-one
125-
~ false-palm-86291ee19f:sea x86_64-avx512 @4faabf31 auto-accepted
126-
127-
## test_round_corners_circle_tall_canvas 150x200_transparent_zen
128-
tolerance off-by-one
129-
~ final-loom-31f079eefc:sea x86_64-avx512 @4faabf31 auto-accepted
130-
131-
## test_round_corners_small 100x100_r5_zen
132-
tolerance off-by-one
133-
~ sole-wolf-a89e7d6ea8:sea x86_64-avx512 @4faabf31 auto-accepted
134-
135-
## test_round_corners_excessive_radius 200x150_r100_zen
136-
tolerance off-by-one
137-
~ ivory-bat-1d7a62f3f4:sea x86_64-avx512 @4faabf31 auto-accepted
138-
139-
## test_round_corners_large 400x400_r200_zen
140-
tolerance off-by-one
141-
~ lame-glen-9986d6828c:sea x86_64-avx512 @4faabf31 auto-accepted
142-
143-
## test_round_corners_custom_percent semitransparent_mixed_radii_zen
144-
tolerance off-by-one
145-
~ moot-dawn-b38412deea:sea x86_64-avx512 @4faabf31 auto-accepted
146-
147-
## test_round_corners_command_string landscape_mixed_radii_png_zen
148-
tolerance off-by-one
149-
~ fleet-trout-290ed7931e:sea x86_64-avx512 @4faabf31 auto-accepted
150-
151-
## test_round_corners_circle_wide_canvas 200x150_black_zen
152-
tolerance off-by-one
153-
~ dim-brook-ad9bbe9f42:sea x86_64-avx512 @4faabf31 auto-accepted
154-
155-
## test_round_image_corners_transparent waterhouse_400x300_r100_zen
156-
tolerance off-by-one
157-
~ elfin-nest-36de8c0ade:sea x86_64-avx512 @4faabf31 auto-accepted

imageflow_core/tests/integration/visuals/codec.checksums

Lines changed: 2 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -100,82 +100,10 @@ tolerance off-by-one
100100
= bone-drum-452a7c1706:sea x86_64-avx512 @8ca16e2d new-baseline
101101
~ shy-wolf-abbe8d5a11:sea x86_64-avx512 @9ba39526 auto-accepted within tolerance (within off-by-one) vs bone-drum-452a7c1706:sea (zensim:99.55 (dissim 0.0045))
102102

103-
## test_jpeg_crop waterhouse_100x200_zen
104-
tolerance off-by-one
105-
~ nice-ivy-c03e88f918:sea x86_64-avx512 @2d81fc05 auto-accepted
106-
107-
## test_crop_with_preshrink 170x220_crop_zen
108-
tolerance max-delta:4 zensim:85 (dissim 0.15) pixels-changed:100.0%
109-
~ steep-raven-c96978d9d0:sea x86_64-avx512 @2d81fc05 auto-accepted
110-
111-
## test_jpeg_simple landscape_within_70x70_zen
112-
tolerance off-by-one
113-
~ hasty-root-36619b3f62:sea x86_64-avx512 @2d81fc05 auto-accepted
114-
115-
## test_rot_90_and_red_dot_command_string landscape_70x70_zen
116-
tolerance off-by-one
117-
~ shy-wolf-abbe8d5a11:sea x86_64-avx512 @2d81fc05 auto-accepted
118-
119-
## test_jpeg_simple_rot_90 landscape_70x70_zen
120-
tolerance off-by-one
121-
~ shy-wolf-abbe8d5a11:sea x86_64-avx512 @2d81fc05 auto-accepted
122-
123-
## test_negatives_in_command_string red_leaf_negative_height_zen
124-
tolerance off-by-one
125-
~ like-glow-fcd087632e:sea x86_64-avx512 @2d81fc05 auto-accepted
126-
127-
## test_transparent_webp_to_webp lossless_100x100_zen
128-
tolerance max-delta:1 zensim:99 (dissim 0.01) pixels-changed:1.0%
129-
~ plump-mole-2e15463da1:sea x86_64-avx512 @2d81fc05 auto-accepted
130-
131-
## test_rot_90_and_red_dot landscape_70x70_zen
132-
tolerance off-by-one
133-
~ shy-wolf-abbe8d5a11:sea x86_64-avx512 @2d81fc05 auto-accepted
134-
135-
## test_encode_gradients png32_passthrough_zen
136-
tolerance max-delta:1 zensim:99 (dissim 0.01) pixels-changed:1.0%
137-
~ fleet-fig-e1eaec376f:sea x86_64-avx512 @2d81fc05 auto-accepted
138-
139-
## test_transparent_png_to_jpeg_constrain 300x300_mozjpeg_zen
140-
tolerance zensim:99 (dissim 0.01)
141-
~ happy-reed-c15044af10:sea x86_64-avx512 @2d81fc05 auto-accepted
142-
143-
## test_transparent_png_to_jpeg shirt_zen
144-
tolerance zensim:99 (dissim 0.01)
145-
~ core-sloth-c1d8b52b25:sea x86_64-avx512 @2d81fc05 auto-accepted
146-
147-
## decode_rgb_with_cmyk_profile_jpeg wrenches_ignore_icc_zen
148-
tolerance off-by-one
149-
~ crude-fort-8d3cdf80eb:sea x86_64-avx512 @2d81fc05 auto-accepted
150-
151-
## test_matte_transparent_png shirt_300x300_white_matte_zen
152-
tolerance zensim:99 (dissim 0.01)
153-
~ first-node-ab5566beef:sea x86_64-avx512 @2d81fc05 auto-accepted
154-
155-
## decode_cmyk_jpeg logo_passthrough_zen
156-
tolerance max-delta:3 zensim:95 (dissim 0.05) pixels-changed:100.0%
157-
~ close-bat-e794334e43:sea x86_64-avx512 @2d81fc05 auto-accepted
158-
159-
## test_problematic_png_lossy crop_1230x760_zen
160-
tolerance zensim:95 (dissim 0.05)
161-
~ open-spire-b4944d7312:sea x86_64-avx512 @567ef9ca auto-accepted
162-
163-
## test_transparent_png_to_png shirt_zen
164-
tolerance max-delta:1 zensim:99 (dissim 0.01) pixels-changed:1.0%
165-
~ eager-puma-c6c1b0d4a4:sea x86_64-avx512 @2d81fc05 auto-accepted
166-
167-
## test_webp_to_webp_quality q5_100x100_zen
168-
tolerance zensim:95 (dissim 0.05)
169-
~ draft-curl-48c90c0dcf:sea x86_64-avx512 @e33b73f9 auto-accepted
170-
171103
## test_branching_crop_whitespace gradient_output_1_zen
172104
tolerance zensim:99 (dissim 0.01)
173-
~ lucky-oak-ff7e5efa15:sea x86_64-avx512 @567ef9ca auto-accepted
105+
~ lucky-oak-ff7e5efa15:sea x86_64-avx512 @89b25bae auto-accepted
174106

175107
## test_branching_crop_whitespace gradient_output_2_zen
176108
tolerance zensim:99 (dissim 0.01)
177-
~ fawn-grain-bd8b1d00ce:sea x86_64-avx512 @567ef9ca auto-accepted
178-
179-
## test_transparent_png_to_png_rounded_corners shirt_cropped_zen
180-
tolerance max-delta:1 zensim:99 (dissim 0.01) pixels-changed:1.0%
181-
~ known-vale-4346ac101f:sea x86_64-avx512 @4faabf31 auto-accepted
109+
~ fawn-grain-bd8b1d00ce:sea x86_64-avx512 @89b25bae auto-accepted

imageflow_core/tests/integration/visuals/color.checksums

Lines changed: 0 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -119,99 +119,3 @@ tolerance off-by-one
119119
= jolly-tree-a82ec324e9:sea x86_64-avx512 @8ca16e2d human-verified
120120
~ only-core-0ea95be314:sea x86_64-avx512 @542276d2 auto-accepted within tolerance (within off-by-one) vs jolly-tree-a82ec324e9:sea (zensim:99.48 (dissim 0.0052))
121121

122-
## test_white_balance_image red_night_auto_zen
123-
tolerance off-by-one
124-
~ apt-lion-da943ad82f:sea x86_64-avx512 @2d81fc05 auto-accepted
125-
~ murky-stork-1a0ab17a07:sea x86_64-avx512 @ddcdc42a auto-accepted within tolerance (within off-by-one) vs apt-lion-da943ad82f:sea (zensim:99.74 (dissim 0.0026))
126-
127-
## test_white_balance_image_threshold_5 t0.5_zen
128-
tolerance off-by-one
129-
~ apt-lion-da943ad82f:sea x86_64-avx512 @2d81fc05 auto-accepted
130-
131-
## test_simple_filters Contrast(1.0)_zen
132-
tolerance off-by-one
133-
~ dense-ore-a18bd9a400:sea x86_64-avx512 @fa264b4a auto-accepted
134-
135-
## test_simple_filters Brightness(1.0)_zen
136-
tolerance off-by-one
137-
~ dense-ore-a18bd9a400:sea x86_64-avx512 @fa264b4a auto-accepted
138-
139-
## test_simple_filters Saturation(1.0)_zen
140-
tolerance off-by-one
141-
~ dense-ore-a18bd9a400:sea x86_64-avx512 @fa264b4a auto-accepted
142-
143-
## test_simple_filters Alpha(1.0)_zen
144-
tolerance off-by-one
145-
~ dense-ore-a18bd9a400:sea x86_64-avx512 @fa264b4a auto-accepted
146-
147-
## test_simple_filters Contrast(0.3)_zen
148-
tolerance off-by-one
149-
~ equal-lark-f5ec4a6fd3:sea x86_64-avx512 @fa264b4a auto-accepted
150-
151-
## test_simple_filters Brightness(0.3)_zen
152-
tolerance off-by-one
153-
~ only-core-0ea95be314:sea x86_64-avx512 @fa264b4a auto-accepted
154-
155-
## test_simple_filters Saturation(0.3)_zen
156-
tolerance off-by-one
157-
~ dense-ore-a18bd9a400:sea x86_64-avx512 @fa264b4a auto-accepted
158-
159-
## test_simple_filters Alpha(0.3)_zen
160-
tolerance off-by-one
161-
~ meek-wolf-a3d1e3f755:sea x86_64-avx512 @fa264b4a auto-accepted
162-
163-
## test_simple_filters Contrast(-1.0)_zen
164-
tolerance off-by-one
165-
~ rich-slate-ec61f62b6a:sea x86_64-avx512 @fa264b4a auto-accepted
166-
167-
## test_simple_filters Brightness(-1.0)_zen
168-
tolerance off-by-one
169-
~ nice-coal-5ff12d1777:sea x86_64-avx512 @fa264b4a auto-accepted
170-
171-
## test_simple_filters Saturation(-1.0)_zen
172-
tolerance off-by-one
173-
~ dense-ore-a18bd9a400:sea x86_64-avx512 @fa264b4a auto-accepted
174-
175-
## test_simple_filters Alpha(-1.0)_zen
176-
tolerance off-by-one
177-
~ holy-pearl-d25a06b488:sea x86_64-avx512 @fa264b4a auto-accepted
178-
179-
## test_simple_filters Contrast(-0.2)_zen
180-
tolerance off-by-one
181-
~ mad-loom-cc0c3d4a4b:sea x86_64-avx512 @fa264b4a auto-accepted
182-
183-
## test_simple_filters Brightness(-0.2)_zen
184-
tolerance off-by-one
185-
~ able-pine-47f203148a:sea x86_64-avx512 @fa264b4a auto-accepted
186-
187-
## test_simple_filters Saturation(-0.2)_zen
188-
tolerance off-by-one
189-
~ dense-ore-a18bd9a400:sea x86_64-avx512 @fa264b4a auto-accepted
190-
191-
## test_simple_filters Alpha(-0.2)_zen
192-
tolerance off-by-one
193-
~ prime-sole-f23038a794:sea x86_64-avx512 @fa264b4a auto-accepted
194-
195-
## test_simple_filters Sepia_zen
196-
tolerance off-by-one
197-
~ dense-ore-a18bd9a400:sea x86_64-avx512 @fa264b4a auto-accepted
198-
199-
## test_simple_filters GrayscaleNtsc_zen
200-
tolerance off-by-one
201-
~ dense-ore-a18bd9a400:sea x86_64-avx512 @fa264b4a auto-accepted
202-
203-
## test_simple_filters GrayscaleRy_zen
204-
tolerance off-by-one
205-
~ dense-ore-a18bd9a400:sea x86_64-avx512 @fa264b4a auto-accepted
206-
207-
## test_simple_filters GrayscaleFlat_zen
208-
tolerance off-by-one
209-
~ dense-ore-a18bd9a400:sea x86_64-avx512 @fa264b4a auto-accepted
210-
211-
## test_simple_filters GrayscaleBt709_zen
212-
tolerance off-by-one
213-
~ dense-ore-a18bd9a400:sea x86_64-avx512 @fa264b4a auto-accepted
214-
215-
## test_simple_filters Invert_zen
216-
tolerance off-by-one
217-
~ rough-heron-94e6431b55:sea x86_64-avx512 @fa264b4a auto-accepted

0 commit comments

Comments
 (0)