Repository navigation
refactor(core): one owner for the distributed fps set - #5756
Conversation
The integer rates Lambda and Cloud Run accept were written out by hand in about 25 places across core, engine, producer, the adapters and the CLI. They now come from DISTRIBUTED_FPS / DistributedFps / isDistributedFps in @hyperframes/core. Engine config snapshots accept 25 like the rest.
Edit accuracy: accurate 271 (base branch 271), smooth 166 of thoseThe gate passes. Quarantined, measured but not gated (0) Unstable (1)
|
jrusso1020
left a comment
There was a problem hiding this comment.
Approving at e93b6d78.
One owner for the set. Core's DISTRIBUTED_FPS = [24, 25, 30, 60] and isDistributedFps now back every distributed check:
- the producer's config validation (its own
ALLOWED_FPScopy is gone),planV2,renderRequestand the harnesses - the CLI's
lambda(render and render-batch),cloudrunandcompositionFps - the engine's config enum
- the Lambda and Cloud Run event types, through
SerializableDistributedRenderConfig["fps"]
A repo-wide search turns up no other hard-coded distributed fps list in producer, engine, cli, aws-lambda or gcp-cloud-run.
The only behaviour change is the intended engine fix. Before, ENUM_ENGINE_CONFIG_FIELDS.fps was [24, 30, 60], and validateEngineConfigSnapshot runs on every serialized request, so a 25 fps snapshot was refused even though the rest of the distributed path accepted 25. Every other check was already {24, 25, 30, 60}. includes is a strict comparison, so "30", NaN and 29.97 are rejected exactly as the old === chains rejected them. Widening EngineConfig.fps is safe because capture, encode and chunk math all read the rational job.config.fps, never EngineConfig.fps. The engine test loops over all four rates and fails against the old enum.
Non-blocking
skills/hyperframes-cli/references/cloudrun.md:25andlambda.md:87still list 24/30/60 for the distributed commands, so an agent following the skill would tell a user that 25 isn't supported. The docs pages already say 24, 25, 30, 60.- The error text changed from "must be 24, 25, 30, or 60" to "must be one of 24, 25, 30, 60". That only matters to anything outside the repo matching on it.
CI is green. No live run.
— Rames
What changed
The integer frame rates the distributed renderer (Lambda, Cloud Run) accepts were written out by hand in about 25 places: type unions, runtime checks, error messages, CLI help, harness gates and a test's own copy. Adding 25 in #5423 had to touch 28 files and still missed a few. They now come from one owner in
@hyperframes/core, next toFps:Fpsfield derives fromSerializableDistributedRenderConfig["fps"].lambdaandcloudrunchecks,--fpshelp text and thedata-fpsdefault read the owner.readAllowedCompositionFpsFromDirno longer takes an allowed list. Its test passed[24, 30, 60], a stale copy without 25.EngineConfig.fpsand the snapshot validator still said24 | 30 | 60, so a distributed render that passed an engine config snapshot with fps 25 was refused. They now use the owner.Core is the owner because it already owns
Fps, and the CLI bundles it, as do engine and producer. The adapters see it through producer's types. No new dependency edges.Error wording changes from "must be 24, 25, 30, or 60" to "must be one of 24, 25, 30, 60".
What I measured
Ran each changed or covering test file on its own, with exit codes:
parseFps.test.ts(newisDistributedFpscases)config.test.ts(new snapshot fps cases)compositionFps.test.ts(new 25 fps case)plan-parity-harness,planV2,regression-harness-distributed,renderRequest,regression-shard-planvalidateConfig,renderToLambdavalidateConfig,renderToCloudRuntsc --noEmitis clean in core, engine, producer, cli, aws-lambda and gcp-cloud-run.Mutations:
[24, 30, 60, 50]: all 13 files above fail, which shows every consumer reads the owner.[24, 30, 60]: only "accepts every distributed fps, including 25" fails.What I did NOT exercise
data-fpsis outside the set (for example 50 or 30000/1001). That is a behaviour change and gets its own PR.