transcripts(routes): harden serve_file — range support, drop __ encoding, loud logs
Three scoped changes to apps/transcripts/routes.py:
- (B) send_file now passes conditional=True so HTTP Range: requests work;
audio/video seeking stops re-downloading from byte 0.
- (C) Remove the __↔/ path-encoding scheme. Flask's <path:> converter
already accepts '/'. Both the encoder (two sites in segment_content)
and decoder (serve_file) are removed in the same commit — no
backwards-compat acceptance of the __ form. workspace.html needs no
change: URLs are built server-side.
- (G) Stop silently swallowing exceptions. serve_file's try/except is
narrowed to (OSError, ValueError) around path validation only;
send_file now runs outside the try so werkzeug's own 404/permission
errors surface naturally. The two inner except blocks in
segment_content (audio parse, screen parse) now log with
exc_info=True for full tracebacks.
Adds apps/transcripts/tests/test_serve_file.py pinning the path-traversal
403 and malformed-day 404 behavior via the Flask test client.
The parallel __ encoding and broad except Exception in apps/speakers/
routes.py:1230 have the same issues but are intentionally deferred per
scope.