A bare Close() on a dial-only probe connection (waitForReady, the dolt-store
fail-fast dialer, the socket-fallback probe, the circuit breaker probe, and
several doctor/CLI reachability checks) sends a TCP RST instead of a clean
FIN. dolt sql-server interprets that RST as an aborted MySQL handshake;
enough of them in a short window can crash the server process (see #4132,
hamchowderr's Windows repro in issuecomment-5014617950 on #4132).
Add internal/doltserver.DrainAndCloseProbe/ProbeSQLServer, a shared helper
that reads (and discards) the handshake greeting before closing, and sweep
every MySQL-speaking dial+close probe in the tree onto it. waitForReady also
gets an F7 fix along the way: a dial that succeeds but never greets (TCP
listener accepting, MySQL engine not yet writing) is no longer treated as
ready — it keeps polling until a greeting arrives or the deadline passes.
Non-MySQL probes (remotesapi gRPC/HTTP, SSH, HTTP(S)) are left as bare
dial+close with a comment explaining why: there is no handshake to drain.
This lands the drain half of #4133 (Zireael). The config half (background
Dolt workers via --config YAML) is not ported here — it is superseded by
main's #4986 YAML-config path, which already addresses that PR's F1 lint
findings. The orphaned-server angle from #4133's report remains tracked by
the existing #4282.
Agent-Signature: claude-fable-5-high on behalf of maphew
Co-authored-by: Zireael <3856578+Zireael@users.noreply.github.com>