重构: 文档汇总+进度看板+孤儿任务清理脚本+gitignore 噪音排除
- docs/02 架构设计: 新增 aichat审查/异步审批构想/流式渲染调研/generating状态机/密钥迁移健壮性/工作流脚本执行边界/条件表达式引擎/F-07 trait下沉/Agent架构说明/任务推进构想/功能创意池;更新功能决策记录+归档/对抗论证/文档记录规范/经验记录
- docs/03 模块文档: 新增 AI对话引擎/DAG引擎详解;更新 df-knowledge/df-nodes/df-storage/df-workflow/df-ai
- docs/05 代码审查: 新增 全栈审查/全局review/架构审查/近期改动审查/工作区多角度走查/自研memo流式渲染审查
- docs/09 问题排查: 新增 aichat-apikey-401
- docs/INDEX+README 索引同步;docs/todo 待办看板(2026-06-15 汇总)
- PROGRESS.md Sprint 22-25;URGENT.md 加急清单快照(5 项 P0 已全修)
- scripts/cleanup_orphan_tasks.{py,sh} 孤儿任务清理工具
- .gitignore 补 *.broken.bak + tmp/ 噪音排除
This commit is contained in:
83
URGENT.md
Normal file
83
URGENT.md
Normal file
@@ -0,0 +1,83 @@
|
||||
# 🔴 加急待办清单
|
||||
|
||||
> 来源:DevFlow 任务系统核对 + docs/todo.md,2026-06-14 汇总
|
||||
> 说明:仅收录 P0(用户可感硬伤 / 数据安全 / 功能不可用)+ 关键 P1 项
|
||||
|
||||
---
|
||||
|
||||
## P0 — 必须优先修复
|
||||
|
||||
### 1. B-260614-AC3 历史中毒无自愈(对话永久卡死)
|
||||
- **现象**:畸形 tool_use/tool_result 一旦入历史,用户重发 → `build_for_request` 带毒 → 服务端 500 → 永久死循环,用户「再也对话不了」
|
||||
- **根因**:`stream_recv.rs` 收 500 时只 `emit AiError + return None`,不清理毒历史;`agentic.rs` 直接 `return`,`ContextManager` 中毒消息原封不动
|
||||
- **修法**:`stream_llm` 收 500/格式错时,检测 `ContextManager` 最后一轮未闭合 tool 配对(assistant 有 tool_call 但无对应 tool_result),剔除该对;或提供「修复当前对话」IPC 操作
|
||||
- **涉及文件**:`src-tauri/src/commands/ai/{stream_recv.rs, agentic.rs}`、`crates/df-ai/src/context.rs`
|
||||
|
||||
### 2. FR-S7 write_file 覆盖已有非空文件无确认/备份
|
||||
- **现象**:2026-06-14 实测事故——AI 误把 write_file 当 edit 用,只传头部 3 行把 PROGRESS.md 762 行/72KB 覆盖成 248 字节
|
||||
- **根因**:`tool_registry.rs` write_file handler 无目标文件存在性检测,直接覆盖
|
||||
- **修法**:覆盖非空文件前自动备份 `.bak` 或检测目标存在强制走 edit_file;写入后返回新旧大小对比,差异巨大时 warn
|
||||
- **涉及文件**:`src-tauri/src/commands/ai/tool_registry.rs`
|
||||
|
||||
### 3. FR-S8 路径 sandbox 系统性逃逸
|
||||
- **现象**:`validate_path` 三处缺陷可被绕过,AI 工具能读写 workspace 外文件
|
||||
- **根因**:① 子串 `..` 检测对绝对路径无效 ② `canonicalize` 仅覆盖已存在路径(write_file 新建漏) ③ Windows `starts_with` 大小写敏感
|
||||
- **修法**:统一 canonicalize(不存在取最长存在前缀)+ 大小写不敏感 prefix 比较 + parent 校验 + symlink 不跟随
|
||||
- **涉及文件**:`src-tauri/src/commands/ai/tool_registry.rs:19-21,53-69`
|
||||
|
||||
### 4. B-03b-R8 缺 human 节点端到端集成测试
|
||||
- **现象**:前端无 human DAG 入口,demoDag 仅 script,单测绿但不覆盖 human→弹窗→审批→返回链路
|
||||
- **影响**:审批闭环的 R6/R7 类 bug 存活土壤,无测试兜底
|
||||
- **修法**:前端加 human DAG 入口(测试用 DAG),端到端验证 审批弹窗→通过/拒绝→工作流继续/取消
|
||||
- **涉及文件**:`src/views/ProjectDetail.vue`、`crates/df-nodes/src/human_node.rs`
|
||||
|
||||
### 5. FR-S1 api_key 明文落盘(剩余项)
|
||||
- **现状**:IPC mask 已修(commit 49ac060),前端不持明文。**剩余**:DB `migrations.rs:446 api_key TEXT NOT NULL` 明文落盘
|
||||
- **修法**:迁移 keyring 单列存储(`keyring` crate),DB 不存原始 key
|
||||
- **涉及文件**:`crates/df-storage/src/migrations.rs`、`src-tauri/src/commands/ai/commands.rs`
|
||||
|
||||
---
|
||||
|
||||
## P1 — 重要,尽快处理
|
||||
|
||||
### 6. B-260614-AC1 anthropic_compat tool_use_id None 发 null
|
||||
- **现象**:`tool_call_id` 为 None 时序列化为 `"tool_use_id": null`,触发服务端 500
|
||||
- **修法**:None 时 skip 该 tool_result 块或填占位 id + warn
|
||||
- **涉及文件**:`crates/df-ai/src/anthropic_compat.rs:297`
|
||||
|
||||
### 7. AR-6 Low 工具失败语义冲突
|
||||
- **现象**:工具执行失败时 emit AiError 置 `streaming=false` 但 agentic loop 续跑,残留文本 flush 又"完成",状态紊乱
|
||||
- **涉及文件**:`src-tauri/src/commands/ai/{audit.rs, agentic.rs:195}`
|
||||
|
||||
### 8. F-260614-01 模型能力系统 Phase 1
|
||||
- **说明**:设计已完成。ModelCapability 数据模型 + ModelRouter 重写 + 7 调用点接入 + Settings 模型池编辑 UI + AiChat 模型下拉
|
||||
- **涉及文件**:`crates/df-ai/`、`src-tauri/src/commands/ai/`、`src/views/Settings.vue`、`src/components/AiChat.vue`
|
||||
|
||||
### 9. F-260614-07 df-ai-core trait 下沉拆 crate(架构前置)
|
||||
- **说明**:解锁 F-03(灵感对抗评估接 LLM)。统一为全局 AI trait 下沉独立 crate,df-ideas/df-nodes 依赖 trait 而非 df-ai 具体 impl
|
||||
- **设计文档**:`docs/02-架构设计/F-07-df-ai-core-trait下沉设计-2026-06-14.md`
|
||||
|
||||
### 10. T-260614-01 多项未 tauri dev 实测
|
||||
- **说明**:Sprint 9-18 积累的未实测项——评分 IPC / promote_idea / token 落库 / 知识库 Tier 1 全栈 / LLM 并发 Semaphore / 知识生命线
|
||||
- **风险**:编译通过 ≠ 运行正确,多轮未实测积压隐患
|
||||
|
||||
### 11. T-260614-02 切对话不中断路由运行时实测
|
||||
- **说明**:Sprint 8 A 路线场景 2/3 部分场景未运行时验证
|
||||
|
||||
---
|
||||
|
||||
## 速查矩阵
|
||||
|
||||
| # | 编号 | 优先级 | 类型 | 一句话 |
|
||||
|---|------|--------|------|--------|
|
||||
| 1 | AC3 | P0 | Bug | 对话永久卡死,无自愈 |
|
||||
| 2 | FR-S7 | P0 | 安全 | write_file 覆盖无备份 |
|
||||
| 3 | FR-S8 | P0 | 安全 | 路径 sandbox 可逃逸 |
|
||||
| 4 | B-03b-R8 | P0 | 测试 | 审批闭环无端到端测试 |
|
||||
| 5 | FR-S1 | P0 | 安全 | api_key DB 明文落盘 |
|
||||
| 6 | AC1 | P1 | Bug | tool_use_id null 触发 500 |
|
||||
| 7 | AR-6 | P1 | Bug | 工具失败状态紊乱 |
|
||||
| 8 | F-01 | P1 | 功能 | 模型能力系统 Phase 1 |
|
||||
| 9 | F-07 | P1 | 架构 | df-ai-core trait 下沉 |
|
||||
| 10 | T-01 | P1 | 验收 | 多项未 tauri dev 实测 |
|
||||
| 11 | T-02 | P1 | 验收 | 切对话不中断实测 |
|
||||
Reference in New Issue
Block a user