Skip to content

Warn on unknown style names instead of silently defaulting - #388

Merged
pizzato merged 1 commit into
mainfrom
claude/stale-style-name-channel-misroute
Sep 12, 2026
Merged

pizzato merged 1 commit into
mainfrom
claude/stale-style-name-channel-misroute

Conversation

@pizzato

@pizzato pizzato commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • Root cause of a video publishing to the wrong YouTube channel: job_config.json for a job rendered 2026-07-24 stamped style_name: "BHOB-David Attenbot" — the pre-hierarchy compound name. PR Style hierarchy: equality-is-inheritance for all fields, per-field parent hints #218 (2026-07-28) split styles into a bare child name (David Attenbot) plus a parent field, but never migrated already-rendered jobs. When the job finally auto-published on 2026-09-11 (~7 weeks later), style_settings() couldn't match the stale name to any current style and silently fell back to whatever default_style was at that moment — routing the upload to Stephen Spielbot's channel instead of A Brief History of Botkind's, and later showing as "AI Music Video Network" once default_style was changed again.
  • style_settings() now logs a warning whenever a non-empty style name matches nothing, instead of silently substituting the default style — this class of drift (a stamped name outliving a rename) should be visible, not silent.
  • Added scripts/repair_stale_style_names.py, a one-off repair tool that finds jobs still carrying a pre-refactor "{parent}-{child}" compound style name and rewrites them to the current bare name. Scanned all 54 jobs under ~/videos; only the one film above was affected, and I've already applied the fix to its job_config.json on this machine.

Test plan

  • .venv/bin/python3 -m pytest tests/ -k style — 238 passed
  • Ran scripts/repair_stale_style_names.py --dry-run against all jobs, confirmed exactly one match, then applied it for real and verified job_config.json now reads style_name: "David Attenbot"
  • Verified channel_for_style() now resolves the repaired job to A Brief History of Botkind's channel, and that a deliberately-unknown style name logs the new warning while still falling back safely

Note

The already-published video itself (https://www.youtube.com/watch?v=6P0pLESBODI) is still live on the Stephen Spielbot channel — this PR fixes the underlying bug and the job's data, not that video. Let me know if you want it deleted from Stephen Spielbot and re-uploaded to A Brief History of Botkind.

🤖 Generated with Claude Code

A style_settings() lookup for a non-empty style name that matches
nothing (e.g. a job stamped before the style-hierarchy refactor split
"BHOB-David Attenbot" into "David Attenbot" with parent "BHOB")
silently fell back to whatever default_style currently is. Because
channel_for_style() reads the channel off that fallback, this
misrouted a Brief-History-of-Botkind film to the Stephen Spielbot
YouTube channel when it finally auto-published, weeks after the
refactor changed the style name it was stamped with.

Add scripts/repair_stale_style_names.py to find and rewrite any
job_config.json still carrying a pre-refactor compound style name, and
log a warning whenever style_settings() has to fall back for an
unrecognized (non-empty) name so this kind of drift is visible instead
of silent.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@pizzato
pizzato merged commit 91e07fe into main Sep 12, 2026
3 checks passed
@pizzato
pizzato deleted the claude/stale-style-name-channel-misroute branch September 12, 2026 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant