Skip to content

fix(paseo-omp): preserve Windows process tree during cleanup - #152

Merged
omercnet merged 2 commits into
mainfrom
fix/windows-process-cleanup-order
Sep 23, 2026
Merged

omercnet merged 2 commits into
mainfrom
fix/windows-process-cleanup-order

Conversation

@omercnet

@omercnet omercnet commented Sep 22, 2026

Copy link
Copy Markdown
Owner

Problem

Windows shutdown started taskkill /T /F and immediately sent stdin EOF. A leader that exits on EOF can disappear before taskkill discovers its ignored-stdio descendant, leaving that descendant orphaned.

TDD regression

The first commit is the real Windows leader-plus-ignored-stdio-descendant reproduction from #151. It requires session.close() to leave no descendant alive. The second commit fixes that failing behavior.

Change

  • Preserve concurrent stdin EOF and process-group cleanup on POSIX.
  • On Windows, keep stdin open while existing process-tree cleanup runs and when it fails or is uncertain. After verified cleanup, end stdin as a safe exit fallback.
  • Add pending-cleanup ordering tests for both OMP RPC and MCP stdio transports.

Verification

  • npx vitest run tests/omp-rpc-process.test.ts tests/mcp-transport.test.ts
  • npm run typecheck
  • npm run check
  • npm test
  • Windows CI executes the real regression.

Copilot AI lite review requested due to automatic review settings September 22, 2026 20:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@omercnet
omercnet force-pushed the fix/windows-process-cleanup-order branch from 700d824 to 5627692 Compare September 22, 2026 20:46
@omercnet
omercnet force-pushed the fix/windows-process-cleanup-order branch from 5627692 to 6902f23 Compare September 23, 2026 07:34
@omercnet
omercnet merged commit e0a5483 into main Sep 23, 2026
18 checks passed
@omercnet
omercnet deleted the fix/windows-process-cleanup-order branch September 23, 2026 07:46
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.

2 participants