Skip to content

Fail closed when ai.provider, timestamps.engine, or tts.language is a list - #105

Merged
cursor[bot] merged 2 commits into
mainfrom
cursor/ai-timestamp-strings-2ccd
Sep 7, 2026
Merged

cursor[bot] merged 2 commits into
mainfrom
cursor/ai-timestamp-strings-2ccd

Conversation

@jmjava

@jmjava jmjava commented Sep 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

YAML lists for ai.provider, ai.base_url, ai.api_key_env, timestamps.engine, and tts.language were coerced with str() into values like "['openai']" / "['local']" / "['en']". Those strings then flowed into normalize_provider, resolve_engine, and xAI TTS language.

This PR requires those present keys to be non-empty YAML strings at Config.__post_init__ via require_yaml_string. Missing keys still use defaults.

Test plan

  • ruff check src/ tests/
  • Targeted pytest: test_from_yaml_list_ai_provider_raises, _ai_base_url_raises, _timestamps_engine_raises, _tts_language_raises
  • Full pytest tests/ — 628 passed, 1 skipped
  • docgen benchmark vs src/docgen/benchmark_data/baseline.json (quality average 100.0)

Milestone

milestones/ai-timestamp-strings.md

Open in Web Open in Cursor 

cursoragent and others added 2 commits September 7, 2026 20:48
… 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
jmjava marked this pull request as ready for review September 7, 2026 20:50
@cursor
cursor Bot merged commit 8a84289 into main Sep 7, 2026
6 checks passed
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.

2 participants