
CodexandClaude Opus 4.7
48d78147b5
refactor(fudai): 进一步拆 __init__ 到 4 个 helper(基础状态/日志基础设施/诊断超时状态/预约运行时状态)
将 __init__ 中剩余的 4 个独立初始化块抽到 helper:
- init_basic_state:device/分辨率/计数器/operation/config_path(约 11 行)
- init_log_infra:_run_id / _log_seq / _log_kv 闭包(约 24 行)
- init_diag_timeout_state:阶段诊断 + 30分钟超时状态(约 11 行)
- init_reservation_runtime_state:预约运行时状态字段(约 22 行)
douyin_fudai.py: 775 → 712 行 (-63)
fudai_init_defaults.py: 210 → 287 行
douyin_fudai.py 跌破 750 行(4121 → 712,本会话累计削减 3409 行 = -83%)
__init__ 函数从 109 → 46 行
验证:
- pytest 1013 passed
- compile OK
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 13:45:51 +08:00
..
2026-05-21 19:03:43 +08:00
2026-05-22 13:45:51 +08:00
2026-05-21 20:12:40 +08:00
2026-01-02 23:57:03 +08:00
2026-05-21 19:03:43 +08:00
2026-05-22 13:45:51 +08:00
2026-01-07 19:06:10 +08:00
2026-05-21 09:01:14 +08:00
2026-05-21 10:18:17 +08:00
2026-05-21 20:12:40 +08:00
2026-05-21 00:23:14 +08:00