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**