OkScript 专项:真实执行 e2e 缺失、执行门禁关闭、首次登录前提未满足

Open
#1,649 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
15/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript, playwright, python, typescript

Research direction

Start with frontend/e2e/okscript.pw.ts, frontend/e2e/run.mjs, and the e2e:real script in package.json; inspect the linked #985 comments for the cited evidence. Then read src/tasks/mixin/login_mixin.py and the OkScript profile and configuration page. Done means the first-login prerequisite is explained, a real E2E path can report explicit skips, and execution gating follows a documented product decision backed by real evidence.

Written by the indexing model from the issue text.

Description

area:frontend codex enhancement

现象

OkScript 通用专项(#985)的真实执行验收(AutoProxy → 进入游戏 → 跑任务)从来没有成功跑通过,而且当前有三道相互独立的阻断。复检过程中的证据与结论见 #985 的最新评论。

1. yarn e2e:real 匹配不到任何用例(验收链不存在)
cd frontend
$env:AUTO_MAS_E2E_DATA_ROOT="$env:TEMP\mas-e2e-list"; New-Item -ItemType Directory -Force -Path $env:AUTO_MAS_E2E_DATA_ROOT | Out-Null
npx playwright test --list --grep "@real"       # → Total: 0 tests in 0 files,随后 Error: No tests found(非 0 退出)
npx playwright test --list --grep "@okscript"   # → 4 tests in 1 file(ok-ef/ok-ww × light/dark,全是配置链路)

package.json 的 e2e:real = cross-env AUTO_MAS_E2E_REAL=1 node e2e/run.mjs --grep @real,run.mjs 只负责起服务并设置 AUTO_MAS_E2E_DATA_ROOT;缺标签这件事在 runner 之外:frontend/e2e/ 里只有 okscript.pw.ts:24 一个 @okscript describe。所以"能进游戏"这条验收路径从来没有被执行过(okscript.pw.ts 里 gameStarted: false 是硬编码字面量)。

另外该链路依赖仓库外未提交的夹具:okscript.pw.ts:41-43 复制 .okscript-web-lab/locked-dependencies,而 .okscript-web-lab/ 在 .git/info/exclude 中;新检出跑 yarn e2e 会直接 ENOENT。

2. 唯一登记项目的执行门禁是关闭的

ok-ef v2.0.0 的 profile 未声明 web_execution/cli_execution,且 success_markers=(),manager.check() 直接拒绝 AutoProxy,界面表现为"当前版本的运行与停止尚未完成验收"。历史验收用的是 lab 脚本里 replace(profile, cli_execution=True, …) 的合成 profile,产品路径未被验证。

3. 游戏侧:首次登录前提未满足(不是白屏 bug)
  • E:\Games\Arknights Endfield\mmkv\login_cache 的 mtime 仍是装机日(2026-09-17),当日 5 次启动均未写入 → 本机没有"最近账号"。
  • WebviewConfig\localBulletin / popupVersion 在失败当次运行期间被写入 → 门户配置抓取是成功的,不存在"登录页没渲染"。
  • sdklogs\HGEventLog.log 的 CURL performed failed! 35 紧邻 MainController::GetIPv6 … Can not get ipv6 with code 35,是 IPv6 探测失败,与登录无关。
  • src/tasks/mixin/login_mixin.py:13-58 的 login_flow() 只做「确认已登录 → 退回登录面 → 点登出/切换 → 在『最近』列表按手机号前三位+后四位选号 → 登录」,src/ 全仓没有验证码/扫码/密码输入路径 → 上游没有首次登录能力。
  • 时间线:任务开始后 3 秒就开始找登出按钮;游戏窗口 84 秒后才 visible:True 1920x1080,随后前台切成 class=Qt5158QWindowIcon(U8 SDK 登录窗),等满 time_out=120 后抛「未找到登出按钮,可能没有先登录,请先登录任意账号」。即上游不等游戏就绪就计时,本机冷启动吃掉了 120 秒中的 84 秒。

期望

  1. 首次登录前置:文档与配置页明确"首次使用需在游戏内手动登录一次";把"未找到登出按钮"这类固定官方文案映射成用户可执行的建议,而不是笼统的失败。
  2. 补 @real 用例:断言 mode=AutoProxy、任务进入终态、LastProxyStatus 取值合法、游戏客户区 1920×1080;前置未满足时显式 skip 并写明原因,不要伪造成通过。
  3. 夹具进仓库:frontend/e2e/fixtures/ 放最小合成安装与依赖指纹清单,缺失时 skip。
  4. 门禁口径:按产品决策落地(取得真实证据后登记成功/停止标记,或新增"监督运行(结果未核验)"并与计划调度隔离);不通过伪造 success_markers 放行。

环境

  • Windows 11,仓库 dev 分支,游戏 E:\Games\Arknights Endfield(ok-ef v2.0.0 中文发行版),验收脚本以管理员运行
  • 相关日志:<游戏>\sdklogs\HGEventLog.log、<游戏>\sdklogs\u8core_ui_pc.log、ok-ef 侧 logs/ok-script.log(本轮原始日志见本地证据目录 上线整改-20261024-104522)
Dominant language
Python
Stars
707
Forks
56
Avg merge
11h 45m
Merged PRs (30d)
429

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AUTO-MAS-Project/AUTO-MAS

All issues in AUTO-MAS-Project/AUTO-MAS

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.