AgentEvalTool/tests/unit
sinohqb 2b6cab6cb2 feat(comparison): unify read model and validation for period comparison
周期对比读模型升位为单一出口(load_comparison_view),GET/POST/markdown
三处调用点统一走同一 view 投影,消除「取数三件套」重复。校验逻辑收敛到
validate_comparison_request,router 捕获映射 400,执行器捕获落 failed 行,
校验顺序权威不再漂移。

- 新增 load_comparison_view:无行返回 status=none + auto_baseline,有行
  返回完整 comparison dict(含 model_name 标签)+ metric_diff
- 新增 validate_comparison_request:活动终态 → 模型 → 基线 → 分析,违
  规抛 ComparisonError
- execute_campaign_comparison 内联校验替换为 validate_comparison_request
  调用,catch ComparisonError 落 failed 行
- router 三处迁移:GET /comparison、POST /comparison、markdown 导出
- 删除 build_comparison_payload(已吸收进 load_comparison_view)
- 8 个新测试覆盖读模型三态 + 校验五错
2026-08-04 10:49:14 +08:00
..
__init__.py v0.2.0-dev: 文件管理 + 页面布局统一 + 6 个 bug 修复 2026-07-16 15:25:22 +08:00
mock_channel.py v0.2.0-dev: 文件管理 + 页面布局统一 + 6 个 bug 修复 2026-07-16 15:25:22 +08:00
test_analysis_default_migration.py feat(models): add analysis-default flag for campaign intelligence 2026-08-03 01:46:51 +08:00
test_build_run_summary.py refactor(engine): extract build_run_summary pure seam 2026-07-31 14:20:51 +08:00
test_campaign_analyses_migration.py feat(analysis): two-phase campaign analysis agent with storage and API 2026-08-03 02:06:29 +08:00
test_campaign_analysis_model_migration.py feat(campaign): support per-campaign analysis model override 2026-08-03 01:53:13 +08:00
test_campaign_analysis.py feat(exploration): findings flow into report, analysis and export 2026-08-03 19:16:33 +08:00
test_campaign_comparison.py feat(comparison): v0.8 周期对比 — 计划指纹自动基线配对、机械指标 diff 与 LLM 演进叙述 2026-08-03 13:32:48 +08:00
test_campaign_narrow_updates.py refactor(repository): narrow atomic updates for patrol/cancel/scheduler writes 2026-08-04 03:39:42 +08:00
test_campaign_period_comparisons_migration.py feat(comparison): v0.8 周期对比 — 计划指纹自动基线配对、机械指标 diff 与 LLM 演进叙述 2026-08-03 13:32:48 +08:00
test_campaign_report_format.py test(report): aggregation edge cases and output format validation 2026-08-03 19:03:44 +08:00
test_campaign_report_loader.py refactor(report): unify campaign report loading behind one read model 2026-08-04 03:30:29 +08:00
test_campaign_report.py style(tests): ruff 全量清理 — 49 项修复,backend 与 tests 全绿 2026-08-03 15:13:24 +08:00
test_campaign_scheduler.py refactor(campaign): move tick decisions into the pure scheduler seam 2026-07-31 02:20:14 +08:00
test_campaign_summary.py style(tests): ruff 全量清理 — 49 项修复,backend 与 tests 全绿 2026-08-03 15:13:24 +08:00
test_campaign_timeline.py style(tests): ruff 全量清理 — 49 项修复,backend 与 tests 全绿 2026-08-03 15:13:24 +08:00
test_cascade.py style(tests): ruff 全量清理 — 49 项修复,backend 与 tests 全绿 2026-08-03 15:13:24 +08:00
test_case_verdict.py refactor(verdict): unify read path on authoritative case_outcomes 2026-07-31 14:11:58 +08:00
test_comparison_read_model.py feat(comparison): unify read model and validation for period comparison 2026-08-04 10:49:14 +08:00
test_engine.py style(tests): ruff 全量清理 — 49 项修复,backend 与 tests 全绿 2026-08-03 15:13:24 +08:00
test_exploration_budget.py feat(campaigns): exploration seed set and budget config per campaign 2026-08-03 17:52:25 +08:00
test_exploration_judge.py feat(exploration): judge sampling review after session close 2026-08-03 18:59:40 +08:00
test_exploration_lifecycle.py refactor(exploration): move ledger and state machine into domain modules 2026-08-04 03:46:51 +08:00
test_exploration_summary.py fix(exploration): include all judge findings instead of poor-only 2026-08-04 02:45:41 +08:00
test_file_repository.py refactor(files): harden storage and split frontend 2026-07-17 17:41:19 +08:00
test_file_service.py refactor(files): harden storage and split frontend 2026-07-17 17:41:19 +08:00
test_http_channel_and_rules.py style(tests): ruff 全量清理 — 49 项修复,backend 与 tests 全绿 2026-08-03 15:13:24 +08:00
test_implicit_rules.py refactor(engine): thin _run_case and _save_rule_results 2026-07-31 14:59:50 +08:00
test_judgement.py refactor(judgement): converge case-pass decision into one deep module 2026-07-29 19:45:02 +08:00
test_llm_score.py style(tests): ruff 全量清理 — 49 项修复,backend 与 tests 全绿 2026-08-03 15:13:24 +08:00
test_llm_task_lifecycle.py refactor(tasks): route LLM background tasks through TaskRegistry 2026-08-04 09:58:20 +08:00
test_metrics.py refactor(metrics): type Run summary and converge cross-run aggregation 2026-07-31 01:57:56 +08:00
test_migrate_model_configs.py feat(models): add centralized model configuration 2026-07-17 20:02:43 +08:00
test_model_configs.py feat(models): add analysis-default flag for campaign intelligence 2026-08-03 01:46:51 +08:00
test_model_gateway.py feat(models): support mainstream model protocols 2026-07-17 20:58:27 +08:00
test_model_metadata_migration.py feat(models): add model capability metadata 2026-07-17 21:41:32 +08:00
test_model_runtime_integration.py refactor(metrics): type Run summary and converge cross-run aggregation 2026-07-31 01:57:56 +08:00
test_orphan_runs.py refactor(metrics): type Run summary and converge cross-run aggregation 2026-07-31 01:57:56 +08:00
test_report_render.py feat(exploration): findings flow into report, analysis and export 2026-08-03 19:16:33 +08:00
test_report.py style(tests): ruff 全量清理 — 49 项修复,backend 与 tests 全绿 2026-08-03 15:13:24 +08:00
test_repository.py refactor(storage): converge CRUD skeleton into BaseRepository 2026-07-31 14:30:11 +08:00
test_s2_rules_and_logic.py style(tests): ruff 全量清理 — 49 项修复,backend 与 tests 全绿 2026-08-03 15:13:24 +08:00
test_scenarios.py style(tests): ruff 全量清理 — 49 项修复,backend 与 tests 全绿 2026-08-03 15:13:24 +08:00
test_settings.py feat(engine): make poll_reply timeout configurable via env 2026-07-30 09:58:08 +08:00
test_task_registry.py refactor(tasks): unify run/campaign task registries into TaskRegistry 2026-07-31 03:39:03 +08:00
test_utils_llm.py style(tests): ruff 全量清理 — 49 项修复,backend 与 tests 全绿 2026-08-03 15:13:24 +08:00
test_webhook.py style(tests): ruff 全量清理 — 49 项修复,backend 与 tests 全绿 2026-08-03 15:13:24 +08:00