Repository navigation
fix(cli): preserve authored clip length when moving - #5315
Open
rudycelekli wants to merge 1 commit into
Open
rudycelekli wants to merge 1 commit into
rudycelekli wants to merge 1 commit into
Conversation
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Preserve an end-authored clip's resolved length when moving it with the timeline CLI.
Why
The timeline reader supports older clips with
data-startanddata-end. The move command checked bounds and overlaps using the original length but only changed the start attribute. A two-second clip at 1–3 seconds moved to 2 seconds became one second long; moving a two-second clip at 4–6 seconds to 1 second made it five seconds long. The same incorrect result appeared in--plan.Related work
This is a small correction to the existing timeline move command introduced in #4221. Open #5279 concerns atomic batch undo receipts; its implementation is independent, although both PRs append CLI regressions to the same test file.
How
For a clip with an authored duration, write its already resolved duration and remove the derived/legacy end attribute alongside the new start. This follows the existing canonical timing writer's contract. Clips whose duration comes from natural media length or an image default retain their unauthored duration.
Test plan
The full CLI suite reports 4594 passed, 6 failed, 49 skipped out of 4649 collected tests. An unchanged-production comparison with the same tests and environment reports 4590 passed, 10 failed, 49 skipped, including the four timing regressions. Five exact failures match between runs: the history held-lock test, the atomic file watcher test, and three Sherpa installation tests. The sixth failure is in the unchanged real-filesystem watcher module: the new-directory case fails after the fix, while the manifest-write case fails in the comparison. That module has no dependency on the changed timeline helper. The full CLI suite is not reported as passing.
Validation covers CLI timing and persistence on macOS. Hosted upstream CI and maintainer review remain outstanding.