Skip to content

fix(chat): read native input text from canonical items - #7982

Merged
huangruiteng merged 1 commit into
mainfrom
codex/steward-native-input-readback-20261103
Nov 3, 2026
Merged

huangruiteng merged 1 commit into
mainfrom
codex/steward-native-input-readback-20261103

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

Actual Antigravity trajectory readback supplies the original text in one userInput.items entry. The result observer and read-only format review both required an additional userResponse field, so legitimate native results were refused. Our protocol fixture incorrectly supplied that redundant field and hid the mismatch.

Use one shared provider text decoder for both readers. It requires exactly one text item and rejects conflicting userResponse when present, ambiguous items and non-text input. All source/hash/time/execution/normal-terminal requirements remain. Native CLEARED history without normal final evidence still cannot be adopted; this change does not replay or declare those historical requests complete.

The default HTTP fixture now matches the observed items-only shape. Regression coverage includes both source prompt layouts, normal result adoption, original-queue read-only metadata review, restart cases and conflicting/extra input refusals. Same final fixtures expose the old rejection at the immutable base. Production service adoption remains a separate acceptance step; managed CI waiting is disabled.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
@huangruiteng
huangruiteng merged commit b9aa6f6 into main Nov 3, 2026
5 of 6 checks passed
@huangruiteng
huangruiteng deleted the codex/steward-native-input-readback-20261103 branch November 3, 2026 10:09

@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; reasoning_effort=max

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

动机 / Motivation

无阻塞发现。使用既有 Antigravity 私聊管家结果恢复及只读格式审阅的用户。真实原生记录只含单一 text item,结果读取和格式审阅却要求额外 userResponse,导致已有答案被拒绝、合法审阅也失败。两条原有读取路径都能核对真实单项文本,同时拒绝冗余字段冲突、多项输入和缺少正常终态的历史。不放宽终态或来源证明、不重放请求、不新增执行权限,也不把上游已清理的记录声明为完成。已被上游清理且缺少正常终态证明的历史仍未补回;生产安装采用与原消息闭环另行验收。

这个问题由真实已安装 provider 的只读观察暴露:完整输入就在 items 中,冗余字段不存在。此前合成夹具总是同时填充两处,掩盖了真实格式。只修结果读取后,扩展回归又复现原格式审阅的同一缺陷;因此需要同时修正两个真实调用者,而不是让用户重发业务。

改动思路 / Approach

把同一 provider 输入形状核验收敛到一个小读取器,两条真实调用路径共用它,继续由既有 Core 和原投递 owner 决定后续动作。

本 PR 仅纠正 native text item 的读取和冲突拒绝;原哈希、来源、执行身份、正常 final 与不确定副作用边界不变。

读取器只接受唯一字典项目且仅包含字符串 text;userResponse 缺失不再错误拒绝,存在时必须和实际 item 完全一致。它不执行 IO、不判断业务完成、不决定回传权限。原结果读取仍核对 source、完整原生覆盖、Core 输入 anchor/hash、时间、execution 与正常终态;只读审阅仍核对实际 full_prompt、一个 execution、全部 DONE 与正常 stop。这里没有把 CLEARED 当作 DONE,也没有补造已经消失的终态证明。

具体改动 / Changes

规范 docs/architecture/rfcs/app-conversation-and-async-inbox-v0.zh-CN.md,不可变修订 4f8014980938f864d254f40d7f3ffaa61949b9b7,本次未修改它。exact-original-input implemented:沿用确切原输入及来源;no-unknown-replay implemented:原副作用/receipt 和正常 final 边界保持;installed-acceptance out_of_scope:安装和原消息实际送达另验。

三个既有文件 +44/-9,其中生产 +17/-4,测试 +27/-5。没有新模块、CLI、schema 或持久状态。公共 provider fixture 默认改成实际观察到的 items-only 形状,避免只为测试保留虚构字段。

关键代码讲解

  1. _native_user_input_text 是 provider 内部的纯读取器:非对象、没有 item、多 item、非文本或冗余内容冲突都返回 None。它统一替换两处直接读取 userResponse 的假设,没有复制 Core eligibility。
  2. completed_result_observation 使用该读取器后,继续通过 manager_input_matches 和原哈希定位确切原请求。原生终态、相邻输入隔离、稳定轨迹和原有 result journal 结构均未改。已有 matching 冗余形状仍兼容,实际无冗余形状可达。
  3. _run_turn 的只读审阅完成段 同样使用该读取器比较 full_prompt。测试通过真实临时 Core、原队列和实际 HTTP protocol fixture,核验合法原 handoff 各提交一次;conflicting-input、response-only、extra-input 三类原审阅均不提交任何 handoff。撤权、错误目标/brief、其他动作、缺 stop、跨 execution 和崩溃恢复继续覆盖。

对主干的风险 / Risks

最强风险是信任冗余字段中的正确提示,忽略 items 中不同的实际输入,导致不相关动作获准。本修复反而把两个入口统一为实际唯一 item,同时保留冗余一致性检查。另一个风险是为补旧答案放宽正常完成要求;cleared-history 反例明确保留拒绝,真实已清理历史也没有被本机改写为完成。

PASS:最终精确源码 169 项受影响 native/原队列回归,263 项不相关用例未选;Ruff、diff hygiene、标准 premerge 的 6 个直接与 2 个选择检查通过,公共三文件和正文扫描干净。原 machine_section_projection 维护性告警在真实不可变基线与候选相同,保持 inherited advisory,无预算放宽。

同一最终夹具在正确 cwd/import 的实际 detached 基线上,两个 source 布局的 items-only 原生结果读取均失败;原队列合法审阅路径也因原结果不能采用而失败。候选对应观察通过。中间只修第一个读取者的实现虽有 143 项通过,扩展旅程仍有三项合法审阅失败;此失败已保留,随后收敛两处规则并新增三类冲突拒绝,最终 169 项才是本次资格。没有拿前一轮局部绿替代最终验证。

语义与 CI 对齐

本次复用已有 provider 输入和原结果语义,显式去除错误的冗余字段前提;没有改变普通执行准入、正常终态、模型权限、原受众或不确定投递责任。无 default-off 声明、提示词或通用义务变化。当前管理 Goal 禁用 CI 等待,本轮没有获取、查询、轮询或等待 CI;CQR 按当前策略禁用。

我的整体评价 / Verdict

long_horizon 改善在于两条已有恢复路径不再因实际 provider 缺少虚构冗余字段而停住;user_experience 改善在于合法原答案和受限格式审阅可以按原规则继续。源格式修复与共享读取器的比例适当,matching 旧形状继续支持,未知终态与冲突输入继续拒绝。原渲染器、正文和布局未变,视觉布局验收不适用。

把同一 provider 输入形状核验收敛到一个小读取器,两条真实调用路径共用它,继续由既有 Core 和原投递 owner 决定后续动作。本 PR 仅纠正 native text item 的读取和冲突拒绝;原哈希、来源、执行身份、正常 final 与不确定副作用边界不变。已被上游清理且缺少正常终态证明的历史仍未补回;生产安装采用与原消息闭环另行验收。尤其是已清理历史的保留文字不能代替正常 final 证明;本 PR 不把它们计作自动完成,也不通过重放来制造验收结果。

English verdict: APPROVE at eb6918d. Both existing native readers now validate the actual single-text input and reject conflicting or ambiguous data. Normal-terminal, source and uncertain-effect boundaries remain; production adoption and cleared-history closure remain separate.

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