Skip to content

fix(core): a render lands where preview does when a set interrupts a tween - #7283

Merged
miguel-heygen merged 2 commits into
mainfrom
cloudperf/render-settles-overlaps
Nov 6, 2026
Merged

miguel-heygen merged 2 commits into
mainfrom
cloudperf/render-settles-overlaps

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

What

A render now lands where preview and a seek do when a set interrupts a tween that is still running on the same property. The set's value holds once the tween has ended, on every worker.

Why

Preview settles this overlap, and renders skip that step. So a worker that renders frame by frame keeps the tween's last value after it ends, while preview and a direct seek keep the set's value.

A panel fading out for 1 s, with a set at 0.3 s that brings it back, shows this. It looks right in preview and renders blank:

Version Frames from worker 0 Frames from later workers
0.9.14 blank correct, so the video snaps back at the worker boundary
0.9.16, 0.9.17 blank blank, because workers replay in order behind the stand-in since #7231
This PR correct correct

Related work

Refs #7061, which settled preview and left renders out. Refs #6707 and #7231, which made workers agree with an in-order render. They stay in place, and the in-order render they match now lands where preview does.

How

seekGsapTimeline moves the playhead through one helper, landOn, for replayed frames and the final frame, and it always settles. The if (!renderFps) guard on the settle step is gone, so preview and render share one path.

Behaviour change: a film with this overlap now renders the set's value after the tween ends, matching preview, where it used to render the tween's final value on frame-by-frame workers. Frames inside the overlap are unchanged.

Test plan

  • Unit tests added: gsap.order.test.ts, "a render where a set interrupts a running tween": in-order, workers starting partway, every 6th frame, and behind the producer's stand-in.
  • fails without the fix: "lands every frame where preview does when one worker renders in order" expects [30, 1] and gets [30, 0]. With the old gsap.ts, all 4 new tests fail and the 6 existing ones in the file pass. With the fix, all 10 pass, 3 runs in a row.
  • All of packages/core/src/runtime: 118 files, 2,812 tests pass.
  • Manual testing: a neutral project through planV2 and renderChunkV2, 1,379-frame chunk, 6 workers, beginframe capture, read frame by frame through frame 420. 8 variants of overlapping writes, nested timelines and autoAlpha each hold one value after frame 160, with no change at frame 230, the worker boundary.
  • Not run: a Mac, screenshot capture, the Desktop app, and the producer regression suite. CI runs that suite; golden renders with this overlap would change there.
  • Comments follow CONTRIBUTING.md "Comments".

@heygengenesis heygengenesis Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verdict: REQUEST CHANGES · 1 blocker · 0 important · 0 nits · head d0559e36

The fix is correct. It falls short on CONTRIBUTING.md: the Comments workflow fails at this head, though the test plan ticks "Comments follow CONTRIBUTING.md". ↓ inline

Scope
  • Read gsap.ts (settleOverlapsEndedBetween, framesSkippedSinceLastSeek, landOn, seekGsapTimeline) and the new tests in full.
  • Verified the fails without the fix: line locally. With main's gsap.ts, all 4 new tests fail ([30, 0] vs [30, 1]). With this head, all 10 tests in gsap.order.test.ts pass.
  • Rule 2 sweep: the render paths in init.ts (lines 5293, 5528) both go through seekGsapTimeline. The raw totalTime calls in htmlCompiler.ts are compile-time probes, not frame capture.
  • Settling on replayed frames reads the cached spans (overlapSpansOf), so it adds no per-frame structure walk.
  • CI was still running for regression, Windows render, and CI. The new goldens for this overlap are not reviewed here.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Edit accuracy: accurate 267 (base branch 267), smooth 130 of those

The gate passes.
Smoothness is reported in the artifact, not gated. A case fails only if it fails 2 of 3 runs.

Quarantined, measured but not gated (8)

Unstable (1)

  • seqab-none-center-r0-root-z100: tracking 0.03, pressJump 0, drop 0, reload 0, render 0.02, renderKey -, undo true, teleport true / tracking 0.03, pressJump 0, drop 0, reload 0, render 0.02, renderKey -, undo true, teleport true / tracking 0.03, pressJump 0, drop 0, reload 0, render 0.02, renderKey -, undo true, teleport true

@heygengenesis heygengenesis Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verdict: APPROVE — 1 resolved, 0 open, 0 new · d0559e3 → 7f840ae

@miguel-heygen
miguel-heygen added this pull request to the merge queue Nov 6, 2026
Merged via the queue into main with commit 6abc62a Nov 6, 2026
97 of 98 checks passed
@miguel-heygen
miguel-heygen deleted the cloudperf/render-settles-overlaps branch November 6, 2026 01:57
@miguel-heygen miguel-heygen mentioned this pull request Nov 6, 2026
2 of 4 tasks
SanHsien added a commit to SanHsien/hyperframes that referenced this pull request Nov 6, 2026
…view

Adopts heygen-com#7264 (no-draw seeks no longer upload graded images to the GPU),
heygen-com#7267 (normalize-audio says where the target stays when a limit holds),
heygen-com#7268 (a render's lint runs at normal priority), heygen-com#7283 (a render lands
where preview does when a set interrupts a tween) and heygen-com#7287 (a missing
local font no longer stops a cloud render), with prerequisite heygen-com#7061.
Not adopted: the stale auto-close workflow (heygen-com#7280; the fork uses
Dependabot) and the v0.9.18/v0.9.19 releases. Watermark advances to
b4cc674.

Co-authored-by: Miguel Ángel <miguel.sierra@heygen.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant