feat: add durable safe retries with uncertainty tracking and SDK examples
This commit is contained in:
@@ -83,6 +83,7 @@
|
||||
- 查询轮次与任务分别唯一;轮次、单轮尝试预算和截止时间独立保存。
|
||||
- 内部事件与外部订阅交付有去重键,租用状态要求有效租用字段。
|
||||
- 终态必须有结束时间,待执行任务不能伪造有效执行租约。
|
||||
- effect_uncertain=true 不能和成功、失败、取消终态共存;尝试/证据 retryable=true 只允许明确失败。
|
||||
|
||||
## 5. 仍需服务层事务保证的条件
|
||||
|
||||
@@ -110,4 +111,6 @@ P2 服务端已新增会话隔离、两步派发、租约、并发许可、结
|
||||
|
||||
000004_execution_history 为已有证据表增加 `(namespace_id, attempt_id, created_at, id)` 分页索引,不新增实体或字段,不回改已有迁移。尝试列表复用执行代次唯一索引。查询 DTO 与持久化模型分离,只在详情读取业务正文,不返回执行秘密或内部摘要;接口见 [执行历史](api/execution-history.md)。
|
||||
|
||||
000005_safe_retry 增加任务 EffectUncertain、尝试与证据 Retryable 字段,Go 与 SQL 均附中文说明;实体数仍为 32。跨尝试的不确定效果必须保留,历史 NEEDS_REVIEW 保守回填 true,旧状态、版本和冻结策略不变。回执增加 `(namespace_id, attempt_id, operation, request_digest)` 索引,换消息身份重报结果也返回原已应用回执。字段语义、升级策略启用与限制见 [安全重试](api/retries.md),升级回归见 [阶段报告](reports/phase-3-safe-retry.md)。
|
||||
|
||||
命令与验证记录见 [开发计划](08-development-plan.md)、[基础阶段验证报告](reports/phase-0.md) 与 [执行历史回归](reports/phase-2-execution-history.md)。
|
||||
|
||||
Reference in New Issue
Block a user