haiku.rag/tests/cassettes/test_rebuild
Yiorgis Gozadinos f96a428ef1
Fix defects found reviewing the coverage work
check_source_accessible narrowed its handler to ValueError, but Path.exists
re-raises errno values outside its ignored set (EACCES, ENAMETOOLONG). Those
were swallowed before and now escaped into the rebuild sweep the guard exists
to protect. Catch OSError too.

Restore the arity guard in _common_path_prefix: without it an empty list
raises from min() and a single label yields a prefix covering the whole path.

Two tests would have hung rather than failed on regression (the vacuum skip
and the protected-wait cancellation); both are now bounded. The import
vacuum test raced against the done-callback that discards the task, and now
spies on the call instead, with a negative control.

Replace assertions that could not fail: blank-query search against an empty
corpus, a batch flush counted against an empty table, a picture description
asserting its own input state, and an FS scheme check with nothing on disk to
resolve. The get_model matrix asserted only the returned type across 26
cases and now pins the per-provider settings. The three batching tests now
count flushes, which revealed embed-only writes through chunks_table.add
rather than _flush_rebuild_batch.
2026-07-27 10:44:32 +03:00
..
test_flush_rebuild_batch_is_a_noop_without_documents.yaml Fix defects found reviewing the coverage work 2026-07-27 10:44:32 +03:00
test_patch_picture_descriptions_returns_zero_for_doc_without_pictures.yaml Fix vcr test 2026-05-05 14:38:03 +03:00
test_rebuild_batch_size_flush.yaml
test_rebuild_descriptions_flushes_in_batches.yaml Cover the rebuild paths 2026-07-26 19:32:09 +03:00
test_rebuild_descriptions_patches_blob_and_chunks.yaml Update benchmark 2026-05-05 13:58:48 +03:00
test_rebuild_descriptions_skips_already_described.yaml Update benchmark 2026-05-05 13:58:48 +03:00
test_rebuild_drops_leftover_staging_table.yaml Stream rebuild --embed-only through a staging table to bound memory 2026-05-14 15:02:12 +03:00
test_rebuild_embed_only.yaml
test_rebuild_embed_only_flushes_in_batches.yaml Cover the rebuild paths 2026-07-26 19:32:09 +03:00
test_rebuild_embed_only_multi_doc_streams_via_staging.yaml Stream rebuild --embed-only through a staging table to bound memory 2026-05-14 15:02:12 +03:00
test_rebuild_embed_only_recovers_picture_bytes[recoverable].yaml Cover the rebuild paths 2026-07-26 19:32:09 +03:00
test_rebuild_embed_only_recovers_picture_bytes[wiped].yaml Cover the rebuild paths 2026-07-26 19:32:09 +03:00
test_rebuild_embed_only_skips_unchanged.yaml
test_rebuild_embed_only_with_changed_vector_dim.yaml
test_rebuild_embed_only_yields_documents_without_chunks.yaml Cover the rebuild paths 2026-07-26 19:32:09 +03:00
test_rebuild_full.yaml
test_rebuild_full_flushes_in_batches.yaml Cover the rebuild paths 2026-07-26 19:32:09 +03:00
test_rebuild_full_flushes_pending_before_source_rebuild.yaml Cover the rebuild paths 2026-07-26 19:32:09 +03:00
test_rebuild_full_skips_document_deleted_mid_rebuild.yaml Cover the rebuild paths 2026-07-26 19:32:09 +03:00
test_rebuild_full_source_failure_is_logged_and_skipped.yaml Cover FULL rebuild source-failure branch 2026-04-24 15:32:53 +03:00
test_rebuild_full_warns_when_source_is_missing.yaml Cover the rebuild paths 2026-07-26 19:32:09 +03:00
test_rebuild_full_with_accessible_source.yaml
test_rebuild_non_embed_mode_drops_staging_recovery_state.yaml Make rebuild --embed-only idempotent across crashes 2026-05-14 15:02:12 +03:00
test_rebuild_rechunk.yaml emit synthetic picture chunks at ingest under multimodal embedders. 2026-05-03 17:04:43 +03:00
test_rebuild_resumes_phase2_from_staging_after_crash.yaml Make rebuild --embed-only idempotent across crashes 2026-05-14 15:02:12 +03:00
test_rebuild_warns_when_post_rebuild_vacuum_fails.yaml Cover the rebuild paths 2026-07-26 19:32:09 +03:00
test_rechunk_raises_when_docling_blob_is_missing.yaml Cover the rebuild paths 2026-07-26 19:32:09 +03:00