WIP: 作品管理与Phaser4客户端发布 #565

Draft
suzmii wants to merge 36 commits from feat/game-works-management into master
Member

关联 Issue: #470

状态

WIP。先建立持续可见的实现入口,后续按客户端上传、Web 作者管理、后台作品管理和真实栈验收逐步补齐。

当前范围

  • 客户端首版只支持 Phaser 4 npm/Vite 工程:受控构建、dist 归一化打包、8 MiB 分片上传、真实进度、幂等恢复和送审。
  • Web 作者侧:私有作品详情、状态筛选、版本历史、驳回理由、继续上传/撤回/下架/发布新版本、资料编辑和软删除。
  • 后台:作品搜索、作者筛选、状态筛选、分页、版本/审核历史、安全下架与恢复。

不变式

  • 复用现有 game-distribution 上传、审核、发行网关,不建立第二套作品系统。
  • 版本包和冻结资料不可原地修改;公开投影不携带作者私有字段。
  • owner、管理员鉴权、publicationRevision CAS 和 Idempotency-Key 继续由服务端裁决。

验收

真实 Phaser4 工程完成构建→归一化 ZIP→分片上传→送审;中断/重启恢复不重复创建游戏或版本;作者不能越权读取私有作品;后台可筛选分页并执行审核/下架/恢复;补齐定向测试、类型检查、schema、编码、文档索引、diff 和真实本地栈/客户端 smoke。

详细实施计划:docs/project-memory/plans/【实施计划】游戏作品管理与客户端发布收口-2026-09-30.md

关联 Issue: #470 ## 状态 WIP。先建立持续可见的实现入口,后续按客户端上传、Web 作者管理、后台作品管理和真实栈验收逐步补齐。 ## 当前范围 - 客户端首版只支持 Phaser 4 npm/Vite 工程:受控构建、dist 归一化打包、8 MiB 分片上传、真实进度、幂等恢复和送审。 - Web 作者侧:私有作品详情、状态筛选、版本历史、驳回理由、继续上传/撤回/下架/发布新版本、资料编辑和软删除。 - 后台:作品搜索、作者筛选、状态筛选、分页、版本/审核历史、安全下架与恢复。 ## 不变式 - 复用现有 game-distribution 上传、审核、发行网关,不建立第二套作品系统。 - 版本包和冻结资料不可原地修改;公开投影不携带作者私有字段。 - owner、管理员鉴权、publicationRevision CAS 和 Idempotency-Key 继续由服务端裁决。 ## 验收 真实 Phaser4 工程完成构建→归一化 ZIP→分片上传→送审;中断/重启恢复不重复创建游戏或版本;作者不能越权读取私有作品;后台可筛选分页并执行审核/下架/恢复;补齐定向测试、类型检查、schema、编码、文档索引、diff 和真实本地栈/客户端 smoke。 详细实施计划:docs/project-memory/plans/【实施计划】游戏作品管理与客户端发布收口-2026-09-30.md
suzmii added 2 commits 2026-10-01 13:59:37 +08:00
- api-server 新增 GET /api/game-distribution/my-games/{gameId},作者可读自己名下审核中/被驳回/已下架/已撤回的作品
- 抽取 owner_game_entry_payload 统一作者条目形状,公开投影继续不携带版本私有状态
- 版本私有状态补 entryUrl 与 packageFileCount,供客户端作品详情展示版本历史与公开链接
- 主规范路由表登记新路由,并修正 /my-games 的错名
- 新增里程碑实施计划【实施计划】游戏作品管理与客户端发布收口-2026-09-30
Merge remote-tracking branch 'origin/master' into feat/game-works-management
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m52s
Project CI / Backend tests (pull_request) Failing after 14s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 2m19s
Project CI / Frontend tests (pull_request) Successful in 2m10s
Project CI / Repository checks (pull_request) Failing after 13s
Project CI / AI game creator shell web tests (pull_request) Successful in 1m40s
Project CI / Native shell tests (pull_request) Successful in 5m16s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 8m42s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 9m16s
1f055e9902
Author
Member

本轮实现已完成,仍保持 WIP:

  • 客户端:Phaser 4 + Vite 发布前校验;构建/准备/上传/校验/送审阶段与上传百分比;账号 + origin + localProjectId + 包摘要的原生幂等账本。
  • Web 作者侧:owner 私有详情、状态/版本筛选、版本历史、恢复动作、资料编辑、软删除、撤回/下架/继续发布操作。
  • 后台:作品搜索、作者/状态筛选、游标分页、软删除展示与版本历史。
  • 后端:deleted_at 末尾追加、公开/owner/admin 过滤、PATCH/DELETE owner 路由、审计事件、DTO/绑定/schema 同步。

自动验证:主站/后台/AGC typecheck;Web/后台 104 个定向测试;AGC 发布 27 个定向测试;api-server 游戏分发 33 个测试、spacetime-module 262 个过滤测试、shared-contracts 4 个测试;Rust fmt、schema、generated bindings、DTO parity、encoding、doc-index、diff check 均通过。真实 Web 未登录作者入口与后台登录入口已用 Chromium 冒烟;真实 AGC GUI 发布、生产开闸和 OSS 清理策略仍未验证。

本轮实现已完成,仍保持 WIP: - 客户端:Phaser 4 + Vite 发布前校验;构建/准备/上传/校验/送审阶段与上传百分比;账号 + origin + localProjectId + 包摘要的原生幂等账本。 - Web 作者侧:owner 私有详情、状态/版本筛选、版本历史、恢复动作、资料编辑、软删除、撤回/下架/继续发布操作。 - 后台:作品搜索、作者/状态筛选、游标分页、软删除展示与版本历史。 - 后端:deleted_at 末尾追加、公开/owner/admin 过滤、PATCH/DELETE owner 路由、审计事件、DTO/绑定/schema 同步。 自动验证:主站/后台/AGC typecheck;Web/后台 104 个定向测试;AGC 发布 27 个定向测试;api-server 游戏分发 33 个测试、spacetime-module 262 个过滤测试、shared-contracts 4 个测试;Rust fmt、schema、generated bindings、DTO parity、encoding、doc-index、diff check 均通过。真实 Web 未登录作者入口与后台登录入口已用 Chromium 冒烟;真实 AGC GUI 发布、生产开闸和 OSS 清理策略仍未验证。
suzmii added 1 commit 2026-10-01 16:31:27 +08:00
作品管理与Phaser4客户端发布闭环
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m21s
Project CI / Backend tests (pull_request) Failing after 16s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 2m18s
Project CI / Frontend tests (pull_request) Successful in 2m8s
Project CI / Repository checks (pull_request) Failing after 16s
Project CI / AI game creator shell web tests (pull_request) Successful in 1m56s
Project CI / Native shell tests (pull_request) Successful in 5m47s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Has been cancelled
a2b70d92b8
补齐 Phaser4 客户端发布前校验、阶段进度与原生幂等账本

增加 Web 作者私有作品管理、资料编辑、版本历史与软删除

增加后台作品筛选、游标分页与删除治理

同步 SpacetimeDB schema、bindings、DTO、文档与定向测试
suzmii added 1 commit 2026-10-01 16:52:06 +08:00
收紧Phaser4发布边界并整理前端模型
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust smoke (pull_request) Has been cancelled
Project CI / AI game creator shell Rust crates (pull_request) Has been cancelled
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
Project CI / Repository checks (pull_request) Has been cancelled
Project CI / AI game creator shell web tests (pull_request) Has been cancelled
0e4cf6356f
阻断无npm构建工作区的单文件项目发布,明确客户端首版支持范围

拆分作品资料媒体默认逻辑与版本历史模型,满足前端刷新组件规则

补充对应Rust发布门禁与导出测试
Author
Member

补充修正:客户端发布现已对无 npm build 工作区的单文件项目主动失败,只支持 Phaser 4 + Vite;对应 Rust 门禁与导出测试已通过。
更正测试统计:spacetime-module 本次命令匹配到 0 个测试(262 个被过滤),不是 262 个通过;api-server 游戏分发 33 passed,shared-contracts 4 passed,AGC Phaser 门禁 5 + 4 passed。
真实验证边界不变:Web/后台已验证未登录入口与视觉渲染;作者登录后作品操作、后台登录后管理列表、真实 AGC GUI 发布、生产开闸和 OSS 清理仍待具备 warm token/真实客户端与生产条件后验证。

补充修正:客户端发布现已对无 npm build 工作区的单文件项目主动失败,只支持 Phaser 4 + Vite;对应 Rust 门禁与导出测试已通过。 更正测试统计:spacetime-module 本次命令匹配到 0 个测试(262 个被过滤),不是 262 个通过;api-server 游戏分发 33 passed,shared-contracts 4 passed,AGC Phaser 门禁 5 + 4 passed。 真实验证边界不变:Web/后台已验证未登录入口与视觉渲染;作者登录后作品操作、后台登录后管理列表、真实 AGC GUI 发布、生产开闸和 OSS 清理仍待具备 warm token/真实客户端与生产条件后验证。
suzmii added 1 commit 2026-10-01 17:05:23 +08:00
合并master到作品管理分支
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust smoke (pull_request) Has been cancelled
Project CI / AI game creator shell Rust crates (pull_request) Has been cancelled
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
Project CI / Repository checks (pull_request) Has been cancelled
Project CI / AI game creator shell web tests (pull_request) Has been cancelled
b3e6950546
保留主线DirectProject与客户端基础设施更新

重新接回Phaser4发布、分片上传进度和幂等账本改动
suzmii added 1 commit 2026-10-01 17:05:52 +08:00
Merge branch 'master' into feat/game-works-management
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust smoke (pull_request) Has been cancelled
Project CI / AI game creator shell Rust crates (pull_request) Has been cancelled
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
Project CI / Repository checks (pull_request) Has been cancelled
Project CI / AI game creator shell web tests (pull_request) Has been cancelled
929a26d59b
suzmii added 2 commits 2026-10-01 17:32:22 +08:00
将分片上传与校验进度迁入主线runtime模块

移除commands旧层重复发布命令并保留desktop入口

补齐合并后的Rust编译与上传回归
Merge remote-tracking branch 'origin/feat/game-works-management' into feat/game-works-management
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 1m34s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m18s
Project CI / Backend tests (pull_request) Successful in 4m27s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 10m41s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 9m41s
Project CI / Frontend tests (pull_request) Successful in 2m11s
Project CI / Native shell tests (pull_request) Successful in 6m4s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m8s
Project CI / Repository checks (pull_request) Successful in 2m53s
e471d4505f
Author
Member

已同步最新 master 到功能分支并推送:\n- 合并提交:e471d4505(包含主线 DirectProject/Codex 相关更新);\n- 修复主线将 game_package_upload 拆到 runtime 后的发布进度接线冲突;\n- 合并后 Web/后台 104 个定向测试、AGC 发布 27 个定向测试、主站类型检查、AGC cargo check、Rust fmt、编码/文档/diff 门禁通过。

已同步最新 master 到功能分支并推送:\n- 合并提交:e471d4505(包含主线 DirectProject/Codex 相关更新);\n- 修复主线将 game_package_upload 拆到 runtime 后的发布进度接线冲突;\n- 合并后 Web/后台 104 个定向测试、AGC 发布 27 个定向测试、主站类型检查、AGC cargo check、Rust fmt、编码/文档/diff 门禁通过。
suzmii added 1 commit 2026-10-01 20:11:23 +08:00
移除AGC发布入口前端灰度
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m33s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 2m3s
Project CI / Backend tests (pull_request) Failing after 18s
Project CI / Frontend tests (pull_request) Successful in 2m18s
Project CI / Repository checks (pull_request) Failing after 16s
Project CI / AI game creator shell web tests (pull_request) Successful in 1m42s
Project CI / Native shell tests (pull_request) Successful in 6m13s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Failing after 8m59s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 11m8s
618c69e766
让DirectProject工作台始终展示发布按钮,保留Tauri、项目原型和服务端校验

删除原生发布灰度查询命令及配置白名单

更新发布入口与Rust facade定向测试
Author
Member

已按需求移除 AGC 发布入口的前端灰度阻断。DirectProject 工作台现在直接传递发布回调;仍保留 Tauri 宿主、项目原型完成、封面/资料校验、服务端鉴权与审核校验。
同时删除 read_game_publish_availability 原生命令、配置白名单与对应测试夹具。验证:入口/发布定向测试 29 passed,AGC typecheck、check-config、ESLint、Prettier、Rust fmt 和 encoding/diff 门禁通过。提交:618c69e76。

已按需求移除 AGC 发布入口的前端灰度阻断。DirectProject 工作台现在直接传递发布回调;仍保留 Tauri 宿主、项目原型完成、封面/资料校验、服务端鉴权与审核校验。 同时删除 read_game_publish_availability 原生命令、配置白名单与对应测试夹具。验证:入口/发布定向测试 29 passed,AGC typecheck、check-config、ESLint、Prettier、Rust fmt 和 encoding/diff 门禁通过。提交:618c69e76。
suzmii added 3 commits 2026-10-02 16:04:59 +08:00
修复游戏封面预览并统一发布灰度说明
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m53s
Project CI / Backend tests (pull_request) Failing after 15s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 2m41s
Project CI / Frontend tests (pull_request) Failing after 1m5s
Project CI / Repository checks (pull_request) Failing after 23s
Project CI / AI game creator shell web tests (pull_request) Successful in 1m48s
Project CI / Native shell tests (pull_request) Successful in 5m43s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 10m6s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 10m9s
772e9f0d42
封面生成结果经鉴权 read-url 转为安全 data URL 预览,失败时不阻断已登记素材发布。

统一后台、前端与后端对 game-distribution:publish 未配置和关闭状态的说明。
suzmii added 5 commits 2026-10-03 13:30:47 +08:00
将运行期存储兼容层保存为独立 JavaScript 文件,通过 include_str 注入发行 HTML。

保持 opaque sandbox 隔离,仅提供当前运行实例的 localStorage 与 sessionStorage 兼容能力。

同步发行沙箱验收脚本和玩法运行契约文档。
构建项目发布时补入 dist 未包含的项目根 assets 文件,并优先保留 dist 同路径产物。

增加 Phaser 发行包素材回归测试并同步发行契约文档。
后台审核详情复用公开游戏详情样式,补齐发布者、冻结资料、素材换签和待审 ZIP 试玩。

AGC 保存已发布作品绑定,支持同一 gameId 更新版本并由用户填写目标版本号。

保留 SpacetimeDB 表结构不变,增加版本号请求校验、幂等边界和本地清单字段。
修复发行资源路径与审核试玩 Cookie
Project CI / Backend tests (pull_request) Failing after 29s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m48s
Project CI / Frontend tests (pull_request) Failing after 1m11s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Failing after 3m18s
Project CI / Repository checks (pull_request) Failing after 42s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Failing after 4m13s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m15s
Project CI / Native shell tests (pull_request) Successful in 6m37s
2eac0975df
归一化发行包根绝对资源引用并兼容已有发行包,修复正式运行时素材请求跑到本地 Vite 的问题。

审核预览仅拒绝真实平台 refresh Cookie,保留版本绑定 Token 和私有缓存隔离。
suzmii added 1 commit 2026-10-03 14:34:41 +08:00
修复审核版本 revision 冲突
Project CI / Backend tests (pull_request) Failing after 33s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m57s
Project CI / Frontend tests (pull_request) Failing after 1m33s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Failing after 3m39s
Project CI / Repository checks (pull_request) Failing after 25s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Failing after 4m46s
Project CI / AI game creator shell web tests (pull_request) Successful in 1m54s
Project CI / Native shell tests (pull_request) Successful in 6m1s
454ed320a5
审核队列与版本快照使用所属游戏当前 publication_revision,避免新游戏审核通过时误携带 0。

详情审核动作使用最新详情 revision,并补充后台回归测试。
suzmii added 1 commit 2026-10-03 14:48:29 +08:00
合并最新 master 到作品管理分支
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m48s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Failing after 3m13s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Failing after 4m21s
Project CI / Frontend tests (pull_request) Failing after 1m39s
Project CI / Repository checks (pull_request) Failing after 1m26s
Project CI / Backend tests (pull_request) Successful in 6m50s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m0s
Project CI / Native shell tests (pull_request) Successful in 6m48s
667d1ad6dc
suzmii added 1 commit 2026-10-03 15:05:02 +08:00
修正发行资源归一化测试
Project CI / Backend tests (pull_request) Failing after 23s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 5m56s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Failing after 3m44s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m41s
Project CI / Repository checks (pull_request) Failing after 29s
Project CI / Frontend tests (pull_request) Failing after 1m38s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m46s
Project CI / Native shell tests (pull_request) Successful in 6m5s
b1e04e8a7b
使用真实 HTML 资源引用验证根绝对路径归一化,修复 CI 中的转义输入误报。
suzmii added 2 commits 2026-10-03 15:46:14 +08:00
统一 AGC 项目与发行版本模型
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m18s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Failing after 3m54s
Project CI / Frontend tests (pull_request) Failing after 1m28s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 5m33s
Project CI / Repository checks (pull_request) Failing after 1m15s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m15s
Project CI / Backend tests (pull_request) Successful in 6m50s
Project CI / Native shell tests (pull_request) Successful in 6m45s
996135379b
将用户版本改为可回退、可重复提交的版本标签,使用不可变 versionId 区分具体提交实例。

明确 publicationRevision 仅负责并发 CAS,不再限制用户版本号递增。
suzmii added 1 commit 2026-10-03 16:42:35 +08:00
实现统一项目发行版本
Project CI / AI game creator shell Rust crates (pull_request) Failing after 56s
Project CI / Backend tests (pull_request) Failing after 23s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Failing after 5m7s
Project CI / Repository checks (pull_request) Failing after 21s
Project CI / Frontend tests (pull_request) Has been cancelled
Project CI / AI game creator shell web tests (pull_request) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
3aa3e33ceb
以 projectVersion 作为 AGC 唯一用户版本,支持同版本重复提交和版本回退。

保留 publicationRevision 并发校验与旧客户端自动递增兼容。
suzmii added 1 commit 2026-10-03 16:55:08 +08:00
支持统一版本回退与重复提交
Project CI / Backend tests (pull_request) Failing after 54s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m22s
Project CI / Frontend tests (pull_request) Successful in 2m8s
Project CI / Repository checks (pull_request) Failing after 17s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 4m23s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Failing after 4m27s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m3s
Project CI / Native shell tests (pull_request) Successful in 5m18s
7bf7d6b10e
以 projectVersion 作为唯一用户版本标签,允许同版本重复提交和版本回退。

按 versionId 保持提交实例不可变,取消同版本旧 pending 提交并按最近提交排序。
suzmii added 1 commit 2026-10-03 17:06:11 +08:00
Merge remote-tracking branch 'origin/master' into feat/game-works-management
Project CI / AI game creator shell Rust crates (pull_request) Successful in 3m5s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Failing after 3m28s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 5m5s
Project CI / Frontend tests (pull_request) Successful in 2m43s
Project CI / Backend tests (pull_request) Successful in 6m12s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m37s
Project CI / Repository checks (pull_request) Failing after 3m54s
Project CI / Native shell tests (pull_request) Successful in 5m59s
72d6ea2180
suzmii added 1 commit 2026-10-03 17:20:09 +08:00
修复审核与发布页面 import 排序
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Failing after 2m34s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 4m30s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 2m18s
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
Project CI / AI game creator shell web tests (pull_request) Has been cancelled
Project CI / Repository checks (pull_request) Has been cancelled
3a1ccf312d
按仓库 eslint simple-import-sort 规则整理五个相关文件,保持行为不变。
suzmii added 1 commit 2026-10-03 17:34:31 +08:00
合并最新 master 到作品管理分支
Project CI / Backend tests (pull_request) Failing after 39s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 2m44s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Failing after 3m43s
Project CI / Repository checks (pull_request) Failing after 40s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 5m52s
Project CI / Frontend tests (pull_request) Successful in 3m17s
Project CI / AI game creator shell web tests (pull_request) Successful in 3m12s
Project CI / Native shell tests (pull_request) Successful in 6m41s
f4ca1aeecc
suzmii added 1 commit 2026-10-03 18:26:46 +08:00
Merge remote-tracking branch 'origin/master' into feat/game-works-management
Project CI / AI game creator shell Rust crates (pull_request) Successful in 2m56s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 4m55s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Failing after 6m19s
Project CI / Backend tests (pull_request) Failing after 4m14s
Project CI / Frontend tests (pull_request) Successful in 2m48s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m36s
Project CI / Repository checks (pull_request) Failing after 3m50s
Project CI / Native shell tests (pull_request) Successful in 6m0s
6edda2ae68
suzmii added 7 commits 2026-10-04 00:40:57 +08:00
- shared contracts:resolveGameCreationAppProjectVersion 改为按 manifest.versions 条数派生,删除 isGameCreationAppProjectVersion,projectVersion 注释降级为遗留兼容位
- Rust shared-contracts:删除 resolve_game_creation_app_project_version / is_game_creation_app_project_version / GAME_CREATION_APP_FIRST_PROJECT_VERSION,project_version 注释改遗留位并重写往返测试
- AGC 发布面板:项目版本改为 useMemo 派生只读输入框,删除本地 state、失焦落盘与 onManifestUpdated 回调
- AGC 发布服务:删除 saveGameDistributionProjectVersion,提交版本号缺省改为按 versions 派生
- AGC 原生:发布成功回写与绑定回填不再写 project_version(置空),删除 update_game_distribution_project_version 命令
- AGC 命令注册与白名单:desktop.rs 注销命令、check-config.mjs 移除白名单条目
- AGC 前端装配:App.tsx 移除两处 onManifestUpdated 传递
- AGC 测试:publish/panel 两条测试改为覆盖派生口径,删除四条写回用例
- 注释对齐:game_publish_attempt.rs / project/manifest.rs / styles.css / shared-contracts 的 game_distribution.rs 把版本标签口径改为「由 versions[] 派生」,清掉 projectVersion 遗留位表述
- 文档:decision-log 追加本决策条目,两份 2026-10-02 计划加取代标注,新增 2026-10-03 里程碑与实施计划
- export.rs:npm 导出用例改名并扩断言,覆盖根 assets 补入与 dist 同名优先
- export.rs:新增 5 条发布前工程栈校验用例(Phaser4+Vite 通过、Phaser3 报可操作错误、缺依赖与非 Vite 失败、semver 区间与 lockfile 版本、无 npm build 工作区失败)
- export.rs:新增 1 条端到端归一化 ZIP 用例(剥离 game 前缀、dist 产物优先、node_modules 与源码不入包、入口引用改相对)
- export.rs:新增 1 条已有可玩入口时跳过 npm run build 的用例
- 游戏管理页:下架改为独立面板(原因必填、校验提示、仍走二次确认),操作列与作者列排版调整,gameId 省略号加 title
- 游戏管理页测试:拆成空原因不提交、面板取消不请求、面板确认后仍需二次确认三条
- 审核页:移除行内游戏级安全下架及其状态与二次确认接线,理由弹窗只服务拒绝,gameId 截断加 title
- 审核页测试:删除两条安全下架用例,替换为行内无该动作、microsZ 时间列渲染、窄视口 gameId 截断
- 新增 adminGameDistributionReview.css:审核页专属列宽与动作列 nowrap,含 1366/980 两档断点
- admin-web admin.css:新增游戏管理表格 5 条排版规则
- shared AdminFormat:新增 normalizeAdminTimestamp,兼容后端 seconds.microsZ 时间口径
- shared AdminFormat 测试:新增 5 条覆盖微秒口径、补零、ISO 与 epoch 兼容、非法值回落
- shared admin.css:admin-status 改为 nowrap
- 文档:后台游戏审核详情计划加取代标注,说明审核页只承载版本级动作
- 平台入口与玩法链路:改写版本模型条款为按 versions 派生只读,并同步安全下架入口收敛到游戏管理页
- 平台入口与玩法链路:新增兼容与迁移、非目标两条
- pitfalls:追加随包 plugins feature 档位与 build.rs 假通过排障条目
# Conflicts:
#	apps/ai-game-creator-shell/tests/gameDistributionPublishLive.test.ts
- 改动文件:apps/ai-game-creator-shell/tests/gameDistributionPublishPanel.test.tsx(仅此一个文件)
- 写法替换:把 `Promise.withResolvers<unknown>()` 换成本地手写 deferred(`let settlePending` + `new Promise((resolve) => { settlePending = resolve })`),resolve 仍由外部持有、promise 仍交回测试,与原 onResolve/onReject 语义一致(原 reject 未被使用)
- 为什么不改 tsconfig:`Promise.withResolvers` 需要 lib ES2024,而 apps/ai-game-creator-shell/tsconfig.json 是 target/lib ES2022;为单个测试把 lib 提到 ES2024 会改整个 AGC 客户端的编译目标与运行时假设,影响面远大于此处需求,故只在测试内手写等价 deferred
- 验证:npm run agc:typecheck 五步全 0(check:tests:types → tsc -p tsconfig.json → skill-pack:check → bundled-resources:check → check-config.mjs)
消除 AGC 导出测试对 HOME 环境变量的依赖
Project CI / AI game creator shell Rust crates (pull_request) Successful in 3m6s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 5m3s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 6m9s
Project CI / Backend tests (pull_request) Failing after 3m57s
Project CI / Frontend tests (pull_request) Successful in 3m8s
Project CI / AI game creator shell web tests (pull_request) Successful in 3m1s
Project CI / Repository checks (pull_request) Failing after 4m21s
Project CI / Native shell tests (pull_request) Successful in 7m42s
0bf84e2886
- export.rs:npm_export_tests 的 2 条用例(npm_package_contains_dist_project_root_assets_and_publish_readme、本批新增的 built_project_publish_payload_includes_uploaded_assets_and_prefers_dist_assets)不再用 std::env::var("HOME") 拼临时根,改用仓库既有约定的 crate::tests::canonical_test_tempdir
- 动机:Windows 只设 USERPROFILE、不设 HOME 时,std::env::var("HOME").unwrap() 会以 NotPresent panic;改后与本批另 5 条 publish_export_tests 的临时根口径一致
- 未动断言:两条用例的断言与语义保持不变,只替换临时根来源(canonical_test_tempdir 同样返回 tempfile::TempDir,root.path() 用法不变)
- 验证(同一命令 cargo test --locked --manifest-path apps/ai-game-creator-shell/src-tauri/Cargo.toml --bin genarrative-ai-game-creator-shell -- --test-threads=1 project::export::):HOME 未设置(env -u HOME)→ exit 0,test result: ok. 12 passed; 0 failed;HOME=C:/Users/dongy → exit 0,test result: ok. 12 passed; 0 failed
- 顺带核对:project/verification.rs 仍有 1 处同名 HOME 写法,属其它模块范围,本次不动
Author
Member

CI run 3295 结论(head 0bf84e288)

一句话:CI run 3295 = 6 passed / 2 failed;两处失败均为 master 既有缺陷,与本 PR 无因果关系;本 PR 此前唯一的真实门禁红(AGC shell lane 的旧导出断言)已修复并转绿。

本轮失败项与出处

  1. Backend tests(run 3295 / job 19355)
    • 失败步骤:cargo test --locked --workspace --exclude spacetime-module --no-fail-fast --manifest-path server-rs/Cargo.toml
    • 首个错误:crates/api-server/src/external_mcp/semantic/tests.rs:33 → assertion \left == right` failed/left: 32/right: 30`
    • 归属:master 4b529a895「新增支付服务接入与订单收银台」(PR #597) 在 docs/openapi/genarrative-external-v1.openapi.json 追加了 /api/external/v1/payment/orders 与 /api/external/v1/payment/orders/{orderId} 两条外部操作,未标 x-mcp-excluded,因此经 external_mcp.rs 的自动派生进入 MCP 工具表;而 semantic/tests.rs 的期望值未同步(MCP_OPERATIONS.len() == 30)。master 自身 run 3268 / job 19139 逐字相同。 紧随的 names.len() == 45(实际 47)亦已过期,同源。
  2. Repository checks(run 3295 / job 19358)
    • 失败步骤:npm run check:repository-ci
    • 首个错误:[check:nginx-spa-routes] FAILED - deploy/nginx/genarrative.conf 缺少 SPA 路由: /pay, /profile/payment(共 15 条诊断,涉及 deploy/nginx/genarrative.conf、deploy/nginx/genarrative-dev-http.conf、deploy/container/nginx.conf)
    • 归属:同一提交把 /pay、/profile/payment 加进 src/routing/activeAppPageRoutes.ts,但未同步 nginx 模板与 Pingora 网关 SPA 清单。master 自身 run 3268 / job 19142 相同。 check:pingora-route-parity 因 npm 链在该步中断而未执行;同一缺口同样存在于 server-rs/crates/pingora-gateway/src/main.rs 的 MAIN_SPA_PATHS(12 条 vs 应为 14 条)。
    • 边界:本 PR 相对 master 对 deploy/**、src/routing/**、server-rs/crates/api-server/src/external_mcp/** 零差异,可在 master 上独立复现。

本 PR 本轮修掉的门禁红

AI game creator shell Rust lane 2/2(run 3295 / job 19353)→ success。原用例 project::export::npm_export_tests::npm_package_contains_only_dist_and_publish_readme 的期望(仅 3 条目、不含项目根 assets/**)与生产行为冲突;其对应的真实回归用例已随一次 master 合并被删除。现已改名为 npm_package_contains_dist_project_root_assets_and_publish_readme 并按契约文档口径扩断言,另补回 6 条发布前工程栈/导出用例。

本轮主要内容

  • 发布版本标签改为由工程内部版本 manifest.versions 条数派生、面板只读;拆除 projectVersion 写链路与该手改命令。
  • AGC 导出/发布测试回补(含去 HOME 依赖、跳过构建路径)。
  • 后台「游戏管理与审核」排版修复,下架流程收敛:安全下架仅保留在游戏管理页的独立面板,审核页只保留版本级动作。
  • 平台入口主规范与排障记忆同步(含 pitfalls.md 4 条新条目)。

真机核验(非测试替代)

真实 AGC 客户端(WebView2 + CDP)实测发布面板:「项目版本」输入框 value=4、readOnly=true、aria-readonly=true,与 get_local_game_manifest 的 versions.length=4 一致;面板并列显示「线上最近提交 v6 · 审核中」;面板内可编辑版本号输入框数量为 0;磁盘清单中遗留的 projectVersion 键已被抹除。

本机环境项(不经由 CI,避免误读)

Windows 本机 check:git-hooks 因临时目录 EBUSY 失败;AGC rust 分片 runner 会被一个 Windows 阻塞模态用例挂死(Linux CI 不受影响,本地改用等价分块跑)。两者均不经由 CI;本机 cargo 类门禁已在 featureless 档位下实跑通过。

## CI run 3295 结论(head `0bf84e288`) **一句话**:CI run 3295 = **6 passed / 2 failed**;两处失败均为 **master 既有缺陷**,与本 PR 无因果关系;本 PR 此前唯一的真实门禁红(AGC shell lane 的旧导出断言)已修复并转绿。 ### 本轮失败项与出处 1. **`Backend tests`**(run 3295 / job 19355) - 失败步骤:`cargo test --locked --workspace --exclude spacetime-module --no-fail-fast --manifest-path server-rs/Cargo.toml` - 首个错误:`crates/api-server/src/external_mcp/semantic/tests.rs:33` → `assertion \`left == right\` failed` / `left: 32` / `right: 30` - 归属:master `4b529a895`「新增支付服务接入与订单收银台」(PR #597) 在 `docs/openapi/genarrative-external-v1.openapi.json` 追加了 `/api/external/v1/payment/orders` 与 `/api/external/v1/payment/orders/{orderId}` 两条外部操作,未标 `x-mcp-excluded`,因此经 `external_mcp.rs` 的自动派生进入 MCP 工具表;而 `semantic/tests.rs` 的期望值未同步(`MCP_OPERATIONS.len() == 30`)。**master 自身 run 3268 / job 19139 逐字相同。** 紧随的 `names.len() == 45`(实际 47)亦已过期,同源。 2. **`Repository checks`**(run 3295 / job 19358) - 失败步骤:`npm run check:repository-ci` - 首个错误:`[check:nginx-spa-routes] FAILED - deploy/nginx/genarrative.conf 缺少 SPA 路由: /pay, /profile/payment`(共 15 条诊断,涉及 `deploy/nginx/genarrative.conf`、`deploy/nginx/genarrative-dev-http.conf`、`deploy/container/nginx.conf`) - 归属:同一提交把 `/pay`、`/profile/payment` 加进 `src/routing/activeAppPageRoutes.ts`,但未同步 nginx 模板与 Pingora 网关 SPA 清单。**master 自身 run 3268 / job 19142 相同。** `check:pingora-route-parity` 因 npm 链在该步中断而未执行;同一缺口同样存在于 `server-rs/crates/pingora-gateway/src/main.rs` 的 `MAIN_SPA_PATHS`(12 条 vs 应为 14 条)。 - 边界:本 PR 相对 master 对 `deploy/**`、`src/routing/**`、`server-rs/crates/api-server/src/external_mcp/**` 零差异,可在 master 上独立复现。 ### 本 PR 本轮修掉的门禁红 `AI game creator shell Rust lane 2/2`(run 3295 / job 19353)→ **success**。原用例 `project::export::npm_export_tests::npm_package_contains_only_dist_and_publish_readme` 的期望(仅 3 条目、不含项目根 `assets/**`)与生产行为冲突;其对应的真实回归用例已随一次 master 合并被删除。现已改名为 `npm_package_contains_dist_project_root_assets_and_publish_readme` 并按契约文档口径扩断言,另补回 6 条发布前工程栈/导出用例。 ### 本轮主要内容 - 发布版本标签改为由工程内部版本 `manifest.versions` 条数派生、面板只读;拆除 `projectVersion` 写链路与该手改命令。 - AGC 导出/发布测试回补(含去 HOME 依赖、跳过构建路径)。 - 后台「游戏管理与审核」排版修复,下架流程收敛:安全下架仅保留在游戏管理页的独立面板,审核页只保留版本级动作。 - 平台入口主规范与排障记忆同步(含 `pitfalls.md` 4 条新条目)。 ### 真机核验(非测试替代) 真实 AGC 客户端(WebView2 + CDP)实测发布面板:「项目版本」输入框 `value=4`、`readOnly=true`、`aria-readonly=true`,与 `get_local_game_manifest` 的 `versions.length=4` 一致;面板并列显示「线上最近提交 v6 · 审核中」;面板内可编辑版本号输入框数量为 0;磁盘清单中遗留的 `projectVersion` 键已被抹除。 ### 本机环境项(不经由 CI,避免误读) Windows 本机 `check:git-hooks` 因临时目录 `EBUSY` 失败;AGC rust 分片 runner 会被一个 Windows 阻塞模态用例挂死(Linux CI 不受影响,本地改用等价分块跑)。两者均不经由 CI;本机 cargo 类门禁已在 featureless 档位下实跑通过。
suzmii added 1 commit 2026-10-04 01:18:55 +08:00
回补 AGC 客户端发布与导出路径的机器级覆盖
Project CI / AI game creator shell Rust crates (pull_request) Successful in 3m11s
Project CI / Backend tests (pull_request) Failing after 4m21s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 5m6s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 6m3s
Project CI / Frontend tests (pull_request) Successful in 3m10s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m42s
Project CI / Repository checks (pull_request) Failing after 3m43s
Project CI / Native shell tests (pull_request) Successful in 6m13s
c4b3d22042
master 839051f53(PR #568 退役 AGC 自建 Agent Runtime/CLI)整文件删除了
src-tauri/src/tests/project.rs(当时含 128 个用例),本分支合并 783ca014e 采纳了
这次删除,导致其中覆盖「客户端发布/导出」活代码的断言失去全部引用。本次不复活已删
文件,把同域用例按原断言意图重建在 project/export.rs 的现役测试模块。生产代码未改动。

mod publish_export_tests 本次新增:
- publish_build_plan_prefers_game_subproject_and_requires_dependencies:构建计划优先 game 子工程;
  缺 game/node_modules 时 needs_dependency_install=true,补齐后为 false。
- publish_build_plan_falls_back_to_root_npm_build:game 无 build 脚本时回落到项目根 npm 工程
  (cwd_relative="."、command 取根 build 脚本、不需要装依赖)。
- publish_export_runs_project_build_before_packaging:原型完成后发布先跑项目 npm build 产出
  dist/ 再打包,且 .agent/logs/command.log 必须记录一次 project.verify build。
- publish_export_blocks_build_until_runnable_prototype_is_completed:原型未完成时禁止触发用户
  项目构建(无 build 标记文件、无 build 日志、错误含「首个可运行原型尚未完成」)。
- publish_export_reports_actionable_error_without_entry_or_build_script:缺可玩入口且没有 build
  脚本时失败关闭,错误必须同时给出「还没有可玩入口」与「build 脚本」。
- local_project_export_package_publish_payload_contains_bytes_and_file_digests:发行载荷带
  package_size_bytes、64 位十六进制 sha256 与逐文件清单;条目无 game/ 前缀、含 index.html 与
  exports/README.md(体积/契约)。
- local_project_export_package_list_only_returns_recent_playtest_zips:包列表只返回
  exports/playtest-package-*.zip,按修改时间倒序,忽略非 playtest 文件与非 exports 目录。
- local_project_export_package_list_skips_symlink_packages(cfg(unix)):符号链接试玩包不得列出(安全)。
- local_project_export_package_rejects_symlink_assets(cfg(unix)):assets/ 内符号链接素材必须
  整包拒收,且不得留下试玩包(安全)。
- local_project_export_package_rejects_symlink_runtime_dirs_and_readme(cfg(unix)):README 与
  运行时目录被符号链接顶替时必须拒收(安全)。

同批提交中另含上一轮已重建的 7 条(同一文件):
publish_stack_validation_{accepts_scaffolded_phaser4_vite_project,
reports_actionable_error_for_phaser3,requires_phaser_dependency_and_vite,
reads_semver_ranges_and_lockfile_versions,rejects_projects_without_npm_build_workspace}、
publish_export_skips_build_when_phaser_vite_entry_exists、
built_project_publish_payload_includes_uploaded_assets_and_prefers_dist_assets。

不适用 / 已覆盖:
- publish_export_skips_build_when_playable_entry_exists(原始版本)已由
  publish_export_skips_build_when_phaser_vite_entry_exists 以 Phaser 4 + Vite 语境等价覆盖,不重复。
- 其余域(preview / assets / commands / windows / cli 等)缺口不在本 PR 交付面,未处理。

fixture 适配:unique_project_path 在 HEAD 为私有 fn,改用 crate::tests::canonical_test_tempdir;
随文件删除的 init_existing_html_project_at 与 fake_llm_game_draft 用最小内联 fixture 取代
(内联单文件可玩 HTML + 去掉 npm 工作区脚手架的工程)。
Author
Member

补充:CI run 3297(head c4b3d2204)

  • 结论:run 3297 = 6 passed / 2 failed,失败项与 run 3295 完全同源 —— Backend tests ← crates/api-server/src/external_mcp/semantic/tests.rs:33 期望 30 实际 32;Repository checks ← check:nginx-spa-routes 缺 /pay、/profile/payment;本批引入 = 0。check:pingora-route-parity 仍因 npm 链在前一步中断而未执行(无报错原文,推定同类)。
  • 本轮新增提交:c4b3d2204 补回 AGC 客户端发布/导出路径的 10 条机器级用例(project::export:: 本机 19 passed / 0 failed),CI 用例数 1884 → 1894,两个 AGC Rust lane 均 success。
  • 门禁:base is ancestor of head 满足(origin/master = ccd271572,盯梢期间未推进)。
  • PR 仍为 draft,保持 WIP,待按反馈整理后再转正式评审。
### 补充:CI run 3297(head `c4b3d2204`) - **结论**:run 3297 = **6 passed / 2 failed**,失败项与 run 3295 完全同源 —— `Backend tests` ← `crates/api-server/src/external_mcp/semantic/tests.rs:33` 期望 30 实际 32;`Repository checks` ← `check:nginx-spa-routes` 缺 `/pay`、`/profile/payment`;**本批引入 = 0**。`check:pingora-route-parity` 仍因 npm 链在前一步中断而未执行(无报错原文,推定同类)。 - **本轮新增提交**:`c4b3d2204` 补回 AGC 客户端发布/导出路径的 **10 条机器级用例**(`project::export::` 本机 19 passed / 0 failed),CI 用例数 `1884 → 1894`,两个 AGC Rust lane 均 **success**。 - **门禁**:`base is ancestor of head` 满足(`origin/master = ccd271572`,盯梢期间未推进)。 - PR 仍为 draft,保持 WIP,待按反馈整理后再转正式评审。
Some checks are pending
Project CI / AI game creator shell Rust crates (pull_request) Successful in 3m11s
Project CI / Backend tests (pull_request) Failing after 4m21s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 5m6s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 6m3s
Project CI / Frontend tests (pull_request) Successful in 3m10s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m42s
Project CI / Repository checks (pull_request) Failing after 3m43s
Project CI / Native shell tests (pull_request) Successful in 6m13s
This pull request is marked as a work in progress.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/game-works-management:feat/game-works-management
git checkout feat/game-works-management
Sign in to join this conversation.