Files
Agent-System/.doc/archive/ops/2026-09-13-document-revision-prelim-output.md
T
weichenandCursor 9345109dca docs(ops): archive completed document-revision session files
Move done DOCREV short-terms, checklists, and handoffs into archive/ops and retarget relative links after Round20 close-out.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-14 00:27:18 +00:00

3.4 KiB
Raw Blame History

title, status, created, updated, owner, branch, worktree, mutex
title status created updated owner branch worktree mutex
prelim_design 缺 output.md 产物契约修复 done 2026-09-13 2026-09-14 Cursor-Auto fix/document-revision-pi-runner-module - document-revision-prelim-output

prelim_design 缺 output.md 产物契约修复

目标

第11轮 UI-11:202 + prelim_design 已正确,但 step_01_draft 缺真实 output.md。embed 官方模板、归一化 runner 路径、缺产物 fail-closed;对「进程 0 + settled failure / 缺产物」的瞬时失败做有界全新 step 重试。不得标 done。

范围

  • internal/template embed + loader
  • internal/agent 路径映射、目标强制、瞬时/永久分类、Result.Retryable
  • internal/squad runOneStep 有界全新 invocation
  • deploy/pi-agent/runner.mjs + settle-policy.mjs
  • deploy/pi-agent/Dockerfile 必须 COPY runner 的全部相对 import 到 /app
  • deploy/app/Dockerfile COPY templates / COPY configs 到 /app;.dockerignore 放行官方 markdown
  • Docker build context / /app/templates/docs 读路径实测(不执行 env-service 重建)
  • 文档:audit / remediation / CURRENT

非目标

  • 不伪造 output.md;不执行截断 write 参数;不改 E2E prompt;不放宽缺失校验
  • 不触碰/提交证据目录;不执行 env-service 重建/重启;本轮不重跑 E2E
  • 不改 FEATURE-MATRIX;不合 dev;不 push
  • 不对永久缺失(干净 settle 后无产物、prompt_empty、治理)无限重试

步骤

  1. 从 dev@2a58674 开 fix/document-revision-prelim-output 并认领 mutex
  2. 定位:stub 模板 + agent_settled 假成功 + 只认精确 output.md 键
  3. embed / 映射 / runner fail-closed + 单测 + 门禁
  4. 纳入现场时序:write 已流出但 terminated;SDK retry 1–3 Connection error;auto_retry_end success=false;仍 agent_settled;trace success=true
  5. settle-policy + Go 分类 + runOneStep 有界全新重试 + 单测
  6. .dockerignore 放行 templates/**/*.md;Docker context 实测 /app/templates/docs/prelim_design.md
  7. 本次写入的目标不覆盖、不再调用;backend 明确失败仍 FAIL(不把文件存在当成功);上一轮残留不当成功
  8. dev@55a4f39 重建后 runner ERR_MODULE_NOT_FOUND settle-policy.mjs:Dockerfile COPY 齐相对模块 + COPY 契约测试
  9. 占槽后真实 UI 重跑(本轮不做)

验收标准

  • 无盘模板时 prelim_design 仍为官方「系统初步设计方案」
  • 绝对/.//重复子目录 rel_path 能落到目标文件
  • ok:true 但无非空目标 → 失败,不发明正文
  • 瞬时 settled failure → 最多一次全新 step;永久缺失不重试;耗尽 fail-closed
  • pi-agent 镜像 COPY 含 runner 全部相对 import(含 settle-policy.mjs)
  • intake 工作流单测仍绿
  • 真实 UI-11 PASS 后才可标 done

相关链接