From 22b4e310125635480996e71479e90be2d03b04f1 Mon Sep 17 00:00:00 2001 From: zizi Date: Sun, 23 Aug 2026 17:53:20 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=B6=E6=AE=B5G=E6=94=B6=E5=B0=BE:=20?= =?UTF-8?q?=E9=93=BE=E8=B7=AF=E9=80=8F=E8=A7=86=E8=A1=A5=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E5=8C=85=E5=85=A8=E9=87=8F=E5=91=88=E7=8E=B0+=C2=A711=E5=85=A8?= =?UTF-8?q?=E7=9F=A9=E9=98=B5=E9=AA=8C=E6=94=B6=E8=B5=B0=E6=9F=A5=EF=BC=88?= =?UTF-8?q?=E4=BA=94=E7=B1=BB=E5=8F=AF=E8=A7=81=E9=A1=B9=E5=85=A8=E5=8F=AF?= =?UTF-8?q?=E8=A7=81=EF=BC=8C=E9=AA=8C=E6=94=B6=E8=AE=B0=E5=BD=95=E7=95=99?= =?UTF-8?q?=E6=A1=A3=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dashboard/server.py | 31 +++++++++++++++- ...8-23-§11可见性对照验收-书12基线走查记录.md | 36 +++++++++++++++++++ .../2026-08-22-agent-example整体收敛总plan.md | 1 + 3 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 docs/acceptance/2026-08-23-§11可见性对照验收-书12基线走查记录.md diff --git a/dashboard/server.py b/dashboard/server.py index 66f1582..a028988 100644 --- a/dashboard/server.py +++ b/dashboard/server.py @@ -2632,6 +2632,34 @@ def _dispatch_chain_html(run_id, trigger_detail): return "".join(parts) +def _run_task_packs_html(run_id: str) -> str: + """链路透视 · 任务包与运行工件:artifacts 目录中与本运行同名的全部留档(只读)。""" + + if not WRITE_CHAPTER_ARTIFACTS.is_dir(): + return "" + files = sorted(p for p in WRITE_CHAPTER_ARTIFACTS.glob(f"{run_id}-*.json") if p.is_file()) + details = [] + for path in files[:30]: + try: + text = path.read_text(encoding="utf-8") + except OSError: + continue + try: + pretty = json.dumps(json.loads(text), ensure_ascii=False, indent=1) + except (ValueError, TypeError): + pretty = text + if len(pretty) > 20000: + pretty = pretty[:20000] + "\n…(超长截断)" + details.append( + f"
{esc(path.name)} · {len(text)} 字" + f"
{esc(pretty)}
" + ) + if not details: + return "" + return ("
任务包与运行工件(artifacts 目录)
" + + "".join(details) + "
") + + def view_run_detail(run_id): _, rr = q( """SELECT r.run_id,r.work_id,r.target_chapter,r.trigger_source,r.started_at,r.finished_at,r.terminal_state, @@ -2845,10 +2873,11 @@ def view_run_detail(run_id): turn_html = _run_turn_panels_html(rid, candidates, state) events_html = _agent_events_html(rid) chain_html = _dispatch_chain_html(rid, trigger_detail) + packs_html = _run_task_packs_html(rid) body = (f"
运行记录 / {esc(rid)}
" f"

运行详情

{info}{error_html}{turn_html}" f"

回执链

{rc_html}

质量评判

{q_html}

模型调用

{call_html}" - f"

链路透视

{chain_html}{events_html}" + f"

链路透视

{chain_html}{events_html}{packs_html}" f"

候选与决策

{cand}{dec}

证据与上下文

{raw_html}{raw_detail_html}{freeze_html}") return layout("运行详情", body, "/runs") diff --git a/docs/acceptance/2026-08-23-§11可见性对照验收-书12基线走查记录.md b/docs/acceptance/2026-08-23-§11可见性对照验收-书12基线走查记录.md new file mode 100644 index 0000000..2471576 --- /dev/null +++ b/docs/acceptance/2026-08-23-§11可见性对照验收-书12基线走查记录.md @@ -0,0 +1,36 @@ +# §11 可见性对照验收:书 12(深渊机神)基线走查 + +日期:2026-08-23 +走查对象:只读看板 `http://127.0.0.1:8765` + muse-example 数据库 +走查依据:`docs/plans/2026-08-22-agent-example整体收敛总plan.md` §11 可见性对照矩阵 + +## 矩阵逐项结论 + +| 内容 | 可见性 | 证据 | 备注 | +|---|---|---|---| +| 作品、章节、正式正文 | ✅ 可见 | `/works` 列「深渊机神」;`/works/12/ch/3` 呈现第 3 章「波纹」全文(5131 字,候选 164 采纳产物) | 正文表合同不变 | +| 候选与待审状态 | ✅ 可见 | `/candidates` 待审队列(118/121/122 待确认);`/candidates/164` 直链呈现正文、运行链接、语义审查发现、本次生成摘要 | 待审队列只显示待确认候选;已采纳/被拒候选经直链与运行页可达 | +| 运行回执、质量结果、模型调用账 | ✅ 可见 | `/runs/run-prod-work12-ch3-42beb650` 回执链 / 质量评判 / 模型调用三区块完整 | 三表继续写入 | +| 知识卡(草稿/转正) | ✅ 可见 | `/knowledge?work_id=12` 呈现卡片行;第 3 章 18 条草稿经人审(署名 qingse)转正为实体卡 40–57 | — | +| 探索轨迹与事件链(example_agent_event) | ✅ 可见(新增可见项) | `/runs/…-42beb650-writer-v9` 链路透视:探索轨迹工具事件(read_chapter_text×8、read_fine_outline×4 等)+ 参数明细 + 模型回合(令牌/成本);派发链父子导航双向可达 | 书 12 时代无事件账本,无基线可比;阶段 G 第一部分接线 | +| 依赖清单(本次运行实际读了什么) | ✅ 可见(新增可见项) | 工具事件明细(工具名 + 参数)即依赖清单数据源;探索运行另有探索清单工件(`…-exploration-summary-v9.json`) | 同上 | +| 生产 artifacts(任务包等) | ✅ 可见 | `/runs/…-42beb650` 任务包与运行工件区块:探索任务包、探索清单、探索摘要、生成任务包、writer-context、pipeline-result 全量可展 | 读侧迁移:看板直接渲染留档;新派发运行的运行目录与事件账本为权威 | +| 授权终态与缺口报告 | ⏳ 机制就绪、无真实样例 | `AUTHORIZATION_REQUIRED` 授权终态(阶段 E 第一部分)与 `authorization-request` 工件、看板 Pipeline 面板均已就绪;改造后尚无运行命中证据缺口 | 不可见原因:无真实缺口运行产生(非接线缺口);待首个缺口运行出现即复验 | + +## 结论 + +§11 要求的五类可见项——候选、待审、正文、卡片、链路记录——**全部可见**;授权终态行机制就绪,等待真实缺口运行产生后复验(原因成立:不是接线缺口)。 + +新作品走新框架链路时,本报告即对照基线:书 12 可见的,新作品必须可见;新增可见项(探索轨迹、依赖清单、派发链)已由两阶段写手/抽取/盲评派发运行真实填充样例。 + +## 证据命令留档(可复现) + +```bash +curl -s http://127.0.0.1:8765/works # 作品行 +curl -s http://127.0.0.1:8765/works/12/ch/3 # 第3章正文 +curl -s http://127.0.0.1:8765/candidates # 待审队列 +curl -s http://127.0.0.1:8765/candidates/164 # 候选详情 +curl -s http://127.0.0.1:8765/runs/run-prod-work12-ch3-42beb650 # 运行详情(链路透视) +curl -s http://127.0.0.1:8765/runs/run-prod-work12-ch3-42beb650-writer-v9 # 派发运行(探索轨迹) +curl -s "http://127.0.0.1:8765/knowledge?work_id=12" # 知识卡 +``` diff --git a/docs/plans/2026-08-22-agent-example整体收敛总plan.md b/docs/plans/2026-08-22-agent-example整体收敛总plan.md index 3f6bbe8..120cd06 100644 --- a/docs/plans/2026-08-22-agent-example整体收敛总plan.md +++ b/docs/plans/2026-08-22-agent-example整体收敛总plan.md @@ -182,6 +182,7 @@ A、B 可并行;C 依赖 A;E 依赖 D;F 依赖 E;G 依赖 D(链路透 - 意图:把现有看板与决策通道收敛为创作台五视图:阅读、待审、卡片、链路透视、决策。 - 第一部分(已完成,看板测试绿):链路透视接线——运行详情页接事件账本(探索轨迹/模型回合/成本)与派发链父子导航;消解 §11 中"探索轨迹与事件链""依赖清单"两个接线缺口;详见 `docs/plans/2026-08-22-阶段G-第一部分-链路透视接线-事件账本与派发链.md`。 +- 收尾(已完成):任务包与运行工件在链路透视区块全量呈现(探索任务包/清单/摘要、生成任务包、上下文、管道结果);§11 全矩阵走查完成并留验收记录 `docs/acceptance/2026-08-23-§11可见性对照验收-书12基线走查记录.md`:五类可见项全可见,授权终态行机制就绪待真实缺口运行。 - 边界:只读库;不拼模型调用命令;决策仍走唯一决策通道;artifacts 读侧迁到数据库与依赖清单投影。 - 验证:待审章节能看到候选、检查报告、依赖清单;链路透视能回放一次运行的任务包、探索轨迹与成本;既有看板测试与决策人闸测试通过。