feat(flywheel): 阶段三执行质量预测层(trailer 死链修复 + 风险画像) #2

Merged
lanrtop merged 14 commits from feat/flywheel-intelligence into master 2026-07-04 14:45:28 +08:00
2 changed files with 9 additions and 6 deletions
Showing only changes of commit 94d8be6eb6 - Show all commits

View File

@ -304,9 +304,10 @@ modules:
- id: flywheel-intelligence
name: 飞轮智能成长
area: backend
status: in_progress
progress: 98
note: "阶段三 P3-A~E 全部完成2026-07-04trailer 死链修复+回填、commit_files 采集、predict_task_risk MCP、梦核高风险 scope 段、返工热区 UI剩存量回填与 MCP 实调终验(待新 build 重启)"
status: done
progress: 100
updated: 2026-07-04
note: "阶段三 P3-A~F 全部完成并消费者终验2026-07-04trailer 死链修复、commit_files 采集、predict_task_risk、梦核高风险 scope 段、返工热区 UI、ingest_git_history agent 按钮;实测 rules_applied 6→27、commit_files 15688规则置信度闭环有真数据"
position: [1750, 650]
- id: cloud-products

View File

@ -191,8 +191,9 @@
- files: src/lib/commands.ts, src/components/insight/FlywheelPanel.tsx, src-tauri/src/commands/risk.rs, src-tauri/src/lib.rs
- acceptance: "[pnpm typecheck] exit 0FlywheelPanel 新增跨项目返工热区展示get_high_risk_scopes 封装同步R01"
### 🔵 P3-F. ingest_git_history agent 按钮(全量导入双投影)
- status: in_progress
### ✅ P3-F. ingest_git_history agent 按钮(全量导入双投影)
- status: done
- done_note: 2026-07-04 完成并消费者终验。MCP 实调无参全量19 项目成功 / 7 失败(全是非 git 目录死登记诚实报错rules_applied 6→27存量 21 条回填,远超 ≥12 验收线,含 R11 failure 记录与 R08/R10 fix 命中commit_files 26→15688规则置信度闭环从此有真实数据。UPSERT 语义实证:有 trailer 才计写入,旧 NULL 行不产生无意义 UPDATE
- complexity: S
- files: src-tauri/src/mcp_tools.rs
- acceptance: "[MCP tool] ingest_git_history() 不传参对所有 win_path 项目执行 ingest_full_git_history返回逐项目 imported/skipped 汇总;传 project_id 只跑单项目tools_list_result 含断言;[消费者验证] 实调后 rules_applied 非空行 ≥12存量 trailer 回填生效)"
@ -207,7 +208,8 @@
是否返工: 否
有效策略: architect 阶段先查数据库实况而非只读设计文档——由此发现 R1 trailer 管道死链(%s 只取 subject单测喂全文全绿而生产喂 subject 永空),这个 P0 若不修,阶段三核心闭环(规则置信度)建在死数据上;「单元绿、集成死」用真 git 仓库 e2e 测试驻军UPSERT 只回填 NULL 不覆盖,让回填天然幂等;三处重复的 git log 取数统一为单一入口read_git_log--name-only 让指标与文件单次进程同取
顺手修的旧债: generate_muhe_prompt 用 pool() 导致测试环境必 panic不可测改 try_pool() 走占位文案
遗留: 存量数据回填与 predict_task_risk MCP 实调,待新 build 发布重启后终验(跑一次「全量导入」即回填 trailer + 文件)
遗留: ~~存量数据回填与 predict_task_risk MCP 实调~~已销项2026-07-04 同日消费者终验全过——predict_task_risk 实调返回 medium/normalingest_git_history agent 按钮补上后 rules_applied 6→27、commit_files 26→15688
追记P3-F 消费者验证): 验证过程暴露「全量导入只有 UI 投影」死角 → 当场按双投影原则补 MCP 投影P3-F 卡agent 从此可自主触发回填7 个非 git 目录死登记被诚实报错暴露,可作后续清理线索
auto_applied_rules: R01, R05, R06, R07, R13
rule_effectiveness: R06=有效conn 注入使 risk.rs 7 测试全部 in-memory 可行), R07=有效e2e git 仓库回归测试抓住的正是集成层缺口), R13=有效acceptance 可执行格式让五张卡零歧义), R01=有效commands.ts 同步时确认 HighRiskScope 类型单一来源), R05=有效commit_files migration 随手写进 migrate()