Skip to content

fix(wtf_transcribe): resolve audio extensions without the OS MIME table - #211

Merged
howethomas merged 1 commit into
mainfrom
thomashowe/con-1115-ext-table
Sep 26, 2026
Merged

howethomas merged 1 commit into
mainfrom
thomashowe/con-1115-ext-table

Conversation

@howethomas

Copy link
Copy Markdown
Contributor

Fixes the main CI failure introduced by #210: test_dialog_mediatype_resolution_order fails in the CI container.

dialog_mediatype() fell back to mimetypes.guess_type() for the filename extension. That lookup depends on the host's MIME table: macOS resolves clip.ogg to audio/ogg, but the slim Linux image CI runs in has no /etc/mime.types, so it returned None and the dialog fell through to audio/wav. The test passed locally and failed in CI.

Change

  • A small built-in table of common audio and video extensions (.wav, .mp3, .ogg, .oga, .opus, .m4a, .aac, .flac, .webm, .mp4), matched case-insensitively before the OS lookup. The result no longer depends on the host.
  • New test test_dialog_mediatype_extension_table_without_os_mime_table stubs mimetypes.guess_type to return nothing, reproducing the CI container, and checks .ogg, .MP3, .opus and a non-media .txt.

Tests

  • conserver/links/wtf_transcribe/: 16 passed.
  • Non-Docker suite: 705 passed, 20 skipped.

Refs CON-1115

🤖 Generated with Claude Code

…IME table

mimetypes.guess_type() depends on the host's MIME table. Slim Linux images
ship without /etc/mime.types, so "clip.ogg" resolved to None in CI's
container and the dialog fell back to audio/wav, failing
test_dialog_mediatype_resolution_order on main. Check a small table of
common audio and video extensions first, then the OS table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@howethomas
howethomas merged commit b603b15 into main Sep 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant