Skip to content

Fail closed when per-segment generation prompts are a list - #110

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

cursor[bot] merged 2 commits into
mainfrom
cursor/generation-segment-strings-2ccd

Conversation

@jmjava

@jmjava jmjava commented Sep 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

YAML lists for per-segment narration_from_source.segments.<id>.system_prompt / topic and manim_scene_generation.segments.<id>.class_name / system_prompt / scene_spec_system_prompt were coerced with str() into bracketed strings used as the chat system prompt, topic line, or Manim class name.

This PR requires those present keys to be YAML strings while walking the existing segment maps. Empty system_prompt remains allowed. class_name must be non-empty when set.

Test plan

  • ruff check src/ tests/
  • Targeted pytest for list-value ConfigError cases and empty prompt
  • Full pytest tests/ — 649 passed, 1 skipped
  • docgen benchmark vs src/docgen/benchmark_data/baseline.json (quality average 100.0)

Milestone

milestones/generation-segment-strings.md

Open in Web Open in Cursor 

cursoragent and others added 2 commits September 7, 2026 21:19
YAML lists for narration_from_source.segments.*.system_prompt/topic and
manim_scene_generation.segments.*.class_name/scene_spec_system_prompt
were str()'d into bracketed strings sent to the chat API or used as a
Manim class name. Require those present keys to be YAML strings.

Co-authored-by: jmjava <jmjava@gmail.com>
ruff, pytest (649 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 21:19
@cursor
cursor Bot merged commit a2efb93 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