Commit Graph

856 Commits

Author SHA1 Message Date
suzmii 6c5f2175c4 Merge remote-tracking branch 'origin/master' into feat/game-fork
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Failing after 4m25s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Failing after 6m11s
Project CI / Frontend tests (pull_request) Failing after 1m38s
Project CI / AI game creator shell Rust crates (pull_request) Failing after 5m39s
Project CI / Native shell tests (pull_request) Failing after 3m46s
Project CI / AI game creator shell web tests (pull_request) Failing after 42s
Project CI / Repository checks (pull_request) Failing after 4m54s
Project CI / Backend tests (pull_request) Successful in 10m28s
# Conflicts:
#	apps/ai-game-creator-shell/scripts/check-config.mjs
#	apps/ai-game-creator-shell/src-tauri/src/commands/desktop.rs
#	apps/ai-game-creator-shell/src-tauri/src/desktop.rs
#	apps/ai-game-creator-shell/src-tauri/src/game_distribution_publish.rs
#	apps/ai-game-creator-shell/src-tauri/src/project/export.rs
#	apps/ai-game-creator-shell/src/components/game-distribution/GameDistributionPublishFormView.tsx
#	apps/ai-game-creator-shell/src/components/game-distribution/useGameDistributionPublishForm.ts
#	apps/ai-game-creator-shell/tests/gameDistributionPublishForm.test.tsx
#	docs/project-memory/shared-memory/pitfalls.md
#	docs/【后端架构】server-rs与SpacetimeDB数据契约-2026-05-15.md
#	server-rs/crates/api-server/src/modules/game_distribution.rs
#	server-rs/crates/shared-contracts/src/game_distribution.rs
#	server-rs/crates/spacetime-client/src/game_distribution.rs
#	server-rs/crates/spacetime-client/src/module_bindings.rs
#	server-rs/crates/spacetime-client/src/module_bindings/game_distribution_create_game_input_type.rs
#	server-rs/crates/spacetime-module/src/game_distribution.rs
#	server-rs/crates/spacetime-module/src/migration.rs
#	src/components/game-distribution/MyGamesPage.test.tsx
#	src/components/game-distribution/MyGamesPage.tsx
#	src/services/gameDistributionClient.test.ts
2026-10-07 20:56:50 +08:00
lhk229 27e385785f 修正美术包 API 指南、AGC 调用与切片用途判定 (#628)
Project CI / AI game creator shell Rust lane 1/2 (push) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (push) Has been cancelled
Project CI / AI game creator shell Rust crates (push) Has been cancelled
Project CI / Backend tests (push) Has been cancelled
Project CI / Native shell tests (push) Has been cancelled
Project CI / Frontend tests (push) Has been cancelled
Project CI / Repository checks (push) Has been cancelled
Project CI / AI game creator shell web tests (push) Has been cancelled
AGC 美术包此前把内容、风格和排布要求放在未被提示词消费的元数据中,并要求恰好四张切片、按返回顺序分配用途。本 PR 完成以下三项修正:

- [x] API 文档:修正整个 `generationInputs` 的定位、保存与读取方式、接口保留/重建规则及已知消费者。任意元数据不会自动进入提示词,服务端行为和校验约束保持不变。
- [x] AGC 请求:美术包将原 brief 和内容、风格、排布要求写入实际消费的 `iconDescriptions`;普通图标入口继续原文单项透传。参考图、比例和尺寸使用正式参数,同步工具说明与随包 skill。
- [x] 客户端切片处理:美术包和直接生图工具不再暴露或发送 `sliceCount`,取消固定四片和按序赋义;按实际产物保存、登记和返回。切片目录按源图集隔离,文件名使用中性序号,普通清单指向真实总图。

四类素材需求只表达内容覆盖,不能证明四个连通区域或固定语义顺序。两个工具返回总图、完整切片路径及资源身份,预览逐项标注路径,未内嵌的图片列出路径供 Agent 查看。Agent 看图识别实体、状态和用途后再接入或处理;有效总图零切片时仍交付并保留告警。

本轮切片改造仅限客户端:服务端 API、请求侧 sliceCount 契约、切分算法和计费行为不变。不新增为数量不符找回、补切或凑数的工作流。保留文件完整性、平台身份、资源预算、事务与重生成恢复;兼容历史四用途产物和旧数量参数账本,旧请求正文、幂等键及 operation 不改写,候选身份不唯一时要求对账。完成结果快照补存切分声明,避免重放丢失响应字段。

验证:

- API 文档阶段:MCP 25 项、External editor API 30 项测试及 OpenAPI 约束等价检查通过。
- 本轮:317 项定向 Rust 测试通过(生成 118、Direct 运行时 93、工具桥 44、MCP 32、账本 6、提示词 24)。覆盖新请求完全省略字段、0/2/4/6 片、目录隔离、完整资源投影、动态事务回滚、旧请求和旧输出槽恢复;已受理任务恢复不新增生成 POST。
- cargo check、rustfmt、skill-pack:check、文档索引、变更文件编码及 git diff --check 通过。
- 未调用真实付费 Provider,未做客户端视觉试玩;PR 保持草稿,等待视觉及产品验收。

Closes #525

Reviewed-on: #628
Co-authored-by: Linghong <ink29535@proton.me>
Co-committed-by: Linghong <ink29535@proton.me>
2026-10-07 19:35:20 +08:00
suzmii ffd7510143 feat(游戏共创): 公开投影新增 coCreationCount(公开可见的全部后代数)
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 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
会议口径:共创页卡片要突出「共创次数(= 该作品有多少个子项目/衍生作品)」。前端已按 `coCreationCount`
接字段(TS 侧先声明 ⇒ 上轮 **dto parity 变红**:`GameDistributionGame 多出未登记字段/变体:coCreationCount`),
本提交把服务端补齐并让 parity 回绿。

- **字段**:公开投影新增 `coCreationCount`(Rust `co_creation_count: u64`)= **该作品子树里「公开可见的全部后代」
  数,不含自己**;沿血缘边 BFS 整棵子树,只数「未软删除 + 已公开」的后代(与 `forkCount` 同一批规则
  `module_game_distribution::counts_as_public_derivative`,只是深度不同)。已删/未公开的后代不进任何一层计数;
  **中间作品不可见也不断链**(它可见的后代仍计入祖先);血缘环/自引用按 visited 去重,自己永不计数。
- **与 `forkCount` 并存、互不推导**:`forkCount` = **直接**子代(「被改编 N」),`coCreationCount` = **全部**后代
  (「共创 N」);同卡上前者 ≤ 后者。
- **发出范围**:公开投影**恒发**(公开目录、公开详情、我的收藏、主题成员 `roots` 都走同一个 `public_game_payload`);
  **无后代时发 `0` 而不是缺键**;作者侧同形响应不发(与 `currentVersion`/`ratingSummary` 同类)⇒ 前端读取建议
  `coCreationCount ?? forkCount`。
- **算法与成本**:在 spacetime **只读事务内现算** —— 先建一次 `PublicDerivativeIndex`(父→直接子代边 + 可见性集合),
  再对本页每行做一次 BFS 子树计数(visited 去重);目录/详情/收藏/主题各自事务内建一次。
  **不新增表/列/索引、不落物化计数,api-server 只发键不遍历**;边际成本 O(作品数)(当前 51)。
- **契约/门禁**:parity 的 `public_game_payload` 构建器 `mustEmit` 把 `coCreationCount` 与 `forkCount` 一起钉住
  ⇒ **parity 由红转绿(EXIT 0)**;TS 契约里两字段注释改为最终口径。
- **文档**:主规范公开投影一行写明两字段口径、BFS 算法与成本。
- **测试**:+4(根带 3 直接子代、其中一个再带 1 孙代 ⇒ **`forkCount == 3`、`coCreationCount == 4`**;无后代两键恒发且为 0;
  不可见后代不计且**中间不可见不断链**;环/自引用安全)→ `module-game-distribution` **153 passed**。

门禁:`cargo check --all-targets` 0;`cargo test -p module-game-distribution` **153 passed**;
`cargo test -p api-server game_distribution` 见下文;**`check-game-distribution-dto-parity` 0(66 组 / 19 构建器 /
15 手拼类型)**;`check:spacetime-schema` 0(98 表);`cargo fmt --all -- --check` 0;`git diff --check` 0。
2026-10-07 18:02:13 +08:00
lhk229 d7ddf5fbc1 修复 CI 领取冲突导致网关永久锁定
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 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
识别 Gitea 已回滚的任务分配冲突,允许 runner 正常重试。
保留未知响应与未完成领取的保护,增加脱敏原因日志。
补充冲突重试及错误边界测试,同步部署文档与共享记忆。
2026-10-07 09:20:04 +00:00
k88936 b4ca794660 修复 hook 夹具在 home 为 Git 仓库时的误判
- 夹具建在 homedir()/data/tmp;home 自身是仓库时,尚未 init 的夹具被 rev-parse 向上解析成父仓库
- isolatedGitEnvironment 增加 GIT_CEILING_DIRECTORIES 指向夹具临时根,阻止 git 发现 home 仓库
2026-10-07 15:13:14 +08:00
k88936 3a0d275746 购买 E2E 定价边界建游失败时提前退出
- boundsGameId 为空时先记录失败再 process.exit(1),避免后续请求 /undefined 级联掩盖根因
2026-10-07 14:10:14 +08:00
k88936 11c8c2789a 重启校验 E2E 恢复封面前查回当前 coverObjectKey
- 旧 STATE_FILE 只有 coverAssetId(素材对象 ID,不是对象存储 key),恢复续跑时先查游戏当前封面 key,不再拿它冒充 coverObjectKey
2026-10-07 14:09:16 +08:00
k88936 28be35239e 修 creator-runtime 夹具缺失 price_mud_points
- fixtures 的 game 字典补上必填非 Option 的 price_mud_points=0,避免迁移导入报 missing field
2026-10-07 14:09:00 +08:00
k88936 0f127dbc70 移除游戏分发 E2E helper 中无引用的导出
- 删除 coverImagePart:各 E2E 脚本都有自己的本地实现,仓库内无人导入
- COVER_PNG 只作 imagePart 的默认值,收回 export
2026-10-07 13:55:05 +08:00
suzmii 94cd35e8f7 Merge remote-tracking branch 'origin/master' into feat/game-fork
Project CI / AI game creator shell Rust crates (pull_request) Successful in 4m11s
Project CI / Frontend tests (pull_request) Successful in 3m40s
Project CI / Backend tests (pull_request) Successful in 8m55s
Project CI / Repository checks (pull_request) Successful in 8m33s
Project CI / Native shell tests (pull_request) Successful in 10m15s
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 web tests (pull_request) Has been cancelled
# Conflicts:
#	apps/ai-game-creator-shell/src/components/game-distribution/useGameDistributionPublishForm.ts
#	docs/project-memory/shared-memory/decision-log.md
2026-10-07 11:53:17 +08:00
k88936 009a772ebd 媒体验证 E2E 去掉对服务端存储前缀的硬编码断言
- 「公开投影只暴露服务端派生的媒体 objectKey」改为结构断言:非空去空白、含路径分隔符、不是客户端 part 文件名
- 不再断言 agc/project-snapshots/v1/game-distribution/media/ 这一内部布局常量
- 与服务端返回键的一致性仍由相邻的 owner/公开投影相等断言覆盖
2026-10-07 11:43:17 +08:00
k88936 1f239a96ce 游戏分发 E2E 抽出共享 multipart 发布 helper
- 新增 scripts/game-distribution-e2e-helpers.mjs:COVER_PNG、imagePart、coverImagePart、publishFormData、resolveApiRequest
- 11 个 E2E 脚本删除各自的重复实现,改为 import;api() 的 body 分支收敛到 resolveApiRequest
- 各脚本的封面文件名前缀、envelope 与鉴权头合并顺序、返回形状保持不变
2026-10-07 11:42:45 +08:00
suzmii 1bdffcdef0 test(族谱截图): 造树模式的越权提示不再引用已下线的 npm 条目
Project CI / Backend tests (pull_request) Failing after 29s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 6m31s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 4m11s
Project CI / Repository checks (pull_request) Failing after 34s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 6m4s
Project CI / Frontend tests (pull_request) Successful in 3m2s
Project CI / AI game creator shell web tests (pull_request) Successful in 3m12s
Project CI / Native shell tests (pull_request) Successful in 8m44s
2026-10-07 11:27:59 +08:00
suzmii 6e5cf195f8 feat(游戏共创): 公开目录补真游标分页(修「48 硬上限 + 无游标」导致最老作品永久不可见)
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 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
真实库实证:51 条 published 时**最老的 3 条**(含最关键的 A0/A1/A11 母版与主干)在公开目录里不可见
(AGC 共创页显示「已检查最新 48 个作品(1 页)」;数据本身没丢)。根因:handler 写死
`limit: MAX_LIST_LIMIT(48)`(并忽略客户端 `limit`),事务过滤排序后 `truncate(limit)`,**既无 has_more
也无游标**。

- **页大小**:默认 **48**(保持既有 AGC 共创页首屏语义——48 只该是默认值而非硬上限)、上限 **100**
  (单响应体量);`0` 取默认、超界**截断**(不报错);api-server 与事务共用同一归一函数。
- **游标**:`"{created_at_micros}:{game_id}"`(复用仓库既有 `"{micros}:{id}"` 惯例,与主题列表同构);
  排序键 `created_at` **倒序** + `game_id` **升序**兜底(与改前比较器逐字同序 ⇒ 首页顺序不变;全序 ⇒
  翻页不重不漏);**先过滤再切页**;「多取一条」判 has_more;`nextCursor` 为真值、**末页为 `null`**。
- **非法游标**:模块产出 `CATALOG_INVALID_CURSOR: 目录游标格式无效` → api-server 新增 `CATALOG_` 前缀分支
  (**排在 owner 不匹配 / 不存在 / 状态 等子串分支之前**)→ **400 + 稳定码 `CATALOG_INVALID_CURSOR`**,
  并纳入「码由模块真实文案可达」的枚举测试(防上次那种不可达码);未登记的 `CATALOG_` 码兜底
  `CATALOG_ERROR`(400)。
- **响应形状不变**:仍是 `{ games, nextCursor }`(`nextCursor` 从恒 `null` 变成真值);抽命名构建器
  `public_games_payload` 并登记 parity(构建器 18→**19**,`mustEmit: ['games','nextCursor']`)。
- **生成绑定**:`game_distribution_public_game_list_input_type.rs`(+`cursor`)、
  `game_distribution_game_list_procedure_result_type.rs`(+`next_cursor`);client facade 改返回
  `(games, next_cursor)`,mapper 同步。
- **文档**(同批):主规范 HTTP 表 `GET /games` 行改为真游标分页;创作者主页工程设计两处「最多 48 / 不分页」
  改写(并注明前端尚未消费游标);`docs/README.md` 索引行同步。
- **测试 +15**:纯函数 9(**51 条能翻到最老那条**、恰好整页不产生空游标、同 `created_at` 用 `game_id` 兜底、
  **先过滤再切页**、游标指向页内最后一条、limit 0/超界、非法游标 7 种);事务结构断言 1;api-server 5
  (形状、`limit` 默认与截断、非法游标 400 + 稳定码、码可达性枚举、**51 条走真实 handler 链路翻页且
  未公开/已软删/无公开版本三种不可见行不出现**)。

门禁:wasm build 0;`cargo check --all-targets` 0;`cargo test -p module-game-distribution` **143 passed**;
`-p spacetime-module` **307 passed / 1 ignored**;`-p spacetime-client` 44 passed;`-p api-server game_distribution`
**112 passed**;DTO parity 0(66 组 / **19** 构建器 / 15 手拼类型);`check:spacetime-schema` 0(98 表);
`check:encoding` 0(5548 files);`cargo fmt --all --manifest-path server-rs/Cargo.toml -- --check` 0;
`git diff --check` 0。
2026-10-07 11:23:59 +08:00
k88936 9184e92774 运维回滚 E2E:封禁态建游请求去掉歧义的沿用封面键
- 带二进制 cover part 时把 metadata.coverObjectKey 显式置 null,与套件其余「新图」语义一致
- 避免同一请求同时携带 objectKey 与 cover 字节,在网关检查顺序变化时结论漂移
2026-10-07 11:12:20 +08:00
k88936 152cdc6177 可达性 E2E:创建游戏失败时先退出再解引用封面键
- 在 gameId 取值后补 if (!gameId) process.exit(1)
- 创建失败时 created.data 为空,提前取 coverObjectKey 会抛未捕获 TypeError 打崩脚本
2026-10-07 11:12:08 +08:00
k88936 9c822c098d 重启校验 E2E 续跑兼容旧 STATE_FILE 的 coverAssetId
- runResume 读封面键时回退 state.coverAssetId
- 旧版状态文件没有 coverObjectKey,直接读会得到 undefined 且被 JSON.stringify 丢掉,v3 会缺封面
2026-10-07 11:11:58 +08:00
k88936 8e59e11f0d 重启校验 E2E:创建游戏失败时先退出再解引用
- 在 check('创建游戏成功') 后补 if (!gameId) process.exit(1)
- check 只记失败不中断,created.data 为空时继续取 coverObjectKey 会抛未捕获 TypeError 打崩脚本
2026-10-07 11:11:41 +08:00
suzmii dd9e3b0019 族谱:父代/子代可断言区分 + 「只看父代与子代」可取消开关;侧栏卡文案对齐口径
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 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
2026-10-07 11:08:22 +08:00
suzmii 70bba0f7b2 test(e2e): 夹具类脚本默认打隔离栈并加护栏/自清理,dev 栈标记可重定向 2026-10-07 11:00:28 +08:00
k88936 069df704fd 真实链路脚本补 owner 媒体读检查
- 待审期间断言作者本人可经 owner 路由预览自己的封面
- 断言匿名走 owner 路由被拒(401)、非本作品媒体的 objectKey 换不出来(404)
2026-10-07 10:26:50 +08:00
suzmii 5caefe297d test(共创): 窄屏图谱视图复盘——面包屑改由大纲形态验证,补可见节点数
Project CI / AI game creator shell Rust lane 1/2 (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
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Has been cancelled
2026-10-07 01:55:08 +08:00
suzmii 32f4025516 test(共创): 新增 AGC 客户端 CDP 真机 Fork 验收 + 窄屏三档核验,并同步实测覆盖文档
Project CI / AI game creator shell Rust crates (pull_request) Successful in 5m56s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 7m15s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 7m17s
Project CI / Backend tests (pull_request) Successful in 9m29s
Project CI / Frontend tests (pull_request) Successful in 3m27s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m30s
Project CI / Repository checks (pull_request) Successful in 5m28s
Project CI / Native shell tests (pull_request) Successful in 6m55s
2026-10-07 01:27:26 +08:00
k88936 6ccb9f4571 AGC 陶泥儿面板文件草稿化与发布媒体直传
- 新增 export/state/taonier 状态层:字段校验、四命令失败载体、失败分类与 adapt/repair/fill 指令、600ms 自动保存与 2s 轮询
- 新增 tabs/taonier 面板:ArtifactsPane/FormCard/OnlineValuesCard/ConflictCard 与三个对话框,线上值并排显示与沿用动作
- 发布媒体改直传:草稿本地图读字节发 cover/screenshot part,空路径沿用线上 objectKey,幂等摘要纳入图片字节
- 退役 AI 资料建议/封面生成:删前端调用、Rust 命令与注册、api-server 路由与专属 DTO
- 删除旧 PublishPane、GameDistributionPublishFormView、GamePublishBlockedDialog、useGameDistributionPublishForm
- 新增 tests/taonierFields、taonierContract、taonierExport,check-config 与 dto parity 同步
2026-10-07 01:12:34 +08:00
k88936 eea37f80f1 游戏分发真实链路脚本迁移到 multipart 媒体直传
- 12 个 check-game-distribution-* 脚本改用 multipart:metadata + cover/screenshot 二进制 part
- 删除 assetId/assetObjectId 断言与素材库直传前置,公开读改走 media/read-url 与 read-bytes
- media-e2e 负例重写:缺封面、超 6 张、非本作品 objectKey、槽位与 part 数量不匹配
- ratings-e2e 直连 reducer 字段改 cover_object_key/screenshots_json,test-creator-runtime 同步
- .gitattributes 为 export/generated 生成目录豁免行尾空白检查
2026-10-07 00:50:19 +08:00
suzmii a898e18a9f fix(游戏共创): 血缘摘要的父作者名改为读时联账号表兜底(修真实库 parentAuthorName 为 null)
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 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
真实库 `GET /games/{A111}` 的血缘摘要里 `parentTitle` 有值而 `parentAuthorName` 为 `null`,详情页溯源条
「父作品 · 作者名」开天窗。根因核实:`game_distribution_lineage_snapshot` 直接用了发布时冻结的
`parent.author_name`,而老数据 / 程序化创建的作品上该列常为 `None`——公开投影与族谱节点早已改成**读时联
`user_account`**,只有血缘摘要没跟上(同一处语义没同步)。

- 血缘摘要改用 `game_distribution_lineage_author_name`(与族谱节点**同一实现**):账号显示名优先 →
  账号不可得/昵称为空白时退回冻结作者名 → 两者都为空白则 `None`(不占位、不回退空串、不编造),
  与公开详情同口径;父作品不可用时仍走原有的 `fork_lineage_visible_identity` 三态裁剪,不泄露已删作品身份。
- 新增结构回归测试 `lineage_summary_resolves_parent_author_name_at_read_time`:血缘快照必须调用账号兜底
  函数,并**不得**再直接出现 `parent.author_name`(宿主起不了真库,行为证据留给真实栈复验)。
- parity 新增登记 `lineage_payload`(构建器 17→**18**):把「builder 发出的键 == DTO 字段」钉住,并要求
  `parentAuthorName` **恒发该键**(值为 `null` 也要发——缺键与 `null` 在前端是两种渲染分支,不能用
  optional 表达)。
- 文档 §3.4:写明读时兜底的口径与优先级;并明确**不新增 `rootAuthorName`**——已只读核实前端
  `GameDetailPage` 只消费 `parentAuthorName`(`CoCreationLineageStrip` 用的是族谱节点的 `authorName`),
  根侧只发 `rootTitle`,不加字段以免契约膨胀。
- **无字段形状变更**(Rust DTO 与 TS 均未增删字段,故无 TS/绑定改动)。

门禁:wasm build 0;`cargo check --all-targets` 0;`cargo test -p spacetime-module` **306 passed / 1 ignored**;
`cargo test -p module-game-distribution` 134 passed;`cargo test -p api-server game_distribution` 107 passed;
DTO parity 0(66 组 / **18** 构建器 / 15 手拼类型);`check:spacetime-schema` 0(98 表);
`check:encoding` 0(5546 files);`cargo fmt --all --manifest-path server-rs/Cargo.toml -- --check` 0;
`git diff --check` 0。

未在真实库手动改任何数据(按要求);修完请另一个 session 用真实数据复验 `parentAuthorName`。
2026-10-07 00:43:54 +08:00
suzmii 4fdcdc4935 chore(scripts): 族谱截图工具支持两节点子树(E2E_CAPTURE_MIN_NODES)
Project CI / AI game creator shell Rust crates (pull_request) Successful in 5m52s
Project CI / Frontend tests (pull_request) Has been cancelled
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Has been cancelled
Project CI / Backend 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
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
2026-10-07 00:34:40 +08:00
suzmii 626dc6d185 chore(scripts): 新增共创网络灌数据脚本 + 截图工具支持只截现有作品
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 crates (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
Project CI / Backend 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
seed-game-distribution-co-creation.mjs: 走真实 API 建树/复用(标题判重、不绑账号)、封面按树分色系、主题与收藏、断言血缘
2026-10-07 00:30:33 +08:00
k88936 7bcef53494 合并 origin/master 到 feat/adapt-xhs-skill:发布表单吸收平台版本号与买断定价,并合入播放会话网关与导出 Skill 更新
Project CI / AI game creator shell Rust crates (pull_request) Successful in 5m56s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 7m16s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 7m24s
Project CI / Repository checks (pull_request) Failing after 59s
Project CI / Backend tests (pull_request) Successful in 8m46s
Project CI / Frontend tests (pull_request) Successful in 2m31s
Project CI / AI game creator shell web tests (pull_request) Failing after 2m27s
Project CI / Native shell tests (pull_request) Successful in 6m17s
- 发布表单 hook 保留本分支的 hook + 视图拆分,移植 master 的平台版本号回读(nextVersionNumber)、买断定价状态与提交校验,删除由工程内部版本派生的 projectVersion
- GameDistributionPublishFormView 接入只读「项目版本」与共享 PlatformGamePricingField,版本号未知时禁用提交
- DirectProjectComposer 同时保留本分支的草稿回填 / 回写 props 与 master 的 actionsPortalTarget 挂点
- 发布表单测试改用平台版本号 mock(nextVersionNumber: 1),补齐买断定价与缺省版本号禁用用例,并修正 Promise 类型标注
- decision-log.md 保留双方新增条目(小红书导出与 Skill 安装工具 + 播放会话前缀清 Cookie)
2026-10-06 23:28:57 +08:00
k88936 3e6d0f39e5 合并 origin/master 到 feat/adapt-xhs-skill:发布入口迁入导出产物面板并吸收发布绑定、内部版本与上传进度
Project CI / Backend tests (pull_request) Failing after 18s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 6m18s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 7m28s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 4m20s
Project CI / Repository checks (pull_request) Failing after 33s
Project CI / Frontend tests (pull_request) Successful in 3m7s
Project CI / AI game creator shell web tests (pull_request) Failing after 2m55s
Project CI / Native shell tests (pull_request) Successful in 8m39s
- 陶泥儿 tab 发布面板去掉前端灰度:删除 readGamePublishAvailability 调用、发布权限占位与对应测试 mock,与 master 删除原生灰度命令保持一致,只在项目清单就绪前显示「正在读取项目清单」
- App.tsx 保留本分支导出产物面板架构,发布入口不再挂 Direct 聊天头;useTaonierTab 收敛 allowed/availabilityPending 状态并同步注释
- 发布表单 hook 合并本分支表单状态与 master 的发布绑定回读、AGC 工程内部版本派生、线上最近提交与上传进度阶段
- GameDistributionPublishFormView 接入发布状态面板、只读「项目版本」标签、发布阶段步骤与「更新游戏」等文案
- 合并发布表单与发布反馈测试:恢复封面/试玩包断言,补 readGameDistributionPublication mock
- agc-skills/manifest.json 取本分支新增的 platform-abstract、vite-export-xhs-minitool 与 master 的三处 sha256,version 提升到 2026-08-26.66
- decision-log.md 保留双方新增条目;技术方案文档补回双方新增章节;玩法链路文档取 master 重写后的发行合同
2026-10-06 20:01:16 +08:00
suzmii bde909315e feat(开发脚本): dev:all 支持 --clear-database 并提示本地库 schema 冲突
Project CI / AI game creator shell Rust crates (pull_request) Successful in 5m18s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 7m19s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 6m55s
Project CI / Backend tests (pull_request) Successful in 9m11s
Project CI / Frontend tests (pull_request) Successful in 3m37s
Project CI / AI game creator shell web tests (pull_request) Successful in 3m46s
Project CI / Native shell tests (pull_request) Successful in 8m35s
Project CI / Repository checks (pull_request) Successful in 7m12s
默认仍写死 --preserve-database(不改默认行为);显式 --clear-database 时不再传它、逐字透传 dev.mjs 既有语义;根栈因 manual migration / Reordering table 失败时补一段可操作提示(打印库名与 data dir、两条出路、清库会丢数据的警告),提示文案抽成纯函数并补单测;文档补一句
2026-10-06 19:41:36 +08:00
k88936 677c477f36 修正生成绑定校验脚本头部过期的目录清单
- check-generated-bindings.mjs 文件头从「两套 crate、四个目录」更新为「五个目录」,补上 AGC export/generated
2026-10-06 18:48:24 +08:00
suzmii fa9ef9037f test(游戏共创): e2e 跟进改动说明/授权继承新语义并补贡献归集断言
Project CI / Backend tests (pull_request) Failing after 18s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 6m56s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 6m6s
Project CI / Repository checks (pull_request) Failing after 37s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 4m27s
Project CI / Frontend tests (pull_request) Successful in 3m41s
Project CI / AI game creator shell web tests (pull_request) Successful in 3m25s
Project CI / Native shell tests (pull_request) Successful in 9m12s
三个发布 helper 补衍生作品必填 changeSummary(theme 脚本那 6 行是另一 session 已写好的,随本次一并提交);lineage 新增衍生作品 PUT 提升被拒 409 FORK_AUTHORIZATION_INHERITED 且档位不变、入口禁用态与未登录文案断言;新增贡献归集段(不变式 + 三链路传递 + 非作者 403 + 匿名 401)
2026-10-06 18:36:10 +08:00
suzmii 6aa2f97410 feat(游戏共创): 贡献归集与归因(接口 + 契约 + 文档;反洗稿改判搁置)
Project CI / AI game creator shell Rust lane 1/2 (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 Rust crates (pull_request) Has been cancelled
Project CI / Backend 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
产品口径:「子代所有的都算父代的」,并要能溯源「多少是子代给的、多少是自己的」。本期**只做计算**,
不含资金/分成结算。

- 递归定义:`inherited(W) = Σ_{c∈直接子代} total(c)`,`total(W) = own(W) + inherited(W)`;每个后代在它的每个
  祖先里只计一次。
- 接口:`GET /api/game-distribution/games/{game_id}/contribution`(Bearer + `no-store`)——**仅该作品作者**:
  未登录/失效 401(中间件)、非作者 403(复用既有 owner-mismatch → FORBIDDEN,不新增第二套鉴权)、
  作品不存在或根自身已软删 404。响应:`{ gameId, own, inherited, total, byGeneration[], directChildren[],
  nodeCount, truncated, truncatedReason }`;指标结构 `ContributionTotals{playCount}` 可扩展(将来加点赞/收藏/收入)。
- 不变量(测试钉住):`inherited == Σ byGeneration.total == Σ directChildren.total`、`total == own + inherited`、
  `nodeCount == Σ byGeneration.gameCount`;`byGeneration` 只含后代(绝对代际,升序)。
- 上限与截断:节点 500 / 深度 32;超限如实标 `truncated: true` + `truncatedReason ∈ {node_limit, depth_limit}`,
  已计入部分仍自洽(与族谱 `truncated` 同约定,不静默给半个数);遍历只用血缘表既有索引,**不新增表/索引**。
- 契约:shared-contracts 4 个 DTO + TS 镜像 + parity(+4 组 → 66 组);7 个生成绑定(含 procedure)。
- 文档:技术方案新增 `§3.11 贡献归集与权益归因`(定义/归因分解/接口/上限与截断/鉴权口径与理由)+ §3.4 路由行 +
  §5.4 实施证据;**任务 B**:反洗稿(相似度校验)从「待拍板」改为「**产品已决定搁置(2026-10-06)**」并从待拍板
  清单移除,结算口径统一为「本期只做贡献归集与归因计算」。
- 测试:module-game-distribution **131 passed**(contribution 12 条,含 A→B→C 三层链路不变量);spacetime-module
  **304 passed / 1 ignored**(+3 结构断言);spacetime-client 43 passed;api-server game_distribution **107 passed**(+3)。

门禁:wasm build 0;`cargo check --all-targets` 0;`SPACETIME_SCHEMA_BASE_REF=9f4c7d76 npm run check:spacetime-schema`
0(98 表);DTO parity 0(66 组 / 17 构建器 / 15 手拼类型);`check:project-bundle-policy-parity` OK;
`check:encoding` 0(5543 files);`cargo fmt --all --manifest-path server-rs/Cargo.toml -- --check` 0;`git diff --check` 0。

注:本块未提交 `scripts/*.mjs`(`check-game-distribution-lineage-e2e.mjs` / `-theme-e2e.mjs` /
`capture-game-lineage-visual.mjs`)——属其它 owner,工作区保留未提交。
2026-10-06 18:05:49 +08:00
suzmii d0176f48b7 feat(游戏共创): 衍生作品发布必填「本次核心改动说明」(版本级存储 + 可达错误码)
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 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
按需求文档 revision 1554「发布设置页 → 二创信息区(必填项)」:衍生作品(有血缘行)发布新版本时**必须**
提供「本次核心改动说明」;母版(0 代)不需要——提供了也忽略、不校验、不落库。

- **存储**:`game_distribution_version` **表尾追加** `change_summary: Option<String>`(`#[default(None)]`);
  列序属 wire format,`game_distribution_version_type` / `_version_snapshot_type` / `_create_version_input_type`
  三个绑定同步重生成(仓外临时 out-dir,只回写受影响文件)。
- **请求**:`GameDistributionCreateVersionRequest.change_summary`(`#[serde(default, skip_serializing_if)]`:
  缺省不序列化 `null`,保住旧客户端的幂等摘要)。
- **校验**:纯函数 `game_distribution_change_summary_violation(value, is_derivative)`,trim 后按**字符**计
  **20..=500** —— 20 是「能写清改了什么」的下限,500 约 1 KiB 上限,兼顾详情页/族谱展示与存储;
  超限或缺失**失败关闭**,错误码 `FORK_CHANGE_SUMMARY_REQUIRED` / `FORK_CHANGE_SUMMARY_INVALID`(均 **400**),
  已登记进 api-server 的 `FORK_` 映射表并纳入「FORK 码由模块真实文案可达」的枚举测试(防上次那种不可达码)。
- **公开投影**:`currentVersion.changeSummary`(衍生为字符串、母版 `null`,发键不发值),版本负载键集合
  逐字钉死为 id/version/entryUrl/sha256/publishedAt/controls/changeSummary,不带对象键/素材 id/审核字段。
- **契约与登记**:Rust DTO + TS 镜像 + parity(`version_summary_payload` 加 `mustEmit: ['changeSummary']`)。
- **文档**:技术方案 `§3.4`(请求增量 + 长度口径与理由 + 两个错误码 + 幂等摘要口径 + 公开投影)、数据契约
  文档的版本表小节(表尾追加列)。
- **测试**:纯函数 5 条(衍生缺失/超短(ASCII 与汉字)/超长(ASCII 与汉字)/区间内 trim 边界/母版忽略)+
  事务 4 条 + 接口 3 条(含公开负载键集合与母版 null)。

门禁:`SPACETIME_SCHEMA_BASE_REF=9f4c7d76 npm run check:spacetime-schema` 0(98 表);`cargo check --all-targets` 0;
`cargo test -p module-game-distribution` **119 passed**;`cargo test -p api-server game_distribution` **104 passed**;
DTO parity 0(62 组 / 17 构建器 / 15 手拼类型);`check:encoding` 0(5535 files);
`cargo fmt --all --manifest-path server-rs/Cargo.toml -- --check` 0;`git diff --check` 0。

注:本块**未提交** `scripts/check-game-distribution-lineage-e2e.mjs` / `check-game-distribution-theme-e2e.mjs` /
`capture-game-lineage-visual.mjs` 的配套改动(属别的 session 的文件,工作区里保留未提交,需其 owner 决定:
衍生作品发布若不传 `changeSummary` 现在会 400,那三个脚本需要同步补字段)。
2026-10-06 17:24:42 +08:00
suzmii eeb101458a Merge remote-tracking branch 'origin/master' into feat/game-fork
Project CI / Backend tests (pull_request) Failing after 34s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 7m27s
Project CI / Native shell tests (pull_request) Failing after 2m46s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 5m58s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 4m23s
Project CI / AI game creator shell web tests (pull_request) Failing after 45s
Project CI / Frontend tests (pull_request) Successful in 2m24s
Project CI / Repository checks (pull_request) Failing after 1m1s
# Conflicts:
#	apps/ai-game-creator-shell/src-tauri/src/game_distribution_publish.rs
#	apps/ai-game-creator-shell/src/components/game-distribution/GameDistributionPublishPanel.tsx
#	apps/ai-game-creator-shell/tests/gameDistributionPublishPanel.test.tsx
#	docs/【后端架构】server-rs与SpacetimeDB数据契约-2026-05-15.md
#	package.json
#	packages/shared/src/contracts/gameDistribution.ts
#	scripts/check-game-distribution-dto-parity.mjs
#	server-rs/crates/api-server/src/modules/game_distribution.rs
#	server-rs/crates/module-game-distribution/src/errors.rs
#	server-rs/crates/module-game-distribution/src/lib.rs
#	server-rs/crates/shared-contracts/src/game_distribution.rs
#	server-rs/crates/spacetime-client/src/active.rs
#	server-rs/crates/spacetime-client/src/active/mapper.rs
#	server-rs/crates/spacetime-client/src/active/mapper/game_distribution.rs
#	server-rs/crates/spacetime-client/src/game_distribution.rs
#	server-rs/crates/spacetime-client/src/module_bindings.rs
#	server-rs/crates/spacetime-client/src/module_bindings/game_distribution_game_snapshot_type.rs
#	server-rs/crates/spacetime-client/src/module_bindings/game_distribution_game_type.rs
#	server-rs/crates/spacetime-module/src/game_distribution.rs
#	server-rs/crates/spacetime-module/src/migration.rs
#	src/components/game-distribution/GameDetailPage.tsx
#	src/components/game-distribution/GameDistributionPages.test.tsx
#	src/components/game-distribution/GamePlayPage.tsx
#	src/components/platform-entry/PlatformEntryActiveFlowShell.tsx
#	src/services/gameDistributionClient.test.ts
#	src/services/gameDistributionClient.ts
2026-10-06 16:10:52 +08:00
suzmii 6cea0a8cd9 族谱卡:封面 16:9 横版、轴统一主题色、控件入画布浮层、去掉第三个动作
Project CI / Backend tests (pull_request) Failing after 15s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 6m57s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 5m8s
Project CI / Repository checks (pull_request) Failing after 42s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 4m21s
Project CI / Frontend tests (pull_request) Successful in 2m49s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m26s
Project CI / Native shell tests (pull_request) Successful in 7m6s
2026-10-06 15:28:00 +08:00
suzmii ce4a50532b test(游戏共创): 截图工具断言跟进终稿语义(封面主视觉/选中路径/面包屑)
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 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
2026-10-06 15:23:27 +08:00
suzmii 87af3bdaf0 test(游戏共创): 新增族谱可视化截图与 DOM 断言工具
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 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
2026-10-06 15:09:56 +08:00
suzmii ca5fde274b test(游戏共创): 族谱 e2e 断言跟进 coverObjectKey 契约 2026-10-06 15:09:51 +08:00
suzmii 5d91377829 族谱可视化补档(1/2):封面字段本地宽化、去掉树节点上的对比入口、复制反馈可观察
- 客户端:新增本地类型 GameDistributionLineageNodeWithCover(契约在 packages/shared,本轮不改):coverObjectKey 可能存在也可能不存在,渲染两侧都能跑;getGameLineage 返回该宽化形状
- 布局模块:节点事实带上 coverObjectKey(占位节点恒为 null),供节点卡片渲染缩略图
- 树节点信息减负:去掉「与原版对比」与游玩数(详情页已有),并清掉 GameLineagePage / GameThemePage / 壳层上已无人使用的 onOpenCompare 传递;Fork 次要动作保留并带可访问名称「Fork <标题>」
- 复制反馈可观察:详情页复制按钮的反馈窗口 1.4s → 5s,并常驻一条 role=status 的「作品 ID 已复制 / 复制失败:请手动选中作品 ID 文本。」
- e2e:那条一直红的断言改为「点击后必须出现可读反馈」(已复制按钮 或 失败提示),点击前 bringToFront——headless Chromium 下 clipboard 写入要求文档聚焦,属环境策略而非被测行为
- 同步删掉「族谱节点打开对比页」的过期用例,并把「父可见才给对比」改成断言树上没有对比入口/游玩数
2026-10-06 14:44:57 +08:00
suzmii 35a4b5f1b0 test(游戏共创): 族谱 e2e 补富树 fixture(多分支多代)
Project CI / AI game creator shell Rust crates (pull_request) Successful in 4m32s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 7m1s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 7m49s
Project CI / Frontend tests (pull_request) Successful in 3m4s
Project CI / Backend tests (pull_request) Successful in 8m7s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m54s
Project CI / Repository checks (pull_request) Successful in 6m17s
Project CI / Native shell tests (pull_request) Successful in 9m31s
2026-10-06 14:14:44 +08:00
suzmii f0cad9dddc 合并 origin/master(52c83cc2a,248 个提交)到 feat/game-purchase
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 5m28s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 7m26s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 4m41s
Project CI / AI game creator shell web tests (pull_request) Successful in 3m56s
Project CI / Backend tests (pull_request) Successful in 9m4s
Project CI / Repository checks (pull_request) Successful in 7m13s
Project CI / Native shell tests (pull_request) Successful in 10m16s
Project CI / Frontend tests (pull_request) Successful in 2m26s
- 同步 master 侧 248 个提交:会员与泥点计费(PR #588 / #603)、创作者主页与关注粉丝(PR #638)、运行页刷新真重载(PR #640)、AGC 模板 templateVersion 递增(PR #643)等;确认 master 未触碰发行网关与 `api-server/src/modules/game_distribution.rs`。
- 冲突 1(server-rs/crates/module-runtime/src/domain.rs:1157-1162)`RuntimeProfileWalletLedgerSourceType` 两侧各自在末尾追加变体:保留 master 的 `MembershipUpgradeGrant` 为索引 16(线上已落库口径),本分支 `GamePurchase` 顺延为索引 17,并保留其「每账号每游戏一次扣费」注释。
- 冲突 2(server-rs/crates/module-runtime/src/domain.rs:1184-1188)`as_str()` 同时保留 `membership_upgrade_grant` 与 `game_purchase` 两个分支。
- 冲突 3(server-rs/crates/spacetime-client/src/active/mapper/runtime_profile.rs:95-101)bindings→领域枚举映射同时保留 `MembershipUpgradeGrant` 与 `GamePurchase` 两支,按新索引顺序排列。
- 冲突 4(server-rs/crates/spacetime-client/src/module_bindings/runtime_profile_wallet_ledger_source_type_type.rs:43-47)生成枚举按模块源码顺序合并为 …`MembershipUpgradeGrant`、`GamePurchase`;随后 `npm run spacetime:generate` 复核该文件与生成结果逐字节一致。
- 冲突 5(server-rs/crates/api-server/src/admin.rs:4849-4853)sats 索引映射改为 `16 => membership_upgrade_grant` 与 `17 => game_purchase` 两条并存。
- 冲突 6(server-rs/crates/api-server/src/admin.rs:6368-6461)索引断言并入 master 的 `[16] => membership_upgrade_grant`,并把 master 的「17 尚未映射」占位断言替换为 `[17] => game_purchase`;本分支的后台消耗统计两个用例原样保留。
- 冲突 7(server-rs/crates/api-server/src/runtime_profile.rs:219-226)来源文案格式化同时保留 `MembershipUpgradeGrant` 与 `GamePurchase` 两支,注释随 `GamePurchase` 保留。
- 冲突 8(docs/project-memory/shared-memory/decision-log.md:3-24)两条决策记录并列保留:本分支 2026-10-05「播放会话前缀在三处入口清空 Cookie」在前,master 2026-10-03「每日免费发放额为 0 时前端隐藏该池」在后。
- 保住 master 侧:发行响应 ETag/304/gzip(`release_asset_response_with_cache` 五参形态与 `release_asset_etag` / `if_none_match_matches` / `accepts_gzip_encoding` / `gzip_release_asset` / `release_asset_not_modified_response`)、共享加载面 `PlatformGameLoadingSurface` 及其使用方、三池钱包与会员档位目录改造。
- 保住本分支侧:付费作品 404 守卫(`price_mud_points > 0` 且位于 `load_package` 之前)、购买与播放会话网关路由、nginx×3 / Pingora / Vite 的播放会话 Cookie 清空与 `nginx-route-parity.matrix.json` 登记、viewer 感知公开详情、后台审核价格、`PlatformGamePricingField` 共享定价组件与两端接入、AGC 项目版本只读 + 平台派发下一版本号、schema 与迁移白名单、钱包来源 `game_purchase`。
- 验证:`git merge-base --is-ancestor origin/master HEAD` 返回 0;`check:encoding`、`check:doc-index`、`check:spacetime-schema`、`check:server-rs-ddd`、`check:rustfmt`、`check:npm-workspaces`、`check:game-distribution-dto-parity`、`check:game-distribution-price-limit-parity`、`check:pingora-route-parity`、`check:nginx-spa-routes`、根/admin-web/AGC typecheck、`git diff --check` 全绿。
- 测试:`cargo test -p module-game-distribution` 30 passed,`cargo test -p api-server game_distribution` 61 passed,`cargo test -p spacetime-module game_distribution` 7 passed;定向 vitest 28 个文件 252 个用例全通过。
- `npm run spacetime:generate` 除 11 个 procedure 文件的纯空白格式差异外无任何语义改动(`git diff -w` 为空),已保留 master 的生成产物形态,提交内无 schema/绑定语义变化。
2026-10-06 13:12:32 +08:00
suzmii 2a04f293b1 Merge remote-tracking branch 'origin/master' into feat/game-fork
Project CI / AI game creator shell Rust crates (pull_request) Successful in 4m25s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 7m18s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 6m31s
Project CI / Frontend tests (pull_request) Successful in 2m38s
Project CI / Native shell tests (pull_request) Failing after 2m52s
Project CI / AI game creator shell web tests (pull_request) Failing after 1m29s
Project CI / Backend tests (pull_request) Successful in 7m44s
Project CI / Repository checks (pull_request) Successful in 5m37s
2026-10-06 12:24:10 +08:00
suzmii 7d342856fa Merge pull request '修复运行页刷新按钮不真正重载' (#640) from fix/run-preview-refresh-reload into master
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 7m7s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 6m4s
Project CI / AI game creator shell Rust crates (push) Successful in 5m19s
Project CI / Frontend tests (push) Successful in 4m25s
Project CI / Backend tests (push) Successful in 9m6s
Project CI / AI game creator shell web tests (push) Successful in 2m42s
Project CI / Repository checks (push) Successful in 6m59s
Project CI / Native shell tests (push) Successful in 11m3s
Reviewed-on: http://git.genarrative.world/git/GenarrativeAI/Genarrative/pulls/640
2026-10-06 10:59:23 +08:00
k88936 796cf9843c Merge remote-tracking branch 'origin/master' into feat/pricing-plan
Project CI / AI game creator shell Rust crates (pull_request) Successful in 6m0s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 6m43s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 7m42s
Project CI / Frontend tests (pull_request) Failing after 1m16s
Project CI / Backend tests (pull_request) Successful in 8m51s
Project CI / AI game creator shell web tests (pull_request) Successful in 3m34s
Project CI / Repository checks (pull_request) Successful in 5m34s
Project CI / Native shell tests (pull_request) Successful in 7m18s
# Conflicts:
#	docs/project-memory/shared-memory/decision-log.md
2026-10-06 10:14:15 +08:00
k88936 febbdd59d5 Merge branch 'feat/pricing-plan-fix' into feat/pricing-plan 2026-10-06 10:12:41 +08:00
suzmii f9f27c2949 test(游戏共创): 主题 e2e 跟进 rootsTruncated 与后台成员名单,修正过期断言
Project CI / AI game creator shell Rust crates (pull_request) Successful in 6m0s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 6m54s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 7m55s
Project CI / Backend tests (pull_request) Successful in 9m31s
Project CI / Frontend tests (pull_request) Successful in 3m6s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m21s
Project CI / Native shell tests (pull_request) Successful in 6m50s
Project CI / Repository checks (pull_request) Successful in 4m58s
- scripts/check-game-distribution-theme-e2e.mjs:
  · 头部契约引用**全部改成符号检索**(函数名/常量名),不再写会随提交漂移的行号
  · 新增「公开详情顶层键集合恰为契约七个(含 rootsTruncated)」与「小主题下 rootsTruncated 是布尔且
    为 false」两条;同时把「memberCount === roots.length」明确标注为只在小主题成立的观察,不再当不变式
  · 新增第 10 组:后台成员名单(未套公开可见性过滤、draft 也能读)——51 个未公开根作品 + 1 个软删除成员
    共 52 行,逐条断言:limit=999 截断到 50 且 totalMembers 仍为 52(limit=1 时 members 只有 1 行、
    totalMembers 不变)、默认 20 游标翻页 3 页 52 行不重不漏且末页 nextCursor=null、成员行键集合恰为
    {rootGameId,title,sortOrder,createdAt,visible,visibility}、按 sortOrder 升序、未公开成员
    visible=false+visibility=unpublished、软删除成员 visible=false+visibility=deleted(落在末页)、
    非法游标 400 THEME_INVALID_CURSOR、主题不存在 404、draft 主题也能读到成员、未登录 401 / 普通作者 403
  · 上一轮标红的「?cursor=abc → 稳定错误码 THEME_INVALID_CURSOR」断言**本轮转绿**(模块侧已把
    GAME_DISTRIBUTION_THEME_INVALID_CURSOR_CODE 前缀拼进游标错误文案,映射分支可达)
  · 实测:71 项 71 PASS / 0 FAIL / 0 SKIP
- scripts/check-game-distribution-collection-e2e.mjs:修正随主题功能上线的**过期断言**——
  匿名作品详情现在比公开目录条目多一个 `themes` 键(详情侧增量,目录侧保持精简)。断言改为
  「目录条目是详情子集:共有键取值全一致 + 详情只多 themes 一处」,不再要求两边键数相等。
  实测:46 项 46 PASS / 0 FAIL / 0 SKIP
2026-10-06 04:35:06 +08:00
suzmii 0d0166c2d9 feat(游戏共创): 后台读取主题成员名单(含草稿/归档主题与不可见成员 + 可见性列)
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 / 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 Rust crates (pull_request) Has been cancelled
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / AI game creator shell web tests (pull_request) Has been cancelled
缺口:后台原先只能借**公开投影** `GET /api/game-distribution/themes/{themeId}` 列成员,而公开投影只服务
`published` 主题 ⇒ **草稿 / 已归档主题在后台看不到成员名单**,运营没法在发布前核对。

新增 `GET /admin/api/game-distribution/themes/{theme_id}/members?limit=&cursor=`:

- **鉴权照既有两层**:路由挂既有 admin 支的 `route_layer(require_admin_auth)`,handler 取
  `Extension<AuthenticatedAdmin>`(未登录/失效 → 401 `UNAUTHORIZED`、非 admin → 403,同组同码同形);
  模块侧 procedure 先跑 `require_editor_generation_runtime_service_identity`(照 `033e3aa79` 五条写接口)。
- **返回全部成员行,不套公开可见性过滤**,且**不要求主题已发布**(`draft` / `archived` 照常可读;
  只有主题真的不存在才 404 `THEME_NOT_FOUND`)。响应:
  `{ themeId, totalMembers, members: [{ rootGameId, title, sortOrder, createdAt, visible, visibility }], nextCursor }`。
- **两个可见性字段刻意独立**:
  · `visible` = 「公开侧此刻会不会出现」,**复用** `game_distribution_theme_member_visible`(未删 + 已公开
    + 有当前公开版本),不另写第二套判定;
  · `visibility` = 更细状态(新纯函数):游戏行不存在 → `missing`(优先于 `deleted`),软删除行 → `deleted`,
    否则原样透传游戏行 `visibility`(`published` / `unpublished` / `suspended`)。
    因此 `visibility == "published"` 但无当前公开版本时 `visible = false` ——运营能看出「公开了但没公开版本」;
    三处钉住这个组合(纯函数单测、api-server payload 单测、事务结构断言)。
- **排序与分页照既有口径**:复用 `sort_theme_members`(`sort_order` 升序 + 成员 id 兜底)+ 新增
  `page_admin_theme_members`;`limit` 缺省 20 / 上限 50 / `0` 取默认 / 超界截断(同一归一化);
  游标 `"{sortOrder}:{memberId}"`,解析**只委托** `parse_game_distribution_theme_cursor` ⇒ 非法游标仍是
  上一轮刚修好的**可达** `THEME_INVALID_CURSOR`(不另造一个不可达码);`totalMembers` 是成员**行**总数,
  切页前算,不受分页影响。
- **契约与登记**:`packages/shared/src/contracts/gameDistribution.ts` 新增
  `GameDistributionAdminThemeMemberRow` / `…ListResponse` / `…MemberVisibility`;parity 登记
  `TS_ONLY_TYPES` +3、`RESPONSE_BUILDERS` +2(列表响应与单条成员各一条,条目形状有独立证据);api-server
  用命名构建器(不内联 `json!`)。
- **测试**:module-game-distribution +5 条纯函数(`missing` 优先于 `deleted`、三类不可见各一条并断言
  `visible`/`visibility` 组合、`published` 无公开版本 ⇒ `visible=false`、游标委托共享实现、翻页不重不漏、
  末页 null、复用共享比较器与同一归一化);spacetime-module +1 并扩 2(结构断言:走主题索引、不套公开可见性
  过滤、不复用「只取可见成员」的助手、不自写排序、不删行、`totalMembers` 在切页前取);spacetime-client +1
  mapper(行总数与游标透传、两个可见性字段不互相推导、空名单是正常结果);api-server 例(401/403、草稿主题
  可读、含不可见成员仍返回、`totalMembers` 不受分页影响、limit 缺省与截断、非法游标 → 400 `THEME_INVALID_CURSOR`、
  主题不存在 → 404)。
- **文档**:技术方案 `§3.10.8`(新行 + `visible`/`visibility` 语义 + 「草稿也能读」的理由)与 `§3.4` 后台接口表;
  里程碑(后台路由清单、实施清单、验收与测试清单,原「只能借公开投影」的留白项标记为已落地)。
- **生成绑定**:新增 4 个 `admin_theme_member_list*` / `list_admin_…_procedure` 生成文件 + `module_bindings.rs`
  入口;wire format 有新增(新 procedure/结果类型)⇒ 部署需重新 publish 模块。

门禁:wasm build 0;`cargo check --all-targets` 0;`cargo test -p api-server game_distribution` **89 passed**;
`cargo test -p module-game-distribution` **106 passed**;`cargo test -p spacetime-module` **287 passed** / 1 ignored;
`cargo test -p spacetime-client` 39 passed;DTO parity 0(58 组 / **17** 构建器 / **15** 手拼类型);
`check:spacetime-schema` 0(96 tables);`check:encoding` 0(5424 files);`cargo fmt --all -- --check` 0;
`git diff --check` 0。

不在本提交内(属另一个 session 的文件,工作区里由我的子代理顺带做了**纯新增性**改动,未提交):
`apps/admin-web/src/api/adminGameThemeTypes.ts` 增加了三个指向共享契约新类型的别名 + 一段注释 —— 与该 session
「登记好之后改回引用共享契约」的计划一致,交由其 review / 提交(或直接删掉其本地重复定义)。
2026-10-06 04:28:39 +08:00
suzmii ce614d59c1 feat(游戏共创): 主题详情 rootsTruncated 信号(memberCount 报真实可见成员数)
Project CI / AI game creator shell Rust crates (pull_request) Successful in 6m1s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 7m10s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 7m58s
Project CI / Backend tests (pull_request) Successful in 9m10s
Project CI / Frontend tests (pull_request) Successful in 2m58s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m32s
Project CI / Native shell tests (pull_request) Successful in 6m37s
Project CI / Repository checks (pull_request) Successful in 4m55s
裁定(与族谱 `truncated` 同约定):`memberCount` = **真实可见成员数**(不受展示上限污染),新增布尔
`rootsTruncated`,**仅当 `roots` 被 50 上限截断时为 true**。此前两个数被同一个 50 上限截断 ⇒ 可见成员
> 50 时静默截断,客户端既看不到全部树、也拿不到任何信号。

- 纯函数:`game_distribution_theme_roots_truncated(visible_member_count, returned_root_count)`
  (相等 / 回传更多 ⇒ false;后者是防御性口径:两组数字不同源时不得凭空报「还有更多」)。
- 契约:`GameDistributionThemeDetail` 加 `roots_truncated`(serde camelCase ⇒ `rootsTruncated`),
  TS 镜像同步;parity `public_theme_detail_payload.mustEmit` 6 键 → **7 键**。
- 事务:`member_count` 走可见成员清单的 `len()`(**不再**经 `page_theme_members` 与上限),`roots` 仍是
  同一清单排序后取前 50,`rootsTruncated` 由纯函数算出(不写死「>50 就 true」——阈值与上限是两个
  独立事实);列表入口共用同一计数函数 ⇒ 同一主题在列表与详情里不会报出两个 `memberCount`。
- api-server:`public_theme_detail_payload` 增加 `rootsTruncated`;形状单测 6 → 7 键,并加
  `memberCount=120 / roots=1 / rootsTruncated=true` 用例,证明两个键口径独立。
- 结构断言同步修正:列表侧原「成员数与 roots 共用同一上限」改为「成员数数的是全部可见成员(断言
  源码里不含切页函数与上限常量)」;详情侧改为「必须调用共享纯函数 + 不得再恒等 `roots.len()` +
  该字段必须进入返回值」。
- 生成绑定:`module_bindings/game_distribution_theme_detail_result_type.rs` 手改后用临时 out-dir 重跑
  `spacetime generate --lang rust` 逐字节校对一致。**wire format 变更 ⇒ 部署需重新 publish 模块**
  (客户端绑定已同步)。
- 文档:技术方案 §3.4 / §3.10.6 / §3.10.9(原「已知限制·三个备选待拍板」→ 已定口径)、里程碑
  (依赖、接口表、验收标准、纯函数表、测试清单、待确认项)、以及数据契约文档里那句「主题详情的
  roots 与列表的 memberCount 永远一致」(本改动已使其为假)。

门禁:wasm build 0;`cargo check --all-targets` 0;`cargo test -p api-server game_distribution` 86 passed;
`cargo test -p module-game-distribution` **101 passed**;`cargo test -p spacetime-module` 286 passed /
1 ignored;DTO parity 0(58 组 / **15** 构建器 / 12 手拼类型);`check:spacetime-schema` 0(96 tables);
`check:encoding` 0(5420 files);`cargo fmt --all -- --check` 0;`git diff --check` 0。

遗留(不在本仓可改范围,需前端 session 跟进):`src/services/gameDistributionClient.ts` 有自己一份主题
详情本地类型与 normalize,会丢弃 `rootsTruncated`(约 3 行小改),因此网页主题页暂时拿不到截断信号;
admin-web 走共享契约类型,后台侧即时生效。
2026-10-06 04:09:45 +08:00