haiku.rag/tests
Yiorgis Gozadinos cab510d0d5
Give the evidence capabilities one typed state
RAGState and AnalysisState each declared the same five fields, so the generic
base could not name them: StateT was bound to BaseModel, and every access
went through cast(Any, state), a getattr by string, or a loop clearing fields
by name so it could skip the one only AnalysisState has.

EvidenceState declares them once. RAGState adds nothing, AnalysisState adds
executions and overrides begin_invocation to clear them. StateT binds to
EvidenceState, which removes all ten casts and both state-shape getattrs; the
three getattr(ctx.deps, "state") probes stay, since those check a
host-supplied object rather than our own state.

discover_evidence reached into capability.state for two fields. It now asks
through evidence_record() and citation_index(), alongside the
evidence_tool_names() and cite_available accessors it already used. The eval
runner's _RagLikeState protocol and the chat app's getattr reads described
this shape from outside and are gone.

Compatibility is semantic JSON-object equivalence, not bytes: field names and
nesting are unchanged, so a dict stored by 0.75.0 loads and re-dumps equal,
but deriving from a shared base reorders AnalysisState's keys. Nothing
serializes, hashes or string-compares this state — every carry point
re-validates by key.
2026-08-19 17:08:44 +03:00
..
capabilities Give the evidence capabilities one typed state 2026-08-19 17:08:44 +03:00
cassettes Put multi-table writes behind one transaction boundary 2026-08-19 14:05:40 +03:00
chat Give the capsule to one return, and the run its own copy of state 2026-08-13 13:00:02 +03:00
data
docker
ingester Move ingester telemetry setup behind argument parsing 2026-08-13 11:37:36 +03:00
sandbox Point the limit comments at the right limits 2026-07-28 19:11:37 +03:00
store Put multi-table writes behind one transaction boundary 2026-08-19 14:05:40 +03:00
tools Make get_config the only configuration lookup 2026-08-19 14:43:40 +03:00
__init__.py
conftest.py
json_body_serializer.py Keep cross-encoder rerank scores apart when they saturate 2026-08-07 14:07:53 +03:00
services.py
test_ask_images.py
test_cascade_delete.py
test_chunk.py Make get_config the only configuration lookup 2026-08-19 14:43:40 +03:00
test_chunker.py Reject unknown and out-of-range configuration values 2026-08-19 15:32:51 +03:00
test_cli.py Move ingester telemetry setup behind argument parsing 2026-08-13 11:37:36 +03:00
test_client.py Make get_config the only configuration lookup 2026-08-19 14:43:40 +03:00
test_client_analyze.py
test_config.py Make the documented configuration match the code 2026-08-19 15:52:50 +03:00
test_context.py Remove the single-document item accessors the batching replaced 2026-08-18 17:12:10 +03:00
test_context_enhancement.py Make get_config the only configuration lookup 2026-08-19 14:43:40 +03:00
test_converters.py Reject unknown and out-of-range configuration values 2026-08-19 15:32:51 +03:00
test_database_autocreate.py Test vacuum against real table state 2026-07-27 12:11:01 +03:00
test_docling_serve_client.py Wire providers.docling_serve.timeout through to the client 2026-08-19 13:30:45 +03:00
test_doctor.py Reach and enforce 100% coverage 2026-07-26 20:11:02 +03:00
test_document.py Load document blobs only when asked 2026-08-06 13:04:51 +03:00
test_download_models.py Make get_config the only configuration lookup 2026-08-19 14:43:40 +03:00
test_duplicate_ingestion.py
test_embedder.py Make get_config the only configuration lookup 2026-08-19 14:43:40 +03:00
test_embedder_config.py Fix defects found reviewing the coverage work 2026-07-27 10:44:32 +03:00
test_enrichment_batching.py Stop the reranker fetch reading text it discards 2026-08-18 18:00:00 +03:00
test_filter.py
test_info.py
test_inspector.py Do not duplicate metadata items in inspector 2026-08-18 12:30:13 +02:00
test_lancedb_connection.py Make get_config the only configuration lookup 2026-08-19 14:43:40 +03:00
test_logging.py
test_mcp.py Make get_config the only configuration lookup 2026-08-19 14:43:40 +03:00
test_pdf_attachments.py
test_pdf_concurrency.py
test_pdf_split.py
test_picture_description.py
test_picture_in_context.py Make get_config the only configuration lookup 2026-08-19 14:43:40 +03:00
test_processing.py Normalize pragma comments to the codebase's single-line form 2026-07-26 20:18:19 +03:00
test_reader.py Make get_config the only configuration lookup 2026-08-19 14:43:40 +03:00
test_rebuild.py Make get_config the only configuration lookup 2026-08-19 14:43:40 +03:00
test_reranker.py Reject unknown and out-of-range configuration values 2026-08-19 15:32:51 +03:00
test_s3_integration.py
test_s3_source.py
test_search.py Make get_config the only configuration lookup 2026-08-19 14:43:40 +03:00
test_settings.py Make get_config the only configuration lookup 2026-08-19 14:43:40 +03:00
test_telemetry.py
test_title_generation.py Reach and enforce 100% coverage 2026-07-26 20:11:02 +03:00
test_utils.py Make get_config the only configuration lookup 2026-08-19 14:43:40 +03:00
test_vacuum_debounce.py Make get_config the only configuration lookup 2026-08-19 14:43:40 +03:00
test_versioning.py Make get_config the only configuration lookup 2026-08-19 14:43:40 +03:00