From f6f821e0825ac65b8f66a44cdb4edef54504e88f Mon Sep 17 00:00:00 2001 From: Tyler Date: Sun, 21 Jun 2026 13:50:51 -0600 Subject: [PATCH] =?UTF-8?q?plan(SP22):=20Task=205=20=E2=80=94=20add=20test?= =?UTF-8?q?=5Fparse=5F837=5Fdoes=5Fnot=5Fretry=5Fon=5F5xx=20to=20spec=20(l?= =?UTF-8?q?ocks=20in=20dedup-safety=20contract)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plans/2026-06-21-cyclone-pipeline-agent.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/superpowers/plans/2026-06-21-cyclone-pipeline-agent.md b/docs/superpowers/plans/2026-06-21-cyclone-pipeline-agent.md index f468ea6..009550a 100644 --- a/docs/superpowers/plans/2026-06-21-cyclone-pipeline-agent.md +++ b/docs/superpowers/plans/2026-06-21-cyclone-pipeline-agent.md @@ -943,6 +943,19 @@ async def test_parse_837_posts_file_and_returns_summary(client, sample_837p_path # Confirm multipart upload content_type = route.calls.last.request.headers["content-type"] assert "multipart/form-data" in content_type + + +@pytest.mark.asyncio +@respx.mock +async def test_parse_837_does_not_retry_on_5xx(client, sample_837p_path): + """parse_837 is a POST — retries would double-submit, so the + dedup-safety contract is that 5xx propagates without retry.""" + route = respx.post("http://test:8000/api/parse-837").mock( + return_value=Response(503, json={"error": "transient"}) + ) + with pytest.raises(httpx.HTTPStatusError): + await client.parse_837(sample_837p_path, payer="co_medicaid") + assert route.call_count == 1 ``` - [ ] **Step 2: Run test to verify it fails**