From 401991669d67c8a75f273b1921441cef9cfd2d85 Mon Sep 17 00:00:00 2001 From: zhengqiuyang <54101044+zhengqiuyang@users.noreply.github.com> Date: Tue, 17 Nov 2026 17:08:08 +0000 Subject: [PATCH] fix(lint): derive the root duration with the parser's timing reader (#8032) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(lint): derive the root duration with the parser's timing reader `deriveDurationFromClips` read `data-start` with a raw `Number()`, so a clip authored at `data-start="-2"` produced an end of `-1`. `resolveCompositionDuration` only counts positive ends, so the clip vanished from the derivation and the composition was reported as having no duration source at all — a hard error that blocks strict renders, even though the parser clamps the same start to zero and renders the clip for its full length. Read the start through `readClipTiming`, the same contract parser the renderer uses, and keep the media-duration default for untimed images. * fix(lint): derive the root duration with the parser's timing reader `deriveDurationFromClips` read `data-start` with a raw `Number()`, so a clip authored at `data-start="-2"` produced a negative end and vanished from the derivation. Read the start through `readClipTiming`, which clamps it to zero, and keep `readAuthoredDurationSeconds` for the authored length so a valid `data-end` still backs an unparseable `data-duration`. --- packages/lint/src/rules/composition.test.ts | 26 +++++++++++++++++++++ packages/lint/src/rules/composition.ts | 12 +++++----- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/packages/lint/src/rules/composition.test.ts b/packages/lint/src/rules/composition.test.ts index 97498b5137..c546cea634 100644 --- a/packages/lint/src/rules/composition.test.ts +++ b/packages/lint/src/rules/composition.test.ts @@ -1978,6 +1978,32 @@ ${Array.from({ length: 10 }, (_, i) => `