mirror of
https://github.com/morluto/rea.git
synced 2026-11-14 10:43:30 +00:00
runProductionMcpDoctor wrapped the SDK StdioClientTransport and only joined its close calls. That transport clears its direct-child reference, ends stdin and signals only that child, so a server whose launcher exited after forking an inherited-stdio descendant left the descendant running while the doctor reported nothing but the transport deadline. Run the doctor on OwnedMcpStdioTransport, which spawns the child in a dedicated POSIX process group or Windows job and verifies group and token-owned descendant cleanup before close returns. Feed stderr through a sink on acquisition so diagnostics survive an early child exit and still honor the 64 KiB retained prefix and full byte count. Covered by a fixture that forks a descendant, exits, and is timed out: the regression asserts the descendant is gone after the doctor returns.