Repository navigation
fix(timeline): preflight exact-frame placements - #355
Conversation
|
Thanks for contribution, I will check this now |
b81b7f7 to
a3525e7
Compare
|
Hi @rponeawa, thanks for saying you would take a look at this PR. I've updated it with end-to-end Agent tests that start from identical invalid inputs, continue through manual correction, and end with a successful Build. Have you had a chance to review it? Are there any concerns blocking the merge? I understand that this change moves an input error from Build to |
|
Thanks for the patience and the thorough measurements! Merged. For context, #348 was merged just before this and already makes |
(cherry picked from commit e0f26d1)
Summary
Timeline endandTake atduring author decoding when the Clock has an inline value.Why
While producing a video, I asked the Agent to record the duration of each core phase (
check,plan, andbuild) because the workflow felt slow. That investigation found invalid Timeline placements which passedcheckandplanbut failed in@hypit/timeline-author@1#assemble-timelineduring Build. This PR moves the same deterministic error tocheck; it does not automatically repair the authored Timeline.End-to-end Agent recovery
To measure the user-facing workflow instead, two independent Agents started from identical project inputs and ran the official version and this PR in parallel. Runtime was prepared before timing. Each Agent interpreted the actual CLI error, manually corrected the SVML, and continued until a full Build completed; no scripted repair or shortened render was used. Benchmarks used upstream
b00532eand PRa3525eon the same workstation.end="28.769002s"(run 1)end="20.066667s"end="18.1s"For both invalid sources, the official version first reported the frame-boundary error in Build, whereas this PR reported it in the initial author check. The new Source A repeat and Source B runs each avoided an extra run check, plan, and failed Build, totaling 14.503 s and 15.405 s of measured CLI work respectively. The larger end-to-end differences also contain Agent decision time and successful-render variance, so they are observations, not a guaranteed or purely code-attributable speedup. Final SVML and MP4 hashes matched between versions within each pair; decoded output contained the full 862, 602, or 543 frames respectively. Source media are not included in this PR, and these selected cases do not estimate real-world error frequency.
Design notes
A statically available Clock gives author decoding enough information to apply the same exact-frame rule as Build. A runtime-only Clock does not, so this change deliberately leaves that path deferred to Build. Valid exact-frame placements and existing semantic Timeline assembly remain unchanged.
Fixes #354
Validation
pnpm check— passed.node --import tsx --test packages/timeline-author/test/*.test.ts— 10 passed.pnpm test— 1040 passed, 31 skipped, 7 failed. The failing cases were not compared against an unchanged-main baseline, so their cause is not established here.Review checklist