Skip to content

Place DSH Turn CLI options with their transport - #9906

Merged
huangruiteng merged 1 commit into
mainfrom
codex/turn-host-cli-options-20261202
Dec 3, 2026
Merged

huangruiteng merged 1 commit into
mainfrom
codex/turn-host-cli-options-20261202

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

User-facing behavior

Move the ten DSH-specific Turn options and their transport compatibility checks into the DSH CLI option module. The shared Turn parser and dispatcher use that module at the existing registration and validation points. Existing flags, defaults, help text and rejection order stay compatible.

Validation

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.2-sol · OpenAI · runtime_reported · xhigh

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

动机 / Motivation

使用 turn run-once 选择普通 DSH、分页或显式 operation transport 的调用者。用户选择宿主并提供 DSH 参数,CLI 要保持帮助、绑定、选项拒绝次序和实际传输之间的对应关系。 冻结基线在共享 Turn 注册模块手工展开十项参数,并由共享处理器逐项拒绝不兼容组合。 候选在两个相同入口调用 DSH 专属模块。原参数解析、实际默认行为、拒绝顺序与执行回执经过配对验证。 安装版普通和分页用真实 DSH 0.2.2rc2 SDK/runtime 与本地 loopback provider。已发布 0.1.5rc1 组合还验证了 File/SQLite 的原生 inline operation CLI 与保存会话,全部合成无外部效果。脱离进程后的重启仍待验证。

审读 d0b5ef82ca7fb4f00555470d9901f63e9a4791f5,目标基线 f2a9c7ecd62fe02dc2bff282aa1116cd8ed34054。

改动思路 / Approach

变化限于四个文件。旧宿主选择、实际 transport 和默认配置保持原语义。 沿用 argparse 规则和原有下游分派,按宿主拆出轻量选项模块。没有为迁移增加语义状态、兼容层或新的解析路径。 DSH CLI 模块拥有参数格式和兼容检查,实际宿主、Goal 准入、操作确认、租约和回执仍由原 owner 执行。 保留共享入口的原时序和单个精确的 DSH 选项 owner,同时保留覆盖冲突次序的端到端反例。

具体改动 / Changes

DSH-HELP 十个选项的公开文本和类型保持一致。DSH-DISPATCH 普通与分页输入、显式 cap 及重放保持一致。DSH-REJECTION 多条件冲突维持原错误优先级,零执行副作用。安装版 8 个正例覆盖普通与分页的 File/SQLite 基线和候选。loopback 实际接收显式上限 3,931 和 2,377 tokens,分页保留 dsh_read 与 KeepRaw,所有精确重放零请求、零扣额。 完整 run-once --help 的 13,242 字节匹配,十项解析类型与默认值核对。没有加载 SDK 或 DSH adapter 即可取 help 和解析。使用合格的旧 SDK/runtime 另跑四个原生 inline operation 正例,源和候选的两个后端均通过。 当前契约

关键代码讲解

对主干的风险 / Risks

把校验移到下游或调换优先级会改变用户看到的错误,并可能在不兼容配置上开始运行宿主。 两个安装版本、两个真实存储各验证十组冲突,一共四十次拒绝。错误及顺序逐项一致,host、额度、状态和 scheduler 效果全为 false。 候选扩围 pytest 299 通过、35 跳过,Ruff 通过。标准预合并唯一告警属于未改的 epoch_prefetch.py,冻结基线与候选诊断完全相同。

语义与 CI 对齐

标准预合并 6 项直检通过。4/5 项选中验证通过,1 项告警。所有阻断检查通过。 试跑把 Python 3.12 SDK 的 pydantic 扩展接到 3.14 时基线与候选都失败,同一 3.12 解释器复跑后两侧通过。Python 3.14 CLI 帮助和拒绝单独验证。operation 在 0.2.2rc2 上的资格拒绝由两个版本共有的 guard 触发,使用合格的 0.1.5rc1 组合后四个匹配后端执行均通过。

我的整体评价 / Verdict

独评通过。 当前提交独评通过。保留共同入口和原有执行语义,新的文件边界可独立读出参数注册和验证责任。真实宿主和拒绝矩阵均支撑当前提交的兼容结论。

English verdict: APPROVE at d0b5ef8. Approve. The DSH option owner preserves the installed CLI help, defaults, conflict precedence, actual ordinary/paged delivery and idempotent replay.

@huangruiteng huangruiteng left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval conclusion

Reviewer: Codex agent · huangruiteng · runtime_reported

动机 / Motivation

The shared Turn parser owned ten DSH-specific flags and their compatibility
checks. That made host-local transport policy harder to read and changed shared
CLI code whenever the DSH surface changed.

改动思路 / Approach

The DSH CLI option module now owns parsing and validation for the existing
flags. The shared parser delegates registration and calls the same validation
at the existing pre-launch point. Public flags, defaults, help text, selection,
and error precedence remain unchanged.

具体改动 / Changes

  • The ten DSH options move to turn_dsh_options.py.
  • Validation returns the operation module and ordinary-SDK selection while
    preserving the existing context-pages, runner, and absolute-path refusals.
  • The shared Turn command consumes that result without adding another parser or
    transport path.
  • Focused tests exercise the preserved rejection order and zero host/quota
    effects.

对主干的风险 / Risks

The material risk is a different option name, default, help surface, or
rejection order that lets an invalid transport cross the launch boundary. On
the latest merge target, six direct and five selected premerge checks passed.
The focused CLI cases passed four tests, and turn run-once --help matched the
new main byte-for-byte under the same interpreter.

我的整体评价 / Verdict

APPROVE at exact head d0b5ef82ca7fb4f00555470d9901f63e9a4791f5. The DSH
module is the single owner of its CLI options and validation while the shared
Turn entrypoint retains its existing sequence and contracts.

English verdict: APPROVE at d0b5ef82ca7fb4f00555470d9901f63e9a4791f5.
DSH option ownership is colocated with transport validation, with unchanged
help/defaults, preserved rejection precedence, and passing focused checks.

@huangruiteng
huangruiteng merged commit 16bd228 into main Dec 3, 2026
31 checks passed
@huangruiteng
huangruiteng deleted the codex/turn-host-cli-options-20261202 branch December 3, 2026 07:45
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