Skip to content

fix: harden generate_voiceover param sanitization#7

Open
fancyboi999 wants to merge 2 commits intoFireRedTeam:mainfrom
fancyboi999:fix/voiceover-param-sanitization-robustness
Open

fix: harden generate_voiceover param sanitization#7
fancyboi999 wants to merge 2 commits intoFireRedTeam:mainfrom
fancyboi999:fix/voiceover-param-sanitization-robustness

Conversation

@fancyboi999
Copy link

@fancyboi999 fancyboi999 commented Feb 11, 2026

Summary

  • make TTS param parsing resilient to invalid LLM outputs (JSON parse and sanitize fallback to {})
  • harden type normalization to avoid runtime crashes on malformed values
  • keep backward compatibility for legacy numeric range schema encoded as enum: [min, max]

Why

Recent range/enum split improved schema clarity but left edge cases where invalid model output could break the whole voiceover node. This PR ensures field-level degradation instead of pipeline failure.

Validation

  • syntax check: python -m py_compile src/open_storyline/nodes/core_nodes/generate_voiceover.py
  • regression checks for sanitizer + infer/sanitize paths
  • E2E-mock path through process with mocked LLM/provider

Scope

  • code only, no docs included in this PR

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