[质量] 虚拟公司 orchestrator 补全 pytest(mock LLM) #127

Open
opened 2026-07-26 18:08:14 +08:00 by admin · 0 comments
Owner

背景

K3 已新增 22 个编排器测试(CEO JSON 解析/知识过滤/交接上下文/全流程 mock),但覆盖范围仍需扩展。

已有测试

  • CEO JSON 解析(5 个)
  • 知识相关性筛选(6 个)
  • 部门交接上下文(5 个)
  • 全流程 mock(验证并行波+独立 session+依赖等待)

待扩展

  • team_orchestrator.py(1975 行,当前 0 测试)
  • company_runner.py(350 行,当前 0 测试)
  • 返工流程(rework)+ 预算熔断
  • 异常路径(LLM 返回非法 JSON、部门执行超时、DB 连接断开)

涉及文件

  • backend/tests/test_company_orchestrator.py(已有 22 个)
  • backend/app/services/team_orchestrator.py
  • backend/app/services/company_runner.py

优先级

⚠️ 中 — 核心模块零测试风险高

预估

1-2 天(已有基础)

## 背景 K3 已新增 22 个编排器测试(CEO JSON 解析/知识过滤/交接上下文/全流程 mock),但覆盖范围仍需扩展。 ## 已有测试 - CEO JSON 解析(5 个) - 知识相关性筛选(6 个) - 部门交接上下文(5 个) - 全流程 mock(验证并行波+独立 session+依赖等待) ## 待扩展 - team_orchestrator.py(1975 行,当前 0 测试) - company_runner.py(350 行,当前 0 测试) - 返工流程(rework)+ 预算熔断 - 异常路径(LLM 返回非法 JSON、部门执行超时、DB 连接断开) ## 涉及文件 - backend/tests/test_company_orchestrator.py(已有 22 个) - backend/app/services/team_orchestrator.py - backend/app/services/company_runner.py ## 优先级 ⚠️ 中 — 核心模块零测试风险高 ## 预估 1-2 天(已有基础)
admin self-assigned this 2026-07-26 18:08:14 +08:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/aiagent#127