Avoid re-running the AI pipeline on derived artifacts - #1
Merged
Merged
Conversation
Five complementary changes so users stop accidentally re-paying for transcription + classification on content the pipeline already saw. Pattern 1+6 (render-lineage detection on add): - New renderLineage.ts walks the active project's render_history when a user drags in a file. If the path matches an entry's output, the AddPanel routes through a new "That's one of your renders" modal instead of the normal copy/reference flow. - "Continue editing intro.mov" jumps the AI tab to the original source via setActive(), so the next render reuses cached artifacts. - "Add anyway" stays as an escape hatch. Pattern 2 (UI copy): - Pacing tab + Audio tab render buttons now spell out "No AI cost on re-render": cuts and overrides reuse the cached classification; audio enhancement / denoise / ducking never touch the LLM. Pattern 4 (content-hash cache for /analyze): - New _analysis_cache.py keys cached AnalysisBundle JSONs by SHA256 of the extracted mic WAV. /analyze hashes after ingest (~1s), looks up, and skips the Groq call on hit. Cache miss falls through to the normal Whisper pass and stores the result. - Catches re-imports, copies across projects, symlinks of the same audio. Doesn't catch trims / different mic tracks (correctly). - Saves ~$0.05 per duplicate analyze. Pattern 5 (no code changes): - Verified runAllStages is idempotent on completed stages and that override / custom-cut mutations route only through the store + /render's re-plan path, never re-triggering /classify. Pattern 3 (deferred): - Splice-aware Cadence (talking to the model about a spliced output without re-running transcription on each clip) is real architecture work: artifact builder with offset math, dispatcher routing, custom cuts at splice-time. Full design captured in docs/design-splice-classification-reuse.md for a future PR. Drive-bys: re-applied two tsc -b strict-mode fixes (SplicingView discriminated-union narrowing + projectDigest export-type) that lived on the deleted public-release branch and didn't make it to master.
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.
Five complementary changes so users stop accidentally re-paying for transcription + classification on content the pipeline already saw.
Pattern 1+6 (render-lineage detection on add):
Pattern 2 (UI copy):
Pattern 4 (content-hash cache for /analyze):
Pattern 5 (no code changes):
Pattern 3 (deferred):
Drive-bys: re-applied two tsc -b strict-mode fixes (SplicingView discriminated-union narrowing + projectDigest export-type) that lived on the deleted public-release branch and didn't make it to master.
What this changes
Why
How I tested
Anything reviewers should pay attention to
Checklist
tests/)uv run pytestpasses locallybun run tsc --noEmitpasses locally (if frontend touched)