Repository navigation
video_cut: ask whether a re-make draws frames, before running it (reelee#480) - #100
Merged
Merged
Conversation
`video_cut_reuses_existing(project, skeleton)` answers, without writing, whether executing a planned video_cut skeleton would reuse a cut on disk (re-verify, adopt, or a fresh equivalent) or draw every frame again. It is the decision `_reuse` makes, split out so the quote and the run read the same thing: `_reuse` now applies `_reuse_candidate`'s answer. First customer: reelee's per-cut re-make door (reeleehq/reelee#480), which must quote a caption fix (seconds) apart from a camera edit (minutes). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… a non-cut skeleton Review of #100 (plausible items): the quote now matches the run by construction. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Adds
braidio.transforms.video_cut_reuses_existing(project, skeleton): a free check, with no writes, that says whether executing a plannedvideo_cutskeleton would reuse a cut already on disk or draw every frame again. On disk, reuse means a fresh equivalent, a re-verify in place, or an adopted cache hit.Why: reeleehq/reelee#480. A surface that re-makes a commentary cut has to quote a caption fix (text pass only, seconds) separately from a camera or picture edit (every frame redrawn, minutes). Until now the answer was only available after the run, as
rendered_frames.How:
_reuseis split into_reuse_candidate(the decision, read-only) and_reuse(applies it: re-verify or adopt). The quote and the run therefore read the same thing and cannot disagree. Behaviour of_reuseis unchanged.Tests:
test_the_reuse_quote_agrees_with_the_run_on_every_doorcovers five cases: a first render, an unchanged re-run, an editorial (caption) edit, a move edit, and a deleted file. In each case the quote is asked first, the test asserts it wrote nothing to the graph, then runs the same plan and checks the quote matched what happened.tests/test_video_transforms.py(82),test_downloads.py(51) andtest_importing.py(93) pass.Adversarial review
A fresh Opus reviewer found no confirmed bugs and its verdict was merge. It confirmed three things:
_reusebehaves exactly as before._reuse_candidatewrites nothing.It raised three plausible items, all now addressed in a second commit:
use_cache/forcearguments asexecute, so the quote matches the run by construction.ValueError.🤖 Generated with Claude Code