haiku.rag/tests/multi_db
Yiorgis Gozadinos bfd09f6880
Leave no database reading when a federated fan-out fails
`asyncio.gather` propagates the first failure while its siblings run on, and the
caller unwinding from that closes the set through `async with` — so a sibling
still reading reads through a closed session. Seven fan-outs were affected:
lookup, search, image enrichment, multimodal picture loading, context expansion,
document listing and counting, and the sandbox's document load.

`gather_all` cancels and drains the rest, then re-raises the original exception.
A `TaskGroup` would drain them too but raise an `ExceptionGroup`, which every
caller and both CLIs' exception handlers would have to unwrap. The two
`return_exceptions=True` gathers in session opening and teardown already drain
their children and are left alone.
2026-08-28 12:02:07 +03:00
..
__init__.py Split the multi-database tests by subject 2026-08-26 13:43:53 +03:00
conftest.py Split the multi-database tests by subject 2026-08-26 13:43:53 +03:00
helpers.py Split the multi-database tests by subject 2026-08-26 13:43:53 +03:00
test_capabilities.py Answer for an unknown database name with one type 2026-08-27 18:04:27 +03:00
test_citations.py Make three tests assert what they are about 2026-08-27 18:04:28 +03:00
test_documents.py Name the database a write wrote to 2026-08-28 08:47:36 +03:00
test_expansion.py Make three tests assert what they are about 2026-08-27 18:04:28 +03:00
test_lifecycle.py Leave no database reading when a federated fan-out fails 2026-08-28 12:02:07 +03:00
test_scope.py Answer for an unknown database name with one type 2026-08-27 18:04:27 +03:00
test_search.py Make three tests assert what they are about 2026-08-27 18:04:28 +03:00