2026-10-13 实机测试结果 + 3 个实测缺陷修复

Browse Source
按 docs/feedback/2026-10-13/TEST_PLAN.md 在 Windows 实机上跑完到第 4 步,
结果与交付物在 docs/feedback/2026-10-13/results/。

通过: 第1步(记录配置)/第2步(坐标缩放)/第3步(预检真实拦截一次后放行)
      第4步 daily 成功(选队 6/6 全走补丁覆盖的 :188 名字查找, 0/5卡死=0, ERROR=0)
      镜牢成功(59 分钟 exit=0), 第5步窗口守护真实触发, 第7步看门狗触发成功
被环境挡住: 子模块 AALC 7452fad -> b0f4393 (GitHub 不通, 6 个镜像全挂)

修掉 3 个测试中实测到的缺陷:

1. 卡死检测认不出"界面误判"型卡死 (lc_mcp/tasks.py)
   原判据只有内容相关的 empty_team 一条。实测 AALC 把镜牢入口误认成经验本界面,
   对着误匹配模板连点 18 分钟, 日志一直在涨所以计数法抓不到, 外层只能干等 45 分钟超时。
   加一条与内容无关的判据: 里程碑(开始执行/结束执行)多久没前进。
   实测 1193 秒无进展被识别, 外层 11 分钟即自愈(原来 45 分钟)。
   新增 tests/test_stall_no_progress.py 5 个用例。

2. 看门狗间隔 5 分钟过长 (计划任务 + scripts/install_unattended.ps1)
   用户断开 RDP 后最长 4 分钟黑屏, AALC 在此期间爆出 134 个错误。
   改为 1 分钟(Windows 计划任务下限, PT30S 会被拒)。

3. 升级判定假阴性 (scripts/levelup.py)
   实测 Zwei 从 Lv.33 升到 Lv.40(MAX)、券也确实扣了, 但脚本报 FAIL:
   "Confirm 后 Power-up 窗口仍在"。旧代码在弹窗残留时直接返回失败,
   根本没走到读详情页那步 —— 而详情页的等级才是事实来源。
   改为: 先关残留弹窗, 再用详情页的等级/经验条下结论。
   新增 test_popup_still_open_but_level_rose_is_still_success。

测试全套 207/207 通过(原 201 + 新增 6)。

未完成: 第6步注册计划任务(等第4步确认), 子模块升级(需可访问 GitHub 的网络)。
另记: AALC 上游 tasks/daily/get_prize.py:44 的 from config import cfg 是错的,
      只影响 to_get_reward 路径, daily/镜牢不经过; 建议升级子模块后复核。
另记: README 的 unittest discover -s tests 在 Python 3.13+Windows 上不成立,
      需 -s tests -t tests。
This commit is contained in:
Codex Agent
2026-10-13 14:58:49 +08:00
parent 5818130c35
commit 1031aca7de
19 changed files with 626 additions and 6 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
# 注册无人值守用的两个计划任务 (在跑游戏的那个账号下, 普通 PowerShell 即可):
# 注册无人值守用的两个计划任务 (在跑游戏的那个账号下, 普通 PowerShell 即可):
# LcMCPKeepDisplay 每 5 分钟跑 keep_display.ps1: 会话掉到 Disc 时重挂 console, 防止截图全黑
# LcMCPDailyCycle 每天定时跑 auto_cycle.py: 刷材料 -> 镜牢 -> 升级/同步, 报告写到 ~\lc_mcp\cycles
#
@@ -52,7 +52,7 @@ if (-not $NoWatchdog) {
$action = New-ScheduledTaskAction -Execute $ps -WorkingDirectory $Repo `
-Argument "-NoProfile -NonInteractive -WindowStyle Hidden -ExecutionPolicy Bypass -File `"$script`""
$trigger = New-ScheduledTaskTrigger -Once -At (Get-Date).AddMinutes(1) `
-RepetitionInterval (New-TimeSpan -Minutes 5) -RepetitionDuration (New-TimeSpan -Days 3650)
-RepetitionInterval (New-TimeSpan -Minutes 1) -RepetitionDuration (New-TimeSpan -Days 3650)
$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries `
-ExecutionTimeLimit (New-TimeSpan -Minutes 3) -MultipleInstances IgnoreNew
Register-ScheduledTask -TaskName $Watchdog -Action $action -Trigger $trigger -Principal $principal `
+10 -3
View File
@@ -155,16 +155,23 @@ def do_level_up(hint=None):
click(*POWERUP_CONFIRM)
time.sleep(4.5)
txt = screen_text(state().get('items', []))
if 'Owned' in txt and 'Cancel' in txt:
# 弹窗"还在"不代表升级没生效。2026-10-13 实测: Zwei 从 Lv.33 一路升到 Lv.40(MAX),
# 券也确实扣了, 但 Confirm 后弹窗仍在, 旧代码据此直接判 FAIL —— 假阴性。
# 详情页的等级/经验条才是事实来源, 所以先关弹窗再读, 用同一个判据下结论。
lingering = 'Owned' in txt and 'Cancel' in txt
if lingering:
click(*POWERUP_CANCEL)
time.sleep(2)
return False, 'Confirm 后 Power-up 窗口仍在, 已取消(券=%s)' % before
lvl1, _, bar1 = read_detail(hint=target or lvl0 or hint)
desc = '券=%s 目标=%s 等级 %s->%s 经验 %s->%s' % (before, target, lvl0, lvl1, bar0, bar1)
desc = '券=%s 目标=%s 等级 %s->%s 经验 %s->%s%s' % (
before, target, lvl0, lvl1, bar0, bar1,
' (弹窗未关, 已按详情页判定)' if lingering else '')
if lvl0 is not None and lvl1 is not None and lvl1 > lvl0:
return True, desc
if bar0 is not None and bar1 is not None and bar1 != bar0:
return True, desc
if lingering:
return False, 'Confirm 后 Power-up 窗口仍在且等级未变: ' + desc
return False, '升级未确认: ' + desc