test(engine): make FFmpeg path assertion cross-platform#2433
Conversation
miguel-heygen
left a comment
There was a problem hiding this comment.
Post-merge advisory review (this PR is already merged into main). Findings flagged for follow-up, not gating.
The revised assertion at packages/engine/src/utils/runFfmpeg.test.ts:73 correctly mirrors the native path.resolve() contract used by getConfiguredBinary() at packages/engine/src/utils/ffmpegBinaries.ts:85-88. It preserves the full selected-path assertion across POSIX and Windows drive/separator semantics rather than weakening it to a basename. The adjacent spawn test at packages/engine/src/utils/runFfmpeg.test.ts:107-118 independently pins the same resolved path at the process boundary.
Fresh context-isolated adversarial pass: I checked relative paths, dot normalization, drive-qualified paths, mixed separators, UNC paths, the process.platform mock interaction, the originating Windows failure log, and the exact-head Windows check. No follow-up findings.
Focused verification: bun run --cwd packages/engine test -- src/utils/runFfmpeg.test.ts (10/10) and bunx oxfmt --check packages/engine/src/utils/runFfmpeg.test.ts passed. Exact-head CI completed with no failures, including Tests on windows-latest.
Verdict: COMMENT (post-merge: Ready)
Reasoning: The one-line change accurately follows production's native Node path-resolution behavior and retains meaningful coverage; exact-head CI and focused local tests are green.
— Deepwork
Summary
PR #2430 merged before Windows render verification completed. Its new FFmpeg diagnostic test expected the POSIX path
/tools/ffmpeg.exe, while the Windows runner correctly renderedD:\tools\ffmpeg.exe, causing both DLL-not-found exit-code cases to fail. The assertion now compares against Node's platform-resolved path; production behavior is unchanged.Test plan
bun run --cwd packages/engine test -- src/utils/runFfmpeg.test.tsbunx oxfmt --check packages/engine/src/utils/runFfmpeg.test.ts