The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(agent): give watchdog stubs progress_timeout; drop eager time.time() from stream-open log
kshitijk4poor628094ee0e00
diff --git a/agent/codex_runtime.py b/agent/codex_runtime.pyindex fc97c268774..35954040884 100644--- a/agent/codex_runtime.py+++ b/agent/codex_runtime.py@@ -1113,8 +1113,9 @@ def run_codex_stream(agent, api_kwargs: dict, client: Any = None, on_first_delta# Claim the delta sink for THIS attempt; a newer attempt supersedes this token.writer_token["value"] = claim_stream_writer(agent)writer_token["raw_stream"] = _raw_stream- logger.debug("Codex stream opened at %.3f (attempt=%s/%s, model=%s)",- time.time(), attempt + 1, max_stream_retries + 1, model)+ # No time.time() here: the first-event stamp below is the attempt's timeline anchor.+ logger.debug("Codex stream opened (attempt=%s/%s, model=%s)",+ attempt + 1, max_stream_retries + 1, model)def _drain_for_finalizer(event_stream: Any) -> None:# ``final`` is already assembled; draining only lets Relay run its finalizer. A transport errordiff --git a/tests/agent/test_nonstream_wait_notice.py b/tests/agent/test_nonstream_wait_notice.pyindex 2de95bdc544..0cc64859d8c 100644--- a/tests/agent/test_nonstream_wait_notice.py+++ b/tests/agent/test_nonstream_wait_notice.py@@ -23,7 +23,7 @@ def _request():request.call_start = 1000.0request.wd = SimpleNamespace(codex=True, stale_timeout=600.0, ttfb_enabled=True, ttfb_timeout=120.0,- idle_enabled=True, idle_timeout=180.0, idle_requires_progress=False,+ idle_enabled=True, idle_timeout=180.0, idle_requires_progress=False, progress_timeout=0.0,)request.codex_watchdog_state = SimpleNamespace(lock=threading.Lock(), last_event_ts=None, last_progress_ts=None,diff --git a/tests/agent/test_wait_notice_cadence.py b/tests/agent/test_wait_notice_cadence.pyindex f3621905089..bf7356b1d28 100644--- a/tests/agent/test_wait_notice_cadence.py+++ b/tests/agent/test_wait_notice_cadence.py@@ -22,7 +22,8 @@ def _nonstream_request(ttfb_timeout=300.0):request.api_kwargs = {"model": "test-model"}request.call_start = 1000.0request.wd = SimpleNamespace(codex=True, stale_timeout=600.0, ttfb_enabled=True, ttfb_timeout=ttfb_timeout,- idle_enabled=True, idle_timeout=180.0, idle_requires_progress=False)+ idle_enabled=True, idle_timeout=180.0, idle_requires_progress=False,+ progress_timeout=0.0)request.codex_watchdog_state = SimpleNamespace(lock=threading.Lock(), last_event_ts=None,last_progress_ts=None, retry_started_ts=None)request.wait_notice_started_ts = None