Commit Graph

2 Commits

Author SHA1 Message Date
suzmii 126fb7bc06 test(游戏共创): 两个浏览器 e2e 的登录等待抗冷启动(Vite 首次编译)
Project CI / AI game creator shell Rust crates (pull_request) Successful in 4m3s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 5m53s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 5m31s
Project CI / Frontend tests (pull_request) Successful in 2m58s
Project CI / Backend tests (pull_request) Successful in 7m44s
Project CI / AI game creator shell web tests (pull_request) Successful in 3m6s
Project CI / Repository checks (pull_request) Successful in 6m45s
Project CI / Native shell tests (pull_request) Successful in 9m32s
- rebase 到 origin/master 后的第一次实跑里,lineage 与(同源的)fork 脚本在浏览器段都卡在
  `page.waitForSelector('.platform-account-entry', { timeout: 120_000 })` 并超时:
  Vite dev server 重启后首次导航要现编译整张模块图,rebase 引入大量新代码时首屏会超过 120s。
  证据:两次运行都在该行超时退出;随后用 Playwright 直接探针(同一 URL)页面正常渲染、
  `.platform-account-entry` count=1、无 pageerror(仅两条未登录态 401 的资源错误),
  紧接着再跑同一脚本即 99/99 全绿。
- 修法:登录等待改成 240s + state:attached,并在超时后重载一次再等(避免把「开发服务器还没编译完」
  误判成页面坏了)。两处改动逐字相同,lineage 与 fork 脚本各一处。
- 实测(HEAD 3ae0d129e,固定端口栈 3110/8188):lineage 99/99、fork 48/48、project-bundle 72/72;
  三条只读门禁 policy-parity / dto-parity / spacetime-schema 均 exit 0。
2026-10-05 17:52:16 +08:00
suzmii 1f243f4edf test(游戏共创): 新增作品级共创授权端到端验收脚本
- 新增 scripts/check-game-distribution-fork-authorization-e2e.mjs(789 行):
  真实 HTTP + 浏览器端到端验收作者侧共创授权链路 —— 从 .app/dev-stack.json 读栈地址;
  开 game-distribution:publish 灰度;注册两个真实作者;上传封面并创建作品;
  断言三态提升阶梯(forbidden→nonCommercial→full)、降级 409、过期 CAS 409、
  未知档位 400、非作者 403、未带 Bearer 401、同 key 同 body 重放 replayed=true、
  以及越权/非法请求无副作用;浏览器侧用 Playwright 在 /games/mine 断言入口与三态
  编辑器(当前档位不可点、更高档位可点)并真跑一次网页提升,截图留档。
- package.json:新增 npm script check:game-distribution-fork-authorization-e2e,
  命名与既有 check:game-distribution-*-e2e 保持一致。
- 实测:本地 dev 栈 + Chrome(E2E_PLAYWRIGHT_DIR 临时 playwright)跑 48 项断言
  48 PASS / 0 FAIL;npm run check:encoding 通过。
2026-10-05 17:30:45 +08:00