AgentEvalTool/.scratch/v1.0/issues/04-report-api.md
sinohqb 9cdbc41808 docs(intelligent-eval): commit v1.0 spec, tickets, and post-v1.0 improvements
All 8 tickets' acceptance criteria checked off (incl. the real OpenClaw
E2E verified on t480). Trivial import-sort fix from ruff included.
2026-08-05 14:01:24 +08:00

931 B
Raw Permalink Blame History

04 — 智能评估报告 API + Markdown 导出

What to build: OpenClaw 提交结构化报告的接口、报告读取接口、Markdown 渲染导出。

Blocked by: 03会话完成才有报告

Acceptance criteria:

  • PUT /api/intelligent-evals/{id}/reportOpenClaw 提交结构化报告body = report JSON状态 executing → completed记录 completed_at
  • GET /api/intelligent-evals/{id}/report:读取报告
  • GET /api/intelligent-evals/{id}/report/markdownMarkdown 渲染导出
  • 报告结构校验:必须包含 summary、findings 数组findings 每项必须有 issue、severity、dimension
  • 评估非 executing 状态提交报告返回 409
  • Markdown 渲染为纯函数dict 进 string 出),有单测
  • 无报告时 GET report 返回空对象或 404
  • 集成测试覆盖:提交报告 → 状态转 completed → 读取 → Markdown 导出