Repository navigation
Qualify native saved checkpoint reads with complete Turns - #9010
Conversation
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.2-sol · OpenAI (runtime_reported, max)
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机 / Motivation
从已保存的 quota checkpoint 继续工作的 Agent 需要取回同一轮的目标、约束和终点。 原有 opt-in 原生烟测与 Complete Turn 格式错位。常规用例按 quota_packet 比较,多 MB 用例在原始内容绑定后追加数据。 修正后,真实 Codex app-server 能验证冷读、暖读与损坏摘要拒绝。Agent 从同一来源取得完整约束,投影路径保持原轮次。 这次提交只恢复原生验证入口。生产安装、模型采纳与完整成本仍待验。
改动思路 / Approach
先由原有读取器验证不可变源 capture,再以 complete_turn 重建预期展示。实际原生读回仍经过冷读、暖读和恢复入口,原始身份、可读正文与回执计数各有断言。 这是原有原生生命周期烟测的调整,生产调用链和 fixture owner 继续复用。 用同一路径对照 base 和 head,能把 fixture 的过期封装与真实读回故障分辨开。现有发布描述和验证分工足以承载改动。
具体改动 / Changes
精确 head 47ae1130332657b6397709aa6e5566d4e3ebb217,diff base 7bc56e74687a93ff4d5bcccb532c454bf2379c29,1 个文件 +58/-24。逐项复核 immutable-source、native-readback、scope-and-no-reentry。验收约定
关键代码讲解
- 多 MB fixture 先加入 Unicode 要求和未选择的材料,再合成同一 Complete Turn 的绑定。源码
- 源文件按摘要读回。投影的绑定必须与原文件一致,已发布的 wire 再用同一输入独立重建。源码
- Benchmark 入口仅加页大小参数,逐项核对原 selection。冷暖源文件仍逐字节与原文件匹配,App 比较完整 JSON。源码
对主干的风险 / Risks
独立复跑的四个 App 用例在精确 base 全部失败,三例在 quota_packet 与 complete_turn 的比较失败,大 capture 在首次准备时拒绝过期绑定。精确 head 四例通过,另有两个 loopback benchmark 变体通过。包含最新 main 的对照树复跑两个 App 例均通过。
语义与 CI 对齐
保留错误摘要拒绝、部分读取不能升级为可复用全量 baseline、App 零新增 guard 回执与零支出。Benchmark 原有显式结算只出现一次。与期望投影相比,同时检查实际发布结果和未变的原材料。
我的整体评价 / Verdict
同意这次测试调整。原生入口重新具备从已保存 checkpoint 核对完整同一轮读取和原始恢复的能力。独立验证覆盖 File 系统中的捕获与 SQLite 控制面,模型 Responses 使用本地合成数据。安装态采用和完整成本仍待验证。
English verdict: APPROVE. At 47ae113, six exact-head native cases and two main integration cases pass. The four matched base App tests fail on obsolete source binding or projection assumptions.
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
47ae113 to
ed0edeb
Compare
huangruiteng
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · GPT-5 · OpenAI · self_reported
审批结论 / Approval conclusion
动机 / Motivation
Maintainers running native saved-context qualification need the opt-in cases to follow the current complete-Turn contract. The old test mixed immutable source and progressive presentation, so its opt-in path could not reliably protect warm recovery. The repaired module reads the bound source separately, follows the production presentation path, and rebuilds the delta. It does not change product behavior.
affected_caller_or_operator: Maintainers running the native saved-context qualification and future changes to saved capture presentation.before_after_scenario: The old test mutated projected presentation as the source; the new test composes exact source material, reads it by digest, then validates the separately emitted presentation.observable_outcome: The module runs the current owner on exact source bytes, separate presentation, native page limit and reconstructed delta.non_goals: Does not change runtime behavior or claim a new native product feature.
改动思路 / Approach
The test now uses compose_turn_decision before capture, read_context_capture_file to recover immutable source bytes, and the existing prepare_context_delivery/restore_context_delivery owners for presentation and delta. No parallel runtime is introduced.
具体改动 / Changes
关键内容讲解
- The large fixture adds synthetic material before composing the source binding.
- Benchmark transport keeps the existing checkpoint routing while adding only the native page limit.
- Final assertions compare the reconstructed current full view and delta ancestry rather than treating presentation as the source.
- The damaged-digest branch proves a reader refusal and then continues with the original reference.
对主干的风险 / Risks
This is test-only. The strongest regression is accidentally qualifying presentation bytes as source; the new immutable-source read and digest refusal cover that exact path. No extra standalone smoke is added: it repairs the existing saved-context module and its existing native consumers.
我的整体评价 / Verdict
The change protects a real native boundary, replaces stale test state with production owners, and avoids same-shape smoke duplication. Local non-native module execution passed 85 tests; the 14 opt-in native cases remain author-reported because LOOPX_NATIVE_CHECKPOINT_BIN is unavailable here.
English verdict: APPROVE for ed0edeb. The repaired test binds source and presentation through the current owners and preserves durable native recovery coverage; no product behavior changes.
Outcome
Restore the opt-in native saved-checkpoint qualification for the current complete Turn contract. The tests validate the immutable source separately from its progressive presentation, preserve the checkpoint's existing routing when the native page limit is added, and verify the reconstructed delta against the current full view. The multi-megabyte fixture adds its synthetic material before composing the source binding.
Validation
The change is confined to the test module. The native runs qualify transport and recovery under fixture inference.
Current main validation
7bc56e7468and reran all 14 opt-in saved-context cases on this test-only candidate with the actual Codex app-server and loopback inference. The quick premerge canary and Ruff passed.