移除 External v1 完成结果联合的 discriminator
Project CI / Repository checks (pull_request) Failing after 9s
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

BGM 回 audioKind=background-music 无映射,图片、视频与历史结果没有
audioKind,fallback 分支又不可能把 audioKind 声明为必填,任何映射都覆盖
不全合法结果。oneOf 加 not 本已精确互斥,删掉 discriminator 不改变校验
语义,只恢复依赖它的客户端生成

契约测试反向锁定 discriminator 缺席,并锁定 fallback 只排除 SFX 一种
audioKind

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-08 09:19:32 +00:00
parent 0073fbd188
commit 4024ea53ed
2 changed files with 20 additions and 15 deletions
@@ -4945,7 +4945,7 @@
}
},
"additionalProperties": true,
"description": "其它生成类型或历史结果的兼容 compact result。该 fallback 明确排除 audioKind=sound-effect,避免吞掉 SFX 专用分支。"
"description": "其它生成类型或历史结果的兼容 compact result。背景音乐(audioKind=background-music)与不带 audioKind 的图片、视频、图标序列帧、角色动作和 UI 拆解结果都落在这里。该 fallback 明确排除 audioKind=sound-effect,避免吞掉 SFX 专用分支。"
},
"ExternalEditorGenerationCompletedResult": {
"oneOf": [
@@ -4956,13 +4956,7 @@
"$ref": "#/components/schemas/ExternalEditorGenerationGenericCompactResult"
}
],
"discriminator": {
"propertyName": "audioKind",
"mapping": {
"sound-effect": "#/components/schemas/ExternalEditorSoundEffectCompactResult"
}
},
"description": "External v1 轮询 completed 状态的命名 compact result 联合。"
"description": "External v1 轮询 completed 状态的命名 compact result 联合。两个分支已由 audioKind 的 const 与 not 精确互斥,不使用 discriminator:背景音乐返回 audioKind=background-music,图片、视频、图标序列帧、角色动作、UI 拆解与历史结果根本没有 audioKind,它们都无法映射到具名分支,且 fallback 分支不可能把 audioKind 声明为必填,因此任何 discriminator 映射都不可能覆盖全部合法结果。"
},
"ExternalEditorGenerationSubmissionResponse": {
"type": "object",