修复宿主继续请求重复发送原始用户输入 #500

Merged
lhk229 merged 2 commits from fix/ga into master 2026-09-23 18:20:42 +08:00
Member

区分首次用户请求与宿主反馈,继续时发送实际验收或错误信息
固定 GUI 和 CLI 的原始用户条目,保留历史与回合身份关联
补充结构化输入、反馈发送、图片输入和历史去重的定向回归测试
同步更新实施计划与排障记录,保持交付验收条件和预算不变

区分首次用户请求与宿主反馈,继续时发送实际验收或错误信息 固定 GUI 和 CLI 的原始用户条目,保留历史与回合身份关联 补充结构化输入、反馈发送、图片输入和历史去重的定向回归测试 同步更新实施计划与排障记录,保持交付验收条件和预算不变
lhk229 added 1 commit 2026-09-23 17:56:38 +08:00
修复宿主继续请求重复发送原始用户输入
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust smoke (pull_request) Has been cancelled
Project CI / AI game creator shell Rust crates (pull_request) Has been cancelled
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
Project CI / Repository checks (pull_request) Has been cancelled
Project CI / AI game creator shell web tests (pull_request) Has been cancelled
559e3dbf36
区分首次用户请求与宿主反馈,继续时发送实际验收或错误信息
固定 GUI 和 CLI 的原始用户条目,保留历史与回合身份关联
补充结构化输入、反馈发送、图片输入和历史去重的定向回归测试
同步更新实施计划与排障记录,保持交付验收条件和预算不变
lhk229 added 1 commit 2026-09-23 17:59:28 +08:00
合并主分支并解决排障文档冲突
Project CI / AI game creator shell Rust crates (pull_request) Successful in 57s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 1m29s
Project CI / Backend tests (pull_request) Successful in 5m46s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 7m52s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 9m43s
Project CI / Native shell tests (pull_request) Successful in 7m23s
Project CI / Frontend tests (pull_request) Successful in 2m37s
Project CI / AI game creator shell web tests (pull_request) Successful in 1m26s
Project CI / Repository checks (pull_request) Successful in 2m28s
5f0ed88f1d
合并 origin/master 的最新改动到 fix/ga
保留宿主继续请求输入修复与最近项目检查恢复的两条排障记录
Author
Member

代码审查(fix/ga → master)

结论

修复方向正确,逻辑闭环,测试覆盖到位,建议合并(CI 目前全部 Waiting,合并前等绿)。

正确性核对(已逐条验证)

  1. turn_kind 翻转时机安全:两条反馈循环里,任何重试发生前 feedback_prompt 都已被改写为验收反馈或错误反馈文本,不存在「原始用户 prompt + HostFeedback」的组合,不会出现首次结构化输入被跳过的情况(direct_runtime/mod.rs:5300:5360)。
  2. CLI 冻结条目与 chat 内身份同源:冻结用的 state.client_turn_iddirect_game_creator_codex_chat_at_with_optional_observer 内部 effective_client_turn_id 的回退来源同为 execution ledger snapshot,itemId 口径一致(codex_app_server/mod.rs:5129-5143)。
  3. 历史幂等成立append_direct_project_history_item_once 对同 ID 内容一致的条目跳过、内容冲突则硬报错。冻结原始条目正好消除了反馈轮「同 ID 写不同内容」的冲突路径,新增的两个 tokio 测试(GUI 式结构化输入 + CLI 式历史去重)直接钉住了这两条语义。

建议知悉的行为变化(不阻塞)

  1. CLI 路径下 execution_session.snapshot() 失败现在会让回合在 CodeGeneration 阶段直接失败(direct_runtime/mod.rs:5120-5131),而此前 direct_user_item=None 可继续。snapshot 失败概率很低,可接受。
  2. 宿主反馈轮的反馈文本不落历史(GUI 此前亦如此,CLI 由「可能写入反馈」变为「确定只保留原始条目」)。若线程重建走 thread/inject_items,注入历史中将不含反馈上下文——属既定取舍,文档已声明,提示一下即可。
  3. PR 夹带了 3 个与修复无关的纯格式化文件(PlatformSegmentedTabs.tsxgameDistribution.tshome.suite.ts),建议以后拆出,便于回溯。

文档(实施计划 + pitfalls)已同步,符合仓库规范。

## 代码审查(fix/ga → master) ### 结论 修复方向正确,逻辑闭环,测试覆盖到位,**建议合并**(CI 目前全部 Waiting,合并前等绿)。 ### 正确性核对(已逐条验证) 1. **`turn_kind` 翻转时机安全**:两条反馈循环里,任何重试发生前 `feedback_prompt` 都已被改写为验收反馈或错误反馈文本,不存在「原始用户 prompt + HostFeedback」的组合,不会出现首次结构化输入被跳过的情况(`direct_runtime/mod.rs:5300`、`:5360`)。 2. **CLI 冻结条目与 chat 内身份同源**:冻结用的 `state.client_turn_id` 与 `direct_game_creator_codex_chat_at_with_optional_observer` 内部 `effective_client_turn_id` 的回退来源同为 execution ledger snapshot,itemId 口径一致(`codex_app_server/mod.rs:5129-5143`)。 3. **历史幂等成立**:`append_direct_project_history_item_once` 对同 ID 内容一致的条目跳过、内容冲突则硬报错。冻结原始条目正好消除了反馈轮「同 ID 写不同内容」的冲突路径,新增的两个 tokio 测试(GUI 式结构化输入 + CLI 式历史去重)直接钉住了这两条语义。 ### 建议知悉的行为变化(不阻塞) 1. CLI 路径下 `execution_session.snapshot()` 失败现在会让回合在 CodeGeneration 阶段直接失败(`direct_runtime/mod.rs:5120-5131`),而此前 `direct_user_item=None` 可继续。snapshot 失败概率很低,可接受。 2. 宿主反馈轮的反馈文本不落历史(GUI 此前亦如此,CLI 由「可能写入反馈」变为「确定只保留原始条目」)。若线程重建走 `thread/inject_items`,注入历史中将不含反馈上下文——属既定取舍,文档已声明,提示一下即可。 3. PR 夹带了 3 个与修复无关的纯格式化文件(`PlatformSegmentedTabs.tsx`、`gameDistribution.ts`、`home.suite.ts`),建议以后拆出,便于回溯。 文档(实施计划 + pitfalls)已同步,符合仓库规范。
lhk229 merged commit c2ec978199 into master 2026-09-23 18:20:42 +08:00
lhk229 deleted branch fix/ga 2026-09-23 18:20:42 +08:00
Sign in to join this conversation.