From 73816bd512f1ce7145728fa0137f6ddb547c67b2 Mon Sep 17 00:00:00 2001 From: Linghong Date: Tue, 18 Aug 2026 05:34:22 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20HEAD=20=E6=97=A2=E5=AD=98?= =?UTF-8?q?=E7=BA=A2=EF=BC=9Aplanning=20session=20=E6=81=A2=E5=A4=8D?= =?UTF-8?q?=E5=9D=97=E7=BB=99=E5=8F=8C=E9=94=9A=E7=BC=BA=E5=A4=B1=E8=AF=8A?= =?UTF-8?q?=E6=96=AD=E8=AE=A9=E8=B7=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit committed_plan_submit_without_either_anchor_is_publicly_recoverable_and_fails_closed 在 HEAD 上确定性失败(Windows 与 WSL 干净基线一致,与本轮审查修复无关): phase 确实是 needs-reconciliation,但 error 不是「恢复锚点同时缺失」。 M1C-2b 把 planning session 恢复块插进了同一个循环,位置在 reconcile_missing_plan_submit_anchors_at 之前。该 fixture 用裸 start_game_creator_agent_runtime_task_at 建策划任务,task record 上没有 parentAgentId/delegationId,于是 exact_plan_child_identity_at 判定身份不符、 返回类型化 Err,session 块随即落 needs-reconciliation 并 continue,更具体的双锚 缺失诊断永远轮不到跑。两条都写 needs-reconciliation,谁先写谁赢,而先写的恰恰是 信息量更少的那条。 不是判错,是插在前面的门改变了哪条诊断胜出——与 M1C-1 那五条 CI 失败、与 P4 同一形状。 - session 恢复块加让路条件:该 run 是双锚缺失候选时跳过。本块只服务「将要继续」的 continuation,而双锚缺失的 run 根本不会继续,修投影没有意义 - 选让路而不是调换两块顺序:调换会让锚点探测对所有 Agent 提前,正是「前移改作用域」 那个坑本身。探测器只对 project-planning + agent-delegate + standard 返回 Some, 且对已按双锚缺失收敛过的状态返回 None,因此这道让路既窄又幂等 - recovery 族 105 passed/2 failed -> 106 passed/1 failed,planning_ 150/1、 session 87/1;剩下的唯一红是 planning_recovery_contains_session_identity_conflict _before_provider(另一条既存红,下一个提交处理) Co-Authored-By: Claude Opus 5 --- .../src/agent/runtime_driver/recovery_scan.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) 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(