Skip to content

fix(launcher): 保留 Windows Agent 参数边界(A06) - #11

Closed
ChenM0M wants to merge 2 commits into
codex/agent-config-a05-launch-resultfrom
codex/agent-config-a06-windows-argv
Closed

ChenM0M wants to merge 2 commits into
codex/agent-config-a05-launch-resultfrom
codex/agent-config-a06-windows-argv

Conversation

@ChenM0M

@ChenM0M ChenM0M commented Sep 22, 2026 •

Copy link
Copy Markdown
Owner

对应 A06,基于 #10 的堆叠 PR。

Start-Process 的 ArgumentList 会重新合并数组,造成空参数、含空格值及引号丢失。Host 启动改用 Rust 原生 Command::args + CREATE_NEW_CONSOLE;保留 npm .cmd/.bat shim 回退。直接返回子进程 PID/系统启动错误,因此仍满足 A04/A05。移除不再需要的 PowerShell 启动脚本及 PID 文本解析。

Rust 对 batch 参数采用专门转义;无法安全表示的特殊值返回错误,不自行拼接 cmd shell 字符串。

验证:Linux 可运行的 4 个 launcher tests、rustfmt/diff check 通过。新增 Windows 实际 C# 子进程 argv probe,覆盖 exe 的空值、空格、引号、反斜杠、Unicode、换行及 shell 字符;另覆盖 cmd shim 和无效 exe/cwd。原生测试在本环境未执行,需 Windows CI/实机验证,保留草稿。

参考:https://doc.rust-lang.org/std/process/index.html#windows-argument-splitting

2026-09-23 repair verification

@ChenM0M

ChenM0M commented Sep 23, 2026

Copy link
Copy Markdown
Owner Author

内容已随整合 PR #33 合入 main (e3cb573)。此 PR 为被取代的分支/栈式 PR,按用户指示关闭;分支保留,未删除。

@ChenM0M ChenM0M closed this Sep 23, 2026
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