Skip to content

Fail closed when scene-spec bools become wait_word 1 - #147

Merged
cursor[bot] merged 2 commits into
mainfrom
cursor/scene-spec-bool-numerics-2ccd
Sep 8, 2026
Merged

Fail closed when scene-spec bools become wait_word 1#147
cursor[bot] merged 2 commits into
mainfrom
cursor/scene-spec-bool-numerics-2ccd

Conversation

@jmjava

@jmjava jmjava commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Problem

Config generation tunables already reject YAML bools (#117 / #120). Scene-spec validation still used isinstance(v, (int, float)) and isinstance(ww, int).

bool is a subclass of int, so wait_word: true became index 1, run_time / width: true became 1, title.font_size: true compiled as font size 1, and page_transition_run_time: true passed the (0, 5] range as 1.0.

scene-compile / load_scene_spec both go through validate_scene_spec.

Change

  • _is_yaml_number / _is_yaml_int exclude bool
  • wait_word / wait_segment / run_time / box sizes / image sizes / layout run times / title font_size
  • Explicit wait_word: 0 still validates

Gate

  • ruff check src/ tests/ green
  • pytest tests/ — 818 passed, 1 skipped
  • docgen benchmark meets src/docgen/benchmark_data/baseline.json (no clock change; no --update-baseline)

Out of scope

Milestone: milestones/scene-spec-bool-numerics.md

Open in Web Open in Cursor 

cursoragent and others added 2 commits September 8, 2026 01:06
validate_scene_spec used isinstance(int/float), so wait_word: true became
index 1, run_time/width true became 1, and title.font_size true compiled
as font size 1. Reject YAML bools; wait_word: 0 still validates.

Co-authored-by: jmjava <jmjava@gmail.com>
ruff green; pytest 818 passed, 1 skipped; docgen benchmark meets baseline.

Co-authored-by: jmjava <jmjava@gmail.com>
@jmjava
jmjava marked this pull request as ready for review September 8, 2026 01:09
@cursor
cursor Bot merged commit 3a9192b into main Sep 8, 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