diff --git a/tests/test_snippet_duplicates.py b/tests/test_snippet_duplicates.py index 6458fa7..3021a52 100644 --- a/tests/test_snippet_duplicates.py +++ b/tests/test_snippet_duplicates.py @@ -96,4 +96,9 @@ async def test_a_failed_scan_returns_an_empty_report_not_an_error(): patch.object(dedup_svc, "async_session", side_effect=RuntimeError("boom")), ): out = await dedup_svc.find_duplicate_snippets(1) - assert out == {"groups": [], "pairs": [], "threshold": 0.8} + # The empty report still carries its per-kind `suggestion` (#2547) — a + # failed scan must be indistinguishable in SHAPE from a clean one, or every + # consumer needs a second code path for the degraded case. + assert out["groups"] == [] and out["pairs"] == [] + assert out["threshold"] == 0.8 + assert "merge" in out["suggestion"]