makoMako
40e2d00d35
修复 Windows 后端退出:taskkill 结束进程树 + turn.completed 支持 (#108)
* fix(executor): handle turn.completed and terminate process tree on Windows
* fix: 修复代码审查发现的安全和资源泄漏问题
修复内容:
1. Windows 测试 taskkill 副作用:fake process 在 Windows 上返回 Pid()==0,避免真实执行 taskkill
2. taskkill PATH 劫持风险:使用 SystemRoot 环境变量构建绝对路径
3. stdinPipe 资源泄漏:在 StdoutPipe() 和 Start() 失败路径关闭 stdinPipe
4. stderr drain 并发语义:移除 500ms 超时,确保 drain 完成后再访问共享缓冲
测试验证:
- go test ./... -race 通过
- TestRunCodexTask_ForcesStopAfterTurnCompleted 通过
- TestExecutorSignalAndTermination 通过
Generated with SWE-Agent.ai
Co-Authored-By: SWE-Agent.ai <noreply@swe-agent.ai>
---------
Co-authored-by: cexll <evanxian9@gmail.com>
Co-authored-by: SWE-Agent.ai <noreply@swe-agent.ai>
2026-01-08 10:33:09 +08:00
..
2025-12-12 14:41:54 +08:00
2026-01-06 15:03:21 +08:00
2026-01-06 15:03:21 +08:00
2025-12-09 15:53:31 +08:00
2025-12-21 18:57:27 +08:00
2026-01-06 15:03:21 +08:00
2026-01-08 10:33:09 +08:00
2026-01-08 10:33:09 +08:00
2025-12-19 20:50:21 +08:00
2025-12-19 20:50:21 +08:00
2025-12-09 15:53:31 +08:00
2025-12-15 13:19:51 +08:00
2025-12-16 10:05:54 +08:00
2025-12-17 10:33:38 +08:00
2025-12-17 10:33:38 +08:00
2025-12-21 18:57:27 +08:00
2025-12-24 11:59:00 +08:00
2026-01-08 10:33:09 +08:00
2026-01-06 15:03:21 +08:00
2025-12-21 15:55:01 +08:00
2025-12-26 14:51:38 +08:00
2026-01-08 10:33:09 +08:00
2025-12-09 16:03:44 +08:00
2025-12-09 16:03:44 +08:00
2026-01-08 10:33:09 +08:00
2025-12-09 16:03:44 +08:00
2026-01-08 10:33:09 +08:00
2026-01-08 10:33:09 +08:00
2025-12-24 09:55:39 +08:00
2025-12-24 11:59:00 +08:00
2025-12-11 16:09:33 +08:00
2025-12-11 16:09:33 +08:00