clipwright/tests
juancarlos.cavero 87adf88daa fix(source): stop serving the untouched original without a credential
GET /api/source streams the file we downloaded, not a derived clip, and it was
open on the reasoning that the UUID job id is the capability. That makes the
product a public YouTube downloader wearing a UUID, which is the characterisation
worth avoiding, and one leaked id in a log or a referer opens someone else's
video.

A <video src> cannot carry an Authorization header, which is why it was open in
the first place, so the owner mints a short-lived signed URL from
/api/source-url and hands the player that. The endpoint takes the signature or
falls back to the owner check. Self-host and ownerless BYOK jobs are untouched:
no owner to check, no secret to sign with. The owner lookup is gated on
BILLING_ENABLED because it falls through to a full rescan of the output
directory, which off billing would run on every preview and buy nothing.

Both minters go through _signed_source_url. The EDL feeds ClipEditor's source
monitor the same way and was built as a bare path, which works in self-host and
in every test and 404s in cloud. The regression test asserts the endpoint calls
the minter rather than comparing strings: off billing the helper returns that
same bare path, so a string comparison passes just as happily with the bug in.
Verified by putting the bug back and watching it fail.

The frontend mints at render, not when the session is persisted, or localStorage
would hold a token that expired overnight.

SOURCE_RETENTION_SECONDS can age the retained download out ahead of the clips it
produced, and defaults to the job clock, so nothing changes until someone sets
it. Lowering it is not free: the EDL, rerender, scenes and reframe endpoints all
read that file and answer 409 once it is gone.

Claude-Session: https://claude.ai/code/session_01WyFE2wXi8quZR6nLRRLDgE
2026-08-29 17:19:39 +02:00
..
conftest.py feat(agents): the pipeline as a platform — API keys, MCP server, webhooks 2026-08-03 22:33:16 +02:00
test_account_erasure.py test(ci): skip the Stripe cancel test when the stripe package is absent 2026-08-24 20:47:23 +02:00
test_account_local_purge.py fix(cloud): close the gaps the account-deletion review turned up 2026-08-24 19:26:12 +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_agent_uploads.py feat(mcp): burn the hook line by default, auto_hook=false opts out 2026-08-27 20:26:57 +02:00
test_alert_classify.py fix: reject too-short sources at submit and stop alerts blaming recovered downloads 2026-08-20 22:54:51 +02:00
test_api_keys.py feat(agents): the pipeline as a platform — API keys, MCP server, webhooks 2026-08-03 22:33:16 +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_ready_marker.py fix(dashboard): show each clip with its hook and captions as soon as it is done 2026-08-24 00:37:24 +02:00
test_clip_selection.py fix(selection): trim the detail pass by score, not by position 2026-08-29 01:42:45 +02:00
test_deploy_drain.py fix(deploy): keep serving until the proxy drops us, then exit for real 2026-08-25 15:11:55 +02:00
test_download_plan.py fix(download): direct file URLs bypass the proxy chain 2026-08-27 18:57:37 +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 fix(auth): harden MX verification after code review 2026-08-13 10:07:20 +02:00
test_ffmpeg_utils.py feat(ai-act): mark dubbed and ai-actor output as machine-readable ai content 2026-08-29 17:19:24 +02:00
test_filename_limits.py fix(clips): precompose accented titles so the file name survives a fetch() 2026-08-24 00:15:08 +02:00
test_gemini_block_split.py test(selection): fix the expected bisect trace 2026-08-27 19:15:36 +02:00
test_gemini_retry.py fix(gemini): distinguir bloqueo de contenido de fallo transitorio 2026-07-24 00:37:14 +02:00
test_generation_controls.py feat(generate): manual clip count and duration controls (discussion #65) 2026-08-18 19:21:42 +02:00
test_hook_layers.py test(hook): styles contract, bitmap-emoji scaling, layer walk-back 2026-08-19 16:22:38 +02:00
test_hooks.py test(hook): styles contract, bitmap-emoji scaling, layer walk-back 2026-08-19 16:22:38 +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_layout_ranges.py feat(layouts): dashboard layout selector, layouts=none, ranges survive a fast recut 2026-08-25 15:45: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_mcp_endpoint.py feat(mcp): OAuth 2.1 for claude.ai/ChatGPT, and a "connect an agent" panel 2026-08-27 01:17:49 +02:00
test_mcp_oauth.py feat(mcp): OAuth 2.1 for claude.ai/ChatGPT, and a "connect an agent" panel 2026-08-27 01:17:49 +02:00
test_mcp_protocol.py feat(mcp): list_clips renders as an MCP App clip picker in UI-capable clients 2026-08-05 23:59:02 +02:00
test_mcp_ui.py feat(mcp): list_clips renders as an MCP App clip picker in UI-capable clients 2026-08-05 23:59:02 +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_probe_plan.py fix(metering): size direct video URLs with ffprobe when yt-dlp reports no duration 2026-08-27 17:10:13 +02:00
test_process_handover.py feat: hand the Thumbnail Studio video and transcript straight to the clip generator 2026-08-20 19:48:13 +02:00
test_proxy_watch.py test(alerts): bring the proxy watcher tests onto the two-strike rule 2026-08-29 01:51:32 +02:00
test_proxy_watch_alerts.py fix(alerts): proxy watcher says what is affected, and needs two misses 2026-08-28 01:21:06 +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_recut.py fix(recut): virtual_transcript must keep Whisper's word-boundary spaces 2026-08-19 12:22:39 +02:00
test_reframe_endpoint.py fix(reframe): harden PR #70's manual reframing after review 2026-08-19 12:09:02 +02:00
test_reframe_v2.py fix(reframe): a source already shot vertical is passed through untouched 2026-08-29 00:06:15 +02:00
test_rerender_endpoint.py test(edl): pin the full-transcript contract with words outside the old window 2026-08-20 13:36:13 +02:00
test_scene_cut_reset.py fix(reframe): cut instead of pan when the source changes shot 2026-08-24 20:41:29 +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_short_source_gate.py fix: reject too-short sources at submit and stop alerts blaming recovered downloads 2026-08-20 22:54:51 +02:00
test_social_tenant_isolation.py harden(social): fail closed when the server cannot resolve the caller's profile 2026-08-21 21:19:44 +02:00
test_source_access.py fix(source): stop serving the untouched original without a credential 2026-08-29 17:19:39 +02:00
test_sparse_speech.py fix(pipeline): clip wordless footage by vision instead of failing on an empty transcript 2026-08-25 01:12:50 +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_thumbnail_studio.py feat(thumbnail): concept-driven thumbnails, crisp burned text, face frames from the video, scored titles 2026-08-27 10:57:34 +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_transcript_checkpoint.py feat(pipeline): keep the transcript across a redeploy so a resumed job does not transcribe twice 2026-08-24 22:05:40 +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