Repository navigation
test(context): keep installed CLI through native worker preflight - #7259
Conversation
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
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 的既有恢复仍保留。
关键内容讲解
test_native_cli_capture_delta_and_compact_recovery的 worker 选择:优先故障 wrapper,其次显式安装 CLI,最后源码解释器旁的 CLI;修复此前后两段使用不同来源的问题。- 原始 capture 来源断言:在完整交付、compact 恢复、字节摘要及原始 capture 不变检查之后,核对两次决策所有结算命令的可执行文件。这是来源边界断言,未冻结临时正文或偶然字段顺序。
对主干的风险
独立使用真实 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.
When
LOOPX_NATIVE_CONTEXT_CLIselected 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 source1746822a8c1155694f048121c9516b31837dfe71: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.