Skip to content

Fix windows build failure - #8504

Merged
AmethystLiang merged 2 commits into
mainfrom
fix-windows-build-failure
Jul 13, 2026
Merged

AmethystLiang merged 2 commits into
mainfrom
fix-windows-build-failure

Conversation

@AmethystLiang

Copy link
Copy Markdown
Contributor

Summary

Describe the user-visible change.

Screenshots

  • Add screenshots or a screen recording for any new or changed UI behavior.
  • If there is no visual change, say No visual change.

Testing

  • pnpm lint
  • pnpm typecheck
  • pnpm test
  • pnpm build
  • Added or updated high-quality tests that would catch regressions, or explained why tests were not needed

AI Review Report

Summarize the code review you ran with your AI coding agent. Include the main risks it checked, what it flagged, and what you changed or verified as a result.
Confirm that the review explicitly checked cross-platform compatibility for macOS, Linux, and Windows, including shortcuts, labels, paths, shell behavior, and any Electron-specific platform differences touched by this PR.

Security Audit

Provide a basic security audit summary from your AI coding agent. Call out any input handling, command execution, path handling, auth, secrets, dependency, or IPC risks that were reviewed, plus any follow-up needed.

Notes

Call out any platform-specific behavior, risks, or follow-up work.

- node-pty's Windows agent throws when kill() is called with a signal
  argument; route all pty.kill() calls through killPtyProcess(), which
  drops the signal on win32 and forwards it on POSIX
@coderabbitai

coderabbitai Bot commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 4c1f87dc-824e-4a2c-9d73-e4757fc451cb

📥 Commits

Reviewing files that changed from the base of the PR and between 3634af7 and a0efcad.

📒 Files selected for processing (1)
  • src/relay/pty-handler.test.ts

📝 Walkthrough

Walkthrough

PTY termination is centralized through a platform-aware helper. Windows calls pty.kill() without a signal, while POSIX platforms retain signal forwarding. Spawn cleanup, shutdown paths, fallback timers, and disposal now use the helper. Windows-focused tests verify signal-less behavior across graceful and immediate shutdown, stale-spawn cleanup, fallback timers, and disposal.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is only the template and lacks actual summary, testing, review, security, and notes content. Fill in each template section with the real change summary, screenshots or no-visual-change note, testing results, review findings, security audit, and platform-specific notes.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: a Windows PTY termination fix causing build/runtime failures.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/relay/pty-handler.test.ts (1)

1021-1041: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add coverage for the remaining Windows cleanup paths.

This test validates graceful shutdown, but the change also affects immediate shutdown, stale-spawn cleanup, the SIGKILL fallback, and dispose(). Add parameterized or focused cases for those paths so a future call-site regression cannot pass unnoticed.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: f2f34a46-8ba8-4534-9f0a-a5b686856ef9

📥 Commits

Reviewing files that changed from the base of the PR and between 06ea551 and 3634af7.

📒 Files selected for processing (2)
  • src/relay/pty-handler.test.ts
  • src/relay/pty-handler.ts

Replace the single graceful-shutdown test with a suite covering every
place killPtyProcess is invoked (graceful/immediate shutdown, stale-spawn
cleanup, SIGKILL fallback timers, and dispose), so a future regression
that reintroduces a signal argument on any Windows code path is caught.
@AmethystLiang
AmethystLiang merged commit 7e303d2 into main Jul 13, 2026
1 check passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* Fix PTY shutdown crash on Windows by dropping unsupported signals

- node-pty's Windows agent throws when kill() is called with a signal
  argument; route all pty.kill() calls through killPtyProcess(), which
  drops the signal on win32 and forwards it on POSIX

* Expand Windows PTY kill-signal-drop test coverage to all call sites

Replace the single graceful-shutdown test with a suite covering every
place killPtyProcess is invoked (graceful/immediate shutdown, stale-spawn
cleanup, SIGKILL fallback timers, and dispose), so a future regression
that reintroduces a signal argument on any Windows code path is caught.
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