diff --git a/apps/ai-game-creator-shell/src-tauri/src/agent/runtime_driver/recovery_scan.rs b/apps/ai-game-creator-shell/src-tauri/src/agent/runtime_driver/recovery_scan.rs index 775421806..60b4ac18e 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/agent/runtime_driver/recovery_scan.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/agent/runtime_driver/recovery_scan.rs @@ -1049,8 +1049,18 @@ pub(in crate::agent) fn resume_game_creator_agent_background_tasks_unredacted_at // and reacquire in project -> execution order, re-read the task under // the new lock set, project exactly once, then release the project lock // before any later path can enter the Session lane. + // + // 但双锚缺失的 run 要让路。本块修 session 投影,是为了让**将要继续**的 + // continuation 不带着过期决定去发第一个 Provider 请求;而 `plan.submit_gdd` + // 的 pending/batch 恢复锚点同时丢失的 run 根本不会继续——下面 + // `reconcile_missing_plan_submit_anchors_at` 会把它判失败并要求人工核对。 + // 若不让路,本块会先落一条泛化的「未命中 planning session 协调器」,把那条 + // 精确得多的双锚缺失诊断永久挡在后面:两者都写 needs-reconciliation,谁先 + // 写谁赢,而先写的那条恰恰是信息量更少的。探测器自身很便宜,且对「已按双锚 + // 缺失收敛过」的状态返回 None,所以这道让路不会反复触发。 let runtime_lock = if agent_id == GAME_CREATOR_PROJECT_PLANNING_AGENT_ID && read_recoverable_runnable_game_creator_agent_runtime_task(root, &agent_id)?.is_some() + && missing_plan_submit_anchor_candidate_at(root, &agent_id)?.is_none() { drop(runtime_lock); let project_lock = match acquire_game_creator_agent_runtime_project_write_lock_with_wait(