契约检查补齐现有 OSS 上传白名单,保留精确校验。
Project CI / Backend tests (pull_request) Has been cancelled
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 web tests (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 / AI game creator shell Rust crates (push) Successful in 1m21s
Project CI / AI game creator shell Rust smoke (push) Successful in 1m53s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 6m29s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 8m32s
Project CI / Frontend tests (push) Successful in 3m43s
Project CI / Backend tests (push) Successful in 8m59s
Project CI / Native shell tests (push) Successful in 9m45s
Project CI / Repository checks (push) Successful in 4m23s
Project CI / AI game creator shell web tests (push) Successful in 3m19s

修正过期注释并更新排障记录。
Native shell 契约检查、5 条素材上传测试、编码及格式检查全部通过。
This commit was merged in pull request #469.
This commit is contained in:
2026-09-22 10:23:29 +00:00
parent b7ca94334f
commit b1be6947b0
2 changed files with 11 additions and 3 deletions
@@ -1,5 +1,12 @@
# 踩坑与排障记录
## AGC 素材直传的 OSS 权限必须同步到 Native shell 契约检查
- **现象**Native shell CI 在 `check:native-shells:contract` 的 HTTP scope 检查失败,尚未准备 Rust 缓存;后续导出步骤正常退出但实际跳过,导致 master 缓存产物缺组、自动镜像刷新等待。
- **原因**`capabilities/main.json` 已为封面与截图直传加入 `https://*.aliyuncs.com/*``scripts/check-native-shells.mjs` 的精确白名单仍只有五项,且误以为更新下载迁至原生 updater 后就不再需要 OSS 权限。`assetDirectUpload.ts` 仍通过 Tauri HTTP 插件执行素材直传。
- **处理**:契约期望同步包含现有 OSS HTTPS 项,保留完整白名单精确比较;不得删除业务所需权限或改成任意 URL 放行。更新下载与素材直传是不同调用链,变更能力配置时同步检查调用方和契约。
- **验证**:运行 `npm run check:native-shells:contract``apps/ai-game-creator-shell/tests/assetDirectUpload.test.ts`;缓存完整性以实际 artifact 和导出日志为准,不能仅看上传 step 是否成功。
## release 安装包文件名中的编码空格不能按控制字符拒绝
- **现象**:release 环境点击“下载客户端”只显示无法获取最新版本,`GET /api/client-downloads` 返回 `502 UPSTREAM_ERROR`dev 环境正常。
+4 -3
View File
@@ -2602,12 +2602,13 @@ function assertAiGameCreatorShellUserDevBoundary() {
{ url: 'https://*/api/*' },
{ url: 'http://localhost:*/*' },
{ url: 'http://127.0.0.1:*/*' },
{ url: 'https://*.aliyuncs.com/*' },
])
) {
throw new Error(
// 更新清单与安装包下载已改由 tauri-plugin-updater 在原生侧完成
// 不再需要为 webview 的 http 插件放行 OSS 域名
'AI game creator native HTTP scope must match the release, dev, custom HTTPS, and loopback API boundary',
// 更新清单与安装包下载由 tauri-plugin-updater 在原生侧完成
// 封面与截图仍通过 webview 的 http 插件向凭证指定的 OSS 地址直传
'AI game creator native HTTP scope must match the release, dev, custom HTTPS, loopback API, and OSS media upload boundary',
);
}