From c3fc1731379a4a22d1d153ad284deddc2d4f8439 Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 7 Oct 2026 18:19:33 -0400 Subject: [PATCH] test: let the blocked-provider test run out of 4xx retries --- tests/test_execution_request_log.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_execution_request_log.py b/tests/test_execution_request_log.py index 426c4d47..28c330ff 100644 --- a/tests/test_execution_request_log.py +++ b/tests/test_execution_request_log.py @@ -96,8 +96,12 @@ async def test_blocked_provider_failure_text_carries_request_id( monkeypatch: pytest.MonkeyPatch, ) -> None: coordinator = AgentCoordinator() + # 4xx errors are retried, so the block repeats until retries run out. + streams = [ + _FakeStream(exc=_blocked_error()) for _ in range(execution._MAX_TRANSIENT_MODEL_RETRIES + 1) + ] with pytest.raises(PermissionDeniedError): - await _run(monkeypatch, [_FakeStream(exc=_blocked_error())], coordinator) + await _run(monkeypatch, streams, coordinator) assert coordinator.statuses["root"] == "failed" error = coordinator.errors["root"] assert "Output blocked by policy" in error