Conversation
|
Independent verification on the PR head (d05a16d): tests/gateway/test_weixin.py passes locally, 38/38 (canonical runner). Diff check and Windows-footgun scan clean. Premise proven on current main, not just trusted: gateway/run_notifications.py:326 calls adapter.send_voice with is_voice=is_voice for every adapter, so Weixin voice notifications TypeErrored before this change. Every sibling adapter (discord, google_chat, feishu, wecom, simplex, line) already accepts routing kwargs; Weixin was the odd one out. Dropping is_voice is behavior-preserving here since Weixin forces file attachment regardless. No findings. |
SummaryFixes #113640: the base media dispatcher passes routing kwargs (e.g. What changed
Strengths
Findings
VerdictNeeds minor polish. |
d05a16d to
b1652e3
Compare
|
Rebased onto current |
|
Follow-up on the review feedback: I checked the rebased current |
b1652e3 to
87085fa
Compare
|
Reproduced the reported failure on current Prepared the minimal current-main repair in isolated worktree
Evidence:
The full |
What does this PR do?
Weixin voice and video attachments can now accept the routing kwargs supplied by the base media dispatcher. Previously,
WeixinAdapter.send_voice()andsend_video()rejectedis_voicebefore their upload path ran, so aMEDIA:audio attachment could be silently omitted while the text reply was delivered. The adapter consumes compatibility-only kwargs and preserves its existing file-upload behavior.Related Issue
Fixes #113640
Type of Change
Changes Made
gateway/platforms/weixin.py— added**kwargscompatibility tosend_voice()andsend_video()without forwarding routing-only values to_send_file().tests/gateway/test_weixin.py— added voice and video regressions that pass metadata plusis_voice, then verify the existing upload arguments remain unchanged.How to Test
HERMES_PYTHON=/Users/blockkonit./Dev/hermes/hermes-agent/.venv/bin/python scripts/run_tests.sh tests/gateway/test_weixin.py -q— 38 passed/Users/blockkonit./Dev/hermes/hermes-agent/.venv/bin/python -m ruff check gateway/platforms/weixin.py tests/gateway/test_weixin.py— passedEvidence
scripts/run_tests.sh tests/gateway/test_weixin.py -k media_senders_ignore_routing_kwargs_before_file_upload -qproduced 2 failures: bothsend_voice()andsend_video()raisedTypeErrorforis_voice.HERMES_PYTHON=/Users/blockkonit./Dev/hermes/hermes-agent/.venv/bin/python scripts/run_tests.sh tests/gateway/test_weixin.py -qproduced 38 passed._send_file()with onlyforce_file_attachment=True; the video case still calls it with no extra arguments.Review follow-up
The Python, scan, Docker, and Nix CI lanes are selected by the changed production Python file. This macOS verification covers the Python test and lint checks; Docker publishing and Windows-only checks are not run locally.
Checklist
Code
Documentation & Housekeeping
cli-config.yaml.example: N/ACONTRIBUTING.mdorAGENTS.md: N/A