fix: enrich image failure audit metadata

This commit is contained in:
kdletters
2026-05-28 14:50:13 +08:00
parent c8b36cf799
commit 771b0411a3
18 changed files with 234 additions and 20 deletions

View File

@@ -71,12 +71,14 @@ pub async fn generate_puzzle_onboarding_work(
let now = current_utc_micros();
let session_id = build_prefixed_uuid_id("puzzle-onboarding-");
let onboarding_profile_id = format!("onboarding-profile-{now}");
let naming = generate_puzzle_first_level_name(&state, prompt_text.as_str()).await;
let tags =
generate_puzzle_work_tags(&state, naming.level_name.as_str(), prompt_text.as_str()).await;
let candidates = generate_puzzle_image_candidates(
&state,
"onboarding-guest",
Some(onboarding_profile_id.as_str()),
session_id.as_str(),
naming.level_name.as_str(),
prompt_text.as_str(),
@@ -132,7 +134,7 @@ pub async fn generate_puzzle_onboarding_work(
));
let item = PuzzleWorkProfileRecord {
work_id: format!("onboarding-work-{now}"),
profile_id: format!("onboarding-profile-{now}"),
profile_id: onboarding_profile_id,
owner_user_id: "onboarding-guest".to_string(),
source_session_id: None,
author_display_name: "陶泥儿主".to_string(),
@@ -675,6 +677,7 @@ pub async fn execute_puzzle_agent_action(
async {
compile_puzzle_draft_with_initial_cover(
&state,
&request_context,
compile_session_id.clone(),
owner_user_id.clone(),
prompt_text,
@@ -689,6 +692,7 @@ pub async fn execute_puzzle_agent_action(
} else {
compile_puzzle_draft_with_uploaded_cover(
&state,
&request_context,
compile_session_id.clone(),
owner_user_id.clone(),
prompt_text,
@@ -861,9 +865,11 @@ pub async fn execute_puzzle_agent_action(
.await?,
]
} else {
let (_, profile_id) = build_stable_puzzle_work_ids(&session.session_id);
generate_puzzle_image_candidates(
&state,
owner_user_id.as_str(),
Some(profile_id.as_str()),
&session.session_id,
&target_level.level_name,
&prompt,
@@ -920,6 +926,7 @@ pub async fn execute_puzzle_agent_action(
})?;
let asset_bundle = generate_puzzle_level_asset_bundle_required(
&state,
&request_context,
owner_user_id.as_str(),
&session.session_id,
&target_level,
@@ -1079,6 +1086,7 @@ pub async fn execute_puzzle_agent_action(
);
let generated = generate_puzzle_ui_background_image(
&state,
&request_context,
owner_user_id.as_str(),
&session.session_id,
&target_level.level_name,