Skip to content

Fix unfinished-work observation through the original native adapter - #8127

Merged
loopx-agent merged 1 commit into
mainfrom
codex/native-live-recovery-proof-20261105T143544921
Nov 5, 2026
Merged

loopx-agent merged 1 commit into
mainfrom
codex/native-live-recovery-proof-20261105T143544921

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

When an original workspace reply explicitly retains unfinished work, its recovery probe currently asks a new Codex app-server to list the original thread’s background terminals. Native app-server only exposes that inventory on the process which loaded the thread, so the probe cannot qualify a safe continuation even while the original adapter remains alive.

Use the existing original adapter for that live observation, with the same five-second control-read budget. Keep cold, dead and foreign adapters fenced; preserve source, grant, stop, queue, immutable-history and one-attempt checks. Recognize native image-view items as reads while retaining rejection of failed, declined, running and unknown effects. Remove the unusable cold completed-work observation route.

Validation:

  • The ownership-aware subprocess counterfactual fails on the base and passes on this head. The real File-backed Lark/Chat workflow covers one remaining write, original reply readback, reply-worker restart, source changes, cancellation, unknown effects, native-process loss and reservation recovery.
  • 34 focused cases pass on Python 3.14. The broader recovery run passed 166 cases and exposed an incomplete controller test double; adding its existing runtime-root field fixes that case. The follow-up routing/history suite passes 60 cases.
  • An isolated control-only check with the installed Codex binary confirms that the owning process can list its terminals and a separate client cannot. No model turns or real recipients were used.
  • The same 34 focused cases pass on Python 3.12. The exact-head quick premerge gate passes with no blocking failures or manual holds; its maintainability advisory remains disclosed.

This fixes live observation ownership. It does not certify arbitrary historical work after native-process loss, settle failed effects, or prove an installed user’s backlog is complete. Existing conversation feedback and readback are reused; no new settings, persistence or decision owner are introduced.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Reviewer: model_agent; model=gpt-6.1-sol; provider=OpenAI; runtime_reported; effort=max.

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

动机 / Motivation

通过原 Lark 私聊使用项目助手、等待未完请求自动补办的用户。旧路径即使原会话仍在线,也向另起的客户端询问后台任务,结果无法核验而一直保留待处理;新路径向原会话自己的活动进程读取清单,在来源和效果校验通过后只继续剩余工作。

本次受管文件与原路回复对照验证中,同一请求只追加一次剩余产物,最终正文返回原会话,重复检查不再次执行。本 PR 不证明任意历史操作已结清,不恢复失去原生进程的写执行,不代替安装后真实欠办逐条验收。原生进程已经丢失,或历史工具失败、效果未知的请求,仍需由原恢复负责人取得独立结清证据;本次不自动放行。

改动思路 / Approach

复用现有 Codex adapter 的读取能力和原 Core 准入规则;后台清单属于持有会话的进程,不属于临时读取客户端。本次仅修复活动原生会话的观察路径并覆盖其反例;不新增状态、队列、调度器、配置或决策 owner。保留原 Session、Turn、来源和接收者;只有已经存在的未完工作分支改用原活动 adapter。纯历史路由失败与只读复核继续使用原来的冷读取路径。把读取异常当成空清单会误放行;另行 resume 一份会话也不能证明原进程的效果,均不是可接受替代。

实际本机控制协议验证了进程所有权差异:原进程返回自己的后台清单,第二个客户端查询同一线程失败;没有启动模型 Turn。完整业务流程另由真实 File Chat/Core、HTTP 读回、进程级协议和合成 provider 验证,二者的证明范围分开。准入、来源/授权、停止、新输入和一次接续预算仍由原 typed owner 决定。

具体改动 / Changes

规范依据:docs/product/use-cases/steward/golden-queries.md,spec_revision 1b636dee161f5ec0039b2c0121ef7ff7060dcb72。GQ09 在本次属于 deferred 的累计验收:活动原会话的剩余执行与原路返回已实现;冷进程丢失、未知历史效果和实际安装欠办仍保留,不能把此局部结果当作整项完成。另核对原生消息连续性文档中“不确定效果先读回、不能证明就保留未知”的要求,未修改这些约束。

关键代码讲解

  • completed_work_observation 绑定已有活动线程和进程,复用原清单校验,不再启动另一份观察进程。缓存缺失、已退出或外国线程都得不到证明。
  • completed_work_readback 继续两次核对完整清单与最新完成 Turn,控制读取上限为原观察路径的五秒;原生 imageView 作为已知读取项接受,失败、拒绝、运行中与未知工具效果仍拒绝。
  • recover_failed_request 只在现有 work_attempt 分支选择原 adapter,观察之后重读来源、绑定和队列。实际派发前的 prepare_continuation_input 再核一次,防止预留后来了新输入。
  • 原 Lark/File 流程测试现在区分“回复 worker 重启”和“原生进程丢失”,不再让冷客户端无条件伪造后台清单。队列反例在 enqueue 前冻结派发,避免以启动速度碰运气。一个旧 controller 测试替身补齐既有 runtime-root 字段;生产构造逻辑没有因此改变。

对主干的风险 / Risks

最强反例是证明取得之后来了新用户输入,或缓存对象已指向另一个线程。现有来源重核与派发前校验保留;测试中旧接续停止,新请求仍能独立处理。冷/退出/外国 adapter、停止、撤权、编辑来源、后台任务、失败和未知效果都保持拒绝;缺失不是无效果证明。原 Turn、失败通知和已完成产物保持原样,重复访问不会再次写入或重新初始化原生会话。

PASS:同一进程所有权反例在基线失败,精确 head 的 34 个重点场景在 Python 3.14 和 3.12 通过;路由及历史后续套件 60 项通过。较宽回归先有 166 项通过和一项旧测试替身缺字段,修正替身后对应案例已经单独通过,原失败记录保留。PASS:精确 head 快速合并门 6 个直接检查与 2 个目录检查,没有阻塞失败、手工门或预算放宽。一项未改动 interaction_contract 的维护性告警仍作为非阻塞诊断保留;不宣称已修复。按 Goal 策略未查询 CI。

没有新增 opt-in/default-off 能力、提示、设置或状态。共享影响限定在原未完请求的 provider IO;历史元数据失败路径有独立回归覆盖。公开/私有差异扫描未发现凭据、私有原消息、运行态文件或个人路径。真实模型内容、安装后消息全量闭环及原生进程丢失后的历史效果结清均未在这里宣称通过。

我的整体评价 / Verdict

这是 justified_increment:已证明原活动会话能通过原队列完成一次剩余产物与原路回复;整个 GQ09 和真实历史欠办仍开放。long_horizon 与 user_experience 在本次已测活动会话路径上 improved:不需要用户再发一次“继续”,也不增加新的配置或确认轮次。视觉审查为 not_applicable:四个文件不改变页面或消息呈现;安装态、模型回答质量和冷进程历史恢复属于明确未验范围。

复用现有 Codex adapter 的读取能力和原 Core 准入规则;后台清单属于持有会话的进程,不属于临时读取客户端。本次仅修复活动原生会话的观察路径并覆盖其反例;不新增状态、队列、调度器、配置或决策 owner。使用现有原生类型与 typed 准入 owner;删除不可用的冷观察分支是本次有价值的收敛。未发现阻塞问题;允许在已有维护者授权及精确 head 合并资格满足后合并,审批结论本身不增加权限。

English verdict: APPROVE c51907c. The original live adapter now supplies the existing settled-effect proof; ownership and no-replay negatives pass. Cold or uncertain historical work and installed backlog acceptance remain explicitly unqualified.

@loopx-agent
loopx-agent merged commit cfca7ec into main Nov 5, 2026
14 of 35 checks passed
@loopx-agent
loopx-agent deleted the codex/native-live-recovery-proof-20261105T143544921 branch November 5, 2026 15:42
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.

1 participant