补齐 External v1 场景生成路由的本地真实栈受理 smoke
Project CI / AI game creator shell Rust crates (push) Successful in 1m27s
Project CI / AI game creator shell Rust smoke (push) Successful in 1m49s
Project CI / Backend tests (push) Successful in 5m9s
Project CI / Native shell tests (push) Successful in 6m14s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 8m6s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 9m12s
Project CI / Frontend tests (push) Successful in 2m42s
Project CI / AI game creator shell web tests (push) Successful in 1m41s
Project CI / Repository checks (push) Successful in 2m16s

- 新增 scripts/check-external-v1-scene-generation-smoke.mjs:dev 账号现建外部 API Key,校验非法 Key 401、缺幂等键/空 sceneContent/custom 缺 customStyle 各自 400、合法请求 202 且返回 operationId、同键重放同一 operationId、同键换请求体 409
- 轮询生成状态得到 completed 与 assetObjectId,并用 external read-url 换签名地址下载成功(200 image/png),证明 Provider 出图在本机可用
- 里程碑最后一条验收改为已勾选,并把先前「Provider 出图未验证」的环境结论更新为已实测
This commit is contained in:
kdletters
2026-09-28 19:52:16 +08:00
parent ad2ab4cd60
commit eb7c00658a
3 changed files with 258 additions and 2 deletions
@@ -37,7 +37,7 @@
- [x] 外部场景路由与站内路由对相同输入产出相同的后端 Prompt 与入队 payload(共享实现单测对照)。
- [x] `docs/openapi/genarrative-external-v1.openapi.json` 与实现一致,相关契约检查通过。
- [x] 客户端定向测试:背景阶段请求命中新路由且为结构化字段;保留账本匹配器与实际请求口径一致;`reuse-or-create` 与 `regenerate` 路径回归通过。
- [ ] 本地真实栈 smoke:`npm run dev:api-server` + 测试 Key 下美术包背景阶段受理成功(Provider 出图按环境可用性记录为已验证或未验证)。
- [x] 本地真实栈 smoke:`npm run check:external-v1-scene-generation-smoke` 用真实 Key 打通新路由的鉴权/参数/受理/幂等,Provider 出图也验证成功(见文末本轮核对)。
## 证据要求
@@ -58,5 +58,6 @@
- 变异验证:把场景分支的路由改回 `/api/external/v1/editor/images/generations` 后该用例立刻变红(夹具拒绝通用路由、生成失败),改回后恢复绿(1.59s)。因此这一条勾选不是镜像断言。
- 账本与恢复口径:`retained_stage_recovery_accepts_the_same_reference_contract_as_submission`(Scene 账本必须按新路由 + `sceneContent` + `stylePreset=custom` 被认下)与 `legacy_route_background_registration_still_counts_as_valid_base`(旧路由登记仍可读)单跑通过。
- `reuse-or-create` / `regenerate` 回归:`direct_output_sync_accepts_trusted_spec_and_background_without_a_historical_spritesheet`(复用已登记背景)、`failed_background_stage_after_local_commit_restores_recorded_spec_and_background` 与 `failed_complete_package_regeneration_restores_replaced_spec_and_background`(失败后按记录恢复 spec / 背景)单跑通过。
- 仍未取得:**本地真实栈 + 测试 Key 的受理 smoke**(`npm run dev:api-server` 后用真实 API Key POST 新路由校验受理与重放)。本轮只读核对过可行性:`deploy/env/api-server.env` 不存在、`.env`/`.env.local` 存在但没有监听中的 dev 端口;`npm run check:api-server-env` 报缺 `TIANTOKEN_BASE_URL` / `TIANTOKEN_API_KEY`(另有阿里云抠图 AccessKey 缺失),所以这条 smoke 目前在**本机环境**上不具备执行条件,不是代码问题。
- 本地真实栈 smoke(**本轮补齐 2026-09-28**):新增 `scripts/check-external-v1-scene-generation-smoke.mjs`(`npm run check:external-v1-scene-generation-smoke`,需要本地 dev 栈)。dev 账号现建一个外部 API Key 后:非法 Key 401、缺 `Idempotency-Key` 400、空 `sceneContent` 400、`custom` 缺 `customStyle` 400;合法场景请求 **202 + operationId `task-…`**,同键重放返回**同一** operationId,同键换请求体 409 `CONFLICT`。轮询 `GET /api/external/v1/generations/{operationId}` 得到 `status=completed` 与 `assetObjectId`,再用 `/api/external/v1/assets/read-url` 换签名地址下载成功(`200 image/png`)。**12 项 PASS**。
- Provider 出图口径更新:本轮实测本机 **Provider 可用且确实出图**(模型 `vector-engine-nanobanana`,objectKey `generated-character-drafts/editor/scene-images/…/image.png`),因此这一条不再记「未验证」;先前记录的「缺 TIANTOKEN 配置」只影响编辑器真实生成配置检查,不阻塞场景路由的 Provider 出图。
- 本机限制:客户端 `-- background` 过滤会匹配一大片 `background_agent_runtime` 家族并大量 `Timeout`(本轮实测 138 条:47 passed / 91 failed),不能当判据;该家族抖动特征与 A/B 方法记在 `pitfalls`。