[Test / Refactor] Runner status probe: cover the transport-error branch and make in-flight tracking runner-aware
Description
Follow-ups from the review of #7826 (runner status probe in _get_session_snapshot, omnigent/server/routes/_sessions/orchestration.py), both non-blocking there:
Transport-error branch has no direct test.
_run_runner_status_probetreatshttpx.HTTPError/ConnectionErrorlike a timeout (failure string, skip window, one WARNING), but the unit suite only drives the timeout, slow non-200, malformed 200, prompt 404, concurrency, cancellation, doubling, reset and rebind paths. Add a fake runner raisinghttpx.ConnectErrorand assert both concurrent callers receiveNone, the next snapshot skips the probe, the in-flight entry is cleared, and the skip window is recorded.Rebind during an in-flight probe joins the old runner's probe.
_probe_runner_live_statuschecks_runner_status_probe_inflightbefore comparing the skip window's runner id, so a snapshot arriving after a rebind while the previous runner's probe (up to 5 s) is still pending awaits that probe and may cache the old runner's status until the relay publishes. Make in-flight tracking runner-aware (key or tag the task by runner id and start a fresh probe when the bound runner differs) and add coverage for a rebind while a probe is pending.
Expected behavior
- A transport failure on the probe is covered by a test that pins the shared fallback, the skip window, and in-flight cleanup.
- A snapshot after a rebind never awaits or caches a result from the previous runner's probe.
Source: omnigent-ai/omnigent