Your Name
|
f07fbb305b
|
fix false fudai detail pixel detection
|
2026-06-04 11:51:12 +08:00 |
|
Your Name
|
1d564000ca
|
add detail OCR performance diagnostics
|
2026-06-04 11:39:29 +08:00 |
|
Your Name
|
dc6ae7d1e4
|
fix task count digit detection
|
2026-06-04 11:15:45 +08:00 |
|
Your Name
|
0c77bf9e0e
|
Keep debug capture history for px and overview
|
2026-06-03 22:46:53 +08:00 |
|
Your Name
|
ca7d64d54b
|
test: isolate region overrides in ui checks
|
2026-06-03 20:39:47 +08:00 |
|
Your Name
|
4797fa046e
|
feat: expose fudai region coordinates in gui
|
2026-06-03 20:29:10 +08:00 |
|
Your Name
|
bcc4d1151f
|
修复WiFi ADB随机端口扫描
|
2026-06-03 17:52:02 +08:00 |
|
Your Name
|
daf0c49288
|
统一日志详细度入口
|
2026-06-03 17:39:53 +08:00 |
|
Your Name
|
198a30dce1
|
完善新UI适配与日志简化
|
2026-06-03 12:40:06 +08:00 |
|
Your Name
|
71a9f4a25f
|
精简简单模式日志输出
|
2026-06-03 12:15:47 +08:00 |
|
Your Name
|
40f9812ab1
|
收口像素检测调试图输出
|
2026-06-03 12:05:27 +08:00 |
|
Your Name
|
3bcb5cb259
|
优化详情调试标注与截图复用
|
2026-06-03 11:36:47 +08:00 |
|
Your Name
|
42aa0f214d
|
修正调试图标注对齐
|
2026-06-03 10:47:39 +08:00 |
|
Your Name
|
24b58a8c6d
|
优化WiFi ADB快速扫描
|
2026-06-03 08:50:43 +08:00 |
|
Your Name
|
e51d37890a
|
精简像素调试图与日志
|
2026-06-03 02:11:45 +08:00 |
|
Your Name
|
098083a354
|
修正福袋详情调试图与图标检测
|
2026-06-03 01:34:30 +08:00 |
|
Your Name
|
1d37d57c90
|
修复福袋详情OCR v2与调试日志
|
2026-06-03 01:22:13 +08:00 |
|
Your Name
|
2c6f024a24
|
test: 增补回顶保留映射与同房三连映射回归
|
2026-06-01 21:18:28 +08:00 |
|
Your Name
|
02a4dc625a
|
test: 增加映射合并与同房三连回顶回归用例
|
2026-06-01 21:16:42 +08:00 |
|
Your Name
|
147892a144
|
fix: 根因修复同房三连与映射合并,避免双切房
|
2026-06-01 21:13:58 +08:00 |
|
Your Name
|
05b9d17951
|
fix: remove recursive run_once reentry after desktop recovery
|
2026-06-01 20:58:24 +08:00 |
|
Your Name
|
36e374ef67
|
refactor: split large modules and harden live-room fudai flow
|
2026-06-01 18:39:44 +08:00 |
|
Your Name
|
c2010084cf
|
fix(fudai): root-fix countdown minute misread with full-line mm:ss priority
|
2026-06-01 16:37:11 +08:00 |
|
Your Name
|
d696f2c974
|
fix(countdown): harden minute OCR selection and normalization
|
2026-06-01 15:15:01 +08:00 |
|
Your Name
|
93d950e78f
|
fix: 根治倒计时分钟误识别并统一候选解析策略
|
2026-06-01 14:48:36 +08:00 |
|
Your Name
|
5a51c951a2
|
fix(fudai): treat notice text as attended and harden attend/log parsing
|
2026-06-01 12:33:33 +08:00 |
|
Your Name
|
61dfc1c15c
|
fix: keep parallel OCR stable and add unknown-button fallback
|
2026-06-01 12:18:21 +08:00 |
|
Your Name
|
a68307d7fd
|
fix(wifi-adb): restore hi-port fallback path and harden reconnect/import edge cases
|
2026-06-01 11:05:47 +08:00 |
|
Your Name
|
e33b42597c
|
fix(wifi-adb): force openscreen mdns backend for scan discovery
|
2026-06-01 09:49:32 +08:00 |
|
Your Name
|
f76232f2fc
|
fix(wifi-adb): improve scan with multi-subnet fallback and mdns discovery
|
2026-06-01 09:40:44 +08:00 |
|
Your Name
|
de21921d03
|
refactor(paths): remove cwd-based mapping path fallbacks
|
2026-06-01 09:15:41 +08:00 |
|
Your Name
|
37f736c158
|
fix(webgui): harden config bool parsing and action error handling
|
2026-06-01 09:07:03 +08:00 |
|
 CodexandClaude Sonnet 4.5
|
96fdc96f24
|
refactor(cleanup): 移除剩余死代码模块
- 删除 douyin/utils/douyin_text_utils.py 及其测试
- 移除 performance_tracker.py 中未使用的 track_function 方法
- 移除 param_usage_tracer.py 中未使用的 stop_tracing / is_enabled
- 清理 bin/run_cli.py 和 tests/test_imports.py 中的残留引用
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
2026-05-23 21:58:41 +08:00 |
|
 CodexandClaude Sonnet 4.5
|
d19d5bfc56
|
refactor(cleanup): 移除 logging 模块死代码
- unified_logger.py: 删除 5 个从未使用的装饰器/函数
- internal_loggers.py: 删除 3 个未使用方法和工厂函数
- action_logger.py: 删除 3 个未使用方法
- log_formatter.py: 删除 6 个未使用格式化函数(保留 GUI 依赖的 4 个)
- 同步更新 __init__.py 和测试文件
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
2026-05-23 21:04:35 +08:00 |
|
 CodexandClaude Sonnet 4.5
|
df69c6ab67
|
fix(countdown): 修复长倒计时被截断到15分钟的bug
check_countdown 中 >900s 的上限过于激进,将实际的58分钟福袋截断到14:50。
改为 >3600s(1小时)上限,兼容抖音的60分钟福袋。
同时修复 _extract_digits 取后N位的问题,改为取前N位,
避免当子图意外捕获额外数字时(如 "1458")被误提取为 "58"。
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
2026-05-23 19:22:20 +08:00 |
|
 CodexandClaude Opus 4.7
|
fe97e82104
|
fix(gui): 实时查看器/状态 Tab 的耗时解析支持 ms 单位
问题:实际 actions.log 写的是 `耗时=10.00ms`(毫秒),但 _parse_minimal
和 parse_action_duration 的正则只匹配 `s`,导致:
- 实时查看弹窗永远显示"暂无动作"
- 实时状态 Tab 同样空白
同时存在的副 bug:兜底正则在整行匹配,前缀里的 `192.168.5.2:5555` /
日志时间戳 `2026-05-21` 都可能被误识别成耗时。
修复:
- 解析窗口限定到 line.find("耗时") 之后的子串 (tail)
- 优先匹配 ms(顺序很重要:\s*s 会先吃掉 "10ms" 的 m)
- s 单位加 (?![a-zA-Z]) 负向后顾,避免匹配 "ms" / "second" 之类
- 同步修复 gui_app.py:3685 的 parse_action_duration(实时状态 Tab)
测试:
- _parse_minimal 加 4 个新测试覆盖 ms / 整数 ms / 优先级 / 前缀干扰
- 全量 1426 passed (+5)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-23 09:08:58 +08:00 |
|
 CodexandClaude Opus 4.7
|
9f330572cc
|
test(gui): 加 gui_app.main() 启动冒烟测试
背景:d759921 抽 _open_realtime_viewer_impl 时误删 16 行搜索工具栏定义,
gui_app 启动时报 NameError,但 pytest 1421 passed 没抓住——def main()
里的 NameError 只有真正调用 main() 才触发,单纯 import 不会执行函数体。
新测试通过 patch tk.Misc.mainloop 让 GUI 创建完所有控件后立刻 quit,
覆盖 def main() 内部所有顶层语句,能抓住 NameError / AttributeError /
ImportError 这类启动期失败。
已验证:临时 revert ca6c2e4 后该测试 FAIL(精确指向 L3994 NameError),
恢复 ca6c2e4 后 PASS。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-23 08:59:30 +08:00 |
|
 CodexandClaude Opus 4.7
|
7884132743
|
test(pkg): 补充 _pkg 子模块单元测试
覆盖 screenshot_manager.save_files / reservation_logic._common /
logging_wrapper_pkg._common 共 14 个测试。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-23 07:05:23 +08:00 |
|
 CodexandClaude Opus 4.7
|
d759921442
|
refactor(gui): 抽 _open_realtime_viewer_impl 到 components/realtime_viewer (5539 → 5370)
gui_app.py 嵌套函数 _open_realtime_viewer_impl 是 170 行的"实时查看"对话框:
弹 Toplevel 显示当前 pic/screenshot.png + 列表展示 actions.log 中含"耗时"的
最近 80 行,每秒刷新。
抽到 gui/components/realtime_viewer.py:
- open_realtime_viewer(root) 主入口
- _tail_read(path, max_bytes) 末尾字节读取
- _parse_minimal(line) 提取 (动作名, 耗时) 二元组
- 全局单例 _active_win 替代原嵌套 def 的属性式 _win
gui_app.py 中嵌套 def 缩成 4 行委托。
新增 13 个单元测试覆盖 _tail_read 4 种情况 + _parse_minimal 8 种格式。
1421 passed (+13)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-23 03:47:58 +08:00 |
|
 CodexandClaude Opus 4.7
|
fb35670032
|
refactor(gui): 抽 ThreadSafeLogWriter 到 components/log_writer (5649 → 5537)
gui_app.py 的 ThreadSafeLogWriter 类(109 行)是自包含的日志文件写入器:
threading.Lock 保护、按日期分割、配置开关、PermissionError/Exception 兜底。
抽到 gui/components/log_writer.py,原 gui_app 中的 109 行类定义 + 1 行实例化
替换为 3 行导入 + 实例化。read_config 通过 staticmethod _read_config 延迟导入,
避免循环依赖。
新增 15 个单元测试覆盖:
- __init__:默认 log_dir / 配置开关 / dated_logs / 相对路径解析 / 配置异常兜底
- write:正常写 / 禁用跳过 / 空行跳过 / 时间戳前缀 / 已格式化行原样写
- 100 线程 × 10 行的并发安全测试(确认 1000 行无丢失)
- PermissionError / 通用异常下不抛 + warn 一次
1408 passed (+15)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-23 03:29:25 +08:00 |
|
 CodexandClaude Opus 4.7
|
230c0d4049
|
refactor(gui): 抽 refresh_stats 字符串格式化到 stats_formatter (6339 → 5634)
gui_app.py 的 refresh_stats 闭包是 705 行纯字符串构建:把 runner.get_stats()
的字典格式化成多个分段(基本信息/快速汇总/核心统计/跳过/OCR/详情/福袋查找/
性能/粉丝团/切换/预约/错误/价值/最近福袋/中奖记录)。
抽到 gui/components/stats_formatter.py:
- format_stats(stats: Dict) -> List[str] 主入口
- 14 个 _append_* 子段构建器(每段一个,按需追加)
- _section_lines(title, body) 标题包装
闭包改为 16 行委托:调 format_stats + 写入 ScrolledText。
新增 32 个单元测试覆盖:
- 空 dict / 缺字段时的兜底
- 基本运行状态(uptime / pid / exit_code 各种格式)
- 各分段的"有数据 / 无数据"条件
- 关键率计算(打开成功率/点击率/参与成功率/中奖率/跳过率/错误频率)
- 边界情况(attend_ok > clicks 检测到已参与,结果未开奖警告,wins 截断到 10 条)
1393 passed (+32)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-23 03:23:53 +08:00 |
|
 CodexandClaude Opus 4.7
|
a864f6e23a
|
refactor(fudai): 抽 __init__ 配置默认值到 init_helpers (1559 → 1323)
fudai_analyse.__init__ L119-354 是 236 行配置字段默认值 + 运行时状态初始化:
- ~80 个 self.X = <default_value> 配置字段
- 30+ 个运行时状态字段
- _reservations_state_path 解析 + room_pos_map 旧文件清理
抽到 douyin/core/fudai_modules/init_helpers.py:
- apply_fudai_defaults(self): 主入口
- _apply_yanghao_defaults(self): 推荐页养号子段
- _resolve_reservations_state_path(self): 解析路径,path_config 失败时
兜底用 ".." 回退(不再用 dirname(__file__) + "state")
- _cleanup_old_room_pos_map_files(self): 清理上次运行的 JSON/CSV/MD 导出
__init__ 中保留:
- L57-117 设备/分辨率/operation/日志系统初始化(依赖较深,难抽)
- L356-357 self.load_config()
行为完全保留:所有字段值、解析顺序、异常兜底全部不变。
test_runtime_path_anchors.test_reservations_state_path_uses_path_config 已更新
为同时检查 douyin_fudai.py 和 init_helpers.py。
1361 passed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-23 03:13:46 +08:00 |
|
 CodexandClaude Opus 4.7
|
e46497ea80
|
refactor(underlying): 抽 cut_pic 图片裁剪到 image_ops (1574 → 1327)
underlying_operations.cut_pic L474-721 是 248 行图片裁剪管道:
- 默认/命名两个分支共享重试 3 次的截图加载验证
- 默认分支裁出 cut.png 或 ocr/<name>.png;命名分支裁出 pic/<target>/<name>.png
- 写入 _ocr_coords_cache 供 analyse_pic_word 调试图像引用
- SAVE_CUT_PIC_DEBUG_IMAGES=1 时保存 cut_pic 调试图
抽到 underlying_operations_pkg/image_ops.py:
- cut_pic(self, left_up, right_down, target, name) -> bool
- _ensure_parent_dir / _validate_coords / _save_cut_debug_images 内部 helper
主类方法替换为 4 行委托。
更新两个旧的源码断言测试以适配抽离:
- test_cut_pic_path:从 inspect.getsource(op.cut_pic) 改为读 image_ops.py 文件源码
- test_runtime_path_anchors:把 path_config.get_pic_dir() 检查范围从单一文件
扩展到 underlying_operations.py + image_ops.py + ocr_pipeline.py 三处
1361 passed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-23 02:43:36 +08:00 |
|
 CodexandClaude Opus 4.7
|
8457219241
|
refactor(underlying): 抽 analyse_pic_word OCR 管道到 ocr_pipeline (1939 → 1560)
underlying_operations.analyse_pic_word L723-1102 是 380 行 OCR 主管道:
路径解析 + 字节缓存 + PIL 加载 + change_color 预处理 + 调试图像保存
+ EasyOCR/PaddleOCR 调用 + 置信度提取 + 缓存写回 + 成功识别落盘。
抽到 underlying_operations_pkg/ocr_pipeline.py:
- analyse_pic_word(self, picname, change_color, pic_path, return_confidence)
- _save_debug_preprocessed: 预处理后的调试图保存(仅 SAVE_OCR_DEBUG_IMAGES=1)
- _save_debug_after_ocr: 含 OCR 文本预览 + 置信度的 after_ocr 调试图
- _save_success_pic: 成功识别落盘到 ocr/<category>/<picname>_success.png
主类方法替换为 4 行委托。原行为完全保留:缓存 / 二值化 / EasyOCR vs Paddle
predict/ocr 兜底 / [None] 短路 / 异常返回空 / picname 失败诊断日志。
新增 16 个单元测试覆盖:
- 早出 4 种(pic_path 空/不存在/带 confidence/OCR 未初始化)
- OCR 调用路径(EasyOCR / Paddle predict / Paddle ocr 兜底 / [None] 短路 / 异常)
- 缓存命中跳过 OCR / 缓存未命中写回
- change_color 0/1/2 三种模式
- return_confidence True/False 返回类型
- autouse fixture 清 OCR 模块级缓存防止测试污染
1361 passed (+16)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-23 02:36:47 +08:00 |
|
 CodexandClaude Opus 4.7
|
b200002a00
|
refactor(finder): 抽 OpenCV 模板匹配兜底到 finder_template_match (635 → 417)
check_have_fudai_with_ready_screenshot L288-513 是像素检测都失败时的最后
兜底(226 行):cv2.matchTemplate(TM_CCOEFF_NORMED) + minMaxLoc 在
156..269 × 351..451 搜索区域里找 fudai.png 模板。
抽到 douyin/detection/detection_pkg/finder_template_match.py:
- match_template(analyser, pic_new, rx, ry, y_pianyi_val, loop) → (det, x)
- _resolve_template_path 从 path_config / 项目根 assets 解析模板路径
(兜底走 .. 回退,避免推到 detection_pkg/assets)
- _save_search_roi 提取 last_match.png 的保存逻辑
主 finder.py 替换为 7 行委托,从 635 → 417 行。
新增 9 个单元测试覆盖:
- _resolve_template_path:用 path_config / 兜底
- 早出条件:模板路径不存在 / cv2.imread 返回 None / 搜索区域无效
- 命中:max_val>=threshold 时 detected_x 是 1080 基准
- 不命中:max_val<threshold 时返回 False
- 模板太大:cv2.resize 被调用
- cv2 不可用时安全返回 False
1345 passed (+9)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-23 02:26:49 +08:00 |
|
 CodexandClaude Opus 4.7
|
ab846dae0f
|
refactor(finder): 抽逐像素兜底扫描到 finder_pixel_scan (817 → 635)
check_have_fudai_with_ready_screenshot L279-461 是 numpy 失败时的逐像素
兜底(183 行):optimal_x 从历史 / 默认热区中心选起 → 检查 5 个 y 偏移
(0/±1/±2)→ 每行从 optimal 向两侧交替搜索 → 最后从左到右兜底。
抽到 douyin/detection/detection_pkg/finder_pixel_scan.py:
- scan_pixel_by_pixel(analyser, pic_new, rx, ry, y_pianyi_val) → (detected, x)
- _is_target_pixel / _safe_check_pixel / _pick_optimal_x / _search_along_y
4 个独立纯函数,每个职责单一
颜色范围常量与 finder_numpy_scan 对齐(_R_MIN/_MAX 等)。
主 finder.py 替换为 8 行委托。
新增 15 个单元测试覆盖:
- _is_target_pixel 边界 / _safe_check_pixel 异常兜底
- _pick_optimal_x 历史命中/越界/无历史 3 种路径
- scan_pixel_by_pixel 主路径成功 / y 偏移 / 越界失败 / pic 异常兜底
1336 passed (+15)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-23 02:20:25 +08:00 |
|
 CodexandClaude Opus 4.7
|
07cdd662c2
|
refactor(finder): 抽 numpy 加速扫描段到 finder_numpy_scan (937 → 811)
check_have_fudai_with_ready_screenshot L271-397 是"numpy 加速水平带扫描"
逻辑(126 行):ROI 裁剪 → RGB 颜色掩码 → 列聚合 → 从最优起始列向两侧
交替搜索第一个匹配列 → 写回 last_fudai_x。
抽到 douyin/detection/detection_pkg/finder_numpy_scan.py:
- scan_with_numpy(analyser, pic_new, rx, ry, y_pianyi_val, optimal_x_scaled)
→ (detected, detected_x)
- numpy ImportError / 异常时返回 (False, None),让 caller 走逐像素兜底
主 finder.py 替换为 7 行委托。
新增 8 个单元测试(用真实 PIL.Image + numpy 构造小图):
- 空图返回 False
- 整图目标色命中 + last_fudai_x 写回
- 仅在某段列有目标色,命中位置在该段
- y_pianyi_val 偏移正确传递到扫描带
- ROI 越界返回 False
- optimal_x_scaled 在命中区时优先返回该位置
1321 passed (+8)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-23 02:15:43 +08:00 |
|
 CodexandClaude Opus 4.7
|
f718dfe2e4
|
refactor(fudai_attend): 抽 1057 行粉丝团门槛分支到 fansclub_handler (1629 → 573)
attend_choujiang 中"加入粉丝团/粉丝团"按钮分支占 1057 行,含一个 751 行的
内嵌闭包 _recover_to_fudai_detail_after_fansclub 处理"加入页"恢复。该分支
是文件中最大的单一逻辑块,独立性高(没有共享主流程的局部变量,全靠 analyser
属性传递状态)。
新建 fudai_attend_pkg/fansclub_handler.py(1070 行)作为整段抽出后的目的地。
导出顶层函数 handle_fansclub_branch(analyser, attend_button_text) -> bool。
attend_choujiang 中原 elif 块替换为 4 行委托:
elif attend_button_text and (
"加入粉丝团" in attend_button_text or "粉丝团" in attend_button_text
):
return handle_fansclub_branch(analyser, attend_button_text)
行为完全保留:
- 设置 analyser.last_attend_fail_reason = "fansclub_required"
- 第一步点参与按钮 (543, 2070)
- 第二步 OCR 找加入粉丝团按钮 + bbox 中心点击(fallback 区域中心)
- 第三步关闭详情页 (500, 470)
- 第四步根据 auto_join_fansclub 等待
- 第五步 _recover_to_fudai_detail_after_fansclub 在加入页再点击 + 返回直播间
新增 9 个单元测试覆盖:
- 总返回 True
- 设置 fail_reason = "fansclub_required"
- 必经的两次坐标点击 (543,2070) / (500,470)
- 截图缺失/OCR 抛异常时的兜底
- auto_join 启用/禁用分支
1313 passed (+9)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-23 02:05:38 +08:00 |
|
 CodexandClaude Opus 4.7
|
2f0eb90d98
|
refactor(fudai_core): 抽 6 个 fallback OCR 闭包到 OcrTaskRunnerFallback (1350 → 1194)
主并行 OCR 失败时走的备用路径里有 6 个 ocr_*_fallback 闭包,结构与
OcrTaskRunner 类似但更简单(不计耗时、countdown 不做数字提取、日志
tag 改为"备用OCR..."),共 156 行。
复用 ocr_tasks.py 模块新增 OcrTaskRunnerFallback 类,与 OcrTaskRunner
共享 _safe_preprocess / _BUTTON_KEYWORDS / _read_disable_flag。
主流程 6 个闭包定义换成 14 行 runner 实例化 + 方法绑定。
新增 10 个单元测试覆盖 Fallback 的所有方法(disable 跳过 / 异常 /
countdown 不提取数字 / button 关键词短路 + retry)。
1304 passed (+10)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-23 01:58:13 +08:00 |
|
 CodexandClaude Opus 4.7
|
f38b373636
|
refactor(fudai_core): 抽 7 个并行 OCR 闭包到 ocr_tasks 模块 (1659 → 1328)
get_fudai_contain L222-553 有 7 个 ocr_* 闭包:task_list / content /
countdown_mm / countdown_ss / value / button / live_room_title。每个都遵循
同样的模板(计时 + analyse_pic_word/digits + perf 字典 + 异常日志),共 330 行。
抽到 douyin_fudai_core_pkg/ocr_tasks.py 的 OcrTaskRunner 类:
- 7 个方法对应 7 个并行任务
- 共享耗时 dict + lock 在构造器传入
- _record_duration / _log_warn 提取出共有的 finally + except 模板
- _BUTTON_KEYWORDS 关键词常量化(原本是闭包里硬编码 tuple)
- _safe_preprocess 顶层 helper
主流程从 7 个闭包定义 + 配置开关重复读取(330 行)变成 22 行 runner 实例化 +
方法绑定,并保留 ocr_task_list / ocr_content / ... 名字给后续 executor.submit
当作 Callable 传入,行为完全不变。
新增 22 个单元测试覆盖:
- _safe_preprocess 兜底
- 7 个方法的成功 / disable 跳过 / 异常 / 边界
- ocr_button 关键词短路 + 重试逻辑
- 所有方法都正确记录耗时到 perf_durations
1294 passed (+22)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-23 01:52:22 +08:00 |
|