Skip to content

Recover Steward steering receipts after Chat restart - #9200

Open
huangruiteng wants to merge 2 commits into
mainfrom
codex/steward-cold-receipt-20261121
Open

huangruiteng wants to merge 2 commits into
mainfrom
codex/steward-cold-receipt-20261121

Conversation

@huangruiteng

@huangruiteng huangruiteng commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Goal And Delivered Outcome

A private Steward correction can reach the original Codex Turn before its acknowledgement is lost. After Chat restarts, retrying the held queue operation now reads the original managed Codex store and settles the existing receipt when the complete native inventory confirms the same Turn, client message ID, and text. Missing or contradictory evidence leaves the original reservation pending.

This follows the private Steward steering delivery in #9185 and targets main.

Author Declaration

  • Written by: model_agent · GPT-6 · OpenAI

Implemented against

Turn-bound steering A23

Criterion Disposition Owner Validation
Preserve the requested Session, Turn, text, and ingress identity during a retry implemented Existing typed steering readback and the Codex adapter Restart with the original process stopped and repeat the same HTTP operation
Confirm delivery from the selected Host implemented Persisted native item readback and existing transcript and queue settlement Accept the exact item; retain pending on missing evidence, different text, or a different native profile

The existing retry control now receives the same delivered receipt from a freshly started Chat backend. The cold reader shares the existing stdio client lifecycle for persisted native work.

Scope And Continuation

This change covers retries against the original managed Codex store and the existing private Steward queue admission. The packaged Composer continues to use its existing recovery control. Installed Desktop, live Feishu, and further model adoption evidence are separate end-to-end qualifications.

Validation

  • Tested revision: c1cde62c153cec6a495ae2000e01bc1c396a0587
  • Run state: finished
  • Input classes: synthetic
Check kind Result Public-safe evidence
regression_parity passed The original qualification run left the replay unresolved on the baseline when the exact item was available after restart. The candidate confirms it and preserves the reservation for missing items, different text, and a different profile.
real_entrypoint passed The isolated wheel and Codex app-server 0.171.0-alpha.13 returned HTTP 409 after simulated acknowledgement loss, then HTTP 200 in a fresh Chat process after the original native process stopped. Recovery issued only initialize and thread/items/list. The entire run contained one native Turn start and one steering call. Inference used a local fixture.
integration passed Three focused Python steering/recovery tests, nine typed steering tests, and the packaged composer-session-admission browser scenario passed. The browser scenario uses synthetic service responses for Composer recovery and queue behavior.
static passed Ruff and the standard premerge checks passed on the exact diff, including the change-quality receipt.
manual not_run Installed Desktop and live Feishu qualification.

Validation against current main

The candidate now includes main at a6ffb3be6e7bdb48e02311ec58d618200fe0501c. The PR still changes the same three files. All six failing hosted browser jobs stopped on the same execution-observation assertion. The old target and the corresponding PR merge tree both reproduced that failure locally. The same check passes on the updated candidate, which includes the existing fix. Release job · Chat browser job · Main fix #9210

The new wheel passed the isolated Codex app-server recovery check and the packaged Composer scenario. After the original native process exited, recovery returned HTTP 200 following the simulated lost acknowledgement and initial HTTP 409. The original Turn had one start and one steer, and the repeated request returned the same receipt. Three focused Python tests, nine typed steering tests, Ruff, standard premerge and the change-quality receipt passed. The prior baseline reproduction is recorded above.

Hosted checks and independent review are required for this commit. Installed Desktop and live Feishu remain separate qualifications.

Windows fixture dependency

The head-specific Windows PowerShell job failed on four captured research fixtures. The shared fixture used a socket selector on an anonymous subprocess pipe and raised WinError 10038. The fixture has identical contents on the tested base, the PR head, and main at b4e1ded.

On macOS, restricting the selector to socket behavior reproduced the four hosted failures on this exact head. Combining it with the shared fixture proposal in #9218 passed 20 tests under the same restriction. These covered the research fixtures, portable pipe behavior, and the original-turn and cold-restart steering paths. The combination was tested locally. The shared fix still requires review and hosted Windows qualification.

The independent review of c1cde62 approved the existing head. The Windows job remains failed for that head.

Frontend / Visual Evidence

  • UI impact: none
  • Source data: synthetic
  • Packaged Composer evidence is recorded in Validation. This patch uses the existing retry and result states.

Type of Change

  • Bug fix
  • Test update

LoopX Area

  • Host or runtime integration

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh

动机 / Motivation

私有 Steward 操作者用已有重试动作确认一次已提交通道的纠偏。 原 live adapter 消失后,既有回执无法通过重试回到已交付。 用户在原 Codex Turn 接收纠偏后丢失 ACK。重新启动 Chat 并核查同一队列项时,当前主干一直保持交付未决,本提案只在原受管 store 的完整列表含有同一 Turn、输入 ID 和原文时交付一次。 同一入站身份由原队列回执延续,冷启动只读原生库存,同一个回执继续承载最终结果。 独立使用源码 HTTP 队列和合成 stdio;作者另录真实 app-server 跨进程运行。已安装 Desktop、实时飞书以及模型采纳未在本轮复验。

改动思路 / Approach

Python 原生适配器打开短命的只读 Codex 观察者。现有 TypeScript effect 判定匹配,现有 queue settlement 负责写回。 冷读限原受管 Codex store,重读当前 Session 核对绑定,沿用原先的权限与确证阈值。 复用已有持久化线程观察者和全量读取。仅扩展已保留输入的恢复入口,避免启动新的 Turn 或恢复原进程。

具体改动 / Changes

准确头 c1cde62,merge base a6ffb3b,3 个文件,+162/-24。将三个文件的准确头与 a6ffb3b 比较。b4e1ded37d4ecf1d43b788cf9d870d3e1020d3ab 已合入新提交,merge-tree 无冲突,原反例在该主干及其整合树上分别重跑。 按修订 1be3f3d 的现有规范核对各项要求。 目标规范

  • exact-turn-ingress · Keep the original Session, Turn, input and ingress across retries.
  • same-store-delivery · Only complete matching evidence from the original managed store may settle.
  • single-settlement · Preserve one transcript event, original queue result and replay identity.

关键代码讲解

对主干的风险 / Risks

独立运行 5 项 Python steering 测试、41 项队列 HTTP 测试、9 项 TypeScript 状态测试和源码 quick premerge。丢回执用例关闭旧 native 进程再创建 ChatRuntime,在相同仓库脚本驱动的隔离 stdio 下读回原 Turn,重复调用得到同一条 delivered 回执。总计一次 Turn start、一次 steer 和一条 turn.steered 事件。 缺少持久化输入、文本不符或换到另一 Codex store 时,原队列预留保持 pending,FIFO 无法领取。复用同一丢回执断言,当前主干在返回原 store 后仍报 live_steering_delivery_unresolved,干净合并树通过。 精确源码和干净整合树上的冷读通过;同一冷读证明在未改主干失败。选择未改 UI 的既有 HTTP 路由覆盖回执与失败行为。 独立冷读验证使用合成 native 对端。真实推理中的纠偏消费与后续工作仍需分别观察。

我的整体评价 / Verdict

批准。当前准确头满足一次交付、同 Turn 和同 ingress 的 A23 要求。恢复结果继续由原队列动作读回。无证据时的保留行为有回归覆盖,后续真实推理中的纠偏采纳仍可按原生消费和实际工作结果单独验证。

English verdict: APPROVE at c1cde62. Approve this exact head. The cold read settles the original reservation only on matching complete evidence. The same restart witness fails on current main and passes on the clean merge tree. Wrong or missing evidence leaves the reservation intact.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants