Correct the intern's name to Devon across all transcripts

Whisper transcribed the intern as "Devin" in 21 of 58 transcripts — he is Devon
everywhere else: backend/services/intern.py, the website, and the show's lore.
Five files used both spellings for the same character, so this was transcription
drift rather than two people. Context confirms every instance is the intern
("our new intern, Devin here", "Devin, where's my coffee?").

436 replacements across 22 files, 384 insertions against 384 deletions — pure
substitution, no content added or lost. Speaker labels went from 219 DEVIN: /
17 DEVON: to 236 DEVON:.

This mattered now because the transcripts stop being .txt files nobody reads and
become indexed text on 57 episode pages.

Root cause is unfixed: the Whisper initial prompt in transcription.py does not
seed "Devon" as a proper noun, so new episodes will drift again. Added a test
that fails if any transcript reintroduces the misspelling.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-14 04:15:08 -05:00
co-authored by Claude Opus 5
parent 2429a2eb07
commit bf1afef351
23 changed files with 415 additions and 384 deletions
+31
View File
@@ -0,0 +1,31 @@
"""The intern is Devon, not Devin.
Whisper heard "Devin" in 21 of 58 transcripts because the initial prompt in
backend/services/transcription.py never seeded his name as a proper noun. That
was invisible while transcripts were plain .txt nobody read; now they render as
indexed text on every episode page, so a regression would be public.
The durable fix is seeding "Devon" in the Whisper initial prompt. This test
catches it if that regresses or a new transcript slips through.
"""
import re
from pathlib import Path
TRANSCRIPTS = Path(__file__).resolve().parent.parent / "website" / "transcripts"
def test_no_transcript_spells_the_intern_devin():
offenders = []
for f in sorted(TRANSCRIPTS.glob("*.txt")):
hits = len(re.findall(r"\bdevin\b", f.read_text(errors="replace"), re.IGNORECASE))
if hits:
offenders.append(f"{f.name} ({hits})")
assert not offenders, f"transcripts spell the intern 'Devin': {offenders}"
def test_devon_is_present_as_a_speaker_label():
"""Guards against a rename that accidentally removed him entirely."""
labelled = [f.name for f in TRANSCRIPTS.glob("*.txt")
if re.search(r"^DEVON:", f.read_text(errors="replace"), re.MULTILINE)]
assert len(labelled) >= 20, f"expected Devon labelled in many episodes, got {len(labelled)}"