test(engine): add ffprobe-unavailable fallback regression tests#379
test(engine): add ffprobe-unavailable fallback regression tests#379vanceingalls wants to merge 1 commit intovance/shader-midpoint-testsfrom
Conversation
0294c06 to
cc0422f
Compare
2163cd0 to
ca9c359
Compare
cc0422f to
8638446
Compare
ca9c359 to
d8c43e8
Compare
dad30f7 to
b3cd341
Compare
1733e38 to
6881964
Compare
b3cd341 to
25fb68e
Compare
jrusso1020
left a comment
There was a problem hiding this comment.
ffprobe-unavailable regression tests are the right coverage for a fallback path that's easy to break silently. The fallback exists for environments where ffprobe isn't on PATH (some minimal Docker images, some CI runners pre-apt-install) — without test coverage, someone could refactor extractMediaMetadata and lose the fallback entirely, with the bug only showing up when the environment actually lacked ffprobe.
Pinning both the "ffprobe missing" branch and the "ffprobe returns garbage" branch (if covered) is the durable form. Approved.
— Rames Jusso
6881964 to
0483635
Compare
18e3dcf to
a588b30
Compare
1d14220 to
2f8e87f
Compare
a588b30 to
c0b8e85
Compare
|
Thanks for the approval @jrusso1020. You're right that this is exactly the silent-breakage class — the fallback only matters in environments without ffprobe on PATH (slim Docker images, pre- The pinned surface in
So the "ffprobe missing" branch is fully covered. The "ffprobe returns garbage" branch isn't pinned in this PR — it's a different failure mode (ffprobe runs but emits malformed JSON / unexpected schema) and would need a separate harness. Logged as a follow-up rather than blocking this one. No outstanding action items from the review. |
2f8e87f to
abe64f1
Compare
c0b8e85 to
a543667
Compare
abe64f1 to
a8a7d7f
Compare
a543667 to
3c1ae7c
Compare
a8a7d7f to
e3ea8d6
Compare
2b1edce to
e5aa605
Compare
230c5df to
aa5be19
Compare
566c95b to
bfa61ac
Compare
456f47f to
bb1d031
Compare
d0dd838 to
de75bbd
Compare
c1d8c12 to
1f9a361
Compare
Mock node:child_process.spawn to surface ENOENT and verify that: - extractMediaMetadata falls back to PNG cICP metadata for image inputs - extractMediaMetadata rethrows for non-image inputs lacking a still-image fallback - extractAudioMetadata + analyzeKeyframeIntervals propagate the install-hint error verbatim Closed gap from hdr-followups Chunk 9B.
de75bbd to
817ab68
Compare

Summary
Mock
node:child_process.spawnto surfaceENOENTand verify ffprobe's three callers behave correctly when ffprobe is missing.Why
Chunk 9Bofplans/hdr-followups.md. The PNG cICP fallback inextractMediaMetadatawas added to support environments without ffprobe, but no test pinned the behavior — silently regressing it would break HDR image support on any system without ffprobe installed.What changed
packages/engine/src/utils/ffprobe.test.ts: mockschild_process.spawnto surfaceENOENTand asserts:extractMediaMetadatafalls back to PNG cICP metadata for image inputs.extractMediaMetadatarethrows for non-image inputs lacking a still-image fallback.extractAudioMetadata+analyzeKeyframeIntervalspropagate the install-hint error verbatim.Test plan
Stack
Chunk 9B of
plans/hdr-followups.md. Test-only change, independent of all other chunks.