Skip to content

test(context): keep installed CLI through native worker preflight - #7259

Merged
loopx-agent merged 2 commits into
mainfrom
codex/context-installed-consumers-20261024
Oct 24, 2026
Merged

loopx-agent merged 2 commits into
mainfrom
codex/context-installed-consumers-20261024

Conversation

@loopx-agent

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

Copy link
Copy Markdown
Collaborator

When LOOPX_NATIVE_CONTEXT_CLI selected an installed console, the native benchmark fixture still started worker preflight with the source environment's CLI. Successful installed page reads could therefore mask an untested preflight binary.

Reuse the same explicit CLI for worker preflight, preserving the fault-injection wrapper and the source default. Check settlement commands in both immutable original captures to verify which CLI actually decided the work. The old routing rule fails this new oracle after otherwise successful delivery.

本次修正安装包验收中的路由缺口:benchmark 预检与后续读取使用同一显式安装版 CLI,并从原始决策捕获核验真实命令来源。默认源码路径、故障注入和产品行为保持原样。

Validation at 0dee46b4e31f611f6f79e10dad17cc456b2744f6, with the isolated Core wheel built from merged source 1746822a8c1155694f048121c9516b31837dfe71:

  • 6 passed using the real native Codex binary and deterministic loopback inference: benchmark worker and App code-mode, quota packet and Turn envelope, warm reuse/resume, compaction, lost hooks and checkpoint handoff. Seven installed Core module digests match that source.
  • 4 passed on Linux amd64 with the same isolated Core wheel, official matching native Codex CLI and source benchmark worker helper, covering both packet surfaces and held-checkpoint handoff. The container had network disabled except for loopback inference; all seven installed module digests match. This ran under CPU emulation on macOS, so duration is not a performance result.
  • 1 passed without the installed override, preserving the ordinary source benchmark path. Reverting only worker CLI selection makes the new route assertion fail as expected.
  • Seven installed CLI activation cases verify default-off, valid App configuration and rejection of missing, unsupported or contradictory declarations; rejection creates no admission, debit, native journal or capture. Failed-validation diagnostic events remain allowed.
  • Ruff, compile, diff hygiene, bilingual-diff validation and the changed-file public-boundary scan passed. Standard premerge direct checks passed; the strict quality result remains non-passing. Required repository mypy reports 5,238 errors on the merged source; it is not waived by this test-only proposal.

This qualifies isolated installed Core CLI composition with the source benchmark worker helper on macOS and inside a Linux container. Normal installed desktop activation, full benchmark runner staging/adoption, autonomous solver outcomes and complete cost benefits remain open. No new performance claim is made.

Scope/refactoring: the existing fixture and original-capture oracle suffice; no new helper, production protocol or configuration owner is 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 | gpt-6.1-sol | OpenAI | runtime_reported | reasoning_effort=max

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

动机

需要确认安装版 CLI 能完成真实 worker 预检与上下文恢复的维护者。原先后续页面读取可以使用安装版,但 benchmark worker 的最初决策仍由源码环境 CLI 生成,导致安装验证漏测预检。本次让预检沿用同一显式安装版 CLI,并从两份原始决策核验命令来源;旧路由能在其他交付断言通过后被新断言检出。本次是安装验证 fixture 的路由修正,不修改产品运行时,也不证明完整桌面激活、solver 研究收益或部署采用。

改动思路

让同一个显式 CLI 选择贯穿 worker 预检与后续读取,并保留故障注入 wrapper 的优先级。当前切片完整修复测试的 CLI 来源漏洞;使用已有真实入口和既有 fixture,不新增产品配置或测试框架。来源校验读取原始决策中的后续命令,不从“页面能读到”推断预检也用了安装版;两份 capture 保留冷启动和后续变化的独立来源。

具体改动

评审绑定 7259@0dee46b4e31f611f6f79e10dad17cc456b2744f6。Git 实际 merge-base 为 1746822a8c1155694f048121c9516b31837dfe71,目标仍是 main;完整差异仅测试文件 +8/-1,没有产品代码、配置或协议变化。规范依据完整原始工作上下文与来源合同:installed-preflight 与 original-capture-oracle 两项均已实现,源码默认和丢失 hook 的既有恢复仍保留。

关键内容讲解

对主干的风险

独立使用真实 Codex 0.163.0-alpha.11.1、当前已安装 CLI 与源码 worker helper,确定性 loopback provider 的 6项通过,覆盖两种 packet、benchmark/code mode 和 missing/killed hook;未提供安装 override 的源码默认另有 1项通过。受控内存反例只还原旧 worker 选择,其他代码保持当前版本:完整交付成功后,新断言在第507行准确失败,证明它能捕获原漏洞。该反例不是当前提交失败,也未修改 tracked 文件。

Ruff 和标准预合并5项直接检查通过、无人工门。严格 mypy 在不可变基线和当前均为 5,238条错误/614文件,同一解释器和环境比较没有新增或移除的错误诊断;生产树及其17个配置检查入口均未变化。这是独立归因的原有失败,保留为严格质量/合并资格限制,未标绿,也未要求本 PR 修复无关旧错误。未查询或等待 CI。

我的整体评价

APPROVE,以 author-owned COMMENTED 记录。已有26-case fixture 的扫描与本次旧路由反例证实是有价值的来源盲区修复;只扩展现有测试,无重复 smoke、额外 helper 或贡献限制依据。它改善长期运行证据的可信度,操作者收益在安装验证层面成立;正常桌面激活、完整 benchmark runner、真实研究采用和完整成本仍未验收。严格 mypy 的既有失败和任何当前合并门分别保留;批准不授权合并。

English verdict: APPROVE — 7259@0dee46b4e31f611f6f79e10dad17cc456b2744f6. Six installed native cases and the source default pass; reverting only worker selection makes the new original-capture oracle fail after otherwise successful delivery. The unchanged5238-error mypy baseline remains a separate strict-quality hold; packaged adoption and solver benefit are unqualified.

@loopx-agent
loopx-agent merged commit 50c5607 into main Oct 24, 2026
3 of 5 checks passed
@loopx-agent
loopx-agent deleted the codex/context-installed-consumers-20261024 branch October 24, 2026 15:36
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