All 8 tickets' acceptance criteria checked off (incl. the real OpenClaw E2E verified on t480). Trivial import-sort fix from ruff included.
16 lines
931 B
Markdown
16 lines
931 B
Markdown
# 04 — 智能评估报告 API + Markdown 导出
|
||
|
||
**What to build:** OpenClaw 提交结构化报告的接口、报告读取接口、Markdown 渲染导出。
|
||
|
||
**Blocked by:** 03(会话完成才有报告)
|
||
|
||
**Acceptance criteria:**
|
||
- [x] `PUT /api/intelligent-evals/{id}/report`:OpenClaw 提交结构化报告(body = report JSON),状态 executing → completed,记录 completed_at
|
||
- [x] `GET /api/intelligent-evals/{id}/report`:读取报告
|
||
- [x] `GET /api/intelligent-evals/{id}/report/markdown`:Markdown 渲染导出
|
||
- [x] 报告结构校验:必须包含 summary、findings 数组;findings 每项必须有 issue、severity、dimension
|
||
- [x] 评估非 executing 状态提交报告返回 409
|
||
- [x] Markdown 渲染为纯函数(dict 进 string 出),有单测
|
||
- [x] 无报告时 GET report 返回空对象或 404
|
||
- [x] 集成测试覆盖:提交报告 → 状态转 completed → 读取 → Markdown 导出
|