Repository navigation
fix(checkpoint): clarify successor review recovery closeout - #7249
Conversation
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent | gpt-6.1-sol | OpenAI | runtime_reported | reasoning_effort=max
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机
从不可变检查点恢复研究上下文、需要继续处理尚未复核决策的调用者。
原指引要求做当前复核,却未说清创建后继任务不等于记录检查点复核,也未明确原轮次收尾仍可用和原轮次已结束两种恢复路径;“原生续接完成”还容易被理解为要先跑 benchmark evaluation。
恢复后创建了后继任务,原轮次仍允许收尾:旧指引容易让调用者遗漏检查点引用或停在新任务已创建;当前文字明确要求在原收尾写回中带入引用并完成结算。若原轮次已结束,则保留未决复核给下一次已准入重规划,禁止重绑或重放旧轮次。
四个真实 File/SQLite 结算流程均显示:创建后继任务和仅写回时语义复核仍未接受;完成原结算后,仅携带原检查点引用的流程被接受,未引用的仍拒绝。新旧 helper 的全部非指引字段在每个相同权威状态上相等;新增文字准确解释现有门槛,没有放宽捕获或执行权限。
交付限于现有 checkpoint CLI/Host 恢复文字和同 owner 的集成覆盖;完成的是这次收尾指引修正。原生目的会话实际完成、自动普通 replan 接入、安装版采用、模型遵从和长程成本收益仍未在本次验证中资格化;不要求先运行 benchmark evaluation,不新增执行授权。
改动思路
原 typed owner 已经要求精确原结算、当前语义复核和检查点引用,缺口在交给调用者的恢复说明。保持 owner 不变并补充两个实际恢复分支,比新增可重绑身份、人工 ACK 或重复状态机更小。Python 只是现有 Host/provider 的说明投影,TypeScript Core 仍决定语义门槛。
只扩展 _restored_context 的 pending-review 指引:区分后继任务创建与复核记录,按当前 guard 的原收尾机会写回引用并结算;已结束的原轮次不重用。明确 capture 另需已接受且已结算的当前语义复核及目的 Codex 会话轮次完成。文档与 File/SQLite 测试沿用现有 typed artifact/settlement owner。
当前无需新增架构或重复状态;继续使用现有收尾和下一次 admitted replan。后续原生目的会话/自动恢复采用的资格仍属于原 checkpoint 研究入口,不为本次文字修正新建仪式化任务。
文字现在区分“当前仍可原身份收尾”和“原轮次已结束”两个合法分支。它不要求重新输入已知的引用或另开确认轮次;调用者沿当前 guard 操作,缺少当前准入时等待下一次正常恢复。新增说明不会通过文案制造额外机器义务。
具体改动
未发现阻塞项。最强剩余限制是尚未证明真实模型会采用新指引,也未执行实际目的原生会话续接;这不是本次文字修正已交付的范围。
不可变已接受规格:docs/reference/research-checkpoint.md,版本 ad6d2f6d3248cb9f612af7626046b689d8f654b0。先读原规格再审补丁;下列是审计映射标签,非伪造原编号。
-
current-review-not-history-authority(implemented):Archived checkpoint evidence cannot reuse historical commands, identities or spend authority; review uses current admission. -
original-closeout-and-reference(implemented):Checkpoint review is tied to actual current semantic settlement and explicit checkpoint citation, not local dedup or successor creation. -
separate-native-completion(implemented):Semantic review acceptance and completed destination native conversation are separate capture conditions; neither grants execution. -
automatic-and-long-term-adoption(out_of_scope):Automatic ordinary replan/native adoption and sustained outcome comparison remain outside the accepted CLI/Host stage.
3 files +72/-2; production +7/-2。完整差异、既有 owner/调用者、全量讨论、DCO 与公开边界已核验。无持久化格式迁移、CLI 参数变化或旧记录解码分支;typed checkpoint_artifacts 全文件在基线与 head 字节一致。新措辞把原有 settled 条件和目的会话门槛说清,不改变原收尾身份或运行权限。
关键代码讲解
restored_checkpoint_review(benchmark/runtime/checkpoint_continuation.py:38):只读取语义复核基础,verify_native=False 不会把语义接受伪装为完整 capture 资格。
_restored_context(benchmark/runtime/checkpoint_continuation.py:46):沿用原 binding、wake、guard 和 artifact owner,只在 pending 指引中解释原结算和已结束轮次的不同处理。
restored_capture_gate(benchmark/runtime/checkpoint_continuation.py:33):完整 capture 另以 verify_native=True 读取原生历史和游标;本 PR 没有更改这道独立门槛。
restore_capture semantic consumption(loopx/control_plane/runtime/checkpoint_artifacts.ts:278):未修改的 Core 谓词继续要求实际已结算复核、原检查点引用和不同于已完成复核的当前 obligation。
test_successor_review_needs_checkpoint_linked_settlement(tests/control_plane/test_checkpoint_restore_capture.py:89):File/SQLite 各覆盖引用/未引用;创建后继与仅写回不够,实际结算后才接受有引用的一侧,后继任务仍开放。
对主干的风险
针对性 suite 为 177 过、13 跳过;跳过的条件性平台/可选依赖路径不记为通过。标准预合并 5 项直接/编译检查、17 项选中 smoke 和 1 项公开边界检查通过;整体状态为 manual_review_required,benchmark_sensitive 人工要求保留。额外 4 个真实 Core File/SQLite 流程逐一比较 5 个阶段,共 20 对 helper 输出,非指引字段完全一致,原结算身份和开放的后继任务均保留。
未引用检查点,即使原轮次已完成写回和 spend 仍不接受复核;只创建后继任务和只写回也不接受。已结束的原 guard 不能再次准入;原生会话完成是独立条件,语义 helper 的接受不代表 capture 或新执行已授权。
没有 live 模型调用或真实原生目的会话续接:探针只构造既有会话准入对象和合成 session 元数据,语义读取使用真实 Core、File/SQLite、artifact、原 guard 和 refresh/spend。基线与当前只替换这一说明模块,对同一物理权威状态比较完整返回字段,未将 ID/receipt/权限字段归一化。13 项跳过与人工审查要求保留,不能把此结果扩展为模型采用或长期研究收益。
四个流程各在原 guard、后继创建、写回未 spend、原结算完成、已结束原轮次五个状态比较返回值。未引用的一侧一直拒绝;有引用的一侧只在结算后接受。恢复 helper 的普通入口已执行,所有非指引字段一致;没有用 helper 接受结果替代真实原生捕获证明。
语义与 CI 对齐
No new schema, Enum, persistence, receipt, flag or semantic classifier. Existing settled progress, checkpoint SHA, current obligation and native session/history are read from their original owners; prose is not parsed to create an obligation.
Guidance activates only for a current restored binding with an unresolved checkpoint review. Missing restored binding returns the unchanged semantic_review_accepted=false early result; accepted review has no pending guidance. Availability of Codex, an artifact or a successor Todo does not activate execution. 开关关闭/未恢复入口做了实际基线与当前配对。原配额、结算、权限和停止条件不靠文案推断。CI 按契约未查询、轮询或等待;本地检查结果、跳过与人工 hold 分别保留。
我的整体评价
APPROVE,仅对应 7249@e098a4b1076715d39182123fc143a3591292f25c。本次恢复说明修正与既有 owner 一致,局部目标已达到;未扩展为父研究目标或原生采用完成。
长期工作:preserved;使用体验:improved。四个真实 File/SQLite 结算流程均显示:创建后继任务和仅写回时语义复核仍未接受;完成原结算后,仅携带原检查点引用的流程被接受,未引用的仍拒绝。新旧 helper 的全部非指引字段在每个相同权威状态上相等;新增文字准确解释现有门槛,没有放宽捕获或执行权限。
已检查 checkpoint CLI/Host 的 pending 指引、完整返回及原结算恢复路径;没有渲染页面或布局改变,不需截图。 未验证范围:没有 live 模型调用或真实原生目的会话续接:探针只构造既有会话准入对象和合成 session 元数据,语义读取使用真实 Core、File/SQLite、artifact、原 guard 和 refresh/spend。基线与当前只替换这一说明模块,对同一物理权威状态比较完整返回字段,未将 ID/receipt/权限字段归一化。13 项跳过与人工审查要求保留,不能把此结果扩展为模型采用或长期研究收益。
有界重构判断:当前无需新增架构或重复状态;继续使用现有收尾和下一次 admitted replan。后续原生目的会话/自动恢复采用的资格仍属于原 checkpoint 研究入口,不为本次文字修正新建仪式化任务。 交付限于现有 checkpoint CLI/Host 恢复文字和同 owner 的集成覆盖;完成的是这次收尾指引修正。原生目的会话实际完成、自动普通 replan 接入、安装版采用、模型遵从和长程成本收益仍未在本次验证中资格化;不要求先运行 benchmark evaluation,不新增执行授权。
这是 author-owned COMMENTED 结论,不是 GitHub 正式 self-approval/rejection。当前批准与 approval-closeout、readiness、人工要求和合并权限分开读回;本评审不合并。
English verdict: APPROVE. APPROVE. The revised recovery guidance matches the existing typed settlement and checkpoint-reference requirements. Four real File/SQLite flows cover successor creation, writeback, settlement and ended-turn handling; twenty base/head observations preserve every non-guidance field. Semantic acceptance still does not prove native destination completion or grant execution. Automated checks pass; thirteen skips and the benchmark-sensitive manual review hold remain explicit. No blocking finding.
A restored benchmark conversation can create a valid replan successor and still leave checkpoint recovery incomplete. The recovery prompt did not explain how that legal exit relates to its additional provenance and settlement requirements, and “native continuation” could be mistaken for benchmark evaluation.
Clarify the existing route: include the checkpoint-linked Vision in the original Turn’s closeout when the current guard offers it; otherwise carry the unresolved review to the next admitted replan without replaying or rebinding an ended Turn. Name the required completed destination Codex conversation turn explicitly. The capture predicate and native-session checks are unchanged; the guidance appears only while restored review is pending.
恢复后的 benchmark 会话可能合法创建后继 Todo,但尚未完成 checkpoint 审查。现在明确:当前 guard 提供原回合收尾路径时,在写回中保留 checkpoint 引用并完成结算;回合已结束则等下一次获准复盘,不重放或改绑旧回合。同时明确“完成目标 Codex 对话回合”不等于 benchmark 评测。既有捕获与会话校验不变。
Validation:
tests/control_plane/test_checkpoint_restore_capture.py13 passed.uv run --extra test pytest -q tests/control_plane/test_checkpoint_restore_capture.py tests/control_plane/test_replan_successor_guard_reentry.py tests/control_plane/test_replan_successor_durable_ack.py benchmark/tests/test_checkpoint_handoff.py benchmark/tests/test_sforge_warm_start.py: 177 passed, 13 skipped in 172.01s on macOS. Skips: 4 Linux writer-process-group cases and 9 optional Harbor/SForge entry cases; these are not claimed as tested.e098a4b1076715d39182123fc143a3591292f25c, base:ad6d2f6d3248cb9f612af7626046b689d8f654b0.这是恢复指引与组合路径验证,不声称已减少真实模型耗时或证明研究收益。冻结实验未热更新;本 PR 未合并、未部署。
Scope review: reuse the current checkpoint adapter, canonical settlement owner and existing regression fixture. No new state owner, workaround receipt or parallel recovery protocol is introduced. #7240 remains a separate capture-witness fix; this change addresses recovery guidance rather than sealing IO.