haiku.rag/tests/capabilities
Yiorgis Gozadinos 0aa6d79f88
Build one capsule of cited evidence from the records
`EvidenceCompactionCapability` reads what the evidence capabilities recorded out of
the run registry, and `build_capsule` renders it: every cited item, grouped by the
question that last cited it, newest group first, each rendered once, with the
pictures of cited evidence and the labels that must accompany them. Discovery runs
one way and reads only, so no capability holds a reference to another and a host
running one, both or neither needs no wiring change.

Everything cited is kept whole and everything else is dropped. There is no character
budget, no picture cap and nothing to configure: a cap would only half-rescue models
that fail on long conversations regardless, and a host that needs earlier evidence
pruned can compact its own requests further.

A capability reports which of its tools produce evidence, so a cite acknowledgement
is never mistaken for one. Pictures are identified by owner, document and reference,
so one figure cited through overlapping chunks is attached once while the same
reference in another document stays a different picture.

The builder does no I/O and never sees the message history, so a picture travels with
its label and the caller fetches the bytes. Nothing reaches the wire yet.
2026-08-13 13:00:02 +03:00
..
conftest.py replace haiku.skills with native Pydantic AI capabilities 2026-07-24 15:26:17 +03:00
test_capabilities.py Build one capsule of cited evidence from the records 2026-08-13 13:00:02 +03:00
test_evidence_capsule.py Build one capsule of cited evidence from the records 2026-08-13 13:00:02 +03:00
test_evidence_ledger.py Make the ledger's clocks defensible against the host 2026-08-13 13:00:02 +03:00