Skip to content

release: v0.10.1 — graceful per-frame zoom skip - #11

Merged
JRemitz merged 1 commit into
mainfrom
release/v0.10.1
Jun 8, 2026
Merged

release: v0.10.1 — graceful per-frame zoom skip#11
JRemitz merged 1 commit into
mainfrom
release/v0.10.1

Conversation

@JRemitz

@JRemitz JRemitz commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

A single OpenAI vision-call timeout on one frame previously aborted the entire smart-zoom analysis and failed the render. User reported this twice in a row (frame_0005.png timed out 3 retries in 30s each), losing both attempts at a render.

With the Catmull-Rom smoothing added in reeln-cli#30 (v0.0.40), the renderer interpolates across a missing keyframe with no visible discontinuity. Dropping one of eighteen frames is now a no-op.

Changes

  • _analyze_frames_for_zoom catches OpenAIError per frame, logs the skip, and continues with the remaining frames.
  • New config fields:
    • min_zoom_points_success_ratio (default 0.5) — minimum fraction of frames that must succeed.
    • min_zoom_points (default 2) — absolute minimum number of successful keypoints.
  • Failure (with the existing error signal in context.shared["smart_zoom"]) is only raised when both thresholds aren't met.
  • Strict pre-0.10.1 behaviour can be restored by setting min_zoom_points_success_ratio: 1.0.

Why these defaults

The renderer's spline needs at least 2 points to interpolate. 50% is a sensible floor — below that the path no longer reliably tracks the action. For typical zoom_frames=18 usage, that means up to 9 frames could fail and the render still completes; in practice timeouts hit ~1 frame, so the user gains a huge resilience improvement at zero correctness cost.

Test plan

  • uv run pytest -q293 tests pass (4 new)
    • test_one_frame_failure_continues_analysis — exact regression: 18 frames, one fails → 17 keypoints in path, no error
    • test_failure_below_ratio_threshold_raises — 1/4 success → error
    • test_ratio_threshold_configurableratio=1.0 restores strict mode
    • test_all_frames_failing_signals_error — full failure still surfaces
  • Manual: re-attempt the failing render — should now complete with one logged "skipping" warning instead of erroring out

🤖 Generated with Claude Code

When a single OpenAI vision call times out (e.g. frame_0005.png hits
the 30s ceiling three retries in a row), the previous behaviour was
to abort the entire smart-zoom analysis and fail the render. With
the Catmull-Rom smoothing added in reeln-cli 0.0.40, the renderer
interpolates across a missing keyframe with no visible discontinuity,
so dropping one frame out of eighteen costs almost nothing.

This release switches _analyze_frames_for_zoom to:
- Catch OpenAIError per frame, log the skip, continue
- Track success count + ratio
- Raise only when success rate < min_zoom_points_success_ratio (0.5)
  OR fewer than min_zoom_points (2) frames succeeded total

Both thresholds are configurable so users who want the strict
pre-0.10.1 behaviour can set ratio=1.0.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@JRemitz
JRemitz merged commit ba4aa95 into main Jun 8, 2026
5 checks passed
@JRemitz
JRemitz deleted the release/v0.10.1 branch June 8, 2026 04:24
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