Skip to content

Keep context test readers compatible with selected first pages - #8173

Merged
huangruiteng merged 2 commits into
mainfrom
codex/context-selection-test-oracles-20261106
Nov 6, 2026
Merged

huangruiteng merged 2 commits into
mainfrom
codex/context-selection-test-oracles-20261106

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

渐进首读现在返回选中字段及其独立导航引用,部分端到端测试仍把它当作完整上下文。更新测试读取助手,让这些测试沿现有引用检查完整源,同时保持“选中页 EOF 不代表完整上下文保留”的边界。

保留失败命令、摘要损坏和符号链接拒绝检查;增加关闭传输时完整验收来源仍可读取的 CLI 回归。原生 benchmark 测试先明确读取 Todo 候选,再执行选择,并按字段语义读取完整父对象中的值。只修改测试及其助手,不修改运行时或读取权限。

验证:在当前 main 基线上,test_context_read_reference.py、test_replan_staged_read.py 和 test_quota_acceptance_references.py 共 131 项通过;另用真实 Codex CLI、隔离配置及本机静态推理服务验证 benchmark 渐进读取/选择/续接场景,1 项通过。git diff --check 通过。完整 CI 与独立评审仍待执行。

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
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 · reasoning_effort=max

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

动机 / Motivation

维护原生上下文测试的开发者会在 should-run 和 saved preflight 的读取回归中遇到这个问题。旧测试把选读首屏当成完整导航,访问 mode 时失败;修复后先沿 navigation 读取完整源,再验证原始要求与字节覆盖。可观察结果是原有四个读取失败消失,关闭 context delivery 时仍保留完整验收要求,选读 EOF 仍不冒充完整读取。范围限于测试读取兼容和回归覆盖,不改变运行时准入、权限、配额、源文件或模型保留声明。

改动思路 / Approach

复用现有 checkpoint fixture,把 selection page 与 navigation 分清,再沿原 command/next_command 取得完整当前源。NativeContextReader.follow 仍在 delivered_context 验证连续字节与 SHA 后才登记 retained baseline;测试读取完整源只是独立 oracle,不代表模型已经理解或保留了全部内容。相比删除旧断言或每个测试另写解析器,这个边界更小,也保留了完整来源与失败语义。

具体改动 / Changes

关键内容讲解

验收依据:docs/reference/required-work-context.md,固定修订 f87d9976baab054e5baee5b0d56538ca3812b39e。文档没有正式 criterion 编号,以下用原文位置定位:required-work-context.md:252(选读 EOF 不证明完整交付)和 required-work-context.md:619(off 保留完整路径)均 implemented。四文件 +82/-6,全为测试;既有 progressive 用例与本次 inline/off 用例保护不同的实际入口状态,保留两者有独立价值。

对主干的风险 / Risks

未发现阻塞问题。最强风险是适配首屏时顺便削弱完整源 oracle;本次完整字节、digest、失败命令及 symlink 拒绝路径均保留。相同命令在 immutable base 为 107 PASS / 4 FAIL / 11 SKIP,四次 FAIL 都是 selected page 上读取旧 mode;head 为 113 PASS / 11 SKIP。另显式执行真实 Codex CLI、隔离配置与静态 loopback Responses 的 benchmark_progressive 测试,1 PASS;这是测试夹具,不是远端模型或正式 benchmark。其余十个 opt-in host 用例未执行,不声称完整 Host 资格。

本地 loopx canary premerge --from-git-diff --git-diff-base f87d9976baab054e5baee5b0d56538ca3812b39e PASS:5 个 direct checks、6 个 catalog checks,无 manual hold。未查询或等待 CI。未新增生产状态、版本分支或权限;共享 helper 的小幅归一已足够,无需额外重构。

我的整体评价 / Verdict

APPROVE,仅针对 bde3444a5f49022426bb6034234be90346a1107d,没有 blocking finding。long_horizon=preserved:完整源、原 Turn 身份和无额外扣账边界保持;user_experience=preserved:开发者使用原测试入口,无新增产品交互。visual_review=not_applicable:四个测试文件不改变渲染页面,展示未验证范围为 none。剩余限制是未运行的其他 native host 参数及模型理解/完整成本,不能由此声称长程收益已证明。此结论不授予 merge 权限。

English verdict: APPROVE bde3444; the test readers preserve the full-source oracle while accepting selected first pages.

@huangruiteng
huangruiteng merged commit 93e3bc4 into main Nov 6, 2026
19 of 24 checks passed
@huangruiteng
huangruiteng deleted the codex/context-selection-test-oracles-20261106 branch November 6, 2026 09:11
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