Dispatch leading ID3v2 and APEv2 tags as standalone parsers #2976
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 220 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.323
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #2976"
general
weight: 0.35
bardrop
Register ID3v2 and APEv2 tag parsers alongside the audio parsers. The factory runs the parser for each leading signature against the current tokenizer, then probes the following bytes. Consecutive tags and the audio container contribute to the same metadata result. A complete tag at end of input returns its metadata directly.
Recognize leading tags on streams and random-access inputs, including inputs with MIME or filename hints. Preserve ID3v2.4 plain-integer frame size recovery and consume tag footers before the next probe. Load ID3v2 and FLAC parser implementations on demand.
Probe up to 16 bytes for fixed signatures.
Select the audio parser from the signature for all read entry points. Consult the MIME type and filename extension only when the initial signature is inconclusive, preserving support for MPEG inputs with leading junk.
Use a bounded ISO file-type box probe for writer selection so
Tolerate undeclared zero bytes after a leading ID3v2 tag and resume detection at the next tag or container.
Resolves #2978
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
New Features
Audio format detection now prioritizes file content, then uses MIME type and filename extension when needed.
Added support for audio files with leading ID3v2 or APEv2 tags, including audio following tag padding.
Bug Fixes
Improved format detection for files with leading metadata, extra zero bytes, or incomplete signatures.
Improved handling of artwork format detection and ID3v2 footer tags.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->