Skip to content

Fail closed when av_sync cannot load a scene spec - #98

Merged
cursor[bot] merged 2 commits into
mainfrom
cursor/av-sync-scene-spec-2ccd
Sep 7, 2026
Merged

cursor[bot] merged 2 commits into
mainfrom
cursor/av-sync-scene-spec-2ccd

Conversation

@jmjava

@jmjava jmjava commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Problem

AVSyncValidator._anchors_from_scene_specs swallowed load_scene_spec errors with continue. A corrupt *.scene.yaml then looked like “no spec anchors”, so _get_anchors fell back to transcript nouns. OCR could still pass on unrelated long words while the board YAML was unreadable.

story_end already fails when a spec cannot load. A crash inside validate_segment_with_timing also escaped _check_av_sync as a traceback.

Change

  • Unreadable scene specs raise ValueError instead of being skipped.
  • _check_av_sync maps validator exceptions to passed=False (soft on --pre-push, same as layout).

Milestone: milestones/av-sync-scene-spec.md. Also marks layout-check-errors as shipped (#97).

Out of scope

  • av_sync stays soft on validate --pre-push.
  • Tesseract missing still skips.
  • Nested validation.av_sync.anchor_keywords type gating is separate.

Gates

  • ruff check src/ tests/
  • pytest tests/
  • docgen benchmark (no clock change; no --update-baseline)
Open in Web Open in Cursor 

Corrupt or invalid *.scene.yaml was skipped, so av_sync fell back to
transcript nouns and could still pass. Raise on load failure and map
validator exceptions to a failed check (soft on --pre-push).

Co-authored-by: jmjava <jmjava@gmail.com>
@jmjava
jmjava marked this pull request as ready for review September 7, 2026 20:22
Local ruff, pytest, and docgen benchmark are green on this branch.

Co-authored-by: jmjava <jmjava@gmail.com>
@cursor
cursor Bot merged commit 72c62ca 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