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