feat: 恢复 auto_daily 调度,新增配置迁移工具,修复中文选船与 delay 生效问题 - #513
Merged
YaoerWu merged 15 commits intoJul 28, 2026
Conversation
…pport - Add SET_CLIPBOARD support for multi-byte (Chinese) text input - Use INJECT_TEXT for ASCII, SET_CLIPBOARD+paste for non-ASCII - Refine touch event injection format - Update controller tests
- config_compat 拆为 detect_* (运行期只读, from_yaml 检测到老版本即抛 LegacyConfigError 提示迁移) 与 migrate_* (纯转换, 供工具调用), 移除 运行期静默迁移与回写原文件逻辑 - UserConfig 新增 operation_delay_min/max 字段 + 校验器写回模块全局, 修复 classic delay 迁移后值丢失 bug (scrcpy 通过 operation_delay() 读取) - 新增 tools/migrate_config.py 独立迁移工具: 指定 --usersettings/--planroot, 默认 cwd 查找, 输出到新目录 (原文件不动), 支持 --dry-run/--force - plan.from_yaml 检测到 classic 前导空 fleet 同样崩溃提示迁移 Co-Authored-By: Claude <noreply@anthropic.com>
操作延迟从直接 import 全局变量改为调用 operation_delay() 函数, 随 config 字段动态生效 (不再绑定导入时的值)。精简 test_controller 测试。 Co-Authored-By: Claude <noreply@anthropic.com>
- 恢复 scheduler (daily_plan / scheduler / triggers) 全天挂机优先级队列调度 - 新增 / 恢复 ops: campaign / destroy / event_fight / exercise / normal_fight / repair / decisive.chapter - 新增 bathroom context + bath_page UI 页面; types 同步调度所需枚举 Co-Authored-By: Claude <noreply@anthropic.com>
usersettings.full.yaml / usersettings.yaml 同步 operation_delay_min/max 等新字段, 移除 classic 已迁移项。 Co-Authored-By: Claude <noreply@anthropic.com>
新增 / 补全 testing/{infra/test_file_utils, ops/test_destroy_unit,
ops/test_scheduler_unit, context/test_bathroom} 单元测试。
Co-Authored-By: Claude <noreply@anthropic.com>
Closed
test_operation_delay_field_sets_globals 之前裸构造 UserConfig(...) 无 emulator: - Linux/WSL CI: OSType.auto() 走 linux 分支强制要求 emulator.serial → ValidationError - 改 os_type=windows 又在非 Windows 上触发 auto_emulator_path → import winreg 失败 给定 serial+path 的 emulator 既满足 linux 分支, 又让 windows 分支跳过 auto_emulator_path (不 import winreg), 两端皆过。本用例只验证 operation_delay 字段 → 模块全局。 Co-Authored-By: Claude <noreply@anthropic.com>
YaoerWu
force-pushed
the
refactor/config-compat-migration
branch
from
July 27, 2026 04:19
2aef25b to
08fee16
Compare
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
本 PR 恢复全天挂机调度(auto_daily),重构 classic 配置的兼容与迁移方式,并修复中文选船输入与 delay 配置不生效等问题。
关联 Issue
吕贝克,萤火虫#481 —— 自动选船搜索框无法输入中文(吕贝克、萤火虫、T-23·改等)主要变更
🎮 emulator / scrcpy 控制器
SET_CLIPBOARD支持多字节(中文)文本输入:ASCII 走INJECT_TEXT,非 ASCII 走SET_CLIPBOARD+ 粘贴,解决选船搜索框无法输入中文的问题。operation_delay()函数,随 config 字段动态生效(不再绑定导入时的值)。⚙️ 配置兼容层重构
config_compat拆为detect_*(运行期只读,检测到老版本配置即抛LegacyConfigError提示用户迁移)与migrate_*(纯转换逻辑),移除运行期静默迁移与回写原文件。UserConfig新增operation_delay_min/max字段,修复 classic delay 迁移后值丢失的 bug,scrcpy 通过operation_delay()读取。tools/migrate_config.py:指定--usersettings/--planroot(默认 cwd 查找),输出到新目录(原文件不动),支持--dry-run/--force。plan.from_yaml检测到 classic 前导空 fleet 同样崩溃提示迁移。📅 auto_daily 全天挂机调度
🧪 测试
test_file_utils、test_destroy_unit、test_scheduler_unit、test_bathroom、test_migrate_config、test_repair_unit单测。test_operation_delay_field_sets_globals在 Linux/WSL CI 的 emulator 构造问题(提供 serial+path 兼容两端)。🐛 其他修复
bath_repair_blacklist默认值、类型不匹配等问题。破坏性变更
tools/migrate_config.py迁移,或在加载时报LegacyConfigError提示。