+Two `tests/test_session.py` tests failed on single CI jobs in one night and passed on rerun, on commits that did not touch `session.py`: `test_main_full_lifecycle` (`main(["start", …])` returned 1 on Python 3.12, run 33277764141) and `test_stop_session_is_prompt` (`stop_session` took 5.02 s against a `< 3.0 s` assertion on Python 3.14, run 33298581269 — 5 s is exactly the `_kernel_alive` probe timeout, so the shutdown ack was missed under load). Every flake costs a 20–30 min rerun. Same family: `tests/test_session.py:138` waits with `time.sleep(1.0)` instead of an `execute_input` handshake. Worst case so far (run 33321498835, Python 3.14 shard 2, PR #87): after earlier session tests passed, every later one in the job — 41 tests — failed with `Kernel did not become ready within 30.0s`; the rerun passed. Something in that job left kernel start-up broken for the rest of the process (leaked kernel, port, or the conftest reaper); the fix needs a diagnostic in `start_session` that prints the kernel's stderr and the connection file state on timeout. Fix the tests' dependence on wall-clock under xdist load (a start budget that scales, a stop assertion on *behaviour* — ack received — not on seconds), and make a failed `start` print *why*.
0 commit comments