4.7 KiB
4.7 KiB
新机器接手交接
1. 目标
这次不是继续在当前机器上排障,而是:
- 把当前代码整理后提交到 Git
- 在新服务器上重新部署验证
- 让新的 Codex 接手继续推进
当前最重要的未完成主线只有一条:
domain-api/app/services/sync_push_service.py中_load_pushable_projections()的修复,需要在远端稳定部署后验证:detect_result_projectionpush 是否恢复detect_result_ingest是否出现
2. 当前代码结论
已经确认并完成的代码侧修复:
domain-api/app/services/sync_push_service.py- 修复
_load_pushable_projections()选择逻辑 - 旧问题:最新
detect_result_projection明明存在且没有 push attempt,但候选集为空 - 现修复:候选改为优先按最新 projection 选择
- 修复
domain-api/tests/test_sync_push_service.py- 已补回归测试
本地验证已完成:
py_compile通过python -m unittest tests.test_sync_push_service通过
3. 当前卡点
不是代码不清楚,而是当前远端 SSH 不稳定:
121.204.244.188:22TCP 可连接- 但 SSH banner 经常超时
- Paramiko 常见报错:
SSHException('No existing session')Error reading SSH protocol banner
因此当前没有拿到“远端已发布并生效”的硬结果。
4. 新机器接手后的首要动作
新机器接手后,先不要扩散排查面,只做这一个最小动作:
- 发布
domain-api/app/services/sync_push_service.py - 重启
domaincheck-sync-agent.service - 只验证两项:
detect_result_projectionpush 是否恢复detect_result_ingest是否出现
5. 关键背景
项目根目录:
/www/wwwroot/getDomain
主要子目录:
domain-api/domain-web/domainCheck/docs/
当前远端主机:
mainland-controller-01121.204.244.188
已确认的远端运行时 region 配置:
NODE_REGION=mainlandSYNC_SOURCE_REGION=mainlandSYNC_TARGET_REGION=overseas
已确认的数据事实:
- mainland 本地已经生成了
detect_result_projection - surrogate job 例如:
job_id=909job_code=sync-overseas-28618
- worker 事件已写入 mainland 本地库
- 真正未打通的是
detect_result_projection的 push 选择阶段
6. 建议提交范围
建议优先提交真正的代码改动,不要把运行产物一起带上。
建议提交:
domain-api/domain-web/domainCheck/tools/- 需要保留的文档
.md
建议重点确认本次必须包含:
domain-api/app/services/sync_push_service.pydomain-api/tests/test_sync_push_service.py
7. 明确不要提交的内容
以下属于运行产物、临时文件或本地探针,不建议提交:
docs/ops_center_runtime/night_runs/step_mix_*/docs/ops_center_runtime/chinaz_gray_runs/docs/_tmp_regression/.codex-release-probe.txt*.bak_**.log*.pid
当前工作区里特别要排除的项目:
domainCheck/app/utils/database.py.bak_20260426_220818_active_job_cache_tunedomainCheck/detect_worker.py.bak_20260426_220818_active_job_cache_tunedocs/ops_center_runtime/night_runs/step_mix_20260426_051718_smoke_p200/docs/ops_center_runtime/night_runs/step_mix_20260426_051754_smoke_p200/docs/ops_center_runtime/night_runs/step_mix_20260426_052641_debug_stepmix/docs/ops_center_runtime/night_runs/step_mix_20260426_053252_mainland_step_mix_p200_t800/docs/ops_center_runtime/chinaz_gray_runs/.codex-release-probe.txt
8. 已跟踪但不建议把这次删除提交进去的文件
这些文件目前显示为已删除,但更像本地运行态/配置文件,不建议在这次“迁移到新服务器”的提交里带上删除:
domainCheck/app/thread_count.jsondomainCheck/node_thread_counts.jsondomainCheck/runtime/runtime_settings.jsondomainCheck/runtime/sensitive_words.jsondomainCheck/runtime_settings.jsondomainCheck/thread_count.json
处理建议:
- 如果这些删除不是你明确想做的配置收口,请在提交前恢复
- 不要把“本地运行时删掉了某个 JSON”误当作产品代码改动提交
9. 提交前建议
提交前建议至少做这几步:
git status --short- 把运行产物和备份文件排除掉
- 只保留代码、测试、必要文档
- 单独复查:
sync_push_service.pytest_sync_push_service.py.gitignore- 本交接文档
10. 给新机器上的 Codex 的一句话
接手后不要重新发散排查 worker、projection 生成、事件落库链;这些已经基本收敛。优先完成 sync_push_service.py 的远端生效验证,只盯:
detect_result_projectionpushdetect_result_ingest