Introduce ModelPurpose.ANALYSIS and a globally-unique is_analysis_default marker on chat model configs so campaign analysis can resolve its model. Service rejects disabled or non-chat configs; repo clears the previous holder on set. Documented the analysis role in CONTEXT.md.
15 lines
1.1 KiB
Markdown
15 lines
1.1 KiB
Markdown
# 05 — 正式线自动触发 + Markdown 导出纳入
|
||
|
||
**What to build:** 正式线活动(`time_scale == 1`)在 runner 写入 COMPLETED 的同一处自动 enqueue 分析后台任务(`triggered_by=auto`);加速活动(`time_scale > 1`)与失败/取消的活动不自动触发;无可解析分析模型时静默跳过(不阻塞活动完成)。活动 Markdown 导出(`render_campaign_markdown`)在该活动存在 completed 分析时追加分析区块:总体结论 / 问题诊断(含严重度、场景、证据 run 引用)/ 分场景叙述 / 改善建议。
|
||
|
||
**Blocked by:** 03(分析服务与存储)
|
||
|
||
**Status:** ready-for-agent
|
||
|
||
- [ ] runner 完成处钩子:`time_scale == 1` 且有可解析分析模型 → enqueue(用假分析服务断言调用/不调用两侧)
|
||
- [ ] 加速线、failed、cancelled 活动不自动触发
|
||
- [ ] 无分析模型时静默跳过,活动完成流程不受影响
|
||
- [ ] `render_campaign_markdown` 追加分析区块(仅 completed 分析);无分析时导出与现状一致
|
||
- [ ] 测试:自动触发三分支 + Markdown 含/不含分析区块两侧
|
||
- [ ] `pytest` + `ruff` 全绿
|