fix: isolate subprocess stdin and decouple startup to prevent MCP stdio deadlocks

- Set stdin=subprocess.DEVNULL across runtime, client, and utility subprocess calls to avoid hijacking the parent process's stdin.
- Run awake service initialization asynchronously on a daemon thread in MCP server startup.
- Redirect logger header printing to stderr to ensure stdio JSON-RPC purity.
- Add unit and lifecycle tests for MCP stdio protocol handshake and stdin isolation.
This commit is contained in:
somew1nd committed 2026-08-26 23:26:10 -07:00
1 parent 8fdecf23d7
commit e984d17635
12 files changed
+237 -13

No files matched your search

+3 -3
View File
@@ -168,9 +168,9 @@ class ArtemisLogger:
colored_separator = f"{Fore.CYAN}{separator}{Style.RESET_ALL}"
colored_message = f"{Fore.CYAN}{message}{Style.RESET_ALL}"
print(colored_separator)
print(colored_message)
print(colored_separator)
print(colored_separator, file=sys.stderr)
print(colored_message, file=sys.stderr)
print(colored_separator, file=sys.stderr)
self.logger.info(f"\n{separator}\n{message}\n{separator}")