Pin the transcript JSON keys so a stray "sender" cannot kill the podcast

The retried podcast failed with "Failed to parse ValidatedTranscript ... 2
validation errors ... missing": qwen3.5:27b had emitted "sender" instead of
"speaker" in 2 of 14 dialogue entries. Pydantic rejects the object, langchain
raises OUTPUT_PARSING_FAILURE and the entire job dies — after the outline and most
of the transcript were already done.

The template showed the schema as a JSON example but never forbade other key names,
so the model was free to drift. transcript.jinja now states the constraint
explicitly, right where the schema is defined.

This does not make the model deterministic — a parse failure still occurred once on
the next run, but podcast_creator's own retry absorbed it and the episode completed:
15:16 min of audio, 53 clips. Before the change the same failure was fatal.

Also, since this is the run that proved the non-root switch end to end: the final
MP3 is owned by dschlueter, and prune_podcast_data.py cleaned up the leftovers of
the two dead runs (5.5 MB) with a plain host-side rmtree.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Dieter Schlüter 2026-07-11 15:56:02 +02:00
commit a10874c574

View file

@ -87,6 +87,11 @@ Follow these format requirements strictly:
} }
``` ```
CRITICAL KEY NAMES: every object inside "transcript" must use EXACTLY the two keys
"speaker" and "dialogue" — never "sender", "name", "text", "content" or any other
variant, not even for a single entry. One wrong key makes the entire podcast fail
to parse and the whole job is lost.
Formatting instructions: Formatting instructions:
{{ format_instructions}} {{ format_instructions}}