haiku.rag/tests
Yiorgis Gozadinos 7f54eb4dbc
Measure the CLI and its application layer
cli.py carried 40 pragmas over whole command bodies and app.py a
class-level one over all 412 statements, while tests/test_cli.py already
drove 29 commands through CliRunner. The pragmas hid lines the suite
executed, so the 100% gate understated real coverage and gave new CLI code
no scrutiny.

Both are measured now. 38 CLI tests stub HaikuRAGApp and assert the parsed
arguments reach the right method; 60 app tests stub the client and record
the console, pinning what each command asks for and what it prints. The only
pragma left in either file is cli() under __main__. The omit list is back to
the two Textual TUIs.

Three defects the coverage surfaced:

haiku-rag settings masked only top-level secret-named fields, so nested ones
printed in full — lancedb.api_key, providers.docling_serve.api_key, WebDAV
source passwords. It uses redact_secrets, which walks the dump.

chat guarded the wrong thing: haiku.rag.chat imports without Textual, and
run_chat raises when it imports ChatApp, so the missing extra escaped as an
ImportError. The guard is on the call. inspector raises at module import
instead, so inspect keeps its guard on the import; each has a test that
fails the way the real installation fails.

search --limit/--search-type and history --limit default to None so the
config resolves the default. Now pinned.

CI passed --cov=haiku while pyproject declares source = ["haiku_rag_slim"];
pass --cov and let the config decide. build-docs.yml only ran on push to
main, so a broken docs build merged and failed at deploy: build on pull
requests, with configure-pages, upload-pages-artifact and deploy gated to
push, and a per-ref concurrency group.
2026-08-20 13:23:00 +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 source adapters out of the ingester package 2026-08-20 11:46:55 +03:00
sandbox Point the limit comments at the right limits 2026-07-28 19:11:37 +03:00
sources Move source adapters out of the ingester package 2026-08-20 11:46:55 +03:00
store Split the store module by responsibility 2026-08-20 12:13:51 +03:00
tools Make get_config the only configuration lookup 2026-08-19 14:43:40 +03:00
__init__.py
conftest.py Consolidate duplicated client-side tests 2026-07-26 13:30:59 +03:00
json_body_serializer.py Keep cross-encoder rerank scores apart when they saturate 2026-08-07 14:07:53 +03:00
services.py
test_app.py Measure the CLI and its application layer 2026-08-20 13:23:00 +03:00
test_ask_images.py Accept images on ask/analyze 2026-07-25 10:23:55 +03:00
test_cascade_delete.py Skip embedding validation on document deletion 2026-07-22 10:48:00 +03:00
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 Measure the CLI and its application layer 2026-08-20 13:23:00 +03:00
test_client.py Move source adapters out of the ingester package 2026-08-20 11:46:55 +03:00
test_client_analyze.py replace haiku.skills with native Pydantic AI capabilities 2026-07-24 15:26:17 +03:00
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 Split the store module by responsibility 2026-08-20 12:13:51 +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 Re-check URI under the write lock to prevent duplicate ingestion 2026-07-08 11:26:45 +03:00
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 Rename document_meta identity column document_id to id 2026-07-08 16:32:55 +03:00
test_info.py Split the store module by responsibility 2026-08-20 12:13:51 +03:00
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 Move source adapters out of the ingester package 2026-08-20 11:46:55 +03:00
test_pdf_concurrency.py
test_pdf_split.py Cover MCP, ingester and converter error paths 2026-07-26 19:14:26 +03:00
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 Split the store module by responsibility 2026-08-20 12:13:51 +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 Split the store module by responsibility 2026-08-20 12:13:51 +03:00
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 Route eval scripts through the shared telemetry configure 2026-07-10 11:38:33 +03:00
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