Skip to content

fix(release): stabilize qualification on configured hosts - #5019

Merged
huangruiteng merged 1 commit into
mainfrom
codex/release-isolate-operator-provider
Sep 24, 2026
Merged

huangruiteng merged 1 commit into
mainfrom
codex/release-isolate-operator-provider

Conversation

@huangruiteng

Copy link
Copy Markdown
Collaborator

Problem and result

On a configured machine, Turn-host default tests could inherit the persisted operator provider and fail despite clearing environment variables. In the native release qualification shell, a command timeout could signal the same process group twice; the second signal could raise a permission error and abort the actual-model gate. The tests now use an isolated machine store, and timeout cleanup sends one group kill while normal command cleanup remains supervised.

Validation

  • 26 Turn-host and machine-credential tests passed.
  • 16 required-vision shell tests passed, including a real sandbox timeout and OS-boundary negative cases.
  • Ruff, mypy, diff check, and the public boundary scan passed.
  • Risk-based premerge: 10/10 selected checks passed; no failure or manual hold.
  • Change-quality receipt: cqr_0ff91a657d72d1a50dd6, valid for this exact diff.

The change is limited to the release qualification shell and deterministic test setup. It does not change operator credential precedence or the production Turn host default. The related future-facing pass kept the existing shell supervisor and provider-store fixture pattern; no broader abstraction was needed.

Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>

@huangruiteng huangruiteng 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.

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

动机

v1.2.0 的真实提交验收暴露两个可复现的资格验证问题:已配置机器凭证会污染只清理环境变量的默认执行器测试;隔离 shell 超时后重复向同一进程组发送 SIGKILL,会把一次受控超时升级成未处理的权限异常。这个 PR 交付的是可独立回滚的验收稳定性修复;版本发布仍取决于最终 main 提交的全套门槛。

改动思路

CLI 默认执行器仍由现有机器级 operator provider 决定,测试只把该 provider 的默认存储根隔离到临时目录,因此没有改变产品的凭证优先级。真实模型验收继续使用原有的 VisionShellHost:超时分支成功清理进程组后记录本次已清理,finally 只负责尚未清理的路径。对正常结束的命令,原有的后代进程清理仍保留;没有新增第二套进程管理器或放宽 shell 沙箱权限。

具体改动

关键代码讲解

  • tests/test_turn_default_host_binding.py:22 的 isolated_machine_credential_store 为本模块测试设置临时机器配置根。正例仍验证显式 DSH 凭证选择 DSH,反例能在真实机器已保存凭证时验证无凭证默认 Codex CLI;另一个机器凭证测试文件继续覆盖产品实际的跨 Goal 共享规则。
  • loopx/control_plane/testing/vision_shell_host.py:119 的 VisionShellHost.execute 保持 120 秒命令预算和独立进程组。超时时第一次 SIGKILL 成功后设定本地 group_killed,随后等待退出并返回 124;finally 不再重复杀已清理的组,同时保留正常完成路径的后代清理和 _active 关闭。
  • tests/control_plane/test_required_vision_closeout_behavior.py:202 通过真实 OS 沙箱运行超时命令,并让第二次进程组清理直接失败,证明超时只发送一次信号。原有同文件测试继续验证只读输入、私有数据和网络边界,整文件 16 项通过。

对主干的风险

主要反例是减少一次 SIGKILL 后可能遗留后代进程。代码仅在超时分支第一次组清理已成功时跳过第二次;正常退出和异常路径仍走 finally 清理,CLI 桥接器也在命令结束时关闭活动窗口。真实沙箱超时测试验证返回 124 与单次组信号,整份 shell 测试验证拒绝越权读取和写入。机器配置只在 pytest 夹具中替换,不触碰生产读取逻辑。已通过 26 项 host/凭证测试、16 项 shell 测试、Ruff、mypy、公开边界扫描与 10/10 项 premerge;最终 release 的完整 pytest、全公开 smoke、真实模型和安装产物仍需在合并后的精确 main 上重新验收。Linux bubblewrap 路径未在本机实际运行,CI 属于后续独立验证。

我的整体评价

这是与当前发布阻塞直接对应、范围适当的修复:重复执行和测试环境污染的长期成本下降,用户不会因为验收假失败收到不可靠版本。没有更改默认模型选择、Goal 权限或前端体验,也没有新增状态协议。精确头提交 59dae89c947a771e880e9449beaf57df37775672 的本地与风险验证足以支持此 PR 合并;版本发布仍要等待最终提交的独立资格验证。语义沿用既有机器 provider 与进程组清理规则,无新公共词汇或强制义务。

English verdict: APPROVE - The exact-head change isolates test credentials and prevents duplicate timeout kills without changing production host defaults or sandbox authority. Focused tests, lint/type checks, public boundary scan, and risk-based premerge passed; final release qualification remains separate.

@huangruiteng
huangruiteng merged commit 116ed4a into main Sep 24, 2026
5 checks passed
@huangruiteng
huangruiteng deleted the codex/release-isolate-operator-provider branch September 24, 2026 19:00
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