Skip to content

build(lfs): track tests/*/src/*.png via Git LFS#376

Open
vanceingalls wants to merge 6 commits intographite-base/376from
vance/lfs-test-pngs
Open

build(lfs): track tests/*/src/*.png via Git LFS#376
vanceingalls wants to merge 6 commits intographite-base/376from
vance/lfs-test-pngs

Conversation

@vanceingalls
Copy link
Copy Markdown
Collaborator

@vanceingalls vanceingalls commented Apr 21, 2026

Summary

Track tests/*/src/*.png via Git LFS to mirror the existing policy for golden videos and .mp4 fixtures.

Why

Chunk 11C of plans/hdr-followups.md. Without this rule, regression suites that grow PNG fixtures over time would bloat the working-tree history and slow shallow clones.

What changed

  • .gitattributes: add tests/*/src/*.png to the LFS-tracked patterns.
  • Migrates the six existing PNG fixtures (1.6 MB combined: hdr-photo-pq.png plus heygen-promo-preview-assets/ screenshots) onto LFS in the same commit so the rule applies retroactively.

Test plan

  • git lfs ls-files includes the HDR PNG fixtures after commit.
  • Working tree size for these files goes from 1.6 MB to 6 × ~130 B LFS pointers.

Stack

Chunk 11C of plans/hdr-followups.md. Independent of all code changes.

Copy link
Copy Markdown
Collaborator Author

vanceingalls commented Apr 21, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@vanceingalls vanceingalls force-pushed the vance/regen-window-f branch from 5a9bccf to becf52d Compare April 21, 2026 20:48
@vanceingalls vanceingalls force-pushed the vance/regen-window-f branch from becf52d to f4e6cc1 Compare April 21, 2026 20:54
@vanceingalls vanceingalls marked this pull request as ready for review April 21, 2026 20:57
@vanceingalls vanceingalls force-pushed the vance/regen-window-f branch 2 times, most recently from 5bfb45e to f6b35f6 Compare April 22, 2026 01:16
@vanceingalls vanceingalls force-pushed the vance/lfs-test-pngs branch 2 times, most recently from d8e0888 to a55e4d6 Compare April 23, 2026 01:58
@vanceingalls vanceingalls force-pushed the vance/regen-window-f branch 2 times, most recently from 5471b3f to b38bd95 Compare April 23, 2026 02:55
@vanceingalls vanceingalls force-pushed the vance/regen-window-f branch from b38bd95 to 53a345a Compare April 23, 2026 03:18
@vanceingalls vanceingalls force-pushed the vance/regen-window-f branch from 53a345a to 7724916 Compare April 23, 2026 03:39
@vanceingalls vanceingalls force-pushed the vance/regen-window-f branch from 7724916 to 2c7e65a Compare April 23, 2026 04:47
@vanceingalls vanceingalls force-pushed the vance/regen-window-f branch from 2c7e65a to 19e869e Compare April 23, 2026 05:07
@vanceingalls vanceingalls force-pushed the vance/regen-window-f branch from 19e869e to 0ee724f Compare April 23, 2026 05:43
@vanceingalls vanceingalls force-pushed the vance/lfs-test-pngs branch 2 times, most recently from 31e0809 to 0af3678 Compare April 23, 2026 06:07
@vanceingalls vanceingalls force-pushed the vance/regen-window-f branch from 0ee724f to 868fced Compare April 23, 2026 06:07
@vanceingalls vanceingalls changed the base branch from vance/regen-window-f to graphite-base/376 April 23, 2026 06:14
… transfer

Chunk 3 of HDR follow-ups. Three independent fixes that share a common
thread: HDR config flowing correctly from the EngineConfig down through
the encoders.

3A. chunkEncoder respects options.hdr (BT.2020 + mastering metadata)
  Previously buildEncoderArgs hard-coded BT.709 color tags and the
  bt709 VUI block in -x265-params, even when callers passed an HDR
  EncoderOptions. Today this is harmless because renderOrchestrator
  routes native-HDR content to streamingEncoder and only feeds
  chunkEncoder sRGB Chrome screenshots — but the contract was a lie.

  Now: when options.hdr is set, the libx265 software path emits
  bt2020nc + the matching transfer (smpte2084 for PQ,
  arib-std-b67 for HLG) at the codec level *and* embeds
  master-display + max-cll SEI in -x265-params via
  getHdrEncoderColorParams. libx264 still tags BT.709 inside
  -x264-params (libx264 has no HDR support) but the codec-level color
  flags flip so the container describes pixels truthfully. GPU
  H.265 (nvenc/videotoolbox/qsv/vaapi) gets the BT.2020 tags but no
  -x265-params block, so static mastering metadata is omitted —
  acceptable for previews, not HDR-aware delivery.

3B. convertSdrToHdr accepts a target transfer
  videoFrameExtractor.convertSdrToHdr was hard-coded to
  transfer=arib-std-b67 (HLG) regardless of the surrounding
  composition's dominant transfer. extractAllVideoFrames now calls
  analyzeCompositionHdr first, then passes the dominant transfer
  ("pq" or "hlg") into convertSdrToHdr so an SDR clip mixed into a PQ
  timeline gets converted with smpte2084, not arib-std-b67.

3C. EngineConfig.hdr type matches its declared shape
  The IIFE for the hdr field returned undefined when
  PRODUCER_HDR_TRANSFER wasn't "hlg" or "pq", but the field is typed
  as { transfer: HdrTransfer } | false. Returning false matches the
  type and avoids a downstream undefined check.

Tests
  - chunkEncoder.test.ts: replaced the previous "HDR options ignored"
    assertions with 8 new specs covering BT.2020 + transfer tagging,
    master-display/max-cll embedding, libx264 fallback behavior, GPU
    H.265 + HDR (tags but no x265-params), and range conversion for
    both SDR and HDR CPU paths.
  - All 313 engine unit tests pass (5 new HDR specs).

Follow-ups (separate PRs):
  - Producer regression suite runs in CI; not exercising HDR-tagged
    chunkEncoder yet because no live caller sets options.hdr there.
…d-transfer caller error

PR #370 review feedback (jrusso1020):

- chunkEncoder: when codec=h264 and hdr is set, log a warning and strip
  hdr instead of emitting a half-HDR file (BT.2020 container tags +
  BT.709 VUI inside the bitstream). libx264 has no HDR support; the only
  honest output is SDR/BT.709. Caller is told to use codec=h265.

- videoFrameExtractor: comment at the convertSdrToHdr call site clarifying
  that dominantTransfer is majority-wins; mixing PQ and HLG sources in a
  single composition is caller-error and the minority transfer's videos
  will be converted with the wrong curve. Render two compositions if you
  need both transfers.

- docs/guides/hdr.mdx: limitations section now documents (a) H.264 + HDR
  is rejected at the encoder layer, and (b) GPU H.265 (nvenc, videotoolbox,
  qsv, vaapi) emits BT.2020 + transfer tags but does NOT embed master-display
  or max-cll SEI, since ffmpeg won't pass x265-params through hardware
  encoders. Acceptable for previews, not for HDR10 delivery.
Address jrusso1020's review on PR #371: add a path.win32 test suite that
exercises isPathInside on Linux/macOS CI to catch accidental Unix-only
assumptions (e.g. only splitting on "/") that would silently regress for
Windows users.

- isPathInside now accepts an optional `pathModule` (defaults to node:path)
  so tests can inject path.win32 / path.posix without changing call sites.
- New describe block covers equality, direct/deep children, sibling-prefix
  rejection, traversal escapes, trailing-backslash normalization, and
  cross-drive rejection.
@graphite-app graphite-app Bot changed the base branch from graphite-base/376 to vance/regen-window-f April 23, 2026 06:57
Migrates the six existing PNG fixtures (1.6 MB combined: hdr-photo-pq.png
plus heygen-promo-preview-assets screenshots) onto Git LFS to mirror the
existing policy for golden videos and fixture .mp4s. Without this,
regression suites that grow PNG fixtures over time would bloat the
working-tree history and slow shallow clones.

Addresses Chunk 11C in plans/hdr-followups.md.
@vanceingalls vanceingalls changed the base branch from vance/regen-window-f to graphite-base/376 April 23, 2026 08:22
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Apr 23, 2026

Merge activity

  • Apr 23, 8:48 AM UTC: This pull request can not be added to the Graphite merge queue. Please try rebasing and resubmitting to merge when ready.
  • Apr 23, 8:48 AM UTC: Graphite disabled "merge when ready" on this PR due to: a merge conflict with the target branch; resolve the conflict and try again..

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.

2 participants