Commit Graph

10 Commits

Author SHA1 Message Date
Hermes Agent
e24107c517 feat: add delivery watchdog and crowd quality summary
Some checks failed
CI / pytest (Python 3.10) (push) Has been cancelled
CI / pytest (Python 3.11) (push) Has been cancelled
CI / pytest (Python 3.12) (push) Has been cancelled
2026-06-14 20:47:25 +08:00
Hermes Agent
ccf93c0b15 feat: add delivery status tracking and crowd quality levels
Some checks failed
CI / pytest (Python 3.10) (push) Has been cancelled
CI / pytest (Python 3.11) (push) Has been cancelled
CI / pytest (Python 3.12) (push) Has been cancelled
2026-06-14 19:34:43 +08:00
Hermes Agent
3f46811e49 release: cut v2.1
Some checks failed
CI / pytest (Python 3.10) (push) Has been cancelled
CI / pytest (Python 3.11) (push) Has been cancelled
CI / pytest (Python 3.12) (push) Has been cancelled
2026-06-13 14:49:58 +08:00
coder
1ce861166f feat(crowd-db): T2.5 扎堆检测单元测试 (覆盖率 93% ≥80%)
PRD 用例: 高风险识别 / 替代方案 / 跨省份 / 异常处理
- 新增 20 个 test_use_case_* 用例锚定 PRD 4 项要求
- 显式覆盖 freq=4 高风险完整字段、alt score 0-100、广东 vs 湖南跨省隔离
- 11 个异常处理用例覆盖 name=None/非 dict 元素/frequency 异常/loader 抛错

根因加固: detector 主循环加入 3 层防御
- isinstance(rec, dict) 防止 TypeError
- isinstance(rec_name, str) 防止 AttributeError on .strip()
- try/except frequency 防止 ValueError
- _normalize_entry 对 truthy 非 str school 走 str() 兜底

质量门禁
- crowd_detector.py 覆盖率 93% (101 stmts / 7 missed 仅 __main__ 块)
- test_crowd_detector 55/55 passed
- data/crowd_db/ 全量 125/125
- ruff check data/crowd_db/ All checks passed
- 仓库全量 249 passed (排除既有 orders/masking 失败)

Refs: docs/IMPLEMENTATION_PLAN_v2.md T2.5
2026-06-12 16:46:42 +08:00
Hermes Agent
6af6e0156b feat(crowd-db): T2.4 扎堆报告生成器 + 端到端渲染验证
- data/crowd_db/risk_report.py: build_crowd_risks 把 RiskFinding 转
  模板所需 crowd_risks 字典;高/中/低三色 emoji(🔴/🟡/🟢);
  group_by_risk / format_risk_summary / render_risk_table 辅助能力;
  LoaderLike Protocol 避免对 CrowdDBLoader 强依赖
- data/crowd_db/tests/test_risk_report.py: 22 用例覆盖三色 emoji、
  模板字段、alternatives 重映射、防御 fallback、空方案、不存在
  省份、自定义 loader 注入
- scripts/verify_t2_4_e2e.py: 用真实湖南 575 分数据 + audit_report.html
  模板渲染一遍,6/6 集成断言通过
- CHANGELOG: T2.4 记录

验证:data/crowd_db/tests/ 105/105、仓库全量 392/392、ruff All checks
passed、validate_template.py PASS
2026-06-12 16:35:20 +08:00
Hermes Agent
00e596ab10 feat(crowd-db): add provenance query and validation 2026-06-12 16:25:05 +08:00
Hermes Agent
55bf84610b feat(crowd_db): T2.3 扎堆检测算法
Some checks failed
CI / pytest (Python 3.10) (push) Has been cancelled
CI / pytest (Python 3.11) (push) Has been cancelled
CI / pytest (Python 3.12) (push) Has been cancelled
- 新增 detect_crowd_risk(plan, user_score, province) 入口
- 遍历方案每条志愿,匹配该分数段内 crowd_db 记录
- 风险等级:frequency >=4 high / 2-3 medium / 1 low / 0 跳过
- 院校模糊匹配(互相包含),专业可选
- 支持 dict / CrowdRecommendation / tuple / list 多种 plan 形态
- 支持注入 loader 便于测试,结果按 frequency 降序
- 20 个单元测试覆盖各分支(136/136 全套通过)
2026-06-12 11:00:03 +08:00
Hermes Agent
b9673d7501 feat(crowd_db): T2.1 扩展湖南数据覆盖 - 专科批+省外顶尖段
- 新增 [440,480] 专科批临界段(4 条)
- 新增 [660,690] 省外顶尖段(清北复交浙,6 条)
- 更新 source 字段说明 T2.1 整理动作
- 总条目 58 -> 68,仍在 50-100 范围内
- 10 个分数段连续覆盖 440-690,无 gap/overlap
- 频次分布 2/3/4 = 18/26/24,平台覆盖均衡
- 5/5 单元测试通过
2026-06-12 10:47:40 +08:00
Hermes
552526a3f1 feat(crowd_db): T1.1 数据加载器 + 目录完善
- data/crowd_db/README.md 补全字段说明、文件命名、数据来源
- data/crowd_db/hunan.json 已有 T2.1 整理的 8 个分数段 58 条数据
- 新增 loader.py: CrowdDBLoader + CrowdRecommendation
  - 省份→文件名映射(湖南→hunan.json) + 多种命名兜底
  - load_province / find_recommendations / find_recommendation_by_school
  - risk_level 派生属性(frequency>=4=high)
- tests/test_loader.py 5 测试全通过

Plan: docs/plans/T1-1-crowd-db-setup.md DoD 达成
2026-06-12 10:29:53 +08:00
Hermes Agent
a146fe942c feat(audit): 完整审核+修订版实施计划
【审核工作】
基于 plan-audit skill 对 11 份文档(5874行)做完整审核:
- 文档完整性: A级 
- 业务对齐: A级 
- 差异化策略: A级 
- 技术选型: A级 
- 任务分解: A级 
- 行业实践: C级 🔴 (5/10)
- 实施可执行: B级 🟡 (62.5%)

【发现14项差距】
4项重大缺失:
  G-01: Web端完全未在实施计划
  G-02: 管理后台(432行设计)无对应实施
  G-03: 分享功能(274行设计)无对应实施
  G-04: AI审核PRD标P1但实际应P0

4项中等缺失:
  G-05: 测试覆盖仅6用例(需≥80%)
  G-06: 渠道SDK集成未设计
  G-07: 错误处理体系缺失
  G-08: CI/CD流程未设计

3项设计偏差:
  D-01: data/crowd_db目录不存在
  D-02: 性能目标无验证任务
  D-03: 数据加密未实施

3项建议优化

【关键产出】
1. docs/AUDIT_REPORT_2026-06-11.md (382行)
   - 完整审核报告
   - 行业最佳实践对照
   - 风险评估
   - 行动建议

2. docs/REMEDIATION_TASK_BOARD_2026-06-11.md (386行)
   - 14项修复任务清单
   - 最短闭环路径
   - 决策记录

3. docs/IMPLEMENTATION_PLAN_v2.md (412行)
   - 11个核心任务(原5个+新增6个)
   - 工期30天→40天
   - 强制TDD覆盖率门槛
   - 6周详细时间表

【已修复P0】
- PRD: F020 AI审核 P1→P0
- 创建 data/crowd_db/ 目录(D-01修复)
- 修订IP为v2版(10.1→11任务)
- 加入测试覆盖率门槛

【决策记录】
D-01: AI审核提升至P0
D-02: 管理后台/分享纳入MVP
D-03: Web端推迟到v2.3
D-04: 测试覆盖设硬指标
D-05: CI/CD简化版

【行业实践差距】
标准达标: 5/10 (50%)
- 测试覆盖: 🔴
- 错误处理: 🔴
- CI/CD: 🔴
- 降级策略: 🔴
- API版本: 🔴
- 日志审计: 🟡
- 性能监控: 🟡
- 数据备份: 🟡
- 安全认证: 🟡
- 文档: 🟡

【下一步】
启动T1 AI审核服务实施(10天)
2026-06-12 10:05:13 +08:00