
CodexandClaude Opus 4.7
7b6dec820b
refactor(fudai): 抽 _handle_in_fudai_detail 步骤3末尾两个小段 (2926 → 2872)
新增 2 个 helper:
- check_invalid_detail_fallback:兜底检查(content="" + value=0 → 视为无效详情)
- prepare_for_attend:记 attend_before_ts + 提取 future_ts + 重置 _detail_closed_by_attend
净减 54 行重复样板代码。新增 9 个单元测试覆盖:
- 空内容+0价值识别为无效
- 正常内容不触发兜底
- detail tuple 短或非 tuple 不抛
- prepare_for_attend 正确返回 attend_before_ts 和写入 future_ts
至此 _handle_in_fudai_detail 总长 1872 → 1010 行(-862 行 / -46%),
douyin_fudai.py 4121 → 2872(累计 -1249 行 / -30%)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 21:16:06 +08:00
..
2026-05-21 19:03:43 +08:00
2026-05-22 21:16:06 +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 21:16:06 +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-22 19:20:29 +08:00
2026-05-22 19:08:09 +08:00
2026-05-21 00:23:14 +08:00