Files
junhong_cmp_fiber/.scratch/tech-global-audit/issues/09-manual-polling-task-integration-cutover.md
2026-07-22 15:58:28 +09:00

25 lines
2.1 KiB
Markdown
Raw 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.
# 09 — 承接手动轮询状态并记录同步外部尝试
**What to build:** 现有手动触发、进度和监控接口保持用户契约但运行状态由公共异步任务契约承接Gateway 实际请求及合并、互斥、限频、提前完成等未发送尝试进入 Integration Log只有状态变化、人工强制、连续失败或高风险异常进入 Audit Event。
**Blocked by:**
- 01 — 交付不可变 Audit Event 写入闭环
- 02 — 交付可恢复的 Integration Log 尝试闭环
- `.scratch/tech-public-foundation/issues/02-transactional-public-outbox-write.md` — 02 — 在业务事务中可靠写入公共 Outbox
- `.scratch/tech-public-foundation/issues/03-outbox-at-least-once-delivery.md` — 03 — 完成 Outbox 到 Asynq 的至少一次投递闭环
- `.scratch/tech-public-foundation/issues/06-unified-async-task-contract.md` — 06 — 冻结统一异步任务五态和查询契约
**Status:** ready-for-agent
**架构通道:** 主通道为 Application + Infrastructure辅助通道为 Query。
**完整业务边界:** 本票收口旧手动轮询日志承担的运行状态替代、外部尝试记录和兼容接口。明确不改变轮询配置、间隔、Redis 分片队列、任务类型、卡级开关、并发控制或失败重排,不新建同步专用运行表。
- [ ] 手动触发、进度与监控公开契约继续可用,状态、计数、失败摘要和恢复行为映射到公共异步任务五态。
- [ ] 实际 Gateway 请求在调用前建立 Integration Log完成后记录结果、耗时、状态变化和脱敏上游摘要。
- [ ] 合并、互斥、限频、已达预期和取消即使未产生 HTTP 请求也有可解释终态,不伪造 HTTP 状态。
- [ ] 同步序列传播 `request_id/correlation_id/series_id/attempt`同序列查询可连续看到立即、3 分钟、5 分钟的全部尝试。
- [ ] 普通无变化成功只写 Integration Log状态变化、人工强制、连续失败或高风险异常按注册规则关联 Audit Event。
- [ ] 回归测试固定现有轮询配置、队列、开关和监控基线,验证切换前后调度事实不变且旧手动轮询表不再承担新增运行状态。