fix(api): 统一 catalog GameMainConfig 字段

This commit is contained in:
2026-07-31 16:05:17 +08:00
parent 4cc143f66d
commit 20ddd67947
4 changed files with 42 additions and 21 deletions
@@ -90,14 +90,14 @@ Go 窗口读取归一化后的 JSON,验证:
- `version.completed_unix_seconds`
- `version.resource_root`
- `launcher_metadata`
- `game_main_config`
- `game_main_config_bootstrap`
2. `parseCatalogStatus``available=false` 返回不可用而不是错误。
3. `resource.manifest` entry 字段能映射为 Go `ResourceManifestEntry`
- `url`
- `destination`
- `bytes`
- `blake3`
4. 本地 snapshot fixture 使用 `game_main_config_bootstrap`RPC `catalog.status` 使用 `game_main_config`
4. 本地 snapshot fixture RPC `catalog.status` 使用 `game_main_config_bootstrap`
5. `bat-api` bootstrap 和 launcher bootstrap 不泄露归一化前的开发机路径。
Go 侧审核通过后的落地建议:
@@ -118,8 +118,8 @@ Go 侧审核通过后的落地建议:
- `launcher_metadata.game_lowest_version`
- `launcher_metadata.game_start_exe_name`
- `launcher_metadata.manifest_source`
- `game_main_config.server_info_data_url`
- `game_main_config.default_connection_group`
- `game_main_config_bootstrap.server_info_data_url`
- `game_main_config_bootstrap.default_connection_group`
2. optional 字段为 null 或缺省:
- Go mirror 不应崩溃。
- HTTP response 中按当前 Go struct `omitempty` 策略输出。
@@ -130,7 +130,7 @@ Go 侧审核通过后的落地建议:
- 归一化是否过度改变 Rust 真实输出。
- fixture 是否意外绑定真实版本、日期、本机路径或私有部署路径。
- `game_main_config``game_main_config_bootstrap` RPC / snapshot 差异是否符合预期
- `game_main_config_bootstrap` RPC / snapshot 中是否保持同一语义
- optional 字段覆盖是否足够。
## notes.md 模板
@@ -191,6 +191,6 @@ contract fixture 工作只有在以下条件同时满足时才算完成:
## 当前状态
- Go `bat-api` 已具备消费 `launcher_metadata` / `game_main_config` 的 mirror struct。
- Go `bat-api` 已具备消费 `launcher_metadata` / `game_main_config_bootstrap` 的 mirror struct。
- Go `bat-api` 已具备 player-facing HTTP 控制面、OpenAPI 和管理面板预留。
- contract fixture 尚未落仓库,等待 Rust 侧真实输出与用户审核。