Skip to content

Refuse a non-positive OCR sample interval - #209

Merged
jmjava merged 1 commit into
mainfrom
cursor/refuse-zero-ocr-interval
Nov 1, 2026
Merged

jmjava merged 1 commit into
mainfrom
cursor/refuse-zero-ocr-interval

Conversation

@jmjava

@jmjava jmjava commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • validation.ocr.sample_interval_sec: 0 is a legal YAML number, and the scanner then adds that step forever.
  • A non-positive or non-finite interval is refused before any frame is read. The proving test fails if that check is removed, and it uses a zero-length clip so a missing check fails the assertion instead of hanging.

Test plan

  • tests/test_ocr.py with PYTHONPATH pointed at the worktree
  • CI lint, unit, benchmark, validate, mutation, and GitGuardian

Made with Cursor

A zero or negative sample_interval_sec is a valid YAML number and makes the frame loop run forever. The scan now fails before that loop.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jmjava
jmjava merged commit cc7deee into main Nov 1, 2026
8 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.

1 participant