A candidate used the same report later attached to the version, so a preview could be treated as the formal result. Proposed reports now close on replace or reject, and only the commit writes an authoritative successor.
1.9 KiB
1.9 KiB
title, status, created, updated, owner, branch, worktree, mutex
| title | status | created | updated | owner | branch | worktree | mutex |
|---|---|---|---|---|---|---|---|
| 候选变更报告与正式提交报告分开 | done | 2026-09-20 | 2026-09-20 | Cursor-Auto | feature/capability-enablement-impact-plan | - | docgov |
候选变更报告与正式提交报告分开
目标
Agent 候选只持久化 proposed 预估报告,不发下游影响或正式提交事件。正式提交才生成 authoritative 后继报告,并让版本指向后继而不是预估。
范围
- 报告增加
authority、lifecycle、successor_report_id,并写入已有deterministic_facts,避免在未占集成槽时改表。 - 新的有效候选把上一份仍 active 的预估标为 superseded。
- 拒绝标 rejected;提交时基线已变则标 expired。这两种以及 superseded、已提交的预估都不能再出建议。
- 正式提交复制一份 authoritative 报告;下游影响通知使用这份报告。
document.agent_version_committed仍只由 docflow 的 EventSink 在提交命令里发出。
非目标
- 不把人工修订、恢复、导入改成先预估再提交。
- 不打开
PI_CHANGE_REPORT_NARRATIVE,不实现 trace_reviewer,不做 T2 物理删除。 - 不新增
document.committed事件名,避免和现有投影消费者分叉。 - 不重启容器,不占集成槽位。
步骤
- 候选写入 proposed,提交写入 authoritative 后继
- 单测覆盖替代、拒绝、版本不指向预估、候选阶段不发下游事件
- 同步 FEATURE-MATRIX 与 CURRENT
验收标准
go test ./internal/docrevision/通过- 预估报告在替代或拒绝后
AllowsSuggestedActions为 false
相关链接
- Checklist:
- Handoff:
- Test report: 本切片为账本单测,未做真实聊天或浏览器验收
证据 / 备注
internal/docrevision/report_disposition.goTestProposedReportStaysInactiveUntilCommitTestRejectedProposedReportCannotSuggest