From 6fb782fc09613cc17b228ef1968de4e011544f32 Mon Sep 17 00:00:00 2001 From: James Date: Mon, 4 May 2026 19:17:23 -0700 Subject: [PATCH] test(engine): pin ALPHA_MODE uppercase ffprobe tag regression MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Locks in the case-insensitive behavior alongside the existing alpha_mode (lowercase) test. If either path regresses, the producer would silently extract alpha-having webms as opaque JPGs and the injected overlays would cover every element below them on the z-stack — a bug that doesn't surface in the studio preview, only in production renders. Co-Authored-By: Claude Opus 4.7 (1M context) --- packages/engine/src/utils/ffprobe.test.ts | 40 +++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/packages/engine/src/utils/ffprobe.test.ts b/packages/engine/src/utils/ffprobe.test.ts index ca3b8870a..0c8fb671a 100644 --- a/packages/engine/src/utils/ffprobe.test.ts +++ b/packages/engine/src/utils/ffprobe.test.ts @@ -225,6 +225,46 @@ describe("ffprobe missing-binary fallback", () => { expect(meta.hasAlpha).toBe(true); }); + // Regression: newer libavformat builds (and the output of `hyperframes + // remove-background` itself) write the VP9-alpha sidecar tag as + // `ALPHA_MODE` (uppercase). The lowercase-only check classified those + // files as having no alpha, the producer extracted them as JPGs, and + // the injected overlays were fully opaque rectangles that hid + // every static element below them on the z-stack. The bug was silent — + // studio preview rendered correctly via native