Files
douyi_guaji_main/tests
CodexandClaude Opus 4.7 8a975f2bf6 refactor(fudai): 抽 _handle_in_fudai_detail 步骤4 到 handle_detail_helpers (3174 → 2926)
新增 3 个 helper:
- step4_make_join_decision:参与决策入口(detail=None 短路 + 调 basic_join_decision)
- _handle_reservation_completion:参与成功是预约福袋时的锁定期处理 + 队列清理
- _close_detail_after_attend:根据 _detail_closed_by_attend 决定是否点 click_back

净减 251 行重复代码。新增 7 个 step4 单元测试覆盖:
- detail=None 短路
- join_decision 失败不设标志
- countdown 有效设标志 + 关详情
- attend 已关详情时跳过 click_back
- 预约福袋无其他预约 → 清锁定期
- 预约福袋有其他预约 → 设保护期
- countdown 已过期不设标志

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 21:09:24 +08:00
..