mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-16 06:19:21 +00:00
Fallow flagged the `uncaughtException` arrow at CRAP 30.0 (right at threshold). Extracting the three exit paths — emitCliErrorEvent, reportPostRenderTerminationEvent, exitAfterPostRenderTermination, exitAfterCliFailure — pulls the two `_flushSync?.()` optional-chain branches out of the arrow body and drops cyclomatic to 3. Same shape already used on compileStage in a sibling PR. Behavior preserved: EPIPE → exit(0), renderSucceeded → report + flush + exit(0), default → commandFailed + track + flush + exit(1) for uncaught; renderSucceeded → report + return, default → commandFailed + track for rejection. Windows contactSheet flake: `createContactSheet > writes PNG output` timed out at 20025ms (default ceiling 20000ms) on Windows. Test does milliseconds of real work — the wall-clock overhead is sharp's native binary fork under runner I/O jitter. PR #2492 already tried lightening the test; the flake persists at the default ceiling. Bumping the per-test timeout to 60s absorbs runner jitter without hiding real slowdowns (a genuine sharp regression would blow through 60s just as readily as 20s). Targeted per-test bump, not a global suite bump. Co-Authored-By: Claude <noreply@anthropic.com> — Via