> python tests.py

test_ambiguous_decimal_and_extra_precision_rejected (__main__.DatabaseTests.test_ambiguous_decimal_and_extra_precision_rejected) ... ok
test_concurrent_reviews_one_wins_other_is_stale (__main__.DatabaseTests.test_concurrent_reviews_one_wins_other_is_stale) ... ok
test_currency_and_unit_change_remain_explicit_in_diff (__main__.DatabaseTests.test_currency_and_unit_change_remain_explicit_in_diff) ... ok
test_duplicate_headers_and_unclosed_quote_are_blocked (__main__.DatabaseTests.test_duplicate_headers_and_unclosed_quote_are_blocked) ... ok
test_duplicate_normalized_keys_reject_both_and_block_batch (__main__.DatabaseTests.test_duplicate_normalized_keys_reject_both_and_block_batch) ... ok
test_explicit_european_decimal_mapping (__main__.DatabaseTests.test_explicit_european_decimal_mapping) ... ok
test_full_report_includes_all_pages (__main__.DatabaseTests.test_full_report_includes_all_pages) ... ok
test_invalid_unicode_is_rejected_without_server_error (__main__.DatabaseTests.test_invalid_unicode_is_rejected_without_server_error) ... ok
test_mid_batch_fault_rolls_back_items_version_and_audit (__main__.DatabaseTests.test_mid_batch_fault_rolls_back_items_version_and_audit) ... ok
test_newlines_in_quoted_description_are_retained (__main__.DatabaseTests.test_newlines_in_quoted_description_are_retained) ... ok
test_quoted_csv_aliases_diff_and_missing_rows (__main__.DatabaseTests.test_quoted_csv_aliases_diff_and_missing_rows) ... ok
test_refresh_changes_review_digest_and_requires_new_review (__main__.DatabaseTests.test_refresh_changes_review_digest_and_requires_new_review) ... ok
test_response_loss_retry_returns_committed_result_once (__main__.DatabaseTests.test_response_loss_retry_returns_committed_result_once) ... ok
test_source_digest_is_idempotent_and_bytes_preserved (__main__.DatabaseTests.test_source_digest_is_idempotent_and_bytes_preserved) ... ok
test_http_authentication_csrf_origin_and_host_checks (__main__.HttpTests.test_http_authentication_csrf_origin_and_host_checks) ... ok
test_http_full_review_and_download_workflow (__main__.HttpTests.test_http_full_review_and_download_workflow) ... ok
test_http_importer_cannot_approve (__main__.HttpTests.test_http_importer_cannot_approve) ... ok
test_http_path_traversal_is_not_a_file_route (__main__.HttpTests.test_http_path_traversal_is_not_a_file_route) ... ok
test_http_reader_cannot_stage_or_approve (__main__.HttpTests.test_http_reader_cannot_stage_or_approve) ... ok
test_http_static_page_and_malformed_input (__main__.HttpTests.test_http_static_page_and_malformed_input) ... ok

----------------------------------------------------------------------
Ran 20 tests in 3.209s

OK

> python operations_rehearsal.py
PASS crash.rollback: Abrupt process exit before commit rolls back every application write
PASS crash.response: Retry after committed child exits returns original approval
PASS load.concurrent: Eight suppliers preserve all rows under four concurrent writers
PASS load.versions: Each concurrent supplier advances exactly once
PASS http.local: Reviewer login and authenticated read succeed
PASS http.boundary: Foreign Host and Origin requests are rejected
PASS restart.session: Process-local sessions do not survive restart
PASS backup.snapshot: Online snapshot excludes uncommitted data and passes integrity
PASS restore.business: Restored supplier, item, batch and audit content is identical
PASS restore.idempotency: Restored batch still prevents duplicate application
PASS restore.corruption: Corrupt snapshot rejected before destination creation
PASS restore.no-overwrite: Existing restore destination is preserved
PASS integrity.final: Final source passes integrity and foreign-key checks
PASS backup.schedule: Finite scheduler creates two checked snapshots and stops
{"checks": 14, "passed": 14, "elapsed_seconds": 0.85}


