Repository navigation
fix(engine): long films show progress during the effect check and never wait minutes on it - #6697
Conversation
Edit accuracy: accurate 271 (base branch 271), smooth 177 of thoseThe gate passes. Quarantined, measured but not gated (0) Unstable (1)
|
There was a problem hiding this comment.
Verdict: APPROVE · 0 blocker · 0 important · 1 nit · head 08d10bf1
- nit:
renderOrchestrator.ts:3688. The "Checking effects" status passes nostageProgress, unlike the other 25% steps (start_browsers). That clearsjob.stageProgressduring the scan, andrenderMachineProgresswrites no@hf-progressline for it. The human progress line still prints, so the desktop stall beat still fires.
Scope
I read riskFrames.ts, the only caller (cssEffectRiskFrames in frameCapture.ts), and the updateJobStatus → CLI → desktop followProgress path. Null still means whole-film screenshot capture. The 120 s budget is under desktop's STALL_REPORT_MS of 180 s. Fails without the fix: I confirmed it locally. With main's riskFrames.ts, the named test fails with expected Set{} to be null. At head, 19/19 tests in riskFrames + riskFrameCapture pass, and the engine tsc is clean. CI: every run for 08d10bf1 is green, and the required jobs passed or were skipped. The earlier heads f409f130 and 67cb1c6f were superseded mid-review; this approval covers 08d10bf1 only.
— Genesis reviewer
Ports: heygen-com#7165 (font preflight and system TTC names), heygen-com#7166 (font shorthand var(), weight-suffixed names, linked font sheets), heygen-com#7168 (render lock and --wait, effect-scan/session watchdog without the heygen-com#7104 retry, font_face_local_only lint), heygen-com#6972, heygen-com#7183 (adapted), heygen-com#7184; docs heygen-com#7132, heygen-com#7196; prerequisites heygen-com#6665, heygen-com#6697, heygen-com#6716 (cache-dir helper only). Deferred heygen-com#7182, heygen-com#7176. Package size budgets follow upstream's heygen-com#7168 increments. Watermarks: commit 15b1de4, PR 7189; monitored 92. Co-authored-by: Miguel Ángel <[email protected]> Co-authored-by: WaterrrForever <[email protected]> Co-authored-by: Ular Kimsanov <[email protected]> Co-authored-by: James Russo <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Description
A long film exported from the Desktop app on a Mac can sit at "prepare" for many minutes with no progress, then end with zero frames written. One report: a 670 s, 1080p 60 fps SVG/canvas film with a blur, about 16 minutes at 4%, then "Streaming encoder exited before frame 0 was written". The app reports an export as stalled after 180 s with no progress line.
The cause is the per-frame effect scan from #6318. When a film has a blur, drop-shadow or backdrop-filter element and takes the single-worker macOS GPU path,
scanCssEffectLiveFramesseeks every frame of the film in a scratch browser before frame 0 is captured, to find the frames the effect shows on. It prints nothing while it runs, and it stops early only once the effect covers more than 60% of the film. At 6 to 24 ms a seek, a long film spends minutes there.Two changes:
Checking effects, N of M framesat 25%. The app's stall watchdog counts that line as progress, so a long scan that is still moving is never reported as stalled, and the film keeps perf(engine): fast capture stays on for frames a shadow, blur or clip effect does not touch #6318's faster capture.The in-page chunk loop moved into
scanChunkunchanged, and the scan takes an options object, so the scan loop stays within the complexity limits.Before and after, on a real render
Old Mac (M4 Pro),
hyperframes render --workers 1 --gpu --fps 60, a 1080p fixture with 2,000 animated SVG circles and one blurred card on screen for 10 s. 0.8.214 against this branch, one render at a time, each stopped after 300 s:The 300 s film scans for 103 s as before, now with a line every chunk, and keeps the fast path. The 600 s film starts at once. Its capture is slower, so in a terminal, where nothing reports stalls, that film takes about 16% longer in total than on 0.8.214 (about 1,890 s against 1,630 s, projected from the rates). In the app, the same film is reported stalled after 180 s on 0.8.214. Scanning ahead of capture instead of before it would remove that trade-off, and is the follow-up.
Testing
fails without the fix:
stops after one chunk when the whole scan would hold back the first frame too longandreports the frames scanned after each chunkinriskFrames.test.ts. On main the scan seeks all 40,219 frames and returns an empty set (expected Set{} to be null), and no progress is reported.riskFrames.test.ts,riskFrameCapture.test.ts,threeDProjection-cssEffectRisk.test.ts: 31 passed;riskFrames.test.tspassed 3 runs in a row.tsc --noEmitfor the engine and producer packages: clean.What I did NOT exercise
No export from the Desktop app itself. The app's stall watchdog resets on any stdout line its progress parser accepts, and
25% Checking effects, 240 of 36000 framesis one: a percent of 25 or less reads as Preparing. I checked that by reading the app's parser, not by running the app. The 120 s budget is my choice, accepted by the team: under the app's 180 s limit, and long enough for the 300 s fixture's 103 s scan.