Fail closed when ai.provider, timestamps.engine, or tts.language is a list - #105
Merged
Merged
Conversation
… list Those keys were str()'d into provider/engine/language (\"['openai']\"). Require non-empty YAML strings at Config.from_yaml, same as tts.model. Co-authored-by: jmjava <jmjava@gmail.com>
ruff, pytest (628 passed, 1 skipped), and docgen benchmark are green. Co-authored-by: jmjava <jmjava@gmail.com>
jmjava
marked this pull request as ready for review
September 7, 2026 20:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
YAML lists for
ai.provider,ai.base_url,ai.api_key_env,timestamps.engine, andtts.languagewere coerced withstr()into values like"['openai']"/"['local']"/"['en']". Those strings then flowed intonormalize_provider,resolve_engine, and xAI TTSlanguage.This PR requires those present keys to be non-empty YAML strings at
Config.__post_init__viarequire_yaml_string. Missing keys still use defaults.Test plan
ruff check src/ tests/test_from_yaml_list_ai_provider_raises,_ai_base_url_raises,_timestamps_engine_raises,_tts_language_raisespytest tests/— 628 passed, 1 skippeddocgen benchmarkvssrc/docgen/benchmark_data/baseline.json(quality average 100.0)Milestone
milestones/ai-timestamp-strings.md