You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(tests): all() on empty document list is vacuously True, masking empty-result regression in list_documents #269
tests/test_documents_endpoint.py asserts all(doc['doc_id'] == 'doc_abc123' for doc in body['data']) to verify document listing. When body['data'] is an empty list [], all() returns True vacuously — a bug returning an empty document list passes the assertion silently.
Root Cause
tests/test_documents_endpoint.py around line 137:
body=response.json()
assertall(doc['doc_id'] =='doc_abc123'fordocinbody['data'])
# ↑ True when body['data'] == [] because all() on empty iterable is True
There is no assertion on the length of body['data'], so an empty response and a correct response are indistinguishable.
Failure Scenario
A regression in list_documents causes it to return {"data": [], "pagination": {...}} for a tenant that has documents.
Activity
piyushmakhija28 commentedon Jun 21, 2026
Fixed in PR #280 (Sprint R3/R4: fix(sprint-r3): root-cause fixes for all 39 bugs from code review round 3 + Sprint R4 round 4)