sinohqb
7eae6de52d
refactor(evaluation/storage): 结算统一与 repository 拆分(Phase 2 + 3)
...
合并两个不可分割的深化:
Phase 2 — 智能作业结算统一(ADR-0012)
- intelligence_jobs.execute(job_kind, campaign_id, ...) 作为结算的
唯一实现:建行 → 认领 → 校验 → generating → 落账,一处编排、
一处截断(500 字符)。两个 executor 退化为 ensure_queued /
validate / work_fn 三个小 adapter。
- analysis.validate_analysis_request() 共享校验入口(活动终态 →
模型),路由捕获映射 400、executor 捕获落 failed 行,与
validate_comparison_request 先例同构。
- campaign_runner._auto_start_analysis 的跳过守卫收敛至
auto_intelligence_eligible 单一判断点。
- comparison.py 删除零调用的 build_comparison_payload;
load_comparison_view 投影归位至 campaign_read_model。
- 新增 characterization 测试(认领竞争、重复触发、截断、恢复上限)。
Phase 3 — storage/repository.py 拆分
- AsyncJobRepository 及两个子类迁至
storage/async_job_repository.py(Phase 2 的 intelligence_jobs
与 comparison 必须 import 自该路径,故与 Phase 2 同 commit)。
- ExplorationSession / ExplorationMessage 迁至
storage/exploration_repository.py;repository.py 由 1180 行降至
约 814 行,grep 确认无残留符号。
- exploration 子模块与路由 import 全部更新;测试 import 跟随。
刻意不做:CAS 共享原语、app.py 五 registry 关停顺序归一
(ADR-0006 精神,等真实需求出现再议)。
2026-08-24 05:50:27 +08:00
sinohqb
1782b245bf
refactor(architecture): deepen campaign runtime modules
2026-08-11 13:18:48 +08:00
sinohqb
864ae2b7fe
fix(review): address release correctness findings
2026-08-09 03:20:40 +08:00
sinohqb
5d04455664
feat(campaigns): auto-trigger analysis and include it in markdown export
...
The scheduler loop enqueues the analysis task when a realtime campaign
completes; accelerated or cancelled campaigns and a missing analysis
model skip silently. The campaign markdown export appends the analysis
appendix (overall, problems, narratives, suggestions) when a completed
analysis exists.
2026-08-03 02:25:07 +08:00