Skip to content

fix(qqbot): add return_exceptions=True to asyncio.gather in chunked upload - #65370

Closed
x7peeps wants to merge 1 commit into
NousResearch:mainfrom
x7peeps:fix/qqbot_add_return_exceptions
Closed

fix(qqbot): add return_exceptions=True to asyncio.gather in chunked upload#65370
x7peeps wants to merge 1 commit into
NousResearch:mainfrom
x7peeps:fix/qqbot_add_return_exceptions

Conversation

@x7peeps

@x7peeps x7peeps commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Add return_exceptions=True to the asyncio.gather() call in _run_with_concurrency() (gateway/platforms/qqbot/chunked_upload.py).

Problem

When uploading a file via QQ Bot's chunked upload API, multiple parts are uploaded concurrently via _run_with_concurrency(), which uses asyncio.gather() without return_exceptions=True.

If any single part upload fails (network error, rate limit, transient HTTP error), the unhandled exception propagates through gather(), cancelling all other in-flight part uploads and crashing the entire upload operation.

This is the same class of bug already fixed in other gather calls (feishu #64864, context_references #64726, agent #62902).

Fix

One-line change: add return_exceptions=True to the asyncio.gather() call at line 602, so per-part failures are isolated instead of cascading to all concurrent uploads.

Testing

  • Syntax check passed (py_compile)
  • Behavior verified

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery platform/qqbot QQ Bot adapter sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages duplicate This issue or pull request already exists labels Jul 16, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of #61302: both make the same one-line asyncio.gather(..., return_exceptions=True) change in QQBot chunked upload handling.

@x7peeps x7peeps closed this Jul 16, 2026
@x7peeps

x7peeps commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Closed as duplicate per maintainer feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have platform/qqbot QQ Bot adapter sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants