Repository navigation
fix(tts): deliver voice-only replies when speech runtime is cold - #128394
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 23, 2026, 6:25 PM ET / 22:25 UTC. ClawSweeper reviewWhat this changesThis PR makes voice-only replies fall back to readable text when speech is unavailable and channel metadata is transport-only rather than visible content. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readinessKeep open for explicit maintainer handling: current main retains the silent-drop path, while this focused patch reuses the channel-owned visibility decision already used after synthesis failures. No actionable patch defect was found; required checks are still running. Priority: P1 Review scores
Verification
Live VerificationCommand: Result: FAIL (partial) — step 2 Assertions:
How this fits togetherTTS prepares a reply before the dispatcher sends it through the originating channel. The fallback must distinguish visible channel-native blocks from routing metadata so an otherwise empty reply is not suppressed by the channel router. flowchart LR
A[Voice-only reply] --> B[TTS payload preparation]
B --> C{Speech available?}
C -->|No or synthesis fails| D[Channel visibility decision]
D --> E[Restore spoken text when metadata is transport-only]
E --> F[Reply dispatcher]
F --> G[Channel router and delivery]
Decision needed
Why: The patch is focused and source-backed, but the protected maintainer label requires explicit human handling rather than automated cleanup. Before merge
Agent review detailsSecurityNone. PR surfaceSource -3, Tests +47. Total +44 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain one shared channel-aware fallback for both cold speech runtimes and synthesis failures, then merge after exact-head checks pass. Do we have a high-confidence way to reproduce the issue? Yes—current main's generic metadata check and the router's channel-aware empty-payload gate establish the silent-drop chain; the new boundary test targets that exact path, though this read-only review did not execute it. Is this the best way to solve the issue? Yes—the patch removes duplicated fallback logic by reusing the established channel-owned visibility decision for both unavailable-runtime and failed-synthesis paths. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6669872a95f8. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
ad88c8e to
f09669e
Compare
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where users sending voice-only replies would receive no answer when speech support was unavailable and the channel payload contained transport metadata. The reply dispatcher incorrectly treated metadata such as Slack unfurl settings as visible content, then the channel router silently reported the reply undelivered.
Why This Change Was Made
Use one channel-aware visibility decision for both unavailable speech runtimes and failed speech synthesis. The canonical channel owner distinguishes actual visible structured blocks from transport-only metadata, so an otherwise invisible voice-only reply falls back to its original spoken text while legitimate structured content remains unchanged.
Production code decreases by three lines. No public configuration, plugin SDK contract, protocol, persistence, or speech-provider behavior changes.
User Impact
Voice-only answers are delivered as readable text when speech cannot run, including before a bundled channel plugin has activated. Existing visible messages, media attachments, and genuine channel-native cards keep their established behavior.
Evidence
delivered: falsethrough the real reply dispatcher and channel router when voice-only replies contained transport-only metadata.node scripts/run-vitest.mjs src/tts/tts-runtime-fallbacks.test.ts src/auto-reply/reply/route-reply.test.ts— 81 tests passed across two suites.node scripts/run-vitest.mjs test/plugins/bundled-provider-auth-literal-parity.test.ts— all 16 cases passed after rebasing onto the independently landed upstream Ollama parity repair.+13/-16production LOC.