haiku.rag/tests/capabilities
Yiorgis Gozadinos f33b789a31
Ask across databases and name the source of each citation
`ask(sources=[…])` scopes a question to some of the configured databases, carried
on the capability state so its search tool searches those. `Citation.source` names
the database a cited chunk came from, resolved from the search results the model
saw, which already carry it.

Context expansion routes each result through the database it came from: a
federating client has no repositories of its own.

The cite fallback, which looks up an id absent from this run's results, searches
only the selected databases. A chunk id says nothing about which database holds
it, so placing one means asking, and asking outside the selection would let a
question scoped to some databases cite another.

The loosely-specced client mocks in the capability tests now say they stand in for
a single-database client. A bare AsyncMock answers any attribute with a truthy
Mock, so `_federated` sent the fallback down the multi-database branch, and
`_source` reached a validated field.
2026-08-24 10:03:46 +03:00
..
conftest.py
test_agent_spec.py Support Pydantic AI agent specs via from_spec 2026-08-21 13:04:09 +03:00
test_borrowed_client.py Lend the caller's client to the capability 2026-08-18 14:58:18 +03:00
test_capabilities.py Ask across databases and name the source of each citation 2026-08-24 10:03:46 +03:00
test_citation_policy.py Let the record say whether a question is still being answered 2026-08-13 15:03:24 +03:00
test_evidence_capsule.py Refuse to compact evidence the host kept no record of 2026-08-13 15:46:23 +03:00
test_evidence_ledger.py Enforce a declaration wherever there is something to declare 2026-08-13 13:39:42 +03:00
test_evidence_wire.py Give the evidence capabilities one typed state 2026-08-19 17:08:44 +03:00