Repository navigation
Preserve the steward’s Codex checkpoint across isolated answer review - #8269
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 | OpenAI | self_reported
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机 / Motivation
管家进入隔离答复复核后,旧路径会在下一条普通消息到来时重建工作线程并导入全部可见历史。原线程已有的压缩检查点没有跟过去,历史越长,重新导入的代价越高。
Owner of an existing Feishu steward conversation after an isolated recovery review. After the isolated review, the next ordinary original source would start a replacement thread with all visible history. All five cases pass. Live and cold return fork once, empty suffix resumes, configuration drift and unknown injection send no model Turn. An actual Codex native thread fork inherited one compaction checkpoint and its dynamic tool. Only one verified assistant suffix was added. No additional compactions. Cold resume retained both and the parent bytes matched. Bound Codex steward with verified live writable adapter on entry, same source, workspace, native account/provider and manager policy on return. Restart after parking is covered. Existing unknown, legacy and changed-policy paths retain their recovery rules.
改动思路 / Approach
复核仍由隔离线程执行。进入复核前记录已核验的工作线程,回到相同授权范围时直接续接。没有新增答复就原生恢复。有新增答复就原生 fork,然后只补入已核验的答复。原生服务保存检查点,Core 保存绑定和原请求证据。 原基线 RFC
Scope checked for this review. Use original native checkpoint and owner boundaries. Bound Codex steward with verified live writable adapter on entry, same source, workspace, native account/provider and manager policy on return. Restart after parking is covered. Existing unknown, legacy and changed-policy paths retain their recovery rules.
具体改动 / Changes
- Core 在原工作 adapter 空闲且来源、账号路由和权限匹配时保存原生身份。下一条普通请求走同一入口。 运行时
- 后缀只从已完成的复核 Turn 读取。它核对原对话前缀和答复正文,跳过原用户请求的副本。 后缀校验
- 原生 fork 校验父线程、provider、工作目录、审批与沙箱。会话存储在同一次绑定更新中发布对应身份。 原生验证 存储约束
无新增答复时只恢复工作父线程,不启动分支。旧绑定只在准备完成后更新,已有原答复和旧工作产物可以继续读回。
| 基线 RFC 条款 | 结论 | 验证 |
|---|---|---|
| Isolated answer review | implemented | 独立复核不导入全量历史 |
| Guarded native history restore | implemented | 来源、配置和原生结果都通过校验才派发 |
| History and failure retention | implemented | 原线程和原失败留存,子线程只衔接一次 |
对主干的风险 / Risks
重点风险是用错原线程或在注入结果未知时继续发起模型请求。原消息用例覆盖正常、重启、空后缀、配置变化和注入中断。主干的五个相同用例均停在工作身份缺失,本提交全部通过。实机 Codex 合成模型试验读到一个继承的压缩检查点、一个新增答复和原动态工具,重启后仍可读。6 项直接检查、14 项合并前用例和 1093 项相邻回归通过。三处行数上限只调整到实测值。 回归测试
我的整体评价 / Verdict
批准当前提交。它把隔离复核和工作上下文分开保存,并从原生线程续接。尚无可核验工作身份的旧会话和跨授权迁移沿用原有路径。部署后仍需通过原会话验收真实的复核返回。
English verdict: APPROVE 11ce5a5. Verified exact-scope original queue and native checkpoint continuation, including cold return and fail-closed preparation. Production adoption is separate.
Goal and delivered outcome
A Codex steward can leave its writable thread to review a failed answer in isolation. Previously, the first subsequent working Turn started a new native thread and imported the visible transcript. The import could compact history the original thread had already compacted.
The steward now keeps the verified working thread on entry to review. On return under the same source and runtime policy, it resumes the thread when there are no new answers. Otherwise it forks the native thread and adds only the verified review answers. The original thread stays intact. This proposal targets
main.Author declaration
Written by Codex using an OpenAI GPT-6 family model. Implemented against the accepted conversation and async inbox RFC at
81ad11a92863a4a43b00d046a9351c425d2762a8.Scope and continuation
This covers bound Codex steward Sessions with a verified live working adapter on entry to isolated answer review, including restart after the checkpoint is parked. Legacy Sessions without that evidence and deliberate executor or policy migration retain their current migration path. The same private message queue and permissions own admission. Production adoption and natural source acceptance are tracked separately from this proposal.
Validation
pytest -q tests/test_steward_interrupted_answer.py -k checkpointNo UI change. Validation uses synthetic input. The actual Codex probe exercises the adapter and app-server protocol with a local fixture model.
Type of change