fischer-agentkit/tests/unit/experts
chiguyong fbe08cb1e2 feat(experts): add debate phase executor to TeamOrchestrator (U2)
Implement _execute_debate_phase() with Lead-facilitated structured debate:
- Lead opens with divergence point + dependency context
- Experts argue in parallel per round (asyncio.gather)
- Lead summarizes each round, then adjudicates final verdict
- Verdict produces decision (adopt/compromise/shelve/inconclusive) + conclusion
- Conclusion written to SharedWorkspace for downstream phases

Escape hatches:
- debate_config.skip=true short-circuits with template text
- MAX_DEBATE_ROUNDS=4 hard cap on rounds
- User /stop intervention ends debate early (U4-compatible via getattr fallback)
- LLM unavailable falls back to template verdict, no crash

New events: debate_started, expert_argument, debate_round_summary,
debate_resolved (plus existing phase_completed for consistency).

Phase dispatcher (_execute_phase) routes by phase_type:
EXECUTION to _execute_execution_phase, DEBATE to _execute_debate_phase.

36 new tests in test_orchestrator_debate.py covering happy path (2 rounds,
2 experts), max_rounds=1 boundary, empty participants, user stop, skip
escape hatch, LLM unavailable, SharedWorkspace integration, event
broadcasting, intervention channel compatibility, and helper methods.
All 377 expert tests pass.

Also includes planning artifacts (brainstorm requirements + implementation
plan with 6 units U1-U6).
2026-06-24 10:54:51 +08:00
..
__init__.py feat: Expert Team Mode — plan-execute collaboration with conversation UI 2026-06-14 22:20:14 +08:00
test_board_backtest.py feat: 私董会讨论模式 + 回测集成 + WS持久化修复 2026-06-17 23:52:53 +08:00
test_board_orchestrator.py feat: 私董会讨论模式 + 回测集成 + WS持久化修复 2026-06-17 23:52:53 +08:00
test_board_router.py feat: 企业级客户端-服务端架构 + 代码审查修复 2026-06-20 06:48:18 +08:00
test_board_team.py feat: 私董会讨论模式 + 回测集成 + WS持久化修复 2026-06-17 23:52:53 +08:00
test_config.py feat: Expert Team Mode — plan-execute collaboration with conversation UI 2026-06-14 22:20:14 +08:00
test_expert.py feat: Expert Team Mode — plan-execute collaboration with conversation UI 2026-06-14 22:20:14 +08:00
test_orchestrator_debate.py feat(experts): add debate phase executor to TeamOrchestrator (U2) 2026-06-24 10:54:51 +08:00
test_plan.py feat(experts): add PhaseType enum and debate_config to PlanPhase 2026-06-24 10:42:11 +08:00
test_registry.py feat: Expert Team Mode — plan-execute collaboration with conversation UI 2026-06-14 22:20:14 +08:00
test_router.py feat(experts): U7 新增 5 个编程专家模板 + dev_team 团队模板 + ExpertTeamRouter 模板展开 2026-06-18 01:50:43 +08:00
test_team.py feat(experts):重写 TeamOrchestrator 为流水线模式 + TeamStatus.PLANNING 2026-06-18 01:39:22 +08:00
test_team_orchestrator.py feat: 企业级客户端-服务端架构 + 代码审查修复 2026-06-20 06:48:18 +08:00