From c21714a379eb06706c020d0dc016635f2c79f1cc Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 22 Oct 2026 11:42:59 +0000 Subject: [PATCH] #2504: the dehaze regression test also fails when the whole dark field renders black Review follow-up (CodeRabbit): an all-black field made every comparison pass, so the field's own level must stay visible first. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AbegtYaPuwqZ81pGfELsFK --- crates/pipeline/src/tests.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/pipeline/src/tests.rs b/crates/pipeline/src/tests.rs index f31e96f59..23eca0ba7 100644 --- a/crates/pipeline/src/tests.rs +++ b/crates/pipeline/src/tests.rs @@ -96,6 +96,8 @@ fn dehaze_does_not_crush_dark_regions_next_to_bright_ones() { } v.sort_unstable(); let mid = v[v.len() / 2] as i32; + // a field rendered all black would pass the comparison below vacuously + assert!(mid > 2, "the dark field itself is crushed in ch {ch}: level {mid}"); for y in 0..160 { for x in 0..120 { let p = r.get(x, y)[ch] as i32;