Repository navigation
fix(tts): release telephony provider resources after synthesis - #143065
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 9, 2026, 12:24 PM ET / 16:24 UTC (Revision 3). ClawSweeper reviewWhat this changesKeeps speech-provider resources alive through telephony configuration, synthesis, and audio-result processing, then releases them while preserving provider selection. Merge readiness✅ Ready for maintainer review This remains a useful, focused fix: current main still lacks finite telephony resource ownership, and the aggregate PR explicitly delegates this work here. No blocking introduced defect was found. Likely related people: steipete, a medium-confidence routing candidate from prior area work. Priority: P2 Review scores
Verification
How this fits togetherTelephony text-to-speech receives text, configuration, and voice preferences through OpenClaw’s plugin runtime. It selects speech providers and returns PCM audio and metadata to calling integrations. flowchart TD
A[Text and voice preferences] --> B[Telephony request]
B --> C[Acquire provider resources]
C --> D[Select provider and fallback order]
D --> E[Prepare and synthesize speech]
E --> F[Read PCM and result metadata]
F --> G[Release owned resources]
G --> H[Return audio or structured failure]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +283, Tests +429, Docs +8. Total +720 across 8 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Use one finite telephony lifetime that retains selected providers through completed audio processing while preserving caller-owned synchronous and streaming lifetimes. Do we have a high-confidence way to reproduce the issue? Yes, source inspection establishes a focused path: a telephony provider holding native resources can be loaded without finite cleanup or lose its managed parent during synthesis. The new tests exercise those boundaries; this review did not execute them. Is this the best way to solve the issue? Yes, extending the existing acquisition owner and canonical lookup policy addresses the resource lifetime without creating a competing provider-selection policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a57c799c86df. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
e6559c9 to
c277f12
Compare
|
Merged via squash.
|
Related: #140674
What Problem This Solves
Fixes an issue where telephony speech requests could leave newly loaded plugin resources open, or lose managed provider resources while configuration, preparation, or synthesis was still running.
Why This Change Was Made
Own speech registrations for the complete finite telephony request, reusing the existing capability acquisition machinery. Share the canonical singular lookup policy while keeping configured catalogs separate from direct preference and override lookups; direct-only providers must not become automatic fallbacks.
Each attempt prepares its applicable configuration view. If runtime configuration refreshes while a primary provider is pending, fallback resolves the updated provider configuration while preserving the initial fallback order. Existing raw hosts, synchronous public SDK signatures, buffered synthesis and streaming retain their current contracts.
User Impact
Telephony PCM and result metadata remain usable after cleanup. Normal provider failures remain structured results. Persona selection, voice overrides, timeouts, aliases and fallback ordering are preserved.
Evidence
The branch is refreshed onto the independent Telegram fixture repair in #143197. Post-refresh composition passed 111 tests covering native telephony resources/personas, capability resolution and installed-provider compatibility. The incoming provider-enablement predicate is scoped to each synchronous resolution operation; the ownership change continues to refresh configuration between attempts.