From 8984a84cfdaa99c281a36cdab5d05727e1e35d69 Mon Sep 17 00:00:00 2001 From: tegwick Date: Sun, 13 Sep 2026 22:13:06 +0200 Subject: [PATCH] Expect uncertain delivery when timeout acceptance cannot be ruled out Assistant: codex Assistant-Model: gpt-6-astra Assistant-Session: 01a092fe-13b1-7f12-ac74-7d258af4d79c --- tests/test_transactional.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_transactional.py b/tests/test_transactional.py index c04043f..f252966 100644 --- a/tests/test_transactional.py +++ b/tests/test_transactional.py @@ -118,10 +118,10 @@ def test_suppression_blocks_send(tmp_path): def test_provider_timeout_temporary_and_permanent_are_redacted(tmp_path): cases = [ - (ProviderError("provider_timeout", retryable=True), "503", True), + (ProviderError("provider_timeout", retryable=True), "422", False), (ProviderError("temporary_deferral", retryable=True), "503", True), (ProviderError("permanent_rejection", retryable=False), "422", False), - (ProviderError("provider_unavailable", retryable=True), "503", True), + (ProviderError("provider_unavailable", retryable=True), "422", False), ] for err, code_prefix, retryable in cases: app = TransactionalApplication( @@ -132,7 +132,7 @@ def test_provider_timeout_temporary_and_permanent_are_redacted(tmp_path): ) status, body = invoke(app, event(event_id=f"evt-{err.code}")) assert status.startswith(code_prefix), (err.code, status, body) - assert body["error"] == err.code + assert body["error"] == ("delivery_outcome_unknown" if err.code in {"provider_timeout", "provider_unavailable"} else err.code) assert body["retryable"] is retryable # Diagnostics must stay redacted: no SMTP host, password, or exception text. blob = json.dumps(body)