Skip to content

fix: 让唤醒回合的提问主动推送企微 - #309

Merged
robscc merged 1 commit into
mainfrom
fix/wecom-question-delivery
Nov 23, 2026
Merged

robscc merged 1 commit into
mainfrom
fix/wecom-question-delivery

Conversation

@robscc

@robscc robscc commented Nov 23, 2026

Copy link
Copy Markdown
Owner

现象

子代理结果唤醒已有企微绑定的会话后,桌面出现 ask_user 卡片,企微侧未收到提问。

根因

  • 流式引擎的 emit / safe_send 路径绕过了企微镜像入口。
  • 主动推送 tap 把卡片留在尾部缓冲。独立镜像 tap 缺少原会话 ID,答复无法正确恢复。

修复

  • 流式 user.question 进入现有镜像管道。已有渠道 tap 时由该 tap 负责投递。
  • 按企微会话绑定选择地址,并即时主动推送。企微回复数字走原会话的断点恢复,针对同一聊天的待答登记校验归属。
  • 暂停回合结束流式输出时保留待答登记。发送失败或旧问题超时,只清理对应的登记。

验证

  • 旧版在真实唤醒路径可复现桌面收到一张卡、企微发送零次。
  • 回归用真实引擎、模拟模型及企微传输,断言一张卡发到已绑定聊天,回复 2 后同一工具调用得到第二项,且不开新回合。
  • 相关 ask_user、企微、事件契约和 relay 测试共 152 项通过。Ruff 与 git diff --check 通过。

现象

子代理结果唤醒已有企微绑定的会话时,桌面能看到决策卡,企微侧没有收到,回复选项也无法恢复原问题。

根因

流式引擎的事件出口没有调用企微镜像。直接调用镜像时,主动推送 tap 只把问题写进尾部缓冲,且待答登记未绑定原会话 ID。

修复

流式提问接入现有镜像。优先使用会话绑定,立即发送企微消息并把答复路由回原问题。保留暂停回合的待答登记,发送失败和超时仅撤销自身登记。

验证

复现旧版桌面一张卡、企微零次发送。真实唤醒回合和模拟企微回调验证一发一答,相关测试 152 项通过,Ruff 和 diff 检查通过。
@codecov-commenter

codecov-commenter commented Nov 23, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 94.38202% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...es/runtime/src/ginno_runtime/channels/ask_relay.py 93.10% 2 Missing ⚠️
...untime/src/ginno_runtime/channels/wecom/adapter.py 91.30% 2 Missing ⚠️
...es/runtime/src/ginno_runtime/channels/wecom/tap.py 97.05% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@robscc
robscc merged commit 7217a03 into main Nov 23, 2026
6 checks passed
@robscc
robscc deleted the fix/wecom-question-delivery branch November 23, 2026 00:26
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