Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ def handler(request: httpx.Request) -> httpx.Response:
"backend": "groq",
}
assert result["audio_path"] == str(fake_mp3)
assert result["source"] == "https://www.youtube.com/watch?v=example"
# P0-2: source URL is sanitized via redact_url — query string stripped
# to avoid leaking signed-URL credentials (access_token, X-Amz-Signature, …).
assert result["source"] == "https://www.youtube.com/watch"


def test_local_audio_happy_path_skips_yt_dlp(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ def fake_transcribe(audio_path: str, *, path_or_hf_repo: str) -> dict[str, objec
"backend": "mlx-whisper",
}
assert result["audio_path"] == str(fake_mp3)
assert result["source"] == "https://www.youtube.com/watch?v=example"
# P0-2: source URL is sanitized via redact_url — query string stripped
# to avoid leaking signed-URL credentials (access_token, X-Amz-Signature, …).
assert result["source"] == "https://www.youtube.com/watch"
assert captured["audio_path"] == str(fake_mp3)
assert captured["model"] == "mlx-community/whisper-large-v3-turbo"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ def handler(request: httpx.Request) -> httpx.Response:
"backend": "openai",
}
assert result["audio_path"] == str(fake_mp3)
assert result["source"] == "https://www.youtube.com/watch?v=example"
# P0-2: source URL is sanitized via redact_url — query string stripped
# to avoid leaking signed-URL credentials (access_token, X-Amz-Signature, …).
assert result["source"] == "https://www.youtube.com/watch"


def test_local_audio_happy_path_skips_yt_dlp(
Expand Down
Loading