mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-01 19:42:03 +00:00
refactor(producer): flag cfg.forceScreenshot mutation as distributed-render TODO
Add a `TODO(distributed-render):` comment near the `applyRenderModeHints` call documenting that this caller-owned-object mutation needs to move into the result type before `freezePlan` wires up. The mutation pattern works in-process but won't survive across processes / replays from a frozen plan — the value belongs in `LockedRenderConfig`, not on a mutated `EngineConfig`. No behavior change. Comment-only. Review feedback addressed: vanceingalls on #718. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -70,6 +70,11 @@ export async function runCompileStage(input: CompileStageInput): Promise<Compile
|
||||
const compiled = await compileForRender(projectDir, htmlPath, join(workDir, "downloads"));
|
||||
assertNotAborted();
|
||||
const compileOnlyMs = Date.now() - compileStart;
|
||||
// TODO(distributed-render): `applyRenderModeHints` mutates `cfg.forceScreenshot`
|
||||
// on a caller-owned object. Before freezePlan wires up, this side-effect
|
||||
// needs to move into the result (e.g. `forceScreenshot: boolean` on
|
||||
// `CompileStageResult`) so the value can be baked into `LockedRenderConfig`
|
||||
// and survive across processes / replays.
|
||||
applyRenderModeHints(cfg, compiled, log);
|
||||
writeCompiledArtifacts(compiled, workDir, Boolean(job.config.debug));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user