Skip to content

[D4] Routing API + dashboard card + demo + tests + docs (API/UI + 端到端验收) #15

@hitome0123

Description

@hitome0123

Parent epic: #11
Depends on: D1 (#12), D2 (#13), D3 (#14)
Estimate: ~1 dev-day (~5h Opus)

范围 Scope

epic 收口:暴露 routing 决策给 API/dashboard、跑端到端 demo、补完测试和文档。让维护者打开运行中的 app 就能完整审计。

改动 Changes

API

  • 新建 web/manuscript_routes.py Flask Blueprint:
    • POST /api/manuscript/<run_id>/route — 触发 venue_router,返回 selection
    • GET /api/manuscript/<run_id>/venue — 当前选定 + rationale + rejected_venues
    • GET /api/manuscript/<run_id>/format_lint — lint report
  • web/app.py — 注册新 Blueprint

Dashboard

  • web/templates/index.html — 加 venue 卡片(chosen + score + 3 个 rejected + lint count + 状态 badge)
  • web/static/js/manuscript.js — 新建,拉数据并渲染
  • 复用 agenda.js 的卡片样式

Demo

  • 新建 scripts/demo_manuscript_routing.py
    • 用 fixture state 跑 router → 输出 selection
    • 顺序触发 ICLR / NeurIPS / arXiv 三个 adapter,各产出一个 bundle
    • 跑 format_linter,打印 lint summary
    • 输出每 bundle 路径 + 截图建议命令

Tests

  • tests/test_manuscript_routes.py — 3 个 HTTP 测试覆盖三个 endpoint
  • 总 coverage:本 epic 累计新增 ~18 测试

Docs

  • 更新 docs/top_venue_manuscript_chain.md
    • 去掉 "all default bundles use ICLR2026" 硬约束描述
    • 改为 "venue_router 决定 + multi-adapter 可插拔"
    • 加 architecture 图(router → adapter → linter → gate → bundle)
  • 更新 README.md — 加 "Manuscript Venue Routing" 章节,列 6 venue + 配置入口

验收 Acceptance

  • 三个 API curl 通(PR 描述贴输出)
  • Dashboard 加载后能看到 venue 卡片 + lint 数量
  • scripts/demo_manuscript_routing.py 一条命令产出 3 个 bundle,artifacts 路径可下载
  • pytest 全绿(含 D1~D3 累计新增);如存在已知 baseline fail,必须列出具体测试名和原因
  • PR 描述包含:
    • 关键阶段 curl 输出(route / venue / format_lint)
    • dashboard 卡片截图
    • 3 个 bundle 的产物路径 + 每个 main.tex 头部 diff
    • 演示视频或 gif(可选)
  • docs/top_venue_manuscript_chain.md + README.md 更新已 commit
  • Epic [Epic] Manuscript Venue Routing + Multi-Template Pipeline (会议路由 + 多模板论文管线) #11 全部 acceptance 项打勾

AI 可验收证据包(必须)

PR 必须生成:

artifacts/d4_manuscript_routing_e2e_acceptance.json

字段至少包含:

{
  "base_ref": "...",
  "commit": "...",
  "demo_command": "python scripts/demo_manuscript_routing.py ...",
  "demo_run_id": 123,
  "api": {
    "route": {"status": 200, "response_path": "...", "chosen_venue": "..."},
    "venue": {"status": 200, "response_path": "...", "rejected_count": 3},
    "format_lint": {"status": 200, "response_path": "...", "lint_count": 0}
  },
  "dashboard": {
    "screenshot_path": "...",
    "contains_chosen_venue": true,
    "contains_rejected_venues": true,
    "contains_lint_count": true
  },
  "bundles": [
    {"venue": "iclr2026", "path": "...", "main_tex_sha256": "..."},
    {"venue": "neurips2024", "path": "...", "main_tex_sha256": "..."},
    {"venue": "arxiv_plain", "path": "...", "main_tex_sha256": "..."}
  ],
  "docs_updated": ["docs/top_venue_manuscript_chain.md", "README.md"],
  "test_command": "...",
  "test_summary": "..."
}

防伪 / 防硬编码要求

  • API response 必须包含 chosen_venuescorerationalerejected_venuesrule_setselection_id
  • Demo 必须能从空 DB 或 fixture DB 自行 seed 所需数据,不能依赖维护者本地已有生产数据。
  • 3 个 bundle 的 main.tex_sha256 必须不同,证明不是复制同一个输出冒充多模板。
  • Dashboard 截图只是辅助证据,AI 验收以 API response 和 artifact manifest 为主。
  • scripts/demo_manuscript_routing.py 必须非交互式可运行,并在失败时返回非 0 exit code。

范围外 Out of scope

  • 自动投稿对接
  • 多轮 revision 自动循环
  • 期刊(journal)模板

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions