Skip to content

FEAT: render-baseline harness — A/B render diff across Remotion bumps (#23 part 2) - #64

Merged
ConalMullan merged 2 commits into
mainfrom
feat/render-baseline
Aug 27, 2026
Merged

FEAT: render-baseline harness — A/B render diff across Remotion bumps (#23 part 2)#64
ConalMullan merged 2 commits into
mainfrom
feat/render-baseline

Conversation

@ConalMullan

@ConalMullan ConalMullan commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Part 2 of #23 — the unlock for routine Remotion bumps.

Design

Render a fixed composition twice on the same machine — at the current pin and at the candidate — and diff the two. No committed "golden" PNGs: those would be noisy across OS/GPU/Chrome builds and rot with every bump. This only ever asks "did this bump change output?"

What's in it

  • tests/render-baseline/ — small pinned Remotion project; one composition, six 30-frame blocks: interpolate/spring/Easing, Sequence + text in a bundled font, OffthreadVideo on a committed 1 s testsrc clip, Audio, TransitionSeries using lib/transitions (glitch, zoomBlur), and lib/components (AnimatedBackground, Label, Vignette, FilmGrain). Duration via calculateMetadata. Bundled DejaVu-subset font (14 KB), no system-ui, no network. Assets total ~50 KB.
  • scripts/render-baseline.mjsrender <label> (bundle once, one still per block at --scale=0.25 --gl=swangle), diff <a> <b> (pixelmatch perceptual count gates; exact count reported alongside for later calibration; diff PNGs + report.md/report.json; exit 1 above --threshold, default 0), install <version>, and ab <version> for a local one-shot that restores the pin afterwards.
  • .github/workflows/render-baseline.yml — on PRs touching package.json under templates/, examples/, showcase/, plus tests/render-baseline/, lib/, or the script: renders base-branch pin and PR pin on the same runner, diffs, posts the table as a PR comment, uploads stills + diffs as artifacts, fails on any difference so a human reviews. workflow_dispatch takes a candidate version.

Verified locally (macOS)

  • Same-version render twice → 0 px on all six stills (deterministic).
  • ab 4.0.518 (4.0.425 → 4.0.518, 93 patches) → 0 px on all six, perceptual and exact. Pin restored.

Gate stays at "any diff → fail" until a few real bumps have shown what noise looks like.

ConalMullan and others added 2 commits August 27, 2026 09:18
…#23 part 2)

tests/render-baseline/: fixed 6-block composition (interpolate/spring,
Sequence+text in a bundled font, OffthreadVideo on a committed testsrc
clip, Audio, TransitionSeries with lib/transitions glitch+zoomBlur,
lib/components) with duration from calculateMetadata. No system fonts,
no network, no Math.random.

scripts/render-baseline.mjs: render <label> (bundle once, one still per
block at --scale=0.25 --gl=swangle), diff <a> <b> (pixelmatch perceptual
+ exact counts, diff PNGs, report.md/json, exit 1 over --threshold,
default 0), install <version>, and ab <version> for local one-shot use.

.github/workflows/render-baseline.yml: on PRs touching package.json
under templates/examples/showcase, tests/render-baseline, lib/ or the
script — renders base-branch pin and PR pin on the same runner, diffs,
comments the table, uploads stills, fails on any difference so a human
looks. workflow_dispatch takes a candidate version.

Verified locally: same-version render is byte-identical (0 px on all
six); 4.0.425 → 4.0.518 (93 patches) is also 0 px on all six.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…acks the harness

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant