Files
Agent-System/.doc/test-reports/2026-09-16-multi-intent-u4-outbox-projection-test-report.md
T
weichenandCursor 2755d916f4 docs(test): record U4 outbox projection report
Close the U4 checklist with golden payload and only-forward projection evidence.

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

2.7 KiB
Raw Blame History

多意图 HITL U4 outbox 与计划投影 测试报告

一、 测试背景 (Background)

U3 已把计划写入 PostgreSQL,但卡片/SSE 仍无法从事实事件恢复。U4 要在同一 UoW 写入 Track E outbox,投影只前进 revision;消息失败不得回滚权威计划。

二、 测试目标 (Test Objectives)

  • Create/Decide/Receipt 发出 intent.plan.*,payload 仅契约字段
  • 重复 event_id 幂等;低 revision 不覆盖;伪造 producer 拒绝
  • 跨用户 shadow 不可见;GET PlanView 不依赖投影
  • 不改 dispatcher claim/lease/retry
  • 默认 HandleTurn 仍不落盘

三、 测试方案与环境 (Test Plan & Environment)

项 值
OS Linux 7.0.0-31-generic
Go go1.27.1 linux/amd64
分支 feature/multi-intent-u4-outbox-projection
Schema 文件 45(共享 :8080 仍 43,不 rebuild)
项目 143 只读
证据 .doc/test-reports/assets/2026-09-16-multi-intent-u4-outbox-projection/

四、 预期结果 (Expected Results)

创建计划发出 awaiting_input;golden 无 prompt/slots;乱序/伪造 fail closed;arch-check 与全仓 short 绿。

五、 实际测试结果与判定 (Actual Results & Evaluation)

5.1 emit 与 golden

  • 测试输入:go test -v -count=1 ./internal/app/intentflow -run 'TestCreatePlanEmits|TestAwaiting'
  • 实际输出:见 emit-verbose.txt。三用例 PASS。
  • 评价判定:PASS。
  • 性能与耗时:<10ms

5.2 只前进与伪造 producer

  • 测试输入:TestProjectionOnlyForwardAndForgedRejected
  • 实际输出:PASS。低 revision 不覆盖;Producer=forged → ErrIntegrityFailure。
  • 评价判定:PASS。
  • 性能与耗时:<10ms

5.3 全仓 short / arch-check

  • 测试输入:./scripts/arch-check.sh --mode block;go test -short -count=1 ./...
  • 实际输出:arch-check block: production gate passed。全仓见 short.txt。
  • 评价判定:PASS。dispatcher 语义未改;chat/coordinator 无回归。
  • 性能与耗时:约 12s

六、 自动化测试套件汇总 (Test Suite Execution)

命令 结果
go test -count=1 ./internal/app/intentflow ./internal/events ./internal/archtest ./internal/db PASS
go test -short -count=1 ./... PASS
./scripts/arch-check.sh --mode block PASS

通过率 100%。隔离库 PG 活验未跑。

七、 测试结论与后续优化建议 (Conclusion & Next Steps)

U4 达到合入标准。后续 U5 挂 decision API;投影失败时仍以 GET PlanView 恢复。