Skip to content

Fail closed when timing.json words/segments are not object arrays - #127

Merged
cursor[bot] merged 2 commits into
mainfrom
cursor/timing-inner-lists-2ccd
Sep 7, 2026
Merged

Fail closed when timing.json words/segments are not object arrays#127
cursor[bot] merged 2 commits into
mainfrom
cursor/timing-inner-lists-2ccd

Conversation

@jmjava

@jmjava jmjava commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Problem

PR #126 required each timing.json stem to be a JSON object. Inner words / segments were still untyped.

A stem like {"words": "x"} or {"words": ["hello"]} then:

  1. Compile / scene-spec-generate coerced a non-list to [] (pace: none compiled as if timestamps had never been run).
  2. A list of non-objects kept LLM wait_word indices and later crashed Manim on .get("start").
  3. sync_audio_tail_waits_in_scenes treated a truthy non-list segments string as present and tried to patch scenes.py.

Change

When words or segments is present and not null, load_bundle_timing requires a JSON array of objects. Missing / null / [] stay allowed (empty still means no timings; paced compile already fails).

Tests

Local: ruff check src/ tests/ green; pytest tests/ 734 passed, 1 skipped; docgen benchmark meets src/docgen/benchmark_data/baseline.json (no --update-baseline).

  • Reject string / object / int words and segments
  • Reject words: ["hello"] and segments: [1]
  • Accept missing / null / empty arrays
  • extract_all does not rewrite the file
  • pace: none compile, validate timing_sync, wizard statuses, scene-asset checks, and sync_audio_tail_waits surface TimestampError

Out of scope

Open in Web Open in Cursor 

cursoragent and others added 2 commits September 7, 2026 23:02
PR #126 typed each stem as an object. A present words/segments field that
was a string, object, or list of scalars still coerced to empty words or
kept bad wait_word indices. Require arrays of objects at load time.

Co-authored-by: jmjava <jmjava@gmail.com>
Co-authored-by: jmjava <jmjava@gmail.com>
@jmjava
jmjava marked this pull request as ready for review September 7, 2026 23:03
@cursor
cursor Bot merged commit 17728df 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