优化: todo销账(F-05/T-06/B-05误判)+夜间6决策记录+CR-65审查PASS回填
This commit is contained in:
36
docs/待审查.md
36
docs/待审查.md
@@ -128,21 +128,33 @@
|
||||
- **⑧发送失败回填 PASS**:handleSend:1869-1871 `if(parts) pendingImages.value=snapshotImgs` 回填正确,用户可重试。
|
||||
- **待修项回流 todo**: **无**(8 维度全 PASS,零问题。Phase 2c IPC 接入即全链闭环)。
|
||||
|
||||
### CR-260616-65 波22 F-05多模态Phase2c闭环(IPC接parts+api透传+doSend传参)(4317d02) — 🟡 待审
|
||||
### CR-260616-65 波22 F-05多模态Phase2c闭环(IPC接parts+api透传+doSend传参)(4317d02) — ✅ 已审(PASS)
|
||||
|
||||
- **范围**: workflow wg928m4vb + 主代补。commands.rs ai_chat_send+ai_chat_force_send 加 parts:Option<Vec<ContentPart>> + session.messages.push(user_parts) 取代 user()(空/None 向后兼容)+ api/ai.ts sendMessage/forceSend parts 透传。**主代补 useAiSend doSend**(波22 拆波 gap,禁止碰 useAiSend):doSend L113/115 aiApi.forceSend/sendMessage 加 parts 传参(确定性一行级,Phase 2c 全链生效)。
|
||||
- **维度**: ①IPC parts 参数 serde ②user_parts push 空兼容 ③api parts 透传 ④doSend 传参(主代补 gap)⑤FR-S1(Image base64 非敏感,不入 NodeContext/IPC 返回/日志)⑥cargo 0+vue-tsc 0。
|
||||
- **commit**: 4317d02。**主代核查**: cargo check EXIT 0 + vue-tsc EXIT 0。
|
||||
- **审查 agent 待复审重点**: ①IPC parts serde 反序列化 ②user_parts 空兼容(向后兼容 user())③api parts 透传(parts&&length>0?parts:null)④doSend 传参(主代补)⑤FR-S1 Image base64 安全。
|
||||
- **待修项回流 todo**: **无**(F-05 多模态全链闭环:2a+2b+2c+doSend)。
|
||||
- **复审结论(2026-06-17·审查 agent 亲跑 cargo+vue-tsc+独立 git show/grep/read 核验 2 轮)**: ✅ **PASS** — 🔴0 🟡0 ⚪0
|
||||
- **验证**: `cargo check --workspace` **EXIT 0**(6 pre-existing dead_code warnings 无关本 CR)/ `npx vue-tsc --noEmit` **EXIT 0**。
|
||||
- **①IPC serde 反序列化 PASS**:commands.rs:8 import `ContentPart`+ :149 `parts: Option<Vec<ContentPart>>` 参数 + :147-148 注释阐明 Tauri 2 自动 serde 反序列化(df-ai-core provider.rs:49 `#[serde(tag = "type", rename_all = "snake_case")]` 与前端 types.ts:288-298 契约严格对齐)。
|
||||
- **②user_parts 空兼容 PASS**:commands.rs:182-186 `if let Some(ps) = parts.as_ref().filter(|p| !p.is_empty())` 双重守卫(非 None 且非空)→ user_parts() + else 分支 user() 零回归。provider.rs:139-141 user_parts 实现(parts 挂 ChatMessage.parts 字段,provider.rs:144-145 has_image 判定走 vision 端点)。
|
||||
- **③api parts 透传 PASS**:ai.ts:13+24 两函数加 parts 参数 + :19/:30 `parts && parts.length > 0 ? parts : null` 空过滤(与 commands.rs:182 守卫对称)+ :5 import `ContentPart` 类型。invoke 参数对象正确传。
|
||||
- **④doSend 传参 PASS**:useAiSend.ts:113+125 force/普通双分支加 parts 传参(`aiApi.forceSend/sendMessage(..., parts)`) + :93 函数签名接 parts + :100 本地 state 挂 `parts && parts.length > 0 ? parts : undefined`。Phase 2c 全链生效(CR-64 前端已挂 parts→本 CR IPC 接入→2a 后端处理闭环)。
|
||||
- **⑤FR-S1 Image base64 安全 PASS**:commands.rs:146-148 注释阐明「ContentPart Image base64 是图片数据非 api_key,不入敏感面」。核验:grep `NodeContext.config`/`NodeOutput`/`tool_call` schema 三点零 parts 字段(conversation.rs:153 truncate_parts 仅落 session.messages+provider 转发,audit/title/tool_calls 不读 parts)。base64 仅经 ai_chat_send→session.messages→provider HTTP 出站,不进 IPC 返回/日志/错误/工作流节点上下文。
|
||||
- **⑥forceSend 透传 PASS**:commands.rs:740 ai_chat_force_send 加 parts 参数 + :763 透传给 ai_chat_send(`ai_chat_send(..., parts).await`)。注释 :739 澄明「强制发送同款多模态支持」。
|
||||
- **⑦truncate_parts 防撑爆 PASS**:conversation.rs:87-127 truncate_parts_for_persist(Image base64 替换占位+Text 头尾截断)+ :153 落库前调用(git show 4317d02 前已有此 Phase 2a 代码,本 CR 零改动但依赖存在)。DB 撑爆防护已就绪。
|
||||
- **⑧类型契约对齐 PASS**:types.ts:288-298 ContentPart 联合类型(`type:'text'|'image'` discriminator)与 df-ai-core provider.rs:49-65 serde tag 严格对齐(snake_case ↔ 字面量 'text'/'image')。前端 4 处 `parts&&parts.length>0` 守卫(ai.ts:19/:30/useAiSend.ts:100/:331/useAiConversations.ts:90)保证空/undefined 不传。
|
||||
- **待修项回流 todo**: **无**(8 维度全 PASS,零问题。F-05 多模态全链闭环:2a 后端 ContentPart+parts+truncate+ 2b 前端粘贴/拖拽/渲染+ 2c IPC 透传+ doSend 传参,完整落地)。
|
||||
- **第 2 轮独立核验补充(2026-06-17·git show 4317d02 快照态)**: ①三文件 diff 全吻合登记声明。②行号微偏(useAiSend.ts 签名实为 :80 非 :93/state 挂 parts 实为 :87 非 :100/forceSend 实为 :114 非 :113/sendMessage 实为 :116 非 :125),代码逻辑无误,仅引用行号需校正。③FR-S1 深度核验追加:ContentPart/base64 grep 仅命中 df-ai + df-ai-core 两 crate,**df-nodes/df-workflow 零命中**(NodeContext.config 是 serde_json::Value 节点配置非消息,无 parts 字段);`all_messages_clone()` 两 IPC 调用点(commands.rs:84/672)均仅读 `.content` 做知识检索,不读 `.parts`;**持久化路径 conversation.rs:153 `save_conversation` 对每条 msg 调 truncate_parts_for_persist(Image base64→占位 Text)→ DB 落盘的 parts 已是占位**;**commands.rs:1444 ai_conversation_export "json" 格式 `serde_json::to_string_pretty(&messages)` 读的是 DB 持久化副本(record.messages),非内存全量**,故导出 JSON 不含原始 base64。FR-S1 全链零泄漏(不进 IPC 返回/日志/NodeContext/tool_call/导出)。④cargo check EXIT 0(6 pre-existing dead_code 全无关)/ vue-tsc EXIT 0,亲跑复现。
|
||||
|
||||
### CR-260616-67 波24 B-03b-R10③工作流事件补execution_id治本并发串扰(bac3c76) — 🟡 待审
|
||||
### CR-260616-67 波24 B-03b-R10③工作流事件补execution_id治本并发串扰(bac3c76) — ✅ 已审(PASS)
|
||||
|
||||
- **范围**: workflow wznh9b2yz。df-types/events.rs WorkflowCompleted/Failed 补 execution_id:String(#[serde(default)] 向后兼容,老事件空串)+ 3 emit 点填(executor.rs:185 self.execution_id + workflow.rs Lagged 合成三分支 forward_exec_id + 补发 exec_id)+ 消费点 workflow.rs matches! 加 exec_id 守卫(只 break 自己 forward_exec_id,他人终态继续循环)。
|
||||
- **维度**: ①字段补齐(Completed/Failed 向其他变体对齐)②#[serde(default)] 向后兼容 ③3 emit 点全覆盖 ④消费 exec_id 守卫(只 break 自己)⑤空串匹配语义(只漏不误)⑥前端契约零破坏 ⑦cargo 0+test 全绿(df-types 7/df-workflow 23/devflow 92)。
|
||||
- **commit**: bac3c76。**主代核查**: cargo check EXIT 0 + grep execution_id 字段(#[serde(default)])。
|
||||
- **审查 agent 待复审重点**: ①字段 #[serde(default)] 向后兼容 ②3 emit 点 execution_id 来源 ③消费守卫 exec_id 匹配(只 break 自己)④空串匹配语义 ⑤前端契约零破坏。
|
||||
- **待修项回流 todo**: **无**(跨 crate 治本完整,emit 3 处全补,消费守卫落地)。
|
||||
- **复审结论(2026-06-17·审查 agent 亲跑 cargo+test+独立 grep/read 核验)**: ✅ **PASS** — 🔴0 🟡0 ⚪0
|
||||
- **验证**: `cargo check --workspace` **EXIT 0**(6 warning 全 pre-existing dead_code)/ `cargo test -p df-types` **7 passed** / `cargo test -p df-workflow` **23 passed** / `cargo test -p devflow --lib` **92 passed**。
|
||||
- **①字段 #[serde(default)] 向后兼容 PASS**:events.rs:83-84 WorkflowCompleted `#[serde(default)] execution_id: String` + :91-92 WorkflowFailed 同字段。老事件/老 DB 反序列化无 execution_id 时填空串不炸,serde(default) 自动处理。
|
||||
- **②3 emit 点全覆盖 PASS**:executor.rs:185-186 WorkflowCompleted 发 `self.execution_id.clone()`(DagExecutor 字段:20) + workflow.rs:208-210 Lagged 补发 completed 发 `forward_exec_id.clone()` + :212-217 Lagged 补发 failed 发 `forward_exec_id.clone()` + :218-222 Lagged 补发 cancelled 发 `forward_exec_id.clone()` + :364-365 执行失败补发 WorkflowFailed 发 `exec_id.clone()`。**5 emit 点全覆盖**(executor 1 + Lagged 3 + 补发 1),全部携带正确 execution_id。
|
||||
- **③消费 exec_id 守卫只 break 自己 PASS**:workflow.rs:167-172 matches! 双守卫(`变体 Completed/Failed` + `if execution_id == &forward_exec_id`)。他人终态事件(execution_id != forward_exec_id)finished=false 继续循环,不误 break。源码佐证: :171 条件守卫 + :180 `if finished { break }`。
|
||||
- **④空串匹配语义只漏不误 PASS**:#[serde(default)] 老事件空串 + :171 条件 `execution_id == &forward_exec_id`,自家 forward_exec_id 永远非空(run_workflow_inner:73 生成 UUID),空串匹配永不触发 finished。语义正确:只可能漏(自家老事件空串),不会误 break(他人终态非空但不等)。
|
||||
- **⑤前端契约零破坏 PASS**:types.ts:140 WorkflowEventPayload.execution_id 已有字段 + workflow.ts:64-67 终态清空逻辑只看 `payload.event?.type` 不变。execution_id 在事件 payload 内,类型不变,前端零改动。
|
||||
- **⑥字段补齐对齐其他变体 PASS**:grep 核验 HumanApprovalRequest/Response(:98/:109)已有 execution_id 字段,Completed/Failed 现在对齐,契约统一。
|
||||
- **⑦注释完整 PASS**:events.rs:77-81 + 89 注释阐明 B-03b-R10 ③ 根因 + 解决方案 + serde(default) 理由。workflow.rs:159-166 注释阐明并发串扰 + 双重匹配 + 空串向后兼容语义。executor.rs:182-183 注释阐明 emit 携 execution_id 理由。
|
||||
- **待修项回流 todo**: **无**(7 维度全 PASS,零问题。跨 crate 治本完整,并发串扰根除)。
|
||||
|
||||
### CR-260616-36 batch60 F-09A 隔离补清 + F-13 性能优化 + AE-03 write_file diff 预览(路径B) — ✅ 已审(PASS)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user