Repository navigation
fix(media): report read failures and preserve explicit IM resends - #2683
Open
henryZhouLikeStudy wants to merge 9 commits into
Open
henryZhouLikeStudy wants to merge 9 commits into
henryZhouLikeStudy wants to merge 9 commits into
Conversation
This was referenced Oct 31, 2026
henryZhouLikeStudy
force-pushed
the
fix/2351-generated-media-develop
branch
from
November 2, 2026 09:39
2a15efe to
96723cc
Compare
# Conflicts: # CHANGELOG.md # Conflicts: # CHANGELOG.md
henryZhouLikeStudy
force-pushed
the
fix/2351-generated-media-develop
branch
from
November 3, 2026 08:42
96723cc to
790f468
Compare
Author
|
Rebased onto current develop and resolved the changelog conflict while preserving both branches' entries. New head: 790f468. Focused Gateway media, stream projection, and i18n tests: 155 passed; Ruff and diff checks pass; CodeCC check passes. |
Preserve the PR changes and upstream fixes; reconcile unreleased changelog entries.
This branch has not been deployed
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.
When generated media is sent through IM, workspace paths must resolve to readable media bytes and explicit resends must remain possible after an upload failure.
This PR preserves the workspace guards and current-turn tool-call filtering, rejects unsupported URL schemes, and emits localized, path-free errors when media cannot be read. It removes cross-call content deduplication: the projection receives no channel delivery receipt, so emitting an event cannot prove that equal bytes were delivered. A new
send_file_to_usercall therefore remains deliverable; replayed results of the same tool-call ID are still suppressed.Regression coverage interleaves media projection with real Weixin byte loading and media-send control flow. Upload/API calls and auxiliary status/fallback output are mocked. It covers failed and successful first uploads, identical and changed media bytes, ordinary and HITL-resumed streams, repeated turns, and replayed tool results. The identical-content resend cases fail before the fix and pass afterward.
Validation
Current head
aacdadd0479c00c6550228a5f116f1817b4effc6includesdevelopatcffc4ceaa537507448682a15bd373cccd6eea001. The media delivery fixes are listed underUnreleasedinCHANGELOG.md.make all PYTEST_JOBS=0. Formatting, Ruff, and mypy passed. Pytest reported 6,182 passes, 39 skips, 36 deselections, and one failure intest_probe_tencent_mirror_unreachable. The same failure reproduced on unmodifieddevelop, where the validation host already had a listener on loopback port 443.Earlier Windows validation
pytest --testmonrun with four workers had 5,242 passes and 271 skips.Channel upload/fallback reporting is tracked separately in TencentCloud/octop-gateway#55. Delivery of unreviewed generated drafts is tracked in #2859.
No production credentials, server addresses, account/session identifiers, chat text, user images, screenshots, or private filesystem paths are included.
Closes #2351.