Initial Checks
Description
Three tests in TestChildProcessCleanup are flaky. They fail intermittently on macOS (darwin) with the same root cause: the child process hasn't started writing to the marker file before the assertion checks.
Affected tests:
TestChildProcessCleanup.test_basic_child_process_cleanupTestChildProcessCleanup.test_nested_process_treeTestChildProcessCleanup.test_early_parent_exit
CI evidence: Tests observed failing on 2025-11-12 and continue to be flaky.
Output:
________TestChildProcessCleanup.test_basic_child_process_cleanup________
[gw9] darwin--Python3.11.14asyncdeftest_basic_child_process_cleanup(self):
...
# Verify child is writingifos.path.exists(marker_file): # pragma: no branchinitial_size=os.path.getsize(marker_file)
awaitanyio.sleep(0.3)
size_after_wait=os.path.getsize(marker_file)
>assertsize_after_wait>initial_size, "Child process should be writing"EAssertionError: ChildprocessshouldbewritingEassert0>0tests/client/test_stdio.py:310: AssertionError
________TestChildProcessCleanup.test_nested_process_tree________
[gw9] darwin--Python3.11.14>assertnew_size>initial_size, f"{name} process should be writing"EAssertionError: parentprocessshouldbewritingEassert0>0tests/client/test_stdio.py:413: AssertionError________TestChildProcessCleanup.test_early_parent_exit________
[gw9] darwin--Python3.11.14>assertsize2>size1, "Child should be writing"EAssertionError: ChildshouldbewritingEassert0>0tests/client/test_stdio.py:494: AssertionError
Python & MCP Python SDK
Python 3.11.14, macOS (darwin)
Latest SDK version
AI Disclaimer
Initial Checks
Description
Three tests in
TestChildProcessCleanupare flaky. They fail intermittently on macOS (darwin) with the same root cause: the child process hasn't started writing to the marker file before the assertion checks.Affected tests:
TestChildProcessCleanup.test_basic_child_process_cleanupTestChildProcessCleanup.test_nested_process_treeTestChildProcessCleanup.test_early_parent_exitCI evidence: Tests observed failing on 2025-11-12 and continue to be flaky.
Output:
Python & MCP Python SDK
AI Disclaimer