feat(trace): isolate chat runs

This commit is contained in:
zhuyongxin
2026-07-10 19:02:04 +08:00
parent 6fdbd34bab
commit 26d5529280
21 changed files with 610 additions and 134 deletions
@@ -1,6 +1,6 @@
# ISS-010 同 session 多轮诊断 Trace 隔离
**状态**:方案已确认,待 OpenSpec
**状态**:OpenSpec 已创建,Phase 1 已完成,Phase 2 进行中
**严重程度**:高
**发现时间**:2026-07-10
**来源**:同一 `sessionId` 多轮 Chat E2E 验证
@@ -439,8 +439,6 @@ tool_invocation(run_id, id)
- 增加 `runId` query 参数。
- Trace response 增加 `runId`。
- 新增 `GET /api/chat/session/{sessionId}/runs`。
- Demo 脚本读取响应中的 `runId` 并查询精确 Trace。
- Trace UI 支持 `sessionId + runId` 最小查询。
验收:
@@ -448,8 +446,7 @@ tool_invocation(run_id, id)
- 传第一轮 `runId` 只返回第一轮 step/tool。
- 传第二轮 `runId` 只返回第二轮 step/tool。
- run 列表 API 只返回轻量 run 摘要,不展开 trace 明细。
- Demo 脚本输出摘要包含 `runId`。
- Trace UI 可以通过 URL 参数打开指定 run。
- Demo 脚本和 Trace UI 的 `runId` 最小适配按 OpenSpec tasks 放到 Phase 6,避免 Phase 3 同时混入前端/脚本范围。
### Phase 4:Feedback 和 CaseLibrary 绑定 run
@@ -475,7 +472,8 @@ tool_invocation(run_id, id)
任务:
- `AiOpsService` 生成并返回/透出 `runId`。
- AIOps `agent_step` / `tool_invocation` / rule evaluation 按 `runId` 隔离。
- AIOps `agent_step` / `tool_invocation` 按 `runId` 隔离。
- AIOps rule evaluation 写入当前 run 的 `diagnosis_run.self_evaluation.aiops_rule_evaluation`。
- AIOps Trace 查询兼容 `sessionId + runId`。
验收: