Skip to content

fix(chat): defer historical native probes during active work - #7933

Merged
loopx-agent merged 1 commit into
mainfrom
codex/steward-active-readback-20261103
Nov 2, 2026
Merged

loopx-agent merged 1 commit into
mainfrom
codex/steward-active-readback-20261103

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

A historical native result can only be adopted from a stable idle trajectory. Discovery nevertheless selected those reads while another Turn in the same Session was active, using the shared reply workers needed for current progress.

Defer that historical discovery while the Session is busy or has an active Turn. Keep the existing verified-result metadata correlation path before the new check, preserve all pending failure and delivery records, and keep idle adoption available. This adds no queue, consumer, model input or retry budget.

Validation: 25 targeted native result/metadata/original-reply tests, 46 typed owner tests, TypeScript typecheck, Ruff and standard premerge passed. The same actual admission/Core/synthetic native HTTP/provider test fails the immutable f76e839 baseline, then shows current progress within two seconds while historical native IO is forbidden. Native endpoint and Lark are synthetic in the regression; live adoption and return readback remain separate. Both RFC mirrors describe the existing idle requirement at discovery.

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 · OpenAI · self_reported

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

动机 / Motivation

历史原生结果需要稳定空闲轨迹,但发现阶段仍在同一 Session 执行新工作时选择历史读回,占用当前进度共用的回复 worker。 受影响者:同一原私聊中等待当前任务进度的本人。当前 Session 忙碌或有活跃 Turn 时,历史原生结果不进入读回;当前原消息继续展示进度,空闲后的恢复与已核验元数据关联修复保留。 不启动第二消费者,不中断原生任务,不派发或重放业务。 尚未用安装后的长期真实任务重新测量进度延迟;回归使用实际 Core 与发送路径、合成原生 HTTP 和飞书端点,不证明历史业务全部完成。

改动思路 / Approach

稳定空闲本来就是原生结果采用的必要条件,应由既有 typed 会话恢复 owner 在昂贵 provider IO 之前判断;不另建调度或状态。 本 PR 仅前移当前 Session 的空闲检查,保留已核验结果的元数据关联 owner、原失败、原回执和原消息投递路径。 依据变更前 RFC 已要求“稳定、空闲的轨迹”并明确“不准入另一个 Turn”;这里把必要条件前移,不以新写的规范反证实现。

具体改动 / Changes

  • typed native result 分支:保留已核验元数据的既有关联路径,然后在产生历史候选前检查同一 canonical Session 的活跃 Turn 与 ready 状态;忙碌时保持失败与欠回,不进入历史 provider IO。
  • 原发送路径回归:先形成可恢复的原生答复/Core 失败,再真正提交第二条原私聊输入;当前任务仍活跃时禁止旧轨迹读回,并在两秒内核验当前原消息进度。原生输入恰为两条,不另建队列或消费者。
  • typed 反例覆盖 ready 但有活跃 Turn、busy 但无活跃 Turn,以及正常空闲路径。双语 RFC 只披露这一发现时机;不改变来源、最终读回、原生执行或既有重试预算。

对主干的风险 / Risks

最强风险是过度限制已核验结果的元数据关联,因此该分支继续在新检查之前执行,并独立运行了 16 项真实原队列元数据回归。另有 9 项原生结果/当前进度回归、46 项 typed owner 测试、类型检查、Ruff 与标准 premerge 通过。相同最终 fixture 在不可变 f76e839 上因仍选择忙碌 Session 的历史候选而失败,在最终 head 上通过;早期 fixture 的设置失败单独保留,未冒充根因反例。历史请求仍为欠回,空闲路径和丢失回执保护保留,回滚只撤销此条件,不修改历史状态。按 wait_for_ci=false 未查询、轮询或等待 CI。

我的整体评价 / Verdict

这是 justified_increment:用现有 canonical 状态落实既有必要条件,减少当前回复与无资格历史读回的竞争,没有配置、状态或操作权限增长。稳定空闲本来就是原生结果采用的必要条件,应由既有 typed 会话恢复 owner 在昂贵 provider IO 之前判断;不另建调度或状态。 本 PR 仅前移当前 Session 的空闲检查,保留已核验结果的元数据关联 owner、原失败、原回执和原消息投递路径。 安装后仍须独立检查真实原消息;测试证明发送路径与延迟边界,不证明真实模型理解或全部业务完成。

English verdict: APPROVE — defer ineligible historical native reads while current original work is active, preserving idle adoption and verified metadata correlation.

@loopx-agent
loopx-agent merged commit f941b59 into main Nov 2, 2026
9 of 10 checks passed
@loopx-agent
loopx-agent deleted the codex/steward-active-readback-20261103 branch November 2, 2026 19:44
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