fix(agent): 隔离 Pi RPC 控制响应与 Prompt 事件流 - #92
Open
yetuge wants to merge 1 commit into
Open
Conversation
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.
改动说明
修复
PiRpcClient的 RPC 事件分流问题,避免控制命令响应或未知 ID 的过期响应串入唯一活跃 Prompt。success: false时正确拒绝对应控制请求。type: 'response'不再回退到唯一活跃 Prompt。关联 Issue
Closes #91
测试报告(正式审核前必填)
环境
实际执行命令与结果
已知失败 / Baseline(如有)
全仓测试中的失败横跨 MarketDataService、registry、screening、JSON persistence、thesis、Langfuse、Massive provider、UI 等与本改动无关的模块,主要表现为全局 mock/共享测试环境耦合。本 PR 只修改 Pi RPC 内部事件分流及其测试;对应 focused test 和整个 agent 目录测试均全绿,shared 与全仓 typecheck 也全部通过。
本次未在干净的
origin/main副本上执行完整基线对照,因此这里如实记录全仓结果,不将其描述为全仓测试通过。UI 截图(涉及 UI 时必填)
Before(适用时)
不适用。
After
不适用。
Scope / 后续
本 PR 仅修复 Pi JSONL RPC 客户端内部的请求关联与事件隔离,不修改 Stream Event v1、renderer/UI、取消传输协议或公共 API。