perf: Reduce unnecessary reads and buffering when parsing Ogg/Opus and FLAC files. #2938
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 · 229 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.325
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #2938"
general
weight: 0.35
bardrop
Reduce unnecessary reads and buffering when parsing Ogg/Opus and FLAC files.
File and stream parsing remain asynchronous, with parser guards, warning registration, and truncation checks preserved.
This branch is based directly on master and is independent of the base64 and MP3 performance branches. It includes the shared parser-selection changes.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Performance
FLAC metadata reads are more efficient while respecting memory limits and preserving audio data.
Ogg Opus duration can be calculated more efficiently for supported files without reading the entire audio payload.
Bug Fixes
Improved duration and bitrate estimates for Ogg Opus files, including files with continued packets.
Improved handling of Ogg page boundaries and truncated input when reading audio metadata.
* Ogg files no longer undergo an unnecessary scan for appended headers.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->