Skip to content

fix(cli): diff warns when yours runs at another frame rate - #6976

Merged
WaterrrForever merged 1 commit into
mainfrom
miao/warn-on-root-fps
Nov 2, 2026
Merged

WaterrrForever merged 1 commit into
mainfrom
miao/warn-on-root-fps

Conversation

@WaterrrForever

Copy link
Copy Markdown
Collaborator

What

hyperframes diff now 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's data-fps, or 30 when the root has none.

Why

From the reverse-any-video feedback. An agent left data-fps off the root on a 24 fps film, in the reporter's run and again in a full museum-film run. It renders with --fps 24 by 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

rateWarning compares the rates, and diffVideos adds it to warnings, so it does not change pass.

The warning lives in diff, not lint or check. The blank and from-file templates have no data-fps, and 30 is a valid default, so a lint warning would fire on every fresh project. diff is 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 no data-fps.
  • Typecheck clean.
  • Project-folder mode is covered at the function level, not through a full capture.

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 jrusso1020 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@WaterrrForever
WaterrrForever added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit 99223d9 Nov 2, 2026
70 checks passed
@WaterrrForever
WaterrrForever deleted the miao/warn-on-root-fps branch November 2, 2026 04:26
@jrusso1020 jrusso1020 mentioned this pull request Nov 2, 2026
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