fix(messages): preserve inbound audio for message-tool TTS#87749
Conversation
|
Codex review: needs maintainer review before merge. Reviewed May 29, 2026, 1:09 AM ET / 05:09 UTC. Summary PR surface: Source +18, Tests +96. Total +114 across 15 files. Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Review detailsBest possible solution: Retry the Codex review after fixing the execution failure. Do we have a high-confidence way to reproduce the issue? Unclear. The review failed before ClawSweeper could establish a reproduction path. Is this the best way to solve the issue? Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model gpt-5.5, reasoning high; reviewed against 0e86ca135225. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +18, Tests +96. Total +114 across 15 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
726db72 to
738fb0a
Compare
|
Land-ready after maintainer rebase/fixup. What changed:
Proof:
Known proof gap: no live Telegram audio roundtrip was run for this maintainer fixup; coverage is focused local tests plus CI/real-behavior-proof workflow. |
Summary
Fixes #87708.
Verification
OPENCLAW_HEAVY_CHECK_LOCK_SCOPE=worktree pnpm test src/infra/outbound/message-action-runner.core-send.test.ts src/agents/tools/message-tool.test.ts src/auto-reply/reply/agent-runner-utils.test.tsnode scripts/run-vitest.mjs run --config test/vitest/vitest.auto-reply.config.ts src/auto-reply/reply/dispatch-from-config.reply-dispatch.test.ts --reporter=verbosepnpm format:check src/auto-reply/reply/inbound-media.ts src/auto-reply/reply/dispatch-from-config.ts src/auto-reply/reply/agent-runner-utils.ts src/auto-reply/reply/agent-runner-utils.test.ts src/agents/command/types.ts src/agents/command/attempt-execution.ts src/agents/embedded-agent-runner/run/params.ts src/agents/embedded-agent-runner/run.ts src/agents/embedded-agent-runner/run/attempt.ts src/agents/agent-tools.ts src/agents/openclaw-tools.ts src/agents/tools/message-tool.ts src/agents/tools/message-tool.test.ts src/infra/outbound/message-action-runner.ts src/infra/outbound/message-action-runner.core-send.test.tsgit diff --checkReal behavior proof
behavior: message-tool sends from an inbound audio turn preserve the inbound audio context before the message-action TTS helper decides whether
messages.tts.auto: "inbound"should synthesize audio.environment: local OpenClaw source checkout on Node 22 with the focused message-tool, outbound runner, embedded context, and reply-dispatch tests.
steps: ran the focused regression suite covering embedded context construction, message tool forwarding, outbound message-action TTS invocation, and the existing reply-dispatch TTS path after moving the inbound-audio detector into the shared helper.
evidence: the focused regression command passed 3 Vitest shards, the dispatch smoke command passed 1 Vitest shard, formatter passed on all touched files, and
git diff --checkpassed.observedResult: embedded runs now compute
currentInboundAudiofrom the same inbound context used by normal final replies, the message tool forwards it asinboundAudio, and the message-action TTS helper receivesinboundAudio: truefor source audio turns.notTested: full live Telegram voice-message plus Microsoft TTS E2E was not run locally. The focused proof covers the source-level runtime path where the inbound-audio fact was dropped before synthesis.