fix: auto-project mainland detect sync

This commit is contained in:
Your Name
2026-04-19 02:59:10 +08:00
parent 4dcbf8ecb3
commit 66f55d880a
5 changed files with 206 additions and 42 deletions

View File

@@ -1,6 +1,6 @@
# TASK_BOARD
更新时间2026-04-19 02:51 CST
更新时间2026-04-19 02:57 CST
## 当前主批次
@@ -15,11 +15,12 @@
## 本轮已完成
本轮完成的是最小输入通道补齐
本轮完成的是最小输入通道第二轮收口
- 已让 `detect_result_projection` 开始携带 `recent_domain_events`
- 已让中央 `detect_result_ingest` 在接收时尝试落库 `detect_run_events`
- 已补幂等去重,避免重复投影重复写事件
- 已补 `sync_agent` 自动产出 `detect_result_projection`
- 已完成最小单测与中央 API 重启
## 关键证据
@@ -34,7 +35,33 @@
- 提取 `domain_started/domain_completed/domain_failed/domain_blacklisted`
- 以幂等方式写入中央 `detect_run_events`
### 证据 2当前真实库里大陆逐条事件仍未出现
### 证据 2mainland 当前只在持续推 `runtime_projection`
中央当前可见:
- `runtime_ingest.updated_at`
- 已刷新到 `2026-04-19 02:55:36`
- `detect_result_ingest.updated_at`
- 仍停在 `2026-04-17 16:57:32`
说明:
- mainland 同步链是活的
- 但还没有持续产出新的 `detect_result_projection`
### 证据 3自动产投影缺口已经补上
当前代码状态:
- `sync_agent` 每个 tick 会基于 `active_job` 自动调用:
- `append_detect_result_projection_if_changed`
所以 mainland 拉新并重启 `domaincheck-sync-agent` 后:
- 不再依赖有人访问 mainland 检测页面
- 逐条结果会自动进入中央
### 证据 4当前真实库里 mainland 逐条事件仍未出现
当前中央库里可见:
@@ -49,33 +76,32 @@
- `mainland-worker-01`
- 无逐条 `domain_*` 事件
### 证据 3当前剩余阻塞已经收缩为“大陆节点尚未跑到这版代码”
所以现在的状态是:
- 中央接收与落库逻辑已具备
- 但大陆节点必须拉到最新代码并继续推投影
- 拉新前,中央库里当然还看不到新的 mainland `domain_*`
## 当前结论
`J1-大陆逐条结果同步前置批` 已进入实现态,不再只是结论确认
`J1-大陆逐条结果同步前置批` 的代码闭环已经补完
- 中央缺口已补
- 现在转入“大陆节点拉新并验证贯通”
- 中央会接
- 中央会落
- mainland `sync_agent` 也会自动产投影
现在只差:
- mainland 拉最新代码
- 重启 `domaincheck-sync-agent`
- 然后验证真实事件是否进入中央
## 下一步唯一主批次
唯一主批次:`J1-大陆逐条结果同步前置批`
唯一主批次仍然是`J1-大陆逐条结果同步前置批`
范围:
- 不做最终 item 回写
-补“大陆逐条结果进入中央”的最小数据通道
-完成 mainland 真实事件进中央的端到端验证
本批次唯一目标:
-大陆节点`recent_domain_events` 真正同步到中央
- mainland 通过新版 `sync_agent` 自动`recent_domain_events` 同步到中央
- 并在中央确认出现 mainland `domain_*` 事件
## 候选批次
@@ -124,6 +150,6 @@
下一轮唯一应该继续做的事情:
-大陆节点拉最新代码后,验证:
- `detect_result_projection` 已含 `recent_domain_events`
- mainland 节点拉最新代码并重启 `domaincheck-sync-agent` 后,验证:
- `detect_result_ingest.payload.projection.recent_domain_events` 已非空
- 中央 `detect_run_events` 已出现 mainland `domain_*`