Files
Agent-System/.doc/ops/short-term/2026-09-15-multi-intent-u3-intentflow-pg.md
T
weichenandCursor b6956003d5 docs(test): record U3 intentflow PG CAS lease report
Close the U3 checklist with CAS/lease/fencing evidence while leaving chat routing on legacy.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-15 23:46:34 +00:00

3.0 KiB
Raw Blame History

title, status, created, updated, owner, branch, worktree, mutex
title status created updated owner branch worktree mutex
多意图 HITL U3:intentflow PG/CAS/lease done 2026-09-15 2026-09-15 Cursor feature/multi-intent-u3-intentflow-pg - intent-plan

多意图 HITL U3:intentflow PG/CAS/lease

目标

建立持久计划/步骤/决策与并发协议(CAS revision、decision nonce、lease/fencing、创建幂等、retention);不接真实写动作,不改 chat/coordinator 生产路由。

范围

  • Goose 00044:intent_plans / intent_plan_steps / intent_plan_decisions
  • app/intentflow owner repository + UoW;owner 可 unwrap pgx
  • 创建幂等 (environment, session_id, client_turn_id);同 turn 异 digest 冲突
  • 决策 CAS + nonce 同/异 digest;确认/取消/过期竞态
  • 步骤 lease + 单调 fencing;两 worker 只一个 owner
  • 业务成功但 receipt 写回失败时按幂等键对账,不盲跑
  • 环境隔离;关闭计划 retention 由 owner 删除
  • app.Assemble 装配 *intentflow.Plans,chat 仍不调用

非目标

  • 不接 HTTP(U5)、不 Append 事件(U4)、不接真实 action adapter(U7/U8)
  • 不把 HITL/tier 回灌 ActionRegistry
  • 不改 internal/intent 生产 TopIntent / IntentPlan
  • 不 rebuild 共享 :8080(schema 44 仅隔离库/后续晋升窗口应用)

步骤

  1. 认领 CURRENT(mutex intent-plan)
  2. Goose 00044 + migrate gate
  3. Store/Engine:Create/Decide/Claim/Receipt/Expire/Purge
  4. 内存并发 + 可选 PG 测试;Assemble 接线
  5. 报告并合回本地 dev

验收标准

  • 双创建同 digest 返回同一 plan;异 digest 冲突
  • nonce 同 digest 返回 receipt;异 digest 冲突
  • 确认/取消/过期只一个 CAS 胜出
  • 两 worker 抢 eligible 步骤无双 owner
  • 租约过期可接管;旧 fencing token 被动作属主拒绝
  • 重启后 succeeded 不重跑;receipt 写回失败按幂等键恢复
  • 跨 environment 隐藏
  • 默认 legacy 时 HandleTurn 不落盘
  • go test -short ./internal/app/intentflow ./internal/app ./internal/archtest ./internal/db 绿

相关链接

证据 / 备注

  • HandleTurn 在默认 legacy 下不落盘;CreatePlan 是 U3 测试与后续 U7 入口。
  • 动作属主端口仅 FakeActionOwner;真实 adapter 从 U7/U8 按 key 接入。
  • PG 活验需隔离 TEST_DATABASE_URL;本机 short 门禁跳过。共享 :8080 仍 schema 43。
  • 提交:a75aa45 docs(ops) 认领;7dfd6d6 feat(db);da0b3d8 feat(intentflow);1385002 feat(app)。