refactor(transcription): share source-aware provider execution - #409
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 4, 2026, 8:56 PM ET / September 5, 2026, 00:56 UTC. ClawSweeper reviewWhat this changesConsolidates file and in-memory transcription into shared provider execution, local-engine handling, and decode retries, with updated documentation and regression tests. Merge readiness✅ Ready for maintainer review Keep open: this remains useful owner-authored work, and the pinned main and latest supplied release still use separate orchestration paths. No actionable introduced defect or merge blocker was found. Priority: P3 Review scores
Verification
How this fits togetherSummarize's core transcription layer receives downloaded media files or bytes and configured provider credentials. It selects local or cloud transcription engines and returns text, timestamps, progress, and diagnostics to the transcript-first summarization pipeline. flowchart TD
A[Media file or bytes] --> B[Shared transcription run]
B --> C{Speaker labels requested?}
C -->|Yes| D[Diarization providers]
C -->|No| E[Groq then local engines]
E -->|Fallback| F[Ordered cloud providers]
F --> G[Source-specific uploads and retries]
D --> H[Transcript and diagnostics]
E -->|Success| H
G --> H
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Maintain one transcription runner while keeping file-specific upload limits, full-input fallback, provider selection, and progress semantics explicit. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR refactors existing behavior rather than reporting a failing workflow; source comparison and existing regression cases provide the relevant checks. Is this the best way to solve the issue? Yes: centralizing orchestration while retaining source-specific I/O policies removes duplication without replacing the existing provider contracts or configuration. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d7faa6a0f4bc. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
What changed
Replace the parallel file/byte orchestration stacks with one source-aware transcription run. Local engines, cloud provider ordering, decode retries, progress, and accumulated notes now have one owner. File and byte adapters remain only where their I/O and upload policies genuinely differ.
This removes 724 production lines from the orchestration cluster and 669 lines overall, including additional regression coverage. No public API or provider configuration changes.
Preserved boundaries
Keep native-file providers lazy, read full input only when a byte provider requires it, and retain provider-specific upload/chunking policies. A failed chunking result remains terminal. Decode retries replace the source only after a completed retry; a thrown retry preserves the original source. Nested segment calls clear parent duration, progress, and diarization.
Validation