haiku.rag/tests/capabilities
Yiorgis Gozadinos e1dd8517f9
Refuse to compact evidence the host kept no record of
Both optional capabilities read what earlier questions retrieved and cited from
the capability's state, so a host that carries only the message history hands
every run an empty record. Compaction then replaced the earlier evidence with
receipts and retained nothing, and the loss was invisible: the citations the host
already displayed were still there. It now refuses when it finds evidence from an
earlier question and no record of what that question cited.

`state_carried` reaches the optional capabilities through discovery, so the
refusal distinguishes a host that never carries state from a question that simply
cited nothing.

The documentation taught the pattern that breaks: the compose example is now
stateful and the requirement is stated where each capability is introduced.

The app's browser storage was doing exactly this, keeping only the fields the UI
reads. It now persists the whole namespace map, so the citation policy's
violations survive a reload as well as the evidence record.
2026-08-13 15:46:23 +03:00
..
conftest.py replace haiku.skills with native Pydantic AI capabilities 2026-07-24 15:26:17 +03:00
test_capabilities.py Stop a partly resolved citation asking to be retried 2026-08-13 15:03:51 +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 Refuse to compact evidence the host kept no record of 2026-08-13 15:46:23 +03:00