Skip to content

fix(chat): continue proven pre-execution host failures once - #6911

Merged
loopx-agent merged 1 commit into
mainfrom
codex/bot-pre-effect-host-recovery-20261020
Oct 19, 2026
Merged

loopx-agent merged 1 commit into
mainfrom
codex/bot-pre-effect-host-recovery-20261020

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

A private steward request can fail before execution with a native host_gate / other error even when its context format is current. The existing scanner previously excluded this request, so delivery of its error notice left the work stranded.

Reuse the original scanner, typed admission owner and same Session queue for one deterministic continuation per request/context version. The complete, stable native inventory must contain exactly the original user input; current App/owner/grant and unchanged source are rechecked. Resume the existing thread, preserve the original failure and notice, and return the actual outcome. A failed continuation is surfaced and retained, without another replay. Policy/usage denials, tools, answers, corrections, unknown effects, native Goal/attached execution and revoked sources remain held. Error-message prose does not grant eligibility.

Validation: 396 relevant source tests pass. The immutable baseline fails the three new positive assertions while preserving two negative cases. Installed-wheel qualification passes 105 selected cases with production Python/TypeScript byte provenance; all 6 direct and 11 selected exact-head premerge checks pass; live autonomous continuation is a separate post-install acceptance step. No new consumer, scheduler, permission, business-completion condition or operator command is added. Both existing RFC mirrors document the bounded change.

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; gpt-6.1-sol; OpenAI; runtime_reported; effort=max; active_turn_verified=false

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

动机

受影响的是私聊管家用户:宿主在开始执行前失败,即使上下文已经更新,原请求仍会停在错误通知后。例如一次工作区路由发现超时,原生清单中只有用户输入。旧扫描器只接续旧格式失败,用户需要再次催办;新路径核验当前权限、原消息和未执行凭证后,在同一会话中自动续办一次。已安装包的原扫描器测试证明:成功时原消息收到实际结果;持续失败时回传新失败,反复扫描不产生第三次执行。本 PR 不修宿主的路由服务,不把错误通知当完成,不处理已有工具、答复、纠正或未知效果的失败,也不引入消费者、调度或权限。真实 provider 是否已经恢复以及真实业务最终结果,需要安装后由原 Bot 执行与独立读回;合成成功不能代替它们。错误通知成功送达只证明传输,不证明原请求已完成;让用户重新描述同一项工作也没有解决默认执行路径。

改动思路

原生读取器只提供完整、稳定的未执行事实,是否接续仍由现有 typed 准入拥有者结合当前权限决定。本 PR 的边界是当前格式的 host_gate/other 未执行失败:沿原线程和原队列续办一次,持续失败就停止;原上下文迁移路径继续保留。先让原扫描器发现候选,再在原请求锁和来源 fence 内核验当前 App、本人、grant、原消息及完整原生凭证,最后才由原队列接续。失败原 Turn 不会重新打开,已有失败通知也不能被当成新的进展草稿。

最强反对理由是:other 是通用错误,不能证明宿主现在健康,额外一次调用仍可能失败或消耗资源。因此这里依靠完整、稳定的原生条目清单确认未执行,并复用原来的一次性预留;不是根据“timeout”之类错误文案判断许可。持续失败时保留并回报实际失败,不继续重试。已知策略/额度拒绝、工具、答复、追加纠正、未知条目和失效来源仍拒绝。

具体改动

规范依据是 docs/architecture/rfcs/app-conversation-and-async-inbox-v0.md,修订 2b466f63f33ad7951d88645d4af596fb18db847e。existing-worker 保留原会话队列与回传拥有者;verified-no-effects 保留当前权限、来源与完整原生未执行核验;immutable-original-result 保留原失败和确定性预留。旧规范原先只覆盖迁移,这次明确增加当前格式宿主失败的有界条件,不能把更新后的文档当作旧版已经要求此行为的证明。

关键代码讲解

  1. failed_request_readback 可观察原生 other,但仍完整分页读取终态与条目,再次读取确认稳定;只有确切原用户条目才能形成凭证。它只读取原生元数据,不创建、恢复或启动模型。
  2. planContextRecovery 对当前格式 host_gate 包含当前原生线程,再同时要求错误 other、确切失败 Turn、原用户唯一条目及来源已核验。旧迁移路径仍使用原来的来源与错误条件,普通当前格式的上下文超限没有被顺带放开。
  3. 原有 recover_failed_request 的当前权限核验、请求锁、来源 fence、确定性 client id 和原队列继续拥有全部效果。新增四种安装包场景覆盖成功、存在原生执行条目、策略拒绝和持续失败:成功实际回到原 provider,持续失败只有两次总启动,没有第三次;旧失败字节和通知保留,也不重新注入历史。

六文件81增/11删,生产变更集中在两个已有拥有者,主体增量为测试和双语说明。没有新状态、请求版本、服务、CLI 或需要维护者手工同步的恢复表。完整来源与旧已完成结果仍作为数据供原 Bot 判断,不能拿来追加权限或推断新业务完成。

对主干的风险

最重要的风险仍是原生 SDK 的条目清单是否完整、终态是否稳定,以及通用错误是否持续存在。未知条目、工具、答复、纠正和变化的终态均拒绝;真正受理仍须重新检查权限和原消息。单次重试只是有界补救,不是对宿主路由服务的修复或可用性承诺。

396项相关源测试通过,105项安装包选择检查通过,关键 Python/TypeScript 字节与精确源一致;当前提交6项直接和11项选中 premerge 检查全通过,Ruff通过。不可变基线执行相同新增断言,三个正例失败、两个负例保持通过,确认原缺口与保护条件。首轮装包因旧 frontend 产物与源码摘要不符而失败;按现有构建命令重建后,同一包校验和测试通过,没有跳过摘要或放宽标准。原失败日志保留。

语义与 CI 对齐

仅复用现有 native/Core 错误枚举、上下文版本和候选/可执行区别,不按错误文本匹配状态。默认范围从迁移扩到当前宿主的已证实未执行失败,已在两份 RFC 和 PR 说明中披露。按当前矩阵不查询或等待 GitHub CI。真实 provider、模型和业务结果仍需要独立线上核验,未用测试代理提供的成功冒充实际采用。

我的整体评价

未发现阻塞项,结论 APPROVE,范围 879df0b63d1a424417045df8f915c7abf544cc11。长期执行(long_horizon)的改善是未执行的失败原请求能够继续进入原队列,同时持续失败没有无限放大;用户体验(user_experience)的改善是已有意图与授权可以零额外确认续办,并在原消息看到实际结果。这个增量直接作用于既有默认路径,保留一次尝试成本和 provider 仍可能失败的边界;完整 Bot 稳定性和其他业务未完成事项不在本 PR 的完成声明中。

English verdict: APPROVE for 879df0b63d1a424417045df8f915c7abf544cc11. The existing native reader proves a complete stable user-only failure; the typed owner admits one current-format host continuation under fresh authority and source checks. Persistent failure stops after that attempt. Package and baseline counterexamples support the bounded change; real provider recovery and original business outcomes remain post-install acceptance.

@loopx-agent
loopx-agent merged commit 04d6415 into main Oct 19, 2026
14 of 36 checks passed
@loopx-agent
loopx-agent deleted the codex/bot-pre-effect-host-recovery-20261020 branch October 19, 2026 19:10
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