文档: 全库走查报告(walkthrough-2026-08,summary + 4 分方向)

4 workflow/35 维度走查产出:P0(2 已修)+ P1(4 修 + 2 专项登记)+ P2/P3 清单 +
推翻假设(AiChat 798 非 God / human_node 测试 76% 无债)。每发现 file:line 源码佐证。
This commit is contained in:
lxy
2026-08-02 03:19:25 +08:00
parent f719546b12
commit ef77120912
8 changed files with 495 additions and 0 deletions
+57
View File
@@ -0,0 +1,57 @@
# DevFlow 全库走查报告(2026-08-02)
> 4 workflow / 35 维度 / df-nodes + AI 链路 + ideas + storage + 前端 + 基础设施 + 剩余模块 + UI/UX
> 走查原则(`code-review-anti-contamination`):只看代码,不信文档/会话描述,关键结论 file:line 源码佐证。
## P0(严重 bug,已修)
| # | 问题 | 位置 | 修复 |
|---|---|---|---|
| 1 | df-mcp update_idea/project/task 缺省字段被空串覆盖(部分更新丢 title) | crates/df-mcp/src/tools.rs | 回退 existing(fc249ad) |
| 2 | df-execute probe_pwsh 死缓存(两 OnceLock,Default 永返 PS5,Pwsh 全死代码) | crates/df-execute/src/shell.rs | OnceLock 单源 PWSH_CACHE(fc249ad) |
## P1(高优,4 修 + 2 专项登记)
| # | 问题 | 位置 | 状态 |
|---|---|---|---|
| 1 | df-mcp evaluate_idea 标 Low 却写库(read-only 仍改) | crates/df-mcp/src/tools.rs | ✅ 拆 evaluate(只读)+score(写)fc249ad |
| 2 | df-execute probe_pwsh 无超时挂起 + detect_shell 与 shell.rs 割裂 | shell.rs + env_snapshot.rs | ✅ 3s 超时 + 单源 fc249ad |
| 3 | ai_self_review build_review_prompt 直接拼 output_text(prompt 注入) | df-nodes/ai_self_review_node.rs | ✅ truncate + XML 标签隔离 fc249ad |
| 4 | MessageList + MessageItem 两套 AI 消息渲染(死代码+职责混乱) | src/components/ai/ | ✅ MessageItem 收敛 user-only f719546 |
| 5 | AI router 路由弱(context 死/weight 弱/意图误收敛砍 Data 工具) | crates/df-ai/src/router.rs + intent.rs | 📋 专项登记(memory `ai-router-sanitize-refactor-debt`) |
| 6 | sanitize step4 制造 orphan(依赖出口断言兜底) | crates/df-ai/src/context/sanitize.rs | 📋 专项登记(同上) |
## P2/P3(关键,后续按优先级)
| 问题 | 位置 | 级别 |
|---|---|---|
| status 无 union(types.ts AiMessage 无 status,AiMessageWithStatus 双份重复 + cast) | api/types.ts + AiChat.vue + MessageList.vue | P2 |
| useAiEvents/useToolCard/useAiSend 胖(900/730/500 行) | composables/ai/ | P2 |
| ApprovalPopup _placeholder hack + 审批 action 两套(path 浮窗缺 always) | views/ApprovalPopup.vue | P2 |
| df-nodes 6 节点未注册(git/http/docker/notify/subflow,实现完整不可达) | state.rs build_registry | P2 |
| parse_review_json(verdict 不规范/score 不 clamp/无正则兜底) | df-nodes/ai_node_helpers.rs | P2 |
| provider_pool 亲和不过 model.enabled | crates/df-ai/src/provider_pool.rs | P2 |
| df-mcp inputSchema required 形同虚设(handler arg_str_or 静默兜底) | crates/df-mcp/src/tools.rs | P2 |
| df-mcp bind_directory 路径校验弱(仅防 ..,无白名单) | crates/df-mcp/src/tools.rs | P2 |
| SubflowNode node_type() 用 &'static str 风格分裂 | df-nodes/subflow_node.rs | P3 |
| script_node 缺 R-PD-2 安全注释 | df-nodes/script_node.rs | P3 |
## 推翻假设(走查否定,更新认知)
- **AiChat.vue 798 行**(非 3000+ God 组件),已抽 5 批(消息列表/输入区/工具卡片/顶栏/侧栏),memory `fe-arch-tech-debt` 过时
- **human_node 36KB 是测试 76%**(实现 200 行内聚,无技术债),memory `devflow-workflow-approval-review` 头号 bug(human_node:41 缺 await)已修(line 55-64)+ 双回归测试
## 修复提交(本次走查)
- `fc249ad` 全库走查 P0+P1 后端(df-mcp 数据丢失/evaluate 拆 + df-execute probe_pwsh 死缓存/超时/单源 + ai_self_review 注入隔离 + generate_image 测试)
- `f719546` 前端走查 P1(MessageList/MessageItem 两套渲染收敛)
## 专项登记(核心,后续)
- **AI router + sanitize step4** — memory `ai-router-sanitize-refactor-debt`(核心模块,改风险大,后续专项)
- **run_agentic_loop 1217 行重构** — memory `agentic-loop-refactor-debt`(分步拆 finish_round_exit/build_runtime_prompt)
## 剩余
- 技能发送后未注入 — SkillResolver 日志(dffc4e4)已加,待打包后测 trace 定位(前端 skill 传?/name 匹配?/read 失败?)
- P2/P3 — 后续按优先级 + 用户反馈