haiku.rag/tests/cassettes
Yiorgis Gozadinos 2da294b850
Put multi-table writes behind one transaction boundary
Four call sites repeated lock, snapshot, try/except, restore. Each used
restore_table_versions, which restores in _tables() order — documents
first, contradicting RESTORE_TABLE_ORDER — and each caught Exception, so
a cancellation mid-write skipped rollback and left the earlier table
writes committed.

Store.write_transaction() holds the lock, snapshots under it, and rolls
back through _rollback_to_snapshot: RESTORE_TABLE_ORDER, shielded from
cancellation, absorbed cancellation re-delivered, rollback failure raised
with the original as cause. The two single-table update_meta sites keep
the bare lock.

The batch documents write moves inside the guarded body; it was outside
the try, so a failure there was never rolled back. Auto-vacuum is
scheduled after the transaction rather than inside it.

restore_table_versions is removed; those four sites were its only callers.
2026-08-19 14:05:40 +03:00
..
test_chunk Fix defects found reviewing the coverage work 2026-07-27 10:44:32 +03:00
test_chunker
test_client Close the source adapter one-shot ingestion builds 2026-08-19 13:14:21 +03:00
test_client_analyze
test_context_enhancement
test_converters
test_database_autocreate
test_document_tools
test_duplicate_ingestion
test_embedder
test_filter
test_picture_in_context
test_read_only
test_rebuild Refresh source-backed documents in place on a FULL rebuild 2026-08-19 13:06:39 +03:00
test_reranker
test_revision_round_trip
test_s3_source
test_sandbox Recover from worker death and deny metadata writes 2026-07-28 19:11:19 +03:00
test_search
test_search_tools Report tool failures with ToolFailed 2026-07-27 18:26:42 +03:00
test_versioning Put multi-table writes behind one transaction boundary 2026-08-19 14:05:40 +03:00