Repository navigation
refactor(tts): resolve caption eligibility from settings - #188326
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 changes before merge. What this changesThis PR resolves caption eligibility directly from TTS settings and removes a forwarding helper and obsolete test mocks. Example: Telegram uses tts.auto="always" and final mode for the answer "Hello from block streaming."
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Partial Merge readiness⛔ Needs changes before merge - 2 items remain Keep this maintainer-authored PR open: the production simplification is useful, but incomplete fixture migration causes two actionable CI failures. Priority: P3 Before merge
Findings
Agent review detailsHow this fits togetherReply dispatch combines channel capabilities, scoped TTS settings, preferences, and session mode to decide whether streamed answer text waits for final speech delivery. flowchart LR
A[Incoming conversation] --> B[Reply dispatch]
C[Channel capabilities] --> D[Caption eligibility]
E[TTS settings and preferences] --> D
D --> B
B --> F[Final speech or text fallback]
F --> G[Channel delivery]
Technical reviewBest possible solution: Keep the direct settings lookup, enable TTS explicitly in the affected ACP fixture, and regenerate the shrinking mock baseline. Do we have a high-confidence way to reproduce the issue? This PR proposes an internal refactor rather than a product bug fix; source inspection establishes equivalent production eligibility decisions. Is this the best way to solve the issue? The direct settings call and existing payload predicate are the smallest complete production change, but removing a shared mock requires migrating its ACP consumer and baseline too. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 994e7aec6812. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource -9, Tests -23. Total -32 across 7 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 30, 2026, 8:48 AM ET / 12:48 UTC. |
|
Merged via squash.
|
…8326) * refactor(tts): resolve caption eligibility from settings * test(tts): complete the real-config fixture cutover
Related: #188252
What Problem This Solves
Caption eligibility computes status-display details although it only needs the existing live TTS settings decision.
User Impact
No intended user-visible behavior or shipped public-contract change.
Why This Change Was Made
Read TTS settings directly after channel-capability and source-config final-mode gates. Preserve prepared preferences, session/agent/channel/account inputs and off/tagged/inbound predicates. Remove the forwarding terminal-payload helper and use the existing payload owner at its sole caller. Remove the obsolete fake status projection from dispatch fixtures and supply real speech-mode config inputs; all existing assertions remain.
Nine net production lines and 23 net test/support lines removed. No new case, option, cache or runtime owner.
Evidence
CI attempt 41056015197 exposed one retired mock-export baseline entry and an ACP speech fixture missing real TTS configuration after removal of the status mock. The appended repair removes only that baseline entry and enables TTS in the affected case, preserving every assertion.
Fresh independent full-range source review covers all nine files and both commits at replacement head
7409b2c3f87e63df7238012094b5f31ad65fe6d1, with no actionable findings. Native formatting, whitespace checks and the normal commit hook passed. Replacement-head hosted CI passed, including the selected owning suites, native mock-export checker, types and lint; no local runtime pass is claimed. Evidence: https://github.com/openclaw/openclaw/actions/runs/41060673639. Overall reduction remains nine production lines, 23 test/support lines and one baseline entry.Native landing evidence: required CI run 41060673639 passed for reviewed head 7409b2c. Root inspected the full source cutover and fresh independent full-range review with no actionable findings. Personal dependency-backed execution remains unrun; exact-head CI supplies executable tests, types and lint proof. No intentional behavior or shipped contract change.