feat(parse): support AC-3 audio resources and add multimodal integration tests#3229
Merged
Conversation
MaojiaSheng
approved these changes
Jul 14, 2026
qin-ctx
approved these changes
Jul 14, 2026
There was a problem hiding this comment.
Pull request overview
This PR adds AC-3 support to the media ingestion pipeline (extension lists, MIME mapping, and magic-byte detection) and introduces an opt-in black-box multimodal integration test matrix that validates ingestion against a live OpenViking service.
Changes:
- Extend audio format handling to include
.ac3across URL detection, MIME-to-extension mapping, and AudioParser magic-byte checks. - Add AC-3-focused URL/GET-fallback tests to ensure
.ac3filenames are preserved even whenHEADfails andcontent-typeis generic. - Add an opt-in (env-gated) 31-case multimodal live ingestion matrix, plus local helper/unit tests for client setup and response validation.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/parse/test_url_filename_preservation.py | Adds coverage ensuring AC-3 URL detection and download preserve .ac3 and route to audio. |
| tests/parse/test_multimodal_file_matrix_integration.py | New opt-in live multimodal ingestion matrix + client config helper tests. |
| openviking/parse/parsers/media/constants.py | Adds .ac3 to supported audio extensions list. |
| openviking/parse/parsers/media/audio.py | Updates supported-format documentation and adds AC-3 magic bytes. |
| openviking/parse/accessors/mime_types.py | Adds audio/ac3 → .ac3 mapping for extension inference. |
| openviking/parse/accessors/http_accessor.py | Adds AC-3 magic-byte detection for URL type/extension inference. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
269
to
272
| "audio/flac": [".flac"], | ||
| "audio/aac": [".aac"], | ||
| "audio/ac3": [".ac3"], | ||
| "audio/x-wav": [".wav"], |
Comment on lines
+328
to
+331
| monkeypatch.setenv("OPENVIKING_CLI_CONFIG_FILE", str(config_path)) | ||
| monkeypatch.delenv("OPENVIKING_URL", raising=False) | ||
| monkeypatch.delenv("OPENVIKING_BASE_URL", raising=False) | ||
| monkeypatch.delenv("OPENVIKING_API_KEY", raising=False) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add AC-3 audio resource support and introduce a black-box multimodal compatibility test matrix against a deployed OpenViking
service.
The integration tests submit remote file URLs directly through
AsyncHTTPClientwithout mocking parsers, storage, or mediavalidation.
Human Involvement
Related Issue
N/A
Type of Change
Changes Made
.ac3extension and route to the audio parser.deployed OpenViking service.
localhost fallback when no URL is configured.
Testing
Commands executed:
Result:
49 passed, 31 skipped
The complete live matrix was also validated against a deployed OpenViking service with valid credentials:
38 passed
Style validation:
uv run --active --no-sync ruff check \ tests/parse/test_multimodal_file_matrix_integration.pyResult:
All checks passed!
Checklist
Screenshots (if applicable)
N/A
Additional Notes
Live integration cases are opt-in through OPENVIKING_RUN_MULTIMODAL_INTEGRATION=1.
The tests use add_resource(wait=False) to validate file-format acceptance and resource creation without waiting for
downstream semantic extraction or embedding queues.
A later live rerun was blocked by an invalid API key in the active local CLI configuration; this occurred before resource
ingestion and is unrelated to format handling.
No external dependency changes are required.