From 50cfed3340277b6e4ab67d54750a6ec5ed5d6e5d Mon Sep 17 00:00:00 2001 From: locpham Date: Tue, 18 Aug 2026 17:36:56 +0700 Subject: [PATCH] =?UTF-8?q?test(gate):=20accept=20fact/other=20chunks=20?= =?UTF-8?q?=E2=80=94=20validate=20data=20chunk=20ends=20at=20EOF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sf.write() float32 WAVs carry a fact chunk; strict 44+data_size check was too narrow. Walk chunks instead; bridge header bug (half data_size) still caught because its data chunk must run to EOF. --- tests/test_lossless_compliance.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/test_lossless_compliance.py b/tests/test_lossless_compliance.py index 00d643f..303f907 100644 --- a/tests/test_lossless_compliance.py +++ b/tests/test_lossless_compliance.py @@ -41,10 +41,19 @@ def harness_audit_null_test(original_path, rendered_path, threshold_db=THRESHOLD def wav_format_info(path): with open(path, "rb") as f: - b = f.read(44) + b = f.read() assert b[:4] == b"RIFF" and b[8:12] == b"WAVE", "not RIFF/WAVE" - data_size = struct.unpack_from("