AGC 音频账本 kind 判定改成显式穷举,去掉静默兜底
Project CI / AI game creator shell Rust shard 4/4 (pull_request) Failing after 19s
Project CI / AI game creator shell Rust shard 2/4 (pull_request) Failing after 19s
Project CI / AI game creator shell Rust shard 3/4 (pull_request) Failing after 20s
Project CI / AI game creator shell Rust shard 1/4 (pull_request) Failing after 20s
Project CI / Native shell tests (pull_request) Failing after 17s
Project CI / AI game creator shell Rust crates (pull_request) Failing after 19s
Project CI / AI game creator shell Rust smoke (pull_request) Failing after 19s
Project CI / Backend tests (pull_request) Failing after 18s
Project CI / Frontend tests (pull_request) Failing after 8s
Project CI / Repository checks (pull_request) Failing after 12s
Project CI / AI game creator shell web tests (pull_request) Failing after 12s
Project CI / AI game creator shell Rust shard 4/4 (pull_request) Failing after 19s
Project CI / AI game creator shell Rust shard 2/4 (pull_request) Failing after 19s
Project CI / AI game creator shell Rust shard 3/4 (pull_request) Failing after 20s
Project CI / AI game creator shell Rust shard 1/4 (pull_request) Failing after 20s
Project CI / Native shell tests (pull_request) Failing after 17s
Project CI / AI game creator shell Rust crates (pull_request) Failing after 19s
Project CI / AI game creator shell Rust smoke (pull_request) Failing after 19s
Project CI / Backend tests (pull_request) Failing after 18s
Project CI / Frontend tests (pull_request) Failing after 8s
Project CI / Repository checks (pull_request) Failing after 12s
Project CI / AI game creator shell web tests (pull_request) Failing after 12s
- `begin_local_project_audio_generation_task` 的 `edit_kind → 账本 kind` 映射显式列出 `SoundEffect` 与 `BackgroundMusic` 两个成员,不再用 `_ =>` 兜底 - 其余 `LocalProjectResourceEditKind` 变体在此处直接返回错误,避免新增音频变体(或上游白名单被 放宽)时被静默记成音效
This commit is contained in:
@@ -422,9 +422,12 @@ fn begin_local_project_audio_generation_task(
|
||||
}
|
||||
let root = Path::new(project_path.trim());
|
||||
enforce_project_permission_policy(root, "asset.register")?;
|
||||
// 显式列全两个音频成员:这里**不做** `_ =>` 兜底——账本的 `kind` 是前端的唯一条目身份,
|
||||
// 新增音频变体(或上游白名单被放宽)时必须在这里大声失败,而不是把它静默记成音效。
|
||||
let asset_kind = match request.edit_kind {
|
||||
LocalProjectResourceEditKind::BackgroundMusic => GameCreationAppAssetKind::BackgroundMusic,
|
||||
_ => GameCreationAppAssetKind::SoundEffect,
|
||||
LocalProjectResourceEditKind::SoundEffect => GameCreationAppAssetKind::SoundEffect,
|
||||
other => return Err(format!("音频生成不支持该素材类型:{other:?}")),
|
||||
};
|
||||
let record = begin_local_project_asset_generation_task(
|
||||
root,
|
||||
|
||||
Reference in New Issue
Block a user