mirror of
https://github.com/nomadkaraoke/karaoke-gen.git
synced 2026-11-20 13:07:57 +09:00
## Summary Theme 4 of the silent-fallback audit (`docs/archive/2026-06-09-fallback-audit-plan.md`, in #805). A *configured* branded render asset that is missing must not silently substitute a different font/background on a paid deliverable. Mirrors the existing background-image check in `output/video.VideoGenerator.__init__` (which already raises). ## Changes - **`output/video._build_ass_filter`** (4.1): when the theme's karaoke `font_path` is set but the file is missing, the final MP4 used to silently drop `:fontsdir` → libass resolves a system fallback font for the whole song. Now raises `FileNotFoundError`. *(Unset `font_path` is still fine — no fontsdir, no raise.)* - **`video_generator._create_background`** (4.3): a set-but-missing title/end-screen `background_image` used to silently fall back to a flat color. Now raises `FileNotFoundError`. *(No background configured is still fine — flat color.)* ## Scope (per your decision) Only these two clean "configured-but-missing → raise" cases are changed. The font **substitution** items (4.2 title/end font, 4.4 CDG→arial, 4.8 measurement font) and duet/colour items (4.5–4.7) are **left as-is** — font substitution overlaps with legitimate CJK font fallback (`test_video_generator_cjk_font.py`) and warrants per-item treatment. ## Testing - [x] New `tests/unit/test_fallback_render_assets.py` (raise + legitimate-unset cases) - [x] 105 render/video tests pass ## Review - [x] CodeRabbit CLI review completed locally (0 findings) @coderabbitai ignore --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>