clipwright/tests
juancarlos.cavero 094e13c2f9 feat(reframe): optional layouts, and a Gemini-picked layout per video
Four new layouts, all off by default, plus a picker that decides which one a
video gets.

- SPLIT (split_layout.py): two speakers stacked. The test is COEXISTENCE in the
  same frame, not presence measured separately: BlazeFace loses faces in
  profile, which is how someone sits while listening, so a presence test
  rejects conversations for looking like conversations. Coexistence also
  separates a two-shot from a shot/reverse-shot, where stacking would show the
  same person twice.
- SCREENCAST / WIDE (screencast_layout.py): content over the presenter, or full
  width when the content fills the frame and the presenter is composited on top
  of it (stacking there shows the same thing twice).
- ALTERNATE (active_speaker.py): hard cuts to whoever is talking. Mouth activity
  must be normalised per speaker against their own resting state; raw magnitude
  scales with contrast and lighting and handed one person 90-100% of the scene.
- Punch-in (punch_in.py): a 12% push on the beats, riding the TRACK path by
  widening its per-frame crop command from x-only to w/h/x/y.

layout_picker.py chooses between none/screencast/split with one Gemini call per
source video. Measured over the 48-clip corpus against hand-checked labels:
94/92/96% across three runs, 0-1 false positives out of 28, and 2 clips of 48
changing answer between runs. The key is asking for a DECISION between closed
options rather than a measurement: the four previous attempts (Canny, MSER,
coverage, width) all asked for a number and none separated a spreadsheet from a
corner scoreboard.

app.py exposes all of it per job through `layouts` on /api/process. Without that
field the pipeline behaves exactly as before.

83 new tests, 315 green.
2026-07-31 13:28:45 +02:00
..
conftest.py feat: karaoke subtitles, deterministic Auto-Edit v2, emoji hooks, retries (PR #50 block 1) 2026-07-17 21:26:04 +02:00
test_active_speaker.py feat(reframe): optional layouts, and a Gemini-picked layout per video 2026-07-31 13:28:45 +02:00
test_alert_classify.py fix(gemini): distinguir bloqueo de contenido de fallo transitorio 2026-07-24 00:37:14 +02:00
test_billing_states.py fix(billing): stop stranding customers whose payment failed 2026-07-25 15:14:15 +02:00
test_clip_selection.py feat: 2-pass Gemini clip pipeline (score windows -> detail shortlist) 2026-07-17 22:32:04 +02:00
test_edit_builder.py feat: karaoke subtitles, deterministic Auto-Edit v2, emoji hooks, retries (PR #50 block 1) 2026-07-17 21:26:04 +02:00
test_email_policy.py feat(abuse): abrir free a email normal + bloquear dominios desechables 2026-07-21 00:45:54 +02:00
test_ffmpeg_utils.py feat(clips): borrar la metadata heredada del source en los clips finales 2026-07-23 01:34:59 +02:00
test_filename_limits.py fix(files): bound filenames by bytes, not characters 2026-07-26 20:59:04 +02:00
test_gemini_retry.py fix(gemini): distinguir bloqueo de contenido de fallo transitorio 2026-07-24 00:37:14 +02:00
test_hooks.py feat: karaoke subtitles, deterministic Auto-Edit v2, emoji hooks, retries (PR #50 block 1) 2026-07-17 21:26:04 +02:00
test_job_error_text.py test(ci): saltar los tests que importan main/app en el CI mínimo 2026-07-23 11:40:05 +02:00
test_layout_picker.py feat(reframe): optional layouts, and a Gemini-picked layout per video 2026-07-31 13:28:45 +02:00
test_log_view.py feat(cloud): user-friendly job logs + transcription progress; hide auto profile id in header 2026-07-18 02:20:31 +02:00
test_metering_free_plan.py feat(abuse): abrir free a email normal + bloquear dominios desechables 2026-07-21 00:45:54 +02:00
test_punch_in.py feat(reframe): optional layouts, and a Gemini-picked layout per video 2026-07-31 13:28:45 +02:00
test_reframe_v2.py feat(clips): four quality fixes found by auditing real user output 2026-07-26 20:59:04 +02:00
test_screencast_layout.py feat(reframe): optional layouts, and a Gemini-picked layout per video 2026-07-31 13:28:45 +02:00
test_speaker_tracker.py fix(reframe): ignore lone target jumps so the camera stops swinging 2026-07-26 20:59:04 +02:00
test_split_layout.py feat(reframe): optional layouts, and a Gemini-picked layout per video 2026-07-31 13:28:45 +02:00
test_subtitle_metering.py fix(subtitles): stop charging quota for burning captions 2026-07-25 17:16:59 +02:00
test_subtitles.py fix(captions): keep apostrophes out of the burned subtitle path 2026-07-29 15:04:50 +02:00
test_transcribe_backends.py fix(transcribe): manejar vídeos sin audio + alerta de fallos honesta 2026-07-21 21:13:59 +02:00
test_translate.py feat: karaoke subtitles, deterministic Auto-Edit v2, emoji hooks, retries (PR #50 block 1) 2026-07-17 21:26:04 +02:00