@@ -67,17 +67,15 @@ export interface ValidateNoGpuEncodeInput {
6767 */
6868export const SYSTEM_FONT_USED = "SYSTEM_FONT_USED" ;
6969
70- /**
71- * Typed code for {@link validateDistributedDuration}. A duration this large
72- * almost always means an unbounded runtime timeline escaped into plan(),
73- * e.g. GSAP `repeat: -1` reporting its internal sentinel duration. Letting
74- * that reach chunk planning creates billions of frames and turns an authoring
75- * error into worker churn.
76- */
70+ /** Typed code for invalid duration metadata resolved by the shared browser probe. */
7771export const DISTRIBUTED_DURATION_OUT_OF_RANGE = "DISTRIBUTED_DURATION_OUT_OF_RANGE" ;
72+ /** Generic alias; the legacy value remains stable for workflow retry policies. */
73+ export const RENDER_DURATION_OUT_OF_RANGE = DISTRIBUTED_DURATION_OUT_OF_RANGE ;
7874
79- /** Distributed renders are operationally bounded to one day of output. */
75+ /** All render paths are operationally bounded to one day of output. */
8076export const MAX_DISTRIBUTED_DURATION_SECONDS = 24 * 60 * 60 ;
77+ /** Generic alias retained alongside the distributed public API. */
78+ export const MAX_RENDER_DURATION_SECONDS = MAX_DISTRIBUTED_DURATION_SECONDS ;
8179
8280/**
8381 * Reject any config that would let GPU encode or hardware-GL slip into a
@@ -143,13 +141,13 @@ export function validateNoSystemFonts(compiledHtml: string): void {
143141 }
144142}
145143
146- export function validateDistributedDuration ( input : {
144+ export function validateRenderDuration ( input : {
147145 duration : number ;
148146 totalFrames : number ;
149147 fps : number ;
150148} ) : void {
151149 const { duration, totalFrames, fps } = input ;
152- const maxFrames = Math . ceil ( MAX_DISTRIBUTED_DURATION_SECONDS * fps ) ;
150+ const maxFrames = Math . ceil ( MAX_RENDER_DURATION_SECONDS * fps ) ;
153151 if (
154152 Number . isFinite ( duration ) &&
155153 duration > 0 &&
@@ -163,12 +161,21 @@ export function validateDistributedDuration(input: {
163161 }
164162
165163 throw new PlanValidationError (
166- DISTRIBUTED_DURATION_OUT_OF_RANGE ,
167- `[planValidation] Distributed render duration is out of range: ` +
164+ RENDER_DURATION_OUT_OF_RANGE ,
165+ `[planValidation] Render duration is out of range: ` +
168166 `duration=${ String ( duration ) } s totalFrames=${ String ( totalFrames ) } fps=${ String ( fps ) } ` +
169- `(maxDuration=${ String ( MAX_DISTRIBUTED_DURATION_SECONDS ) } s, maxFrames=${ String ( maxFrames ) } ). ` +
167+ `(maxDuration=${ String ( MAX_RENDER_DURATION_SECONDS ) } s, maxFrames=${ String ( maxFrames ) } ). ` +
170168 `This usually means an unbounded timeline escaped into render planning, such as ` +
171169 `GSAP repeat:-1 / yoyo loops without an explicit finite root duration. Add a finite ` +
172170 `data-duration or replace infinite repeats with a finite repeat count before rendering.` ,
173171 ) ;
174172}
173+
174+ /** Backward-compatible distributed entry point for existing adopters. */
175+ export function validateDistributedDuration ( input : {
176+ duration : number ;
177+ totalFrames : number ;
178+ fps : number ;
179+ } ) : void {
180+ validateRenderDuration ( input ) ;
181+ }
0 commit comments