feat(transcripts): stage corrected .cleaned.txt over raw ASR#26
Merged
Conversation
stage_completed_transcripts.rb now prefers the known-terms-corrected <id>.cleaned.txt (the /transcriptions triage/learn-loop output) over raw <id>.txt / <id>.stitched.txt when staging pipeline transcripts for the site, so operator corrections reach _data/transcripts instead of raw ASR. Groups files by video id via new preferred_transcript_files(); guards main under __FILE__==$PROGRAM_NAME so the added spec can require it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
just3ws
force-pushed
the
transcripts/stager-prefer-cleaned
branch
from
July 8, 2026 17:19
44aca42 to
1dd05f3
Compare
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
bin/stage_completed_transcripts.rbnow prefers the learning-loop-corrected<id>.cleaned.txtover the raw ASR<id>.txtwhen both exist in the retention root, falling back.cleaned.txt→.stitched.txt→ shortest plain.txt.Why
The
/transcriptionslearning loop (known-terms → triage → distill) emits corrected.cleaned.txt. The stager was ignoring it and copying raw ASR into_datastaging, discarding the corrections.Tests
spec/bin/stage_completed_transcripts_spec.rb— 4 examples (cleaned-preference, stitched fallback, plain-only, one-per-id). All pass.🤖 Generated with Claude Code