Skip to content

refactor(engine): the effect scan resolves its options before scanning - #7336

Merged
miguel-heygen merged 1 commit into
mainfrom
dpins/effect-scan-options
Nov 6, 2026
Merged

miguel-heygen merged 1 commit into
mainfrom
dpins/effect-scan-options

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

What

The effect scan's loop no longer resolves its option defaults, which brings it back under the complexity limit. No behavior changes.

Why

#7331 split scanCssEffectLiveFrames so that its new end signal fires on every exit, and the inner loop came out at a CRAP score of 31.6 against a limit of 30. #7331 was already in the merge queue when the audit reported, so this follows it.

Related work

Follows #7331.

How

scanCssEffectLiveFrames resolves budgetMs, now and onProgress once and passes them to the loop. The loop no longer reads an options object, and it calls onProgress without the optional check.

Test plan

  • Unit tests: riskFrames.test.ts, 19 passed, on the same code before it was rebased onto main.
  • tsc --noEmit in packages/engine is clean.
  • bunx fallow audit --base origin/main: verdict pass, 0 complexity findings.
  • No behavior change, so there's no fails-without-the-fix test.
  • Comments follow CONTRIBUTING.md "Comments".

Size

12 added lines and 5 removed in one file. It stands alone because #7331 had already merged.

@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.

Approved at 66145876. I found no behavior change.

  • The defaults (budgetMs, now, onProgress) still apply only when a value is undefined. Moving them into the outer signature does not change when they take effect. onProgress = () => {} makes the unconditional call in the loop equal to the old onProgress?.().
  • onEnd is now read once when the call starts, where before it was read in finally. The only production caller (frameCapture.ts:1362) passes a fresh object literal, so the two behave the same.
  • Locally at this head: riskFrames.test.ts 19/19 passed and tsc --noEmit in packages/engine is clean. The branch contains current main.
  • This is a refactor, not a fix, so no fails-without-the-fix line is needed.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Edit accuracy: accurate 267 (base branch 267), smooth 91 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

@miguel-heygen
miguel-heygen added this pull request to the merge queue Nov 6, 2026
Merged via the queue into main with commit ca64c2a Nov 6, 2026
102 of 104 checks passed
@miguel-heygen
miguel-heygen deleted the dpins/effect-scan-options branch November 6, 2026 22:22
SanHsien added a commit to SanHsien/hyperframes that referenced this pull request Nov 7, 2026
…-com#7336-heygen-com#7358

Adopt heygen-com#7304 (without CLI renderDiagnostic, needs heygen-com#6725), heygen-com#7331, heygen-com#7332, heygen-com#7334,
heygen-com#7337, heygen-com#7336, heygen-com#7339, heygen-com#7289, heygen-com#5594, heygen-com#6900, heygen-com#7322, heygen-com#7342, heygen-com#7343, heygen-com#7350 (onProgress
only), heygen-com#7352, heygen-com#7348, heygen-com#7344, heygen-com#7353, heygen-com#7356 and heygen-com#7355. Defer heygen-com#5708 (needs heygen-com#6911) and
heygen-com#7345 (READ_VERSION 4 vs 7); heygen-com#7307 not applicable. Re-read 14 moved pins, pin 6
new PRs (monitored 126). Make checkReportFile module-private and suppress the
cross-package closeTestChrome duplicate for fallow.

Co-authored-by: Miguel Ángel <miguel.sierra@heygen.com>
Co-authored-by: SophiaHuangCc <129631224+SophiaHuangCc@users.noreply.github.com>
Co-authored-by: Dante <duanjl.china@gmail.com>
Co-authored-by: Muzzy5150 <muzzy5150yt@gmail.com>
Co-authored-by: ump45nose <52391318+ump45nose@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.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