swe-agent[bot]
edbf168b57
fix(codeagent-wrapper): fix race condition in stdout parsing
修复 GitHub Actions CI 中的测试失败问题。
问题分析:
在 TestRun_PipedTaskSuccess 测试中,当脚本运行很快时,cmd.Wait()
可能在 parseJSONStreamInternal goroutine 开始读取之前就返回,
导致 stdout 管道被过早关闭,出现 "read |0: file already closed" 错误。
解决方案:
将 parseJSONStreamInternal goroutine 的启动提前到 cmd.Start() 之前。
这确保解析器在进程启动前就 ready,避免竞态条件。
测试结果:
- 本地所有测试通过 ✓
- 覆盖率保持 93.7% ✓
Generated with swe-agent-bot
Co-Authored-By: swe-agent-bot <agent@swe-agent.ai>
2025-12-13 13:20:49 +08:00
..
2025-12-12 14:41:54 +08:00
2025-12-12 15:35:39 +08:00
2025-12-12 15:35:39 +08:00
2025-12-09 15:53:31 +08:00
2025-12-11 16:09:33 +08:00
2025-12-12 22:06:23 +08:00
2025-12-11 16:09:33 +08:00
2025-12-13 13:20:49 +08:00
2025-12-09 15:53:31 +08:00
2025-12-12 14:27:50 +08:00
2025-12-12 14:25:22 +08:00
2025-12-09 16:03:44 +08:00
2025-12-12 22:06:23 +08:00
2025-12-12 14:25:22 +08:00
2025-12-09 17:02:59 +08:00
2025-12-09 16:03:44 +08:00
2025-12-09 16:03:44 +08:00
2025-12-09 16:03:44 +08:00
2025-12-09 15:53:31 +08:00
2025-12-11 16:09:33 +08:00
2025-12-11 16:09:33 +08:00