Repository navigation
fix(tts): preserve hidden speech answers when synthesis fails - #118690
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 2:10 PM ET / 18:10 UTC. ClawSweeper reviewWhat this changesThe branch restores hidden explicit TTS text after synthesis or audio storage fails, but only when the reply otherwise has no deliverable content. Merge readinessKeep this PR open for explicit maintainer review. The patch addresses a real silent-delivery path, has no actionable line-level correctness finding, and correctly reuses the channel-aware content contract; the remaining decision is whether to accept that cross-channel privacy contract once exact-head validation completes. Priority: P1 Review scores
Verification
How this fits togetherTTS removes hidden speech-only directives before requesting audio from a provider and storage owner. The resulting payload goes through the shared reply dispatcher and channel router, which suppresses empty replies but delivers text, media, interactive content, locations, and channel-owned structured payloads. flowchart LR
A[Agent reply with hidden TTS text] --> B[TTS payload preparation]
B --> C[Speech synthesis and audio storage]
C -->|audio succeeds| D[Audio reply payload]
C -->|audio fails| E[Check deliverable reply content]
E -->|no content| F[Restore explicit speech text]
E -->|rich content exists| G[Keep hidden text private]
D --> H[Reply dispatcher and channel delivery]
F --> H
G --> H
Decision needed
Why: The patch intentionally changes a silence-on-failure path into visible text delivery and relies on channel plugins to identify private structured content. Before merge
Agent review detailsSecurityNone. PR surfaceSource +11, Tests +296. Total +307 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Merge the focused TTS-owner fallback after exact-head checks complete, preserving the channel-owned structured-payload predicate as the privacy boundary for rich replies. Do we have a high-confidence way to reproduce the issue? Yes. Current-main routing source proves that an empty final is intentionally suppressed, and the branch's focused dispatcher-and-router regression path establishes how failed hidden-TTS synthesis reaches that guard. Is this the best way to solve the issue? Yes. The repair belongs at the TTS failure owner and uses the shared content predicate instead of weakening the downstream empty-reply suppression behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a67c52611e57. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
…0803-tts-hidden-text-fallback
|
Merged via squash.
|
…outing-20260803 * origin/main: (34 commits) fix(config): reject unsupported diagnostics otel grpc (#93087) fix(providers): recognize configured media credentials across provider boundaries (#118761) refactor: delete dead post-landing plugin/hooks scaffolding (#118920) fix(cron): deliver child results after heartbeat-only parent responses (#118743) fix(ci): keep Matrix chunk tests aligned with inventory (#118917) fix(tts): preserve hidden speech answers when synthesis fails (#118690) test(gateway): add HTTP API QA coverage (#118809) test(qa): cover Control UI sessions and cron (#118838) fix(macos): preserve native command ownership and consent (#118914) test(qa): cover OpenClaw exec process lifecycle (#118819) test(ui): cover diagnostic operator flows (#118837) fix(search): propagate cancellation through provider-owned requests (#118895) test(gateway): cover loopback and LAN access (#118824) refactor(channels): own the lifecycle status contract in SDK patch factories (#118795) test(ui): add guarded config QA coverage (#118814) fix(feishu): fence external collaboration tool results (#118877) test(qa): cover Plugin SDK import topology (#118878) test(qa): register external app SDK proof (#118829) fix(gateway): expire temporal rows in cached session lists (#118875) test(matrix): isolate runtime state (#118892) ...
* commit 'efcced7207baa0b1b1db5e8e1836673a24212657': test(agents): prove process control roundtrip (#118843) test(qa): add memory redaction boundary coverage (#118916) fix(kilocode): model discovery overstates the usable context window (#118868) fix(media): isolate generated-provider text from delivery directives (#118780) test(gateway): add node control-plane QA coverage (#118784) fix(config): reject unsupported diagnostics otel grpc (#93087) fix(providers): recognize configured media credentials across provider boundaries (#118761) refactor: delete dead post-landing plugin/hooks scaffolding (#118920) fix(cron): deliver child results after heartbeat-only parent responses (#118743) fix(ci): keep Matrix chunk tests aligned with inventory (#118917) fix(tts): preserve hidden speech answers when synthesis fails (#118690)
…te-dry-run-no-state-mutation * commit '682f60ce56b37c5cd3205fdcbbf25b21d48708f2': (28 commits) fix(config): reject unsupported diagnostics otel grpc (#93087) fix(providers): recognize configured media credentials across provider boundaries (#118761) refactor: delete dead post-landing plugin/hooks scaffolding (#118920) fix(cron): deliver child results after heartbeat-only parent responses (#118743) fix(ci): keep Matrix chunk tests aligned with inventory (#118917) fix(tts): preserve hidden speech answers when synthesis fails (#118690) test(gateway): add HTTP API QA coverage (#118809) test(qa): cover Control UI sessions and cron (#118838) fix(macos): preserve native command ownership and consent (#118914) test(qa): cover OpenClaw exec process lifecycle (#118819) test(ui): cover diagnostic operator flows (#118837) fix(search): propagate cancellation through provider-owned requests (#118895) test(gateway): cover loopback and LAN access (#118824) refactor(channels): own the lifecycle status contract in SDK patch factories (#118795) test(ui): add guarded config QA coverage (#118814) fix(feishu): fence external collaboration tool results (#118877) test(qa): cover Plugin SDK import topology (#118878) test(qa): register external app SDK proof (#118829) fix(gateway): expire temporal rows in cached session lists (#118875) test(matrix): isolate runtime state (#118892) ...
…aw#118690) * fix(tts): preserve hidden speech answers when synthesis fails * fix(tts): preserve visible Slack fallback before channel activation * test(tts): respect plugin ownership boundaries
Summary
Root cause and canonical owner
The existing TTS payload producer strips hidden
[[tts:text]]instructions before speech generation. When the speech provider or audio-storage owner failed, it returned the stripped empty payload; the real reply dispatcher accepted an empty final, producing no useful user-visible answer. This behavior also exists in releasedv2026.7.2-beta.7. The TTS failure owner now consults the existing canonicalhasReplyPayloadContentowner and restores clean explicit speech text only when the entire payload would otherwise be undeliverable.Actual operator-visible proof
The identical real active plugin registry → failing speech provider → real
createReplyDispatcher→ actual delivery sink produced before repair:{"accepted":true,"transportPayloads":[{"hasContent":false,"text":null}],"failedFinals":0,"networkRequests":0}After repair, the actual dispatcher produced:
{"accepted":true,"transportPayloads":[{"hasContent":true,"text":"Your important answer is ready."}],"failedFinals":0,"networkRequests":0}Provider failure and storage failure genuinely failed first; four independently deliverable rich payload cases additionally proved hidden speech text is never leaked when a card/interactive/location/channel payload already exists.
git diff --check: clean.