test(agent): trim stale-kill unwedge tests to the two invariants
Keep the real httpx 0.28 wrapper-shape test (proves the shutdown reaches the socket through BoundSyncStream/ResponseStream/PoolByteStream) and the loopback E2E (a parked reader unwinds within its stale budget and the retry lands). The other four were narrower restatements of the same paths. Also treat httpx.ReadError as a transport error in codex_runtime: it is the same abort-induced-read class the streaming retry loop now recovers from.
This commit is contained in:
@@ -869,7 +869,7 @@ def run_codex_stream(agent, api_kwargs: dict, client: Any = None, on_first_delta
|
||||
import httpx as _httpx
|
||||
from openai import APIConnectionError as _APIConnectionError
|
||||
from agent import relay_llm
|
||||
transport_errors = (_httpx.RemoteProtocolError, _httpx.ReadTimeout, _httpx.ConnectError, ConnectionError)
|
||||
transport_errors = (_httpx.RemoteProtocolError, _httpx.ReadTimeout, _httpx.ReadError, _httpx.ConnectError, ConnectionError)
|
||||
active_client = client or agent._ensure_primary_openai_client(reason="codex_stream_direct")
|
||||
max_stream_retries, model = 1, api_kwargs.get("model")
|
||||
# Accumulate streamed text so callers / compat shims can read it.
|
||||
|
||||
Reference in New Issue
Block a user