docs: clarify postgres-mode None + test exact=True default (review #850)

- Note at both metrics-task call sites that receive_stream is None in postgres
  mode (get_ingest_pending falls back to procrastinate counts).
- Add test_default_is_exact_true covering the status-endpoint count path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Chris Coutinho
2026-06-04 19:47:29 +02:00
co-authored by Claude Opus 4.8
parent fc3e0f28f6
commit 8c9f97d6c4
3 changed files with 14 additions and 1 deletions
@@ -78,6 +78,15 @@ class TestCountIndexed:
assert all(call.kwargs["exact"] is False for call in qc.count.await_args_list)
async def test_default_is_exact_true(self) -> None:
# The on-demand status endpoint relies on the exact=True default.
qc = AsyncMock()
qc.count.side_effect = [_count_obj(10), _count_obj(3)]
await mp.count_indexed(qc, _COLLECTION)
assert all(call.kwargs["exact"] is True for call in qc.count.await_args_list)
class TestPublishVectorSyncMetrics:
@pytest.fixture(autouse=True)