Skip to content

Fail closed when timing.json is corrupt at compile and validate - #89

Merged
cursor[bot] merged 1 commit into
mainfrom
cursor/timing-json-parse-2ccd
Sep 7, 2026
Merged

Fail closed when timing.json is corrupt at compile and validate#89
cursor[bot] merged 1 commit into
mainfrom
cursor/timing-json-parse-2ccd

Conversation

@jmjava

@jmjava jmjava commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Problem

Wizard timestamps already refuse to overwrite a corrupt timing.json. Scene-compile and validate still swallowed decode errors and treated the file as missing words. Paced compile then said “run timestamps”; pace: none specs compiled as if there were no timing file.

Change

load_bundle_timing is the single loader:

  • missing file → {}
  • garbage JSON or a non-object root → TimestampError / SceneGenerationError

Used by scene-compile, validate (timing_sync / story_end / av_sync), scene_asset_validate, and wizard timestamps.

Milestone: milestones/timing-json-parse.md

Out of scope

Testing

Local:

  • ruff check src/ tests/ — clean
  • pytest tests/566 passed, 1 skipped
  • docgen benchmark — meets src/docgen/benchmark_data/baseline.json (no clock change)

CI on this branch is the merge gate.

Open in Web Open in Cursor 

Load the bundle timing file in one place: missing is empty, garbage JSON
or a non-object root is an error. Scene-compile, validate, and wizard
timestamps no longer treat a broken file as empty words.

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