Repository navigation
fix(tools): preserve invocation ID for merged parallel responses - #342
Merged
Merged
Conversation
raychen911
commented
Sep 22, 2026
Contributor
- inherit invocation_id from the base function response event
- prevent merged responses from being filtered in INVOCATION mode
- add regression coverage for parallel response merging
- inherit invocation_id from the base function response event - prevent merged responses from being filtered in INVOCATION mode - add regression coverage for parallel response merging
Contributor
AI Code Review审查结论通过 审查范围:b6fc4f3..7012913,共 2 个文件(_tools_processor.py 1 行行为变更 + 测试文件新增 53 行)。变更将并行工具响应合并事件的 invocation_id 从随机 UUID 改为继承 base event,目标是在 TimelineFilterMode.INVOCATION 下保留合并事件、修复随机 id 导致的事件被过滤问题。经追踪完整调用链验证:该 id 始终等于 ctx.invocation_id(__invoke_tools 的成功/失败路径均以 ctx.invocation_id 构造事件;runner/llm_agent/session 持久化、cancel 清理、memory/compact 服务等消费方均从 ctx 取 id,不依赖事件自身 id),author/branch 与 id 同源无错配;EventActions 为合并中新构造对象,state_delta 逐项复制;行为收敛正确且无跨调用方破坏。测试充分:新增 merged id 断言与 INVOCATION 过滤回归测试,均命中修复根因。未发现由该变更引入的可操作缺陷,门禁结论为通过。 发现的问题未发现需要反馈的代码问题。 |
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.