From 915981e431974d78dd6a53fba9b709afdec7baa4 Mon Sep 17 00:00:00 2001 From: menghao Date: Wed, 12 Aug 2026 18:56:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8E=9F=E7=94=9F=E5=A3=B3?= =?UTF-8?q?=E9=97=A8=E7=A6=81=E5=9B=9E=E5=BD=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 避免首次修改门禁覆盖试玩失败修复与新版本复验规则 允许异步唤醒测试接受任务已自然结束的竞态结果 --- .../src/agent/runtime_actions/autonomous_policy.rs | 7 +++++++ .../src/agent/runtime_driver/main_loop_tests.rs | 10 ++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/apps/ai-game-creator-shell/src-tauri/src/agent/runtime_actions/autonomous_policy.rs b/apps/ai-game-creator-shell/src-tauri/src/agent/runtime_actions/autonomous_policy.rs index 7727f2188..b85acad3f 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/agent/runtime_actions/autonomous_policy.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/agent/runtime_actions/autonomous_policy.rs @@ -708,6 +708,13 @@ pub(crate) fn validate_agent_runtime_autonomous_plan_liveness( if agent_id == GAME_CREATOR_PROJECT_SUPERVISOR_AGENT_ID && loop_index > AGENT_RUNTIME_AUTONOMOUS_PRE_MUTATION_LOOP_LIMIT && verification_gate.mutation_revision.is_none() + && verification_gate.failed_playtest_revision.is_none() + && verification_gate.verified_revision.is_none() + && !observations.iter().any(|observation| { + observation.tool == "preview.validate" + && observation.status == "failed" + && observation.summary == "浏览器验证未通过,请根据诊断修复后重试" + }) && !has_mutation && !has_code_asset_route && plan.response.trim().is_empty() diff --git a/apps/ai-game-creator-shell/src-tauri/src/agent/runtime_driver/main_loop_tests.rs b/apps/ai-game-creator-shell/src-tauri/src/agent/runtime_driver/main_loop_tests.rs index df9c4e0a5..be937a926 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/agent/runtime_driver/main_loop_tests.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/agent/runtime_driver/main_loop_tests.rs @@ -814,8 +814,14 @@ async fn game_chat_art_receipt_wakes_the_same_code_prototype_run() { .expect("waiting main task exists"); let wake_started = wake_waiting_static_delegate_parent_run_at(&root, &waiting) .expect("wake same main run after art receipt"); - cancel_game_creator_agent_runtime_task_at(&root, "code-prototype", &main.run_id) - .expect("cancel resumed fixture run"); + if let Err(error) = + cancel_game_creator_agent_runtime_task_at(&root, "code-prototype", &main.run_id) + { + assert!( + error.contains("Agent Runtime 任务已结束,不能取消"), + "cancel resumed fixture run: {error}" + ); + } let release_deadline = std::time::Instant::now() + std::time::Duration::from_secs(5); loop { if game_creator_agent_runtime_task_lock_is_available(&root, "code-prototype")