From 4b50f879d2cf6fd7d7a650c31bf3cf83f07ead50 Mon Sep 17 00:00:00 2001 From: Linghong Date: Thu, 30 Jul 2026 13:22:11 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=87=AA=E4=B8=BB=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E7=AD=89=E5=BE=85=E6=B5=8B=E8=AF=95=E7=AB=9E=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 使用待处理任务夹具替代会启动后台 drain 的高层入口 避免 planning 与 waiting-for-manifest-tasks 并发写入同一 run 定向测试连续运行五十次通过 --- .../agent/runtime_driver/main_loop_tests.rs | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) 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 ac1183d0c..0bd6ac827 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 @@ -317,24 +317,26 @@ fn autonomous_manifest_waiting_context_persists_without_finishing_parent_run() { let root = temporary.path().join("project"); init_local_game_project_at(&root, "manifest-waiting-project", TASK) .expect("init manifest waiting project"); - start_game_creator_supervisor_background_task_for_session_at( + let session_id = resolve_agent_conversation_session_id_at( &root, + GAME_CREATOR_PROJECT_SUPERVISOR_AGENT_ID, None, + true, + ) + .expect("resolve autonomous parent session"); + let task_record = append_unique_game_creator_agent_runtime_pending_task( + &root, + GAME_CREATOR_PROJECT_SUPERVISOR_AGENT_ID, + &session_id, TASK, RUN_ID, AGENT_RUNTIME_SUPERVISOR_CLI_SOURCE, - AGENT_RUNTIME_RUN_PROFILE_AUTONOMOUS_GAME_BUILD, + Some(AGENT_RUNTIME_RUN_PROFILE_AUTONOMOUS_GAME_BUILD), + None, ) .expect("queue autonomous parent task"); update_manifest_task_status_at(&root, "design-director", GameCreationAppTaskStatus::Running) .expect("start first manifest task"); - let task_record = read_latest_game_creator_agent_runtime_task_by_run_id( - &root, - GAME_CREATOR_PROJECT_SUPERVISOR_AGENT_ID, - RUN_ID, - ) - .expect("read autonomous parent task") - .expect("autonomous parent task exists"); let mut runtime = agent_runtime_state_from_task_record(&task_record); let mut observations = Vec::new(); let continuation = AgentRuntimeContinuationContext::default();