fix(engine): retry probe on pollHfReady zero-duration timeout#1824
Merged
Conversation
Renders were failing outright with "[FrameCapture] Composition has zero duration. Runtime ready: false, ..." whenever window.__renderReady didn't flip true within playerReadyTimeout (45s) — most often under host contention (e.g. several renders running concurrently), never from a defect in the composition itself. Confirmed by re-running an affected composition standalone: it succeeded immediately (initMs ~3.5-4.4s vs. the 45s timeout it hit under concurrent load). The probe stage already retries once with a fresh browser session for exactly this class of "succeeds on retry" infra flakiness (frame detachment, disconnects, navigation timeouts, launch failures), but isTransientBrowserError didn't recognize this message, so it fell through to an immediate, unretried failure. Match "Composition has zero duration ... Runtime ready: false" as transient. Left the "Runtime ready: true" case (pollHfReady's fast-fail: no GSAP timeline and no data-duration) unmatched — that's a genuine authoring bug, not a timing fluke, and should keep failing fast.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pollHfReady's own timeout ("[FrameCapture] Composition has zero duration. Runtime ready: false, ...") was falling throughisTransientBrowserErroras non-transient, so the probe stage's existing retry-with-fresh-session logic (already used for frame detachment, disconnects, navigation timeouts, launch failures) never got a chance to run — the render failed outright on the first hiccup.window.__renderReadysimply doesn't flip true withinplayerReadyTimeout(45s), most often under host contention (several renders/browsers running concurrently) rather than any defect in the composition. Re-running an affected composition standalone succeeded immediately (~3.5-4.4s init vs. the 45s it hit under concurrent load).data-duration) unmatched on purpose — that's a genuine authoring bug, not a timing fluke, and should keep failing fast without wasting a retry.Test plan
frameCapture-transientErrors.test.ts— added transient/non-transient cases for both message shapes; all 20 pass.probeStage.test.ts— added an end-to-end test that the probe stage retries once and succeeds on this error, and a companion test that the permanent (Runtime ready: true) variant still fails fast without retrying; all 14 pass.oxlint/oxfmtclean on changed files.