Skip to content

fix(cli): check waits for the composition as long as snapshot and render do - #6947

Merged
miguel-heygen merged 6 commits into
mainfrom
fix/check-render-ready-wait
Nov 4, 2026
Merged

miguel-heygen merged 6 commits into
mainfrom
fix/check-render-ready-wait

Conversation

@miguel-heygen

@miguel-heygen miguel-heygen commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

What

hyperframes check now waits for the composition to become render-ready for 45 s by default, the same constant snapshot and render use (DEFAULT_CONFIG.playerReadyTimeout). The --timeout flag default and DEFAULT_CHECK_OPTIONS.timeout both come from it; the docs line is corrected (it said 3000).

Why

On slow machines and heavy scenes (a 4-core, 4 GB Windows laptop; a local 3D scene) check failed with "Runtime did not become render-ready within 10000ms" while snapshot and render of the same project were allowed 45 s. The 10 s lived in two places (the option default and the flag default), apart from the constant the other commands use.

Related work

Refs the report that check should wait while the page still makes progress and fail only when it stalls; this change only removes the disagreement with snapshot/render and does not add progress detection.

How

DEFAULT_CHECK_OPTIONS.timeout takes DEFAULT_CONFIG.playerReadyTimeout; the flag's default is String(DEFAULT_CHECK_OPTIONS.timeout), so there is one owner. An explicit --timeout still wins.

Test plan

  • Unit test added: waits for the composition as long as snapshot and render do unless --timeout says otherwise (packages/cli/src/commands/check.test.ts). fails without the fix: before the change it received 10000 where 45000 was expected; after, check.test.ts 157 passed, checkBrowser.test.ts 68 passed.

  • Manual testing performed: not run on a slow machine.

  • Documentation updated (if applicable)

  • Comments follow CONTRIBUTING.md "Comments"

  • Review fix: the warning that tells a person to raise --timeout (checkBrowser.ts, two places) named 20s, which now lowers the 45 s default. It is one exported constant (RENDER_READY_WARNING_SUFFIX) whose example is twice the default (90s), and the stale 3000ms doc comment now says 45 s. fails without the fix: names a --timeout above the default, so following it never lowers the wait (checkBrowser.test.ts) is red alone with the example shrunk (expected 18000 to be greater than 45000); checkBrowser.test.ts + check.test.ts 226 pass.

Size

A lone one-constant fix (the change is the constant, one test and one docs line); nothing open to fold it into.

@mintlify

mintlify Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
hyperframes 🟢 Ready View Preview Nov 3, 2026, 11:38 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@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 · 0 blocker · 1 important · 1 nit · head 9d3c07ca

The default check timeout now comes from one place, and the body has the fails without the fix: line naming the new test.

  • important: this change makes the timeout hint wrong. packages/cli/src/utils/checkBrowser.ts:385 and :542 still say raise --timeout (for example 20s). Now that the default is 45 s, a user who hits that warning and follows the hint would lower the budget. Change the example to something above the default (e.g. 2m) or drop the number.
  • nit: the doc comment at checkBrowser.ts:197 still says check's render-ready wait "defaults to 3000ms (DEFAULT_CHECK_OPTIONS.timeout)".
Scope

Read the full diff. Traced options.timeout at head through idleWindow (still max(120s, timeout+10s), so 120 s), the navigation and render-ready timeouts of openSettledCompositionPage (×3), and auditClipDurations. That last one now waits up to 45 s for media that never loads, which matches what snapshot and render allow. The cli package already depends on @hyperframes/engine, and DEFAULT_CONFIG.playerReadyTimeout is the fixed 45_000, separate from env resolution. CI and Docs were still running when I reviewed. No earlier reviews.

— Genesis V2

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Edit accuracy: accurate 267 (base branch 267), smooth 116 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-pct-r0-root-z100: tracking 0.05, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo true, teleport true / tracking 0.05, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo true, teleport true / tracking 0.05, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo true, teleport true

@miguel-heygen
miguel-heygen force-pushed the fix/check-render-ready-wait branch from 9d3c07c to 8bf6fd3 Compare November 1, 2026 22:04

@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 — 2 resolved, 0 open, 1 new (blocker) · 9d3c07ca → 8bf6fd36

The 20s hint and the 3000ms comment are fixed. The blocker is that this head breaks two checks in packages/cli/src/utils/checkBrowser.ts:

  • Preflight format:check fails on this file (job). The cause is the double blank line after RENDER_READY_WARNING_SUFFIX and the two renderReadyWarningSuffix: values split onto their own lines. Preflight failing also turns Windows render verification and preview-regression red. Fix: bun run format.
  • Comments ratchet fails (run): checkBrowser.ts comment share rose from 4.0% to 4.1%, and a file's share may only go down. The new /** What a render-ready warning tells… */ line is the added comment. Drop it; the constant's name already says it.

— Genesis V2

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

Review @ 8bf6fd36: request changes (required CI red)

Blocker: two required checks are red at this head, and both come from formatting:

  • Preflight (lint + format) fails on packages/cli/src/utils/checkBrowser.ts.
  • The required Render on windows-latest and Tests on windows-latest then fail with "changes=success preflight=failure; this required check cannot pass", so they never actually ran.
  • bun run format should clear all three.

Also red (not required): Comments, the comment-share ratchet. checkBrowser.ts went from 4.0% to 4.1%, so the new one-line doc comment on RENDER_READY_WARNING_SUFFIX has to go, or the comments elsewhere in the file get trimmed.

The change itself looks right:

  • DEFAULT_CHECK_OPTIONS.timeout and the --timeout flag default both come from DEFAULT_CONFIG.playerReadyTimeout, and an explicit flag still wins.
  • The hint's example is now twice the default, so following it can't shorten the wait.
  • Each fails without the fix: line names a test.

I'll approve on a re-ping at a head where the required checks are green.

— Somu

@miguel-heygen
miguel-heygen force-pushed the fix/check-render-ready-wait branch from 8bf6fd3 to b7c6254 Compare November 2, 2026 22:34

@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 · 8bf6fd36 → b7c6254d

— Genesis V2

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

Re-reviewed at c948138f, after the rebase onto main. Both findings from my last review are fixed:

  • checkBrowser.ts is formatted (style(cli): format checkBrowser.ts). Preflight and the required Windows checks are green.
  • The doc comment on RENDER_READY_WARNING_SUFFIX is gone, so the Comments ratchet passes.

The source is the same as what I reviewed at 8bf6fd36:

  • DEFAULT_CHECK_OPTIONS.timeout and the --timeout default both come from DEFAULT_CONFIG.playerReadyTimeout (45 000 on main).
  • The hint's example is twice the default.
  • Both regression tests are present.

Nit: the --timeout description hardcodes "default: 45000", so it will drift if the engine default changes. Non-blocking.

— Somu

@miguel-heygen
miguel-heygen added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit f487a20 Nov 4, 2026
86 checks passed
@miguel-heygen
miguel-heygen deleted the fix/check-render-ready-wait branch November 4, 2026 00:08
This was referenced Nov 4, 2026
SanHsien added a commit to SanHsien/hyperframes that referenced this pull request Nov 4, 2026
Adopted with tests that fail on the old code (except the link change):
- offload: rewrite media inside <template>, keep same-named files from
  other folders (heygen-com#6842, offload part only)
- autoUpdate: no background upgrade across a 0.x minor; Homebrew installs
  only notify (heygen-com#7013, autoUpdate part only)
- engine: script load failures carry origin/code; aborted scripts are not
  load failures (heygen-com#7088, heygen-com#7093)
- community Discord invite links (heygen-com#7097)
- studio: write media duration to the store once per file (heygen-com#6745)
- check: restart the idle watchdog on each driver call during analysis
  (heygen-com#6919, adapted to this line's fixed 120s idle window)
- check: default wait raised from 10s to 45s, matching snapshot/render
  (heygen-com#6947)
- image cancellations no longer ignored by extension (heygen-com#6928)
- capture: system sleep no longer counts as a stall (heygen-com#7096, hand-ported;
  the sequential branch also uses the shared stall clock)

Commit watermark advances to 183614b (28 consecutive commits with
file:line evidence); PR and issue watermarks are unchanged. The rest of
the review is in docs/UPSTREAM_REVIEW_2026-11-04_CONTINUED.md.

Co-authored-by: Miguel Ángel <miguel.sierra@heygen.com>
Co-authored-by: WaterrrForever <miao.yang@heygen.com>
Co-authored-by: Wenbo Zhu <wenbo_zhu@berkeley.edu>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
staging - docs — c948138f Deployed Nov 3, 2026 by mintlify[bot]
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.

3 participants