Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 1.15 KB

timing-json-parse.md

File metadata and controls

32 lines (23 loc) · 1.15 KB

Milestone: corrupt timing.json must not look like empty words

Status: Shipped
PR: #89
Depends on: milestones/wizard-narration-paths.md (PR #81)

Problem

Wizard timestamps already refuse to overwrite a corrupt timing.json. Compile and validate still swallowed JSONDecodeError and treated the file as missing words. Paced compile then failed with a “run timestamps” message; pace: none specs compiled as if there were no timing file.

Goal

One loader: missing file → {}; garbage JSON or a non-object root → error.

Done when

  • load_bundle_timing in timestamps.py
  • scene-compile / linted_class_block_from_spec raise SceneGenerationError
  • validate timing_sync / story_end / av_sync fail with the parse error
  • scene_asset_validate and wizard timestamps reuse the loader
  • Tests: corrupt JSON and list-root, including pace: none
  • ruff check src/ tests/
  • pytest tests/
  • docgen benchmark (no clock change)

Out of scope

  • Empty segments.all still leaves timing.json unchanged (#78)
  • Missing timing.json still means empty words (paced compile already fails)