Repository navigation
fix(adapters): terminate Windows coding-agent trees - #5224
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
✅ Deterministic PR hygiene checks passed. |
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. This pull request is already Ready for Review. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: lidge-jun/opencodex/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughChangesWindows process termination
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~12 minutes Change: Bug fix Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant runCodingAgentTurn
participant killWindowsProcessTree
participant taskkill.exe
participant ChildProcess
runCodingAgentTurn->>killWindowsProcessTree: terminate child PID
killWindowsProcessTree->>taskkill.exe: invoke /PID /T /F
taskkill.exe->>ChildProcess: terminate process tree
runCodingAgentTurn->>ChildProcess: fallback SIGTERM then SIGKILL
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
리뷰 · 우선순위 52 / 80윈도우에서 코딩 도우미를 중간에 멈추면, 껍데기만 죽고 안에 있던 프로그램은 남습니다. 이 PR은 그 구멍을 막습니다. 윈도우는 이제는 윈도우이고 프로세스 번호가 있으면 베이스는 라인 - src/adapters/coding-agent/turn.ts:37 - 라인 - tests/providers/codebuddy-adapter.test.ts:618 - 새 테스트는 잘 죽었을 때만 봅니다. 죽이는 함수가 에러를 던지면 직접 메인테이너의 판단이 필요한 지점 윈도우는 기다리지 않고 바로 강제로 죽입니다. 리눅스는 2초 기다렸다가 더 세게 죽입니다.
너의 추천
이 댓글은 grok-bot이 작성했습니다 |
Summary
child.kill("SIGTERM")/SIGKILLon the spawnedcmdshim, which terminated only the shim and orphaned the real CLI process tree. Onwin32the turn now terminates the whole tree viataskkill /PID <pid> /T /F, falling back to the direct SIGTERM-to-SIGKILL path if taskkill fails. The terminator is injectable throughCodingAgentDeps.killWindowsProcessTreefor tests.Verification
bun test tests/providers/codebuddy-adapter.test.ts— 41 pass, 0 fail (includes the new "a Windows abort terminates the cmd shim process tree" regression test).bun x tsc --noEmit— clean.Checklist
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
All CI tests are green on my local testing.
I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit