Repository navigation
fix: qualify Codex 0.169 native context replay - #9044
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
使用 Codex App Server 的长程 Agent 重启后续作,需要识别原线程已完整读取的上下文。实际 .11.1 paginated rollout 能完整回放选读,目标主干会清除 LoopX 的选读复用记录。候选在同一作用域内保留完整选读和原 Turn。身份变化、失败输出、截断和相邻版本继续走恢复路径。本次复核指定 writer 的续作资格、故障和 #8942 组合。
改动思路 / Approach
沿用 _snapshot 的物理文件身份检查和 _matches 的读取区间核验。SessionStart 在 native replay 后检查当前线程。现有 owner 判定有效输出能否用于后续交付。一行生产改动限定已复测的 writer 版本,配套双语参考和正反例。让同一合成会话通过真实 App Server、原生 shell reader 和生产 hooks。分别在目标主干、精确候选和组合树上重启,用实际模型输入复核原选择正文、Turn 收据和 LoopX 保留摘要。
具体改动 / Changes
精确 head 7b7797df89db20cadaa1cd0983440f76aab9c9c6,diff base 29c312949b6c26e3b27288234881eea2958ead94,3 个文件 +12/-7。逐项复核 exact-writer-and-identity、complete-and-failed-output、companion-replay。验收约定
关键代码讲解
- 生产改动只将 0.169.0-alpha.11.1 加入精确名单。已有文件归属、session、cwd、paginated 模式和完整记录条件照常执行。源码
- 真实 App Server 重启配对复原了 1,346 字节选读和原 Turn。主干清除 LoopX 复用记录,候选保留选读摘要和同一 epoch。源码
- 146 个源码用例覆盖失败输出、权限和身份改变、截断、替换、丢失及相邻 .11.2。失败时使用原 capture 恢复。源码
- 使用 #8942 的 dca761a 与当前精确 head。真实重启后,两组都可从原输出恢复完整四页 12,002 字节。#9044 单独运行时清除多页复用记录,组合树保留它。组合树另有 350 个 resume/lifecycle 测试通过。源码
对主干的风险 / Risks
独立验证使用真实 App Server、隔离源码与确定性回环 fixture。对照组保留原 Turn,候选另有 4 个真实压缩恢复用例通过。作者的 Core wheel、成本数字和安装版 Desktop/Lark 的实际采用未纳入本轮复测。
语义与 CI 对齐
版本字段描述原 rollout writer。资格仍依赖匹配的物理来源和完整输出。失配时从当前 capture 恢复所缺事实。原权限和接续凭据适用。
我的整体评价 / Verdict
批准当前精确提交。真实重启保留原完整选读及 Turn 收据,失败输出和相邻版本仍触发恢复。#8942 组合通过独立验证,实际安装采用和完整成本仍待 C1 验收。
English verdict: APPROVE. Exact-writer resume preserves a verified selection and the original Turn receipt. Unknown writers and incomplete replay fall back safely. The #8942 composition passed independent validation.
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
7b7797d to
685cbea
Compare
huangruiteng
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · GPT-5 · OpenAI · self_reported
审批结论 / Approval conclusion
动机 / Motivation
Codex App users restarting a thread written by Codex 0.169.0-alpha.11.1 previously lost retained-read eligibility and received selected context again. The candidate extends the existing exact-writer qualification only; all source identity and complete-output checks remain.
affected_caller_or_operator: Codex App users restarting threads written by Codex 0.169.0-alpha.11.1.before_after_scenario: On the baseline, the 0.169 writer reused zero selected sections after App Server restart; the candidate reuses the verified section while preserving the original heartbeat receipt.observable_outcome: The exact 0.169 writer is accepted, neighboring and malformed versions remain rejected, and 146 focused replay tests pass.non_goals: Does not claim installed App adoption, matched single-session production outcome, or reuse across multiple selected pages owned by #8942.
改动思路 / Approach
reason: Exact allowlisting preserves explicit compatibility control. current_pr_boundary: One writer version and its documentation/test oracle.
_snapshot continues to own physical-file, session, workspace, model and permission checks. This PR adds one exact session_meta.cli_version value to the same allowlist; it does not widen version matching or create another replay path. R-QUALIFIED-WRITER, R-COMPLETE-TURN and R-FALLBACK are implemented at this head.
具体改动 / Changes
关键代码讲解
_snapshotaccepts0.169.0-alpha.11.1while retaining all surrounding refusals and bounded streaming.- The bilingual
required-work-contextreference records the exact qualified writer and conservative fallback. test_codex_context_resume.pyexercises exact and neighboring writer versions, changed continuity, damaged history, complete output and restart behavior.
规格依据为 docs/reference/required-work-context.md revision 29c312949b6c26e3b27288234881eea2958ead94。
对主干的风险 / Risks
最强反例是一个版本字符串相近但语义不兼容的 writer 被误接受。精确 allowlist 和 unchanged identity/byte gates 阻止该情况;146 项 replay tests 与 quick premerge 通过,仅保留已有 maintainability advisory。
我的整体评价 / Verdict
该改动只扩展明确受支持的 writer,不改变回退原则,也不宣称模型输入保留已得到证明。它减少有效重放的无谓全量投递,同时把生产 App 采用留给后续验收。
English verdict: APPROVE for 685cbea. The exact Codex 0.169 paginated writer now replays under the unchanged complete-Turn and conservative-fallback contract.
Goal And Delivered Outcome
Codex 0.169.0-alpha.11.1 writes paginated rollout history, but main has yet to qualify that writer. After a real App Server restart, the retained-read checkpoint is discarded and the selected context is delivered again. Qualifying this exact writer in the existing check allows the restarted thread to reuse the verified read and preserve the original heartbeat receipt.
Related to #8916, #8942, and #8266. Target
main.Author Declaration
29c312949b6cand the exact writer qualification in fix(codex): qualify native replay for 0.169.0-alpha.11.1 #8916._snapshotcheck and source plus Core App Server restartScope And Continuation
The independently testable change is the single writer qualification and its reference and regression coverage. #8942 owns reuse across multiple selected pages. The clean composition keeps the current receipt and reconstructs the same input from the surviving native history. C1 still needs installed App adoption and the matched single-session outcome and complete-cost comparison.
Validation
7b7797df89db20cadaa1cd0983440f76aab9c9c6finishedsynthetic,authorized_private_read_onlyreal_entrypointpassedregression_paritypasseddca761a9e5e0, the clean Git composition restored all 1,152 omitted literals and kept the current receipt. It reused 19 sections, reduced reader pages from 11 to 4 and tool-output bytes from 239,474 to 80,540 for this replay.unitpassedtests/control_plane/test_codex_context_resume.py, including the neighboring writer, failed outputs, changed identity, damaged history, compaction and rollback.staticpassedintegrationpassed29c312949b6cwith an exact-scope quality receipt, 6 direct checks, and 11 selected checks. The maintainability advisory reports the same two unreviewed findings on main and on the proposal.manualnot_runThe broad archived replay uses private inputs and the public focused tests reproduce the compatibility and fallback contract.
Frontend / Visual Evidence
UI impact
noneType of Change
LoopX Area
Direction and acceptance Controller/Executor Unified Contract, C1.
Shared-authority RFC fixture impact N/A.
Boundary Checklist