Skip to content

fix(bug): fix the bug in unittest - #4

Merged
qbc2016 merged 1 commit into
qbc2016:bc/generate_responsefrom
DavdGao:bc/generate_response_fix
Nov 10, 2025
Merged

qbc2016 merged 1 commit into
qbc2016:bc/generate_responsefrom
DavdGao:bc/generate_response_fix

Conversation

@DavdGao

@DavdGao DavdGao commented Nov 10, 2025

Copy link
Copy Markdown

AgentScope Version

[The version of AgentScope you are working on, e.g. import agentscope; print(agentscope.__version__)]

Description

[Please describe the background, purpose, changes made, and how to test this PR]

Checklist

Please check the following items before code is ready to be reviewed.

  • Code has been formatted with pre-commit run --all-files command
  • All tests are passing
  • Docstrings are in Google style
  • Related documentation has been updated (e.g. links, examples, etc.)
  • Code is ready for review

@qbc2016 qbc2016 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@qbc2016
qbc2016 merged commit cf2d4bd into qbc2016:bc/generate_response Nov 10, 2025
10 checks passed
DavdGao added a commit that referenced this pull request Aug 5, 2026
…i#10/agentscope-ai#12/agentscope-ai#13 + session name

- agentscope-ai#10: allow all PermissionMode values for channel sessions. The engine
  resolves every mode server-side and the ASK path maps to the confirm
  card, so accept_edits/explore work too — drop the over-conservative
  allowlist, keep only a valid-enum check.
- #4: gateway drops events for a since-disabled channel (record.enabled
  guarded in _handle_message and _handle_decision).
- agentscope-ai#8: Feishu fetches its own bot open_id via /bot/v3/info and gates on
  the bot's own mention rather than any mention.
- agentscope-ai#12: ChannelTypeRegistry.__bool__ + lifespan guards so the dispatcher
  is neither built nor started when no channel types are registered.
- agentscope-ai#13: in-memory bus honors queue TTL (expire on push+drain) and caps
  the media buffer drain at _MEDIA_BUFFER_MAX.
- session name shortened to "{channel_type}:{chat_id}".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
DavdGao added a commit that referenced this pull request Aug 5, 2026
FeishuChannel ran lark's blocking ``client.start()`` on a daemon thread;
it parks forever on ``run_until_complete(_select())``, so setting the
stop flag and join(timeout=5) never made it return — the thread lingered
and kept delivering events after the channel was disabled or updated.

Capture the WS thread's own event loop and, in teardown (which the
lifecycle dispatcher triggers via task.cancel() on disable/update),
stop it via call_soon_threadsafe so client.start() unblocks, the thread
exits, and join succeeds promptly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants