Fail closed when visual_map type/scene/source or segment_names stem is a list - #108
Merged
Merged
Conversation
…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
marked this pull request as ready for review
September 7, 2026 21:12
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
visual_map.<id>.type/scene/class/sourcewere coerced withstr()into values like"['manim']". Compose and the pipeline then skipped the segment (unknown type / missing class) instead of failing at config load, andyaml-generatetreated that string as a non-manim leftover and preserved the broken row.segment_nameskeys 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__. Emptyvisual_maptype: ""remains allowed (unmapped / yaml-generate fill).mixed.sourcesstays a list.Test plan
ruff check src/ tests/typepytest tests/— 641 passed, 1 skippeddocgen benchmarkvssrc/docgen/benchmark_data/baseline.json(quality average 100.0)Milestone
milestones/visual-map-field-strings.md