Files
hyperframes/packages/producer/tests/hdr-regression
Vance Ingalls 60f4ebbf13 test(hdr-regression): tighten Window C maxFrameFailures budget after Chunk 1 fix (#369)
## Summary

Tighten `hdr-regression` Window C `maxFrameFailures` from 30 → 5 now that Chunk 1 (opacity pipeline) has landed.

## Why

Window C (direct `<video>` opacity tween) was previously listed as a known failure with a `maxFrameFailures` budget of 30 to absorb expected drift until Chunk 1 landed. After the Chunk 1 fix, the regression test passes against the existing golden with **0 failed frames**. Tightening the budget catches any future drift in the opacity path immediately rather than letting up to 30 broken frames slip through.

## What changed

- `tests/hdr-regression/meta.json`: `maxFrameFailures` 30 → 5 (small budget remains for HEVC encoder noise).
- `tests/hdr-regression/README.md`: updated to mark Window C as fixed and note the tightened budget.

The HEVC encoder is byte-deterministic and the opacity fix doesn't perturb pixels at the PSNR ≥ 28 checkpoint threshold, so regenerating the golden produces byte-identical output. The golden is therefore unchanged. Window F (transform + border-radius) remains pending Chunk 4; its broken state is currently baked into the golden, so the suite is green and Chunk 4's regen will catch any drift.

## Test plan

- [x] `bun run test --filter hdr-regression` — passes with 0 failed frames at the new budget.

## Stack

Follow-up to Chunk 1 (opacity pipeline). Reviewable separately so the golden churn (none in this case) is decoupled from the code fix.
2026-04-22 20:14:46 -07:00
..

HDR Regression Suite

HDR10 (BT.2020 PQ) regression suite with four back-to-back windows (AD) covering the highest-value HDR compositing shapes. 10s / 300 frames at 30fps.

Windows

# Window Pipeline aspect under test
A Baseline HDR + direct opacity HDR pass-through with a GSAP opacity tween directly on the <video> element.
B Z-order sandwich (DOM → HDR → DOM) Orange background, HDR video in the middle, blue overlay on top. Tests z-ordered layer compositing.
C Transform + border-radius HDR <video> with transform: rotate() scale() + border-radius clipping. Tests affine blit pipeline.
D Shader transition (HDR → HDR image) Shader transition between an HDR video and an HDR PQ image. Tests HDR image transfer cache + shader path.

Fixtures

  • src/hdr-clip.mp4 — short HEVC Main10 / BT.2020 PQ clip with a moving bright gradient (see NOTICE.md for attribution).
  • src/hdr-photo-pq.png — 256x144 16-bit RGB PNG with a hand-injected cICP chunk (primaries=BT.2020, transfer=SMPTE ST 2084, matrix=GBR, range=full).

To regenerate the PNG fixture:

python3 packages/producer/tests/hdr-regression/scripts/generate-hdr-photo-pq.py

Running

cd packages/producer
bun run test hdr-regression
bun run test:update hdr-regression

In CI it runs in the hdr shard alongside hdr-hlg-regression (see .github/workflows/regression.yml).