mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 12:54:29 +00:00
Move the pure compile sub-stage (`compileForRender` + `applyRenderModeHints` + `writeCompiledArtifacts` + `CompositionMetadata` build + DPR resolution) out of `executeRenderJob` into `services/render/stages/compileStage.ts`. No behavior change. The sequencer calls `runCompileStage` at the same code point with identical inputs and outputs. The following invariants are preserved verbatim: - `cfg.forceScreenshot` is still mutated by `applyRenderModeHints`. - `perfStages.compileOnlyMs` is set to the same wall-clock interval (around the `compileForRender` call only). - The "Compiled composition metadata" log line is emitted after artifact writes with the same payload shape. - The "Supersampling composition via deviceScaleFactor" log line is emitted only when `deviceScaleFactor > 1`. - `stage1Start`, `updateJobStatus(..., "Compiling composition", 5, ...)`, and `perfStages.compileMs` (set at the end of probe) remain at their current code points in the sequencer. The probe sub-stage (`if (needsBrowser)`) is unchanged — it is extracted separately in PR 1.3. `recompileWithResolutions` lives inside the probe block because it depends on browser-resolved durations. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>