Repository navigation
fix(cli): diff warns when yours runs at another frame rate - #6976
Conversation
A root without data-fps on a 24 fps film rendered at 30 fps, and nothing said so. fails without the fix: warns about a render at another frame rate
jrusso1020
left a comment
There was a problem hiding this comment.
Reviewed at 029fc5ee4c82a0b933ff3abdf7e9447aab9efa4b.
Frame-rate mismatch is reported in warnings without changing pass; video mode probes the original render before resampling, while project mode reads the declared root/default rate.
Need: yes · Size: ok, two files · Reuse: readCompositionFps, parseFps and fpsToNumber · Simpler: already minimal · Structure: fine
Risk: low — local diff diagnostic/classification change, no generation or billing path changed.
Validation: node node_modules/vitest/vitest.mjs run src/measure/diff.test.ts src/measure/diff-segments.test.ts src/measure/diff-people.test.ts: 35 passed on this exact head, including the existing delayed-cut regression. The new real-encode warning test fails against base production code (empty warnings versus expected “yours runs at 24 fps”). Independent source-module controls cover rational rates, explicit-root selection and missing/invalid declarations.
Project-folder rate parsing is checked separately from live browser capture; no full project capture run here.
Verdict: APPROVE
Reasoning: No blocking regression found in the changed path and its callers. The limited scope and disclosed validation limits support landing.
— hf-review
What
hyperframes diffnow warns when yours runs at a different frame rate from the original, for a render and for a project folder. A project's rate comes from the root'sdata-fps, or 30 when the root has none.Why
From the reverse-any-video feedback. An agent left
data-fpsoff the root on a 24 fps film, in the reporter's run and again in a full museum-film run. It renders with--fps 24by hand, so its own render looks right, and a plain render of the same project comes out at 30 fps. Nothing said so: that run's plain render showed 2 missing cuts where the agent's 24 fps render showed 1.How
rateWarningcompares the rates, anddiffVideosadds it towarnings, so it does not changepass.The warning lives in
diff, notlintorcheck. Theblankandfrom-filetemplates have nodata-fps, and 30 is a valid default, so a lint warning would fire on every fresh project.diffis the one place that knows the rate to match.Test plan
fails without the fix:
diff.test.ts"warns about a render at another frame rate"diff.test.ts: 21 passed, including the warning's text, a fractional rate, and a root with nodata-fps.