Repository navigation
Conversation
Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com>
huangruiteng
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh
动机 / Motivation
从 Windows 虚拟环境以绝对路径运行 loopx.exe doctor --installation-only --deep 的用户。 当 Scripts 不在 PATH 上时,缺少后缀的 argv[0] 让 Doctor 无法定位原启动器,包安装检查会误报启动器缺失。 相同 Windows 分支输入下,Doctor 找回已登记的启动器,实际 RECORD 校验由失败转为通过。 范围是找到本次安装诊断的 Windows 启动器,包归属与读取范围沿用原有检查。
改动思路 / Approach
范围是 Windows pip 启动器路径的识别与两项针对性回归。 在既有 launcher 选择器恢复一个经过路径匹配的输入,后续仍由原 RECORD 校验决定归属。 已识别的 launcher 进入既有诊断,实际认证与执行范围仍由当前包记录和 Doctor 所选模式约束。 Windows 复用本次解释器的原始参数并比较去掉后缀后的完整位置。
具体改动 / Changes
_current_invocation仅在路径匹配时恢复后缀。collect_installation_doctor将本次调用交给深度检查。_distribution_command_summary继续根据文件和 RECORD 校验安装归属。
依据 docs/architecture/rfcs/monorepo-distribution-split-v0.md,基线 6248a6d50e8caf4089d40dd65907b95f95fbc7f7。已登记的 Windows 启动器 由缺失变为匹配。RECORD 归属隔离 由异路径及未登记副本覆盖。
对主干的风险 / Risks
macOS 上使用仿真的 Windows argv 和真实 RECORD 解析、路径比较。 不匹配的 orig_argv 保持无调用路径。恢复成功但未在 RECORD 登记的副本仍失败,带后缀与 POSIX 的行为成对保持。 6 项 quick premerge 直接检查和 3 项选定检查通过,另有 73 项 Doctor Python 测试通过。 本地选定检查包括真实 POSIX 安装、打包 Codex CLI 和升级 smoke。独立评审未在原生 Windows 上重跑安装器。 当前主干三方比较干净。
我的整体评价 / Verdict
批准。 这次修复拿回了同一次调用的绝对路径,独立对照确认 RECORD 仍拒绝无归属的副本。安装专用入口优先检查本次明确调用的启动器,PATH 搜索仅作后备。改动只涉及 CLI 安装诊断。
英文简短结论
English verdict: APPROVE at 1e1c424. The matching Windows launcher reaches the existing RECORD verification. Mismatched arguments and unrecorded copies remain rejected.
…lidate-9999-windows-doctor-current-main-20261204 Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com>
Problem
With the venv Scripts directory off PATH, invoking an installed
loopx.exe doctor --installation-only --deepby absolute path fails to identify its launcher. pip’s Windows wrapper strips the executable suffix fromsys.argv[0], so bare Core falls through to the generic CLI checks. Windows failureChange
Recover the Windows launcher from the interpreter’s original arguments only when the path matches the normalized invocation. Doctor continues to verify it against the owning distribution’s RECORD. The regression covers matching and unrelated original paths.
Validation
mainat6248a6d50e.The same-artifact Windows rerun passed runtime retirement and fixture cleanup.
Native Windows split-package follow-up
On native Windows x64, the exact #9646 head
c045e12a71still refused the absoluteloopx.exeinvocation with the venv Scripts directory off PATH. Applying this PR's1e1c424f93patch to that head restored both installed entry points, retained copied-launcher rejection, and passed all six individual companion removals and restorations on the same eight-wheel assembly. The two launcher normalization cases passed. Native Windows runReview follow-up
Revision
44baee03d8againstmain@0e784d7cba. The two-file Windows launcher patch is unchanged against current main. The Doctor source suites passed 73 cases, including matching and mismatched launcher records. Its separate composition with the current split-package Doctor also passed 46 freshness cases. Source and packaged-archive install plus the update smoke passed after preparing the checked-out Chat bundle before packaging. The native Windows evidence above applies to the unchanged patch on the earlier revision; the current composition was checked locally on macOS.