修复审批回执重放的会话归属
Project CI / Repository checks (pull_request) Failing after 5m11s
Project CI / Frontend tests (pull_request) Successful in 7m0s
Project CI / Backend tests (pull_request) Successful in 10m1s
Project CI / Native shell tests (pull_request) Successful in 18m3s

按原 Supervisor task 会话恢复审批修改意见

允许归档会话中已有幂等消息安全重放

同步审批恢复的长期决策记录
This commit is contained in:
2026-08-28 03:47:31 +00:00
parent f4776637c6
commit f4819e9a42
3 changed files with 17 additions and 10 deletions
@@ -7792,6 +7792,7 @@ CI 上 `background_agent_runtime_recovers_stale_running_before_pending_task` 在
- 现象:GDD“修改”已成功生成下一版本且当前 pending 身份正确,但 hydrate 持续返回 `recoveryPending=true`,审批卡显示“审批状态正在恢复”。
- 原因:恢复扫描会重放全部历史 approval receipt;旧版本 receipt 仍拿当前单例 approval pending 做 identity 比对。修改后当前 pending 已属于新版本,旧 receipt 的 identity 不同是正常状态,却被误记为投影缺口。
- 决策:receipt 的 index、Markdown、audit、submit observation、session 等投影继续允许全量恢复;approval pending 只由 lineage 最新 GDD 的 receipt 读取、更新和清理。历史 receipt 不得检查或改写当前 pending,也不得因此提升 `recoveryPending`。
- 审批意见消息按 receipt 的 `rootRunId` 解析到原 Supervisor task 所属会话恢复;不会按当前 active session 重新路由。已存在于归档会话的幂等消息允许重放且不新增消息,缺失消息仍保持恢复失败,不静默写入其他会话。
- 验证:沿用现有审批恢复与 planning submit 定向测试;未新增独立测试,避免为非代表性 fixture 引入额外状态构造。
## 2026-08-27 审批修订以最新用户意见更新 GDD 决定快照