clipwright/tests
juancarlos.cavero 18f2cf4dbd feat(selection): put a floor under the clip count
Prod measurement, 3-ago-2026: 408 of 429 jobs (95%) delivered three clips or
fewer, the mode being ONE. Cross-referenced against retention on the cohort
that signed up 3-7 days ago (old enough to have returned, recent enough that
the 7-day purge has not deleted their user_videos rows):

    clips delivered   users   came back a 2nd day
    1-3                 251   0.4%
    4-9                  31   16.1%

Forty times the retention on the far side of a boundary that 95% of jobs never
crossed. That is the mechanism behind the 96.7% of users who only ever use the
product on a single day.

The shortlist was not the constraint — a 5-minute video already shortlists 5
windows. The detail prompt was: it asked to "prefer one great clip per
candidate window", and both the 2-second rule and STANDS ALONE end in "or skip
it" with no lower bound, as does DIVERSITY's "drop the other". Three rules
pushing down and nothing holding the count up collapses to one clip.

clip_count_targets() now derives a floor and a ceiling from the shortlist size
(3 windows -> 3-6, 5 -> 4-10, 10+ -> 6-12) and the prompt states it. Every
quality rule is untouched — they are validated at 82% against random windows
and this change does not spend that.

A/B on 8 real prod transcripts (3.5-18 min, all of which delivered 1-3 clips in
production), sharing the score pass between variants so only the detail prompt
differs:

    OLD  mean 2.75  median 2.5  <=3 clips: 6/8
    NEW  mean 4.00  median 4.0  <=3 clips: 3/8
    better on 7 of 8, worse on none, one tie (sign test p = 0.016)

The ceiling never bound: the most any video produced was 5 against a ceiling of
8-12, so the model is not padding to hit a number — the floor and the removal
of the one-per-window bias are doing the work. That is the outcome to want.

Read the limits honestly. Three of eight still land at three or fewer, and the
sample under-represents the sub-5-minute videos that are 54% of real jobs and
the hardest case here: both short videos in the set shortlisted only 2 windows
out of the 3-4 that existed, because the SCORE pass returned fewer usable
windows than it was given. That is the next thing to look at, and it caps this
change on exactly the videos that matter most.

CLIP_TARGET_MIN / CLIP_TARGET_MAX override both bounds for further A/B runs
without a deploy.
2026-08-03 11:17:33 +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_camera_inset.py feat(reframe): layout for a screen with the camera composited into a corner 2026-07-31 13:28:45 +02:00
test_clip_selection.py feat(selection): put a floor under the clip count 2026-08-03 11:17:33 +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(layout): shadow mode, decide and log without touching the render 2026-08-01 01:58:19 +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_panel_layout.py fix(panel): a 2x2 grid for three people, not three bands 2026-07-31 14:24:46 +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