aps-agent/docs/round-68-sap-outbound-p3-pa...

47 lines
2.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Round 68 多智能体并行实施计划
日期:2026-08-03
## 1. Worker 边界
### W68-SAP
独占 `server/aps_domain/sap_sync.py`:canonical evidence helper、stage P3 params、apply preflight/grant/audit/idempotency。
### W68-WORKFLOW
独占 `server/aps_domain/workflow.py` 与 `server/agent_core/harness.py`:outbound power=P3;confirmed branch 传递 envelope/checkpoint/grant/approvers。不得修改其他 action。
### W68-TEST
独占 `tests/golden/test_sap_sync.py` 与新增 `tests/golden/test_sap_outbound_evidence.py`:双人审批、漂移、篡改、重放、audit、幂等、缺 envelope。
## 2. 协调契约
- SAP helper 返回 `versionId/versionNo/items/idemKeys/payloadDigest/worldFingerprint/evidenceRefs`。
- stage params 与 consume grant params 必须逐字段同构。
- workflow 只负责 checkpoint 与 envelope 透传,不重算业务 digest。
- tests 可直接调用 helper 生成基线,不复制 digest 算法。
## 3. 集成顺序
1. helper/contract tests。
2. stage/harness P3。
3. confirmed apply preflight。
4. failure audit/idempotency。
5. focused -> affected -> full -> runtime -> detect_changes -> audit。
## 4. 禁止项
- 不在验证前调用 SAP client。
- 不允许 P3 静默降级 P2 或沿用旧 P2 token。
- 不把 Mock SAP 当真实现场验收。
- 不提交、发布或触碰现场数据。
## 5. 首轮 Plan Audit 修订
- W68-SAP 还独占 `sapOutboundExecutions` 状态机和逐 idem key 持久化;实现不依赖 workflow 重算。
- W68-WORKFLOW 在 stage-time checkpoint/唯一 approvalParams 与 final trusted decision record 透传,final 不创建 checkpoint。
- W68-TEST 必须覆盖:approval-time snapshot 漂移、consume 前零 push/零 grant loss、同人二审拒绝、不同人二审成功、preview/stage HTTP 零 push、outbox 部分失败逐条持久化、新审批关联恢复、full candidate 第 51 条漂移。
- 所有 worker 以 work plan §7 为最终契约;与前文冲突时以 §7 为准。