fix(weixin): preserve voice transcript origin - #65022
Closed
zgzczzw wants to merge 1 commit into
Closed
Conversation
tonydwb
reviewed
Jul 15, 2026
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Looks Good
- Fix(weixin): preserve voice transcript origin
- 39 additions, 1 deletion — targeted fix
- No issues detected
Reviewed by Hermes Agent
Contributor
|
Merged into main via consolidated salvage PR #73515 (merge Your contribution is credited to you in git history. Thank you! Closing this PR as merged-via-salvage. |
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Preserves the voice origin when Weixin supplies a server-side transcript in
voice_item.text.Previously,
_extract_text()returned the transcript as plain text. Because_download_voice()intentionally skips downloading audio when Weixin already supplied text, the resulting event had no media and was classified as ordinary text. Downstream agents therefore could not distinguish a voice transcript from text typed by the user.This change adds a compact platform-origin marker while leaving ordinary text messages unchanged. It is a deliberately narrower alternative to #27235: it preserves the missing semantic information without adding outbound echo state or a new behavior/configuration knob.
Related Issue
Related to #11686 and #27235.
Type of Change
Changes Made
gateway/platforms/weixin.pyto retain an explicit voice-transcript marker forvoice_item.text.tests/gateway/test_weixin.pycovering the exact inbound payload shape.How to Test
voice_item.text.[Voice transcription provided by Weixin]followed by the transcript.Automated verification:
Checklist
Code
pytest tests/ -qsuite locally (targeted Weixin suite passes)Documentation & Housekeeping
cli-config.yaml.exampleupdate — N/A; no config keys changedCONTRIBUTING.md/AGENTS.mdupdate — N/A; no architecture or workflow change