Skip to content

Fail closed when visual_map type/scene/source or segment_names stem is a list - #108

Merged
cursor[bot] merged 2 commits into
mainfrom
cursor/visual-map-field-strings-2ccd
Sep 7, 2026
Merged

cursor[bot] merged 2 commits into
mainfrom
cursor/visual-map-field-strings-2ccd

Conversation

@jmjava

@jmjava jmjava commented Sep 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

YAML lists for visual_map.<id>.type / scene / class / source were coerced with str() into values like "['manim']". Compose and the pipeline then skipped the segment (unknown type / missing class) instead of failing at config load, and yaml-generate treated that string as a non-manim leftover and preserved the broken row.

segment_names keys were already strings; a list value became "['01-intro']" and asset lookup used a bogus stem.

This PR requires those present fields to be YAML strings at Config.__post_init__. Empty visual_map type: "" remains allowed (unmapped / yaml-generate fill). mixed.sources stays a list.

Test plan

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

Milestone

milestones/visual-map-field-strings.md

Open in Web Open in Cursor 

cursoragent and others added 2 commits September 7, 2026 21:11
…s a list

YAML lists were str()'d into unknown visual types (compose skipped the
segment; yaml-generate preserved the broken row) or bogus asset stems.
Require those present fields to be YAML strings at config load. Empty
visual_map type remains allowed.

Co-authored-by: jmjava <jmjava@gmail.com>
Rename the visual_map field loop variable so it does not shadow
dataclasses.field. ruff, pytest (641 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:12
@cursor
cursor Bot merged commit ee7b12f 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