mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-01 19:42:03 +00:00
Resolve the compileStage TODO from PR #720. cfg.forceScreenshot is now computed exactly once inside compileStage (after applyRenderModeHints) and returned on CompileStageResult.forceScreenshot. The sequencer stores it on a local captureForceScreenshot; downstream capture stages take the value as an explicit parameter and derive their own engine config rather than reading cfg.forceScreenshot. Mid-pipeline mutations removed: - renderOrchestrator.ts: the pre-compile alpha-output mutation moved into compileStage so the resolution is one operation in one place. - captureHdrStage.ts: stopped mutating caller-owned cfg; the layered composite path now uses a local hdrCfg derived from cfg plus forceScreenshot=true. The stage throws if called with forceScreenshot=false to make the contract explicit. - BeginFrame auto-worker calibration fallback: still flips capture mode on a timeout, but flips the local boolean instead of cfg. The screenshot-mode retry uses a derived cfg view. captureStage / captureStreamingStage add a forceScreenshot input and derive captureCfg (identity-equal to cfg when the values already agree, so no extra allocation on the common path). lefthook.yml: grandfather renderOrchestrator.ts and captureHdrStage.ts in the new 500-line filesize hook (#748). Both pre-date the hook and are actively being shrunk in the producer stages stack. Unblocks Phase 3 chunked rendering: LockedRenderConfig.forceScreenshot in the distributed plan is computed here and survives across processes without depending on shared mutable state.