Files
mtusi2026lab4/evidence/student-tests-first-run-f9f5ab9.txt
T
Alexey BodanyukandClaude Opus 5.5 85ca984ab8 lab4: доказательства из чистого clone, REPORT, текст PR
Прогон scripts/collect_evidence.py на свежем clone (f9f5ab9) + повтор своих тестов,
публичных проверок и замера стоимости после найденных им исправлений.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 15:55:03 +03:00

415 lines
43 KiB
Plaintext

# Own tests: unit + stand (pytest -v); failures restored in finally
# 2026-10-25T11:43:04Z, commit f9f5ab9 bench: сценарий прерванного apply на 2000 сирот, понятные подписи итогов
$ python -m pytest student-tests -v
============================= test session starts =============================
platform win32 -- Python 3.14.6, pytest-9.1.1, pluggy-1.7.0 -- C:\Users\wfa22\Desktop\Высоконагруженные приложения\lab4-clean\.venv\Scripts\python.exe
rootdir: C:\Users\wfa22\Desktop\Высоконагруженные приложения\lab4-clean
plugins: anyio-4.15.1
collecting ... collected 320 items
student-tests/test_api.py::test_register_never_returns_password_and_login_returns_bearer PASSED [ 0%]
student-tests/test_api.py::test_duplicate_username_is_409 PASSED [ 0%]
student-tests/test_api.py::test_bad_password_on_registration_is_400[short-11ch] PASSED [ 0%]
student-tests/test_api.py::test_bad_password_on_registration_is_400[ ] PASSED [ 1%]
student-tests/test_api.py::test_bad_password_on_registration_is_400[ \t \n \t \n \t \n ] PASSED [ 1%]
student-tests/test_api.py::test_bad_password_on_registration_is_400[\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f] PASSED [ 1%]
student-tests/test_api.py::test_edge_passwords_register_and_login[\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f] PASSED [ 2%]
student-tests/test_api.py::test_edge_passwords_register_and_login[with:colons:inside] PASSED [ 2%]
student-tests/test_api.py::test_edge_passwords_register_and_login[Twelve chars] PASSED [ 2%]
student-tests/test_api.py::test_wrong_password_and_unknown_user_give_the_same_401 PASSED [ 3%]
student-tests/test_api.py::test_malformed_basic_is_401_not_500[Basic \xe9] PASSED [ 3%]
student-tests/test_api.py::test_malformed_basic_is_401_not_500[Basic !!!] PASSED [ 3%]
student-tests/test_api.py::test_malformed_basic_is_401_not_500[Basic bm9fY29sb24=] PASSED [ 4%]
student-tests/test_api.py::test_malformed_basic_is_401_not_500[Basic //46eA==] PASSED [ 4%]
student-tests/test_api.py::test_malformed_basic_is_401_not_500[Bearer aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] PASSED [ 4%]
student-tests/test_api.py::test_malformed_basic_is_401_not_500[] PASSED [ 5%]
student-tests/test_api.py::test_logout_revokes_only_this_token PASSED [ 5%]
student-tests/test_api.py::test_x_user_id_basic_and_garbage_do_not_authenticate PASSED [ 5%]
student-tests/test_api.py::test_malformed_json_is_400[{] PASSED [ 5%]
student-tests/test_api.py::test_malformed_json_is_400[] PASSED [ 6%]
student-tests/test_api.py::test_malformed_json_is_400[[]] PASSED [ 6%]
student-tests/test_api.py::test_malformed_json_is_400[null] PASSED [ 6%]
student-tests/test_api.py::test_malformed_json_is_400[{"username": "abc_def", "display_name": NaN, "password": "Twelve-chars"}] PASSED [ 7%]
student-tests/test_api.py::test_malformed_json_is_400[{"username": "abc_def", "display_name": "x", "password": "Twelve-chars"}{"a": 1}] PASSED [ 7%]
student-tests/test_api.py::test_malformed_json_is_400[{"username": "abc_def", "display_name": "\ud800", "password": "Twelve-chars"}] PASSED [ 7%]
student-tests/test_api.py::test_invalid_registration_fields_are_400[body0] PASSED [ 8%]
student-tests/test_api.py::test_invalid_registration_fields_are_400[body1] PASSED [ 8%]
student-tests/test_api.py::test_invalid_registration_fields_are_400[body2] PASSED [ 8%]
student-tests/test_api.py::test_invalid_registration_fields_are_400[body3] PASSED [ 9%]
student-tests/test_api.py::test_invalid_registration_fields_are_400[body4] PASSED [ 9%]
student-tests/test_api.py::test_invalid_registration_fields_are_400[body5] PASSED [ 9%]
student-tests/test_api.py::test_unicode_limits_are_code_points_and_nul_is_stored PASSED [ 10%]
student-tests/test_api.py::test_oversized_body_and_wrong_content_type PASSED [ 10%]
student-tests/test_api.py::test_chat_validation PASSED [ 10%]
student-tests/test_api.py::test_foreign_chat_is_indistinguishable_from_missing PASSED [ 10%]
student-tests/test_api.py::test_chat_list_order_pagination_and_isolation PASSED [ 11%]
student-tests/test_api.py::test_history_pages_without_loss_or_duplicates PASSED [ 11%]
student-tests/test_api.py::test_bad_limit_or_cursor_is_400[limit=0] PASSED [ 11%]
student-tests/test_api.py::test_bad_limit_or_cursor_is_400[limit=101] PASSED [ 12%]
student-tests/test_api.py::test_bad_limit_or_cursor_is_400[limit=abc] PASSED [ 12%]
student-tests/test_api.py::test_bad_limit_or_cursor_is_400[limit=1&limit=2] PASSED [ 12%]
student-tests/test_api.py::test_bad_limit_or_cursor_is_400[cursor=] PASSED [ 13%]
student-tests/test_api.py::test_bad_limit_or_cursor_is_400[cursor=garbage] PASSED [ 13%]
student-tests/test_api.py::test_bad_limit_or_cursor_is_400[cursor=djF8bXx4fDF8Mg] PASSED [ 13%]
student-tests/test_api.py::test_bad_limit_or_cursor_is_400[cursor=djF8bXx4fDk5OTk5OTk5OTk5OTk5OTk5OTk5fHk=] PASSED [ 14%]
student-tests/test_api.py::test_cursor_bound_to_chat PASSED [ 14%]
student-tests/test_api.py::test_read_after_write PASSED [ 14%]
student-tests/test_api.py::test_malformed_cursor_values_are_400_on_both_lists PASSED [ 15%]
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[\xff] PASSED [ 15%]
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[{"text":"first","TEXT":"second"}] PASSED [ 15%]
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[{"text":"a","text":"b"}] PASSED [ 15%]
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[{"text":123}] PASSED [ 16%]
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[{"text":"valid"}}] PASSED [ 16%]
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[{"text":"valid"}]] PASSED [ 16%]
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[{"text":"x"} {}] PASSED [ 17%]
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[{"text":"x","sender_id":"11111111-1111-4111-8111-111111111111"}] PASSED [ 17%]
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[{"text":"x","attachment_ids":null}] PASSED [ 17%]
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[{"text":"x","attachment_ids":["nope"]}] PASSED [ 18%]
student-tests/test_api.py::test_bad_message_body_is_400_and_nothing_is_stored[{"text":" \n\t "}] PASSED [ 18%]
student-tests/test_api.py::test_ff_byte_body_on_registration_is_contract_error PASSED [ 18%]
student-tests/test_api.py::test_text_is_stored_verbatim_and_length_counts_raw_text PASSED [ 19%]
student-tests/test_api.py::test_unknown_attachment_ids_are_404 PASSED [ 19%]
student-tests/test_api.py::test_member_ids_are_compared_as_uuids_not_strings PASSED [ 19%]
student-tests/test_api.py::test_non_ascii_or_garbage_bearer_is_401_not_500[Bearer \xe9] PASSED [ 20%]
student-tests/test_api.py::test_non_ascii_or_garbage_bearer_is_401_not_500[Bearer .] PASSED [ 20%]
student-tests/test_api.py::test_non_ascii_or_garbage_bearer_is_401_not_500[Bearer a b] PASSED [ 20%]
student-tests/test_api.py::test_non_ascii_or_garbage_bearer_is_401_not_500[Bearer \xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9] PASSED [ 20%]
student-tests/test_api.py::test_non_ascii_or_garbage_bearer_is_401_not_500[bearer\taaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] PASSED [ 21%]
student-tests/test_api.py::test_login_with_a_body_is_rejected PASSED [ 21%]
student-tests/test_api.py::test_password_range_is_12_to_128_code_points PASSED [ 21%]
student-tests/test_api.py::test_every_api_response_carries_instance_and_request_id PASSED [ 22%]
student-tests/test_api.py::test_unicode_whitespace_only_strings_are_400[\xa0] PASSED [ 22%]
student-tests/test_api.py::test_unicode_whitespace_only_strings_are_400[\u2003\u2003] PASSED [ 22%]
student-tests/test_api.py::test_unicode_whitespace_only_strings_are_400[ \xa0\t\u3000] PASSED [ 23%]
student-tests/test_api.py::test_odd_registration_bodies_are_400_and_the_api_survives[{"username":"num_probe","display_name":"x","password":1e1000}] PASSED [ 23%]
student-tests/test_api.py::test_odd_registration_bodies_are_400_and_the_api_survives[{"username":"ff_probe","display_name":"x","password":"12345678901\xff"}] PASSED [ 23%]
student-tests/test_api.py::test_odd_registration_bodies_are_400_and_the_api_survives[{"username":"num_probe","display_name":1,"password":"Twelve-chars-ok"}] PASSED [ 24%]
student-tests/test_api.py::test_more_than_100_members_is_400 PASSED [ 24%]
student-tests/test_api.py::test_cursor_of_one_list_is_rejected_by_the_other PASSED [ 24%]
student-tests/test_attachments.py::test_png_and_jpeg_roundtrip_byte_for_byte PASSED [ 25%]
student-tests/test_attachments.py::test_metadata_reveals_no_storage_details PASSED [ 25%]
student-tests/test_attachments.py::test_original_is_not_stored_on_api_containers PASSED [ 25%]
student-tests/test_attachments.py::test_outsider_and_unknown_get_404 PASSED [ 25%]
student-tests/test_attachments.py::test_attachment_ids_are_checked_per_chat PASSED [ 26%]
student-tests/test_attachments.py::test_message_with_attachments_and_history PASSED [ 26%]
student-tests/test_attachments.py::test_idempotent_replay_with_attachments PASSED [ 26%]
student-tests/test_attachments.py::test_message_body_validation[{"attachment_ids":["%(a)s"]}] PASSED [ 27%]
student-tests/test_attachments.py::test_message_body_validation[{"text":null,"attachment_ids":["%(a)s"]}] PASSED [ 27%]
student-tests/test_attachments.py::test_message_body_validation[{"text":1,"attachment_ids":["%(a)s"]}] PASSED [ 27%]
student-tests/test_attachments.py::test_message_body_validation[{"text":"x","attachment_ids":null}] PASSED [ 28%]
student-tests/test_attachments.py::test_message_body_validation[{"text":"x","attachment_ids":"%(a)s"}] PASSED [ 28%]
student-tests/test_attachments.py::test_message_body_validation[{"text":"x","attachment_ids":{}}] PASSED [ 28%]
student-tests/test_attachments.py::test_message_body_validation[{"text":"x","attachment_ids":["%(a)s","%] PASSED [ 29%]
student-tests/test_attachments.py::test_message_body_validation[{"text":"x","attachment_ids":["%(a)s",1]] PASSED [ 29%]
student-tests/test_attachments.py::test_message_body_validation[{"text":"x","attachment_ids":["not-a-uui] PASSED [ 29%]
student-tests/test_attachments.py::test_message_body_validation[{"text":"","attachment_ids":[]}] PASSED [ 30%]
student-tests/test_attachments.py::test_message_body_validation[{"text":" "}] PASSED [ 30%]
student-tests/test_attachments.py::test_message_body_validation[{"text":"x","attachment_ids":[],"sender_] PASSED [ 30%]
student-tests/test_attachments.py::test_at_most_ten_attachments PASSED [ 30%]
student-tests/test_attachments.py::test_size_limit_through_the_load_balancer PASSED [ 31%]
student-tests/test_attachments.py::test_pixel_limit_before_decoding PASSED [ 31%]
student-tests/test_attachments.py::test_exactly_40_megapixels_is_accepted PASSED [ 31%]
student-tests/test_attachments.py::test_bad_content_is_415[png: first 33 bytes of the fixture] PASSED [ 32%]
student-tests/test_attachments.py::test_bad_content_is_415[png: truncated] PASSED [ 32%]
student-tests/test_attachments.py::test_bad_content_is_415[png: corrupt IDAT, valid CRC] PASSED [ 32%]
student-tests/test_attachments.py::test_bad_content_is_415[png: fewer rows than IHDR] PASSED [ 33%]
student-tests/test_attachments.py::test_bad_content_is_415[png: flipped byte] PASSED [ 33%]
student-tests/test_attachments.py::test_bad_content_is_415[png: bytes after IEND] PASSED [ 33%]
student-tests/test_attachments.py::test_bad_content_is_415[jpeg: no scan data after SOS] PASSED [ 34%]
student-tests/test_attachments.py::test_bad_content_is_415[jpeg: truncated] PASSED [ 34%]
student-tests/test_attachments.py::test_bad_content_is_415[mime: png bytes declared jpeg] PASSED [ 34%]
student-tests/test_attachments.py::test_bad_content_is_415[mime: jpeg bytes declared png] PASSED [ 35%]
student-tests/test_attachments.py::test_bad_content_is_415[mime: gif declared png] PASSED [ 35%]
student-tests/test_attachments.py::test_bad_content_is_415[mime: html declared png] PASSED [ 35%]
student-tests/test_attachments.py::test_bad_content_is_415[type: text/plain] PASSED [ 35%]
student-tests/test_attachments.py::test_bad_content_is_415[type: octet-stream] PASSED [ 36%]
student-tests/test_attachments.py::test_bad_content_is_415[type: multipart] PASSED [ 36%]
student-tests/test_attachments.py::test_bad_content_is_415[type: missing] PASSED [ 36%]
student-tests/test_attachments.py::test_empty_body_is_400 PASSED [ 37%]
student-tests/test_attachments.py::test_bad_filename_is_400[missing] PASSED [ 37%]
student-tests/test_attachments.py::test_bad_filename_is_400[filename=] PASSED [ 37%]
student-tests/test_attachments.py::test_bad_filename_is_400[filename=%20%20%20] PASSED [ 38%]
student-tests/test_attachments.py::test_bad_filename_is_400[filename=.] PASSED [ 38%]
student-tests/test_attachments.py::test_bad_filename_is_400[filename=..] PASSED [ 38%]
student-tests/test_attachments.py::test_bad_filename_is_400[filename=a%2Fb.png] PASSED [ 39%]
student-tests/test_attachments.py::test_bad_filename_is_400[filename=a%5Cb.png] PASSED [ 39%]
student-tests/test_attachments.py::test_bad_filename_is_400[filename=a%00b.png] PASSED [ 39%]
student-tests/test_attachments.py::test_bad_filename_is_400[filename=c1%C2%85.png] PASSED [ 40%]
student-tests/test_attachments.py::test_bad_filename_is_400[filename=tab%09.png] PASSED [ 40%]
student-tests/test_attachments.py::test_bad_filename_is_400[filename=photo%E2%80%AEgnp.exe] PASSED [ 40%]
student-tests/test_attachments.py::test_bad_filename_is_400[filename=%FF%FE.png] PASSED [ 40%]
student-tests/test_attachments.py::test_bad_filename_is_400[filename=a.png&filename=b.png] PASSED [ 41%]
student-tests/test_attachments.py::test_bad_filename_is_400[filename=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] PASSED [ 41%]
student-tests/test_attachments.py::test_unicode_filename_is_kept_and_safely_exposed PASSED [ 41%]
student-tests/test_attachments.py::test_variant_parameter PASSED [ 42%]
student-tests/test_balancing.py::test_one_session_is_served_by_every_real_replica PASSED [ 42%]
student-tests/test_balancing.py::test_write_on_one_replica_is_read_on_the_other PASSED [ 42%]
student-tests/test_balancing.py::test_lb_stops_routing_to_a_replica_that_is_alive_but_not_ready[0-pg_hba] PASSED [ 43%]
student-tests/test_balancing.py::test_lb_stops_routing_to_a_replica_that_is_alive_but_not_ready[0-network] PASSED [ 43%]
student-tests/test_balancing.py::test_lb_stops_routing_to_a_replica_that_is_alive_but_not_ready[1-pg_hba] PASSED [ 43%]
student-tests/test_balancing.py::test_lb_stops_routing_to_a_replica_that_is_alive_but_not_ready[1-network] PASSED [ 44%]
student-tests/test_balancing.py::test_graceful_stop_of_each_replica_loses_no_request[0] PASSED [ 44%]
student-tests/test_balancing.py::test_graceful_stop_of_each_replica_loses_no_request[1] PASSED [ 44%]
student-tests/test_balancing.py::test_killed_replica_bounded_errors_recovery_and_no_duplicates[0] PASSED [ 45%]
student-tests/test_balancing.py::test_killed_replica_bounded_errors_recovery_and_no_duplicates[1] PASSED [ 45%]
student-tests/test_balancing.py::test_graceful_shutdown_order_in_logs PASSED [ 45%]
student-tests/test_balancing.py::test_full_restart_lb_rediscovers_all_replicas PASSED [ 45%]
student-tests/test_balancing.py::test_scale_up_and_down_is_picked_up_without_errors PASSED [ 46%]
student-tests/test_balancing.py::test_compose_policy_limits_ports_secrets_images PASSED [ 46%]
student-tests/test_balancing.py::test_running_containers_have_limits_and_no_bypass_ports PASSED [ 46%]
student-tests/test_balancing.py::test_migrations_ran_once_by_the_migrate_service PASSED [ 47%]
student-tests/test_consistency.py::test_interrupted_and_stalled_uploads_leave_nothing PASSED [ 47%]
student-tests/test_consistency.py::test_crash_between_s3_put_and_commit_is_cleaned_by_janitor PASSED [ 47%]
student-tests/test_consistency.py::test_lost_answer_after_commit_never_deletes_the_object PASSED [ 48%]
student-tests/test_consistency.py::test_fresh_pending_upload_is_not_touched_by_janitor PASSED [ 48%]
student-tests/test_db.py::test_registration_race_exactly_one_201_and_seven_409 PASSED [ 48%]
student-tests/test_db.py::test_create_chat_rolls_back_after_the_chat_row_was_inserted PASSED [ 49%]
student-tests/test_db.py::test_migrations_rerun_is_a_noop PASSED [ 49%]
student-tests/test_db.py::test_100_messages_from_10_clients_keep_order_and_cursor_walk PASSED [ 49%]
student-tests/test_db.py::test_secrets_are_not_stored_in_plain_text PASSED [ 50%]
student-tests/test_explain.py::test_late_page_uses_index_range_not_filter PASSED [ 50%]
student-tests/test_failures.py::test_valkey_failure[stop] PASSED [ 50%]
student-tests/test_failures.py::test_valkey_failure[pause] PASSED [ 50%]
student-tests/test_failures.py::test_postgres_failure[stop] PASSED [ 51%]
student-tests/test_failures.py::test_postgres_failure[pause] PASSED [ 51%]
student-tests/test_failures.py::test_locked_table_gives_bounded_503 PASSED [ 51%]
student-tests/test_failures.py::test_logout_during_valkey_outage_is_never_lost PASSED [ 52%]
student-tests/test_idempotency.py::test_replay_returns_the_same_201_and_message_from_every_replica PASSED [ 52%]
student-tests/test_idempotency.py::test_other_body_with_the_same_key_is_409_and_keeps_the_original PASSED [ 52%]
student-tests/test_idempotency.py::test_key_order_and_missing_attachment_ids_are_the_same_body PASSED [ 53%]
student-tests/test_idempotency.py::test_missing_or_invalid_key_is_400[] PASSED [ 53%]
student-tests/test_idempotency.py::test_missing_or_invalid_key_is_400[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] PASSED [ 53%]
student-tests/test_idempotency.py::test_missing_or_invalid_key_is_400[\u043a\u043b\u044e\u0447] PASSED [ 54%]
student-tests/test_idempotency.py::test_missing_or_invalid_key_is_400[a b] PASSED [ 54%]
student-tests/test_idempotency.py::test_missing_or_invalid_key_is_400[a/b] PASSED [ 54%]
student-tests/test_idempotency.py::test_missing_or_invalid_key_is_400[a,b] PASSED [ 55%]
student-tests/test_idempotency.py::test_missing_or_invalid_key_is_400[a\tb] PASSED [ 55%]
student-tests/test_idempotency.py::test_missing_or_invalid_key_is_400[*] PASSED [ 55%]
student-tests/test_idempotency.py::test_repeated_key_header_is_400 PASSED [ 55%]
student-tests/test_idempotency.py::test_longest_key_and_every_allowed_character PASSED [ 56%]
student-tests/test_idempotency.py::test_scope_is_user_plus_chat_plus_key PASSED [ 56%]
student-tests/test_idempotency.py::test_outsider_and_revoked_session_never_see_the_stored_result PASSED [ 56%]
student-tests/test_idempotency.py::test_concurrent_same_key_through_different_replicas_creates_exactly_one PASSED [ 57%]
student-tests/test_idempotency.py::test_concurrent_same_key_different_bodies_one_wins PASSED [ 57%]
student-tests/test_idempotency.py::test_failure_after_the_key_insert_rolls_everything_back PASSED [ 57%]
student-tests/test_idempotency.py::test_client_timeout_then_retry_with_the_same_key_gives_the_committed_message PASSED [ 58%]
student-tests/test_idempotency.py::test_lock_timeout_is_a_transient_503_that_is_not_recorded PASSED [ 58%]
student-tests/test_idempotency.py::test_replay_after_the_serving_replica_is_stopped PASSED [ 58%]
student-tests/test_reconcile.py::test_detect_and_safely_fix_faults_on_both_sides PASSED [ 59%]
student-tests/test_reconcile.py::test_checksum_mode_finds_same_size_corruption PASSED [ 59%]
student-tests/test_reconcile.py::test_safety_valve_refuses_mass_deletion PASSED [ 59%]
student-tests/test_reconcile.py::test_store_outage_stops_the_run_without_damage[s3] PASSED [ 60%]
student-tests/test_reconcile.py::test_store_outage_stops_the_run_without_damage[postgres] PASSED [ 60%]
student-tests/test_reconcile.py::test_live_uploads_are_never_hurt_by_concurrent_apply PASSED [ 60%]
student-tests/test_sessions.py::test_short_ttl_expires[valkey] PASSED [ 60%]
student-tests/test_sessions.py::test_short_ttl_expires[postgres] PASSED [ 61%]
student-tests/test_sessions.py::test_restart_does_not_extend_ttl FAILED [ 61%]
student-tests/test_sessions.py::test_postgres_session_store PASSED [ 61%]
student-tests/test_storage_failures.py::test_s3_outage_is_503_and_text_keeps_working[stop] FAILED [ 62%]
student-tests/test_storage_failures.py::test_s3_outage_is_503_and_text_keeps_working[pause] PASSED [ 62%]
student-tests/test_storage_failures.py::test_upload_survives_failover_of_the_serving_replica PASSED [ 62%]
student-tests/test_storage_failures.py::test_bucket_is_private_outside_the_api PASSED [ 63%]
student-tests/test_storage_failures.py::test_s3_restart_keeps_objects PASSED [ 63%]
student-tests/unit/test_images.py::test_public_fixture_is_accepted PASSED [ 63%]
student-tests/unit/test_images.py::test_valid_png_kinds[rgba] PASSED [ 64%]
student-tests/unit/test_images.py::test_valid_png_kinds[palette] PASSED [ 64%]
student-tests/unit/test_images.py::test_valid_png_kinds[1bit] PASSED [ 64%]
student-tests/unit/test_images.py::test_valid_png_kinds[gray] PASSED [ 65%]
student-tests/unit/test_images.py::test_valid_png_kinds[noise] PASSED [ 65%]
student-tests/unit/test_images.py::test_valid_png_kinds[1x1] PASSED [ 65%]
student-tests/unit/test_images.py::test_interlaced_png_is_accepted PASSED [ 65%]
student-tests/unit/test_images.py::test_broken_png_is_415[first 33 bytes of the fixture] PASSED [ 66%]
student-tests/unit/test_images.py::test_broken_png_is_415[truncated (no IEND)] PASSED [ 66%]
student-tests/unit/test_images.py::test_broken_png_is_415[truncated in IDAT] PASSED [ 66%]
student-tests/unit/test_images.py::test_broken_png_is_415[flipped byte -> CRC error] PASSED [ 67%]
student-tests/unit/test_images.py::test_broken_png_is_415[garbage IDAT with valid CRC] PASSED [ 67%]
student-tests/unit/test_images.py::test_broken_png_is_415[fewer rows than IHDR] PASSED [ 67%]
student-tests/unit/test_images.py::test_broken_png_is_415[bytes after IEND (polyglot)] PASSED [ 68%]
student-tests/unit/test_images.py::test_broken_png_is_415[text] PASSED [ 68%]
student-tests/unit/test_images.py::test_broken_png_is_415[gif] PASSED [ 68%]
student-tests/unit/test_images.py::test_broken_png_is_415[two bytes of a signature] PASSED [ 69%]
student-tests/unit/test_images.py::test_pixel_limit_is_checked_from_the_header PASSED [ 69%]
student-tests/unit/test_images.py::test_png_verification_is_streaming_and_fast PASSED [ 69%]
student-tests/unit/test_images.py::test_jpeg_header_is_parsed_incrementally PASSED [ 70%]
student-tests/unit/test_images.py::test_valid_jpeg[base] SKIPPED (dj...) [ 70%]
student-tests/unit/test_images.py::test_valid_jpeg[prog] SKIPPED (dj...) [ 70%]
student-tests/unit/test_images.py::test_broken_jpeg_is_415[no scan data after SOS-] SKIPPED [ 70%]
student-tests/unit/test_images.py::test_broken_jpeg_is_415[truncated-] SKIPPED [ 71%]
student-tests/unit/test_images.py::test_good_filenames[photo.png] PASSED [ 71%]
student-tests/unit/test_images.py::test_good_filenames[\u0444\u043e\u0442\u043e \u043e\u0442\u043f\u0443\u0441\u043a\u0430.jpg] PASSED [ 71%]
student-tests/unit/test_images.py::test_good_filenames[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] PASSED [ 72%]
student-tests/unit/test_images.py::test_good_filenames[emoji \U0001f468\u200d\U0001f469\u200d\U0001f467.png] PASSED [ 72%]
student-tests/unit/test_images.py::test_good_filenames[ x ] PASSED [ 72%]
student-tests/unit/test_images.py::test_good_filenames[..x] PASSED [ 73%]
student-tests/unit/test_images.py::test_bad_filenames[] PASSED [ 73%]
student-tests/unit/test_images.py::test_bad_filenames[ ] PASSED [ 73%]
student-tests/unit/test_images.py::test_bad_filenames[\u3000] PASSED [ 74%]
student-tests/unit/test_images.py::test_bad_filenames[.] PASSED [ 74%]
student-tests/unit/test_images.py::test_bad_filenames[..] PASSED [ 74%]
student-tests/unit/test_images.py::test_bad_filenames[a/b.png] PASSED [ 75%]
student-tests/unit/test_images.py::test_bad_filenames[a\\b.png] PASSED [ 75%]
student-tests/unit/test_images.py::test_bad_filenames[a\x00b] PASSED [ 75%]
student-tests/unit/test_images.py::test_bad_filenames[c1\x85.png] PASSED [ 75%]
student-tests/unit/test_images.py::test_bad_filenames[tab\t.png] PASSED [ 76%]
student-tests/unit/test_images.py::test_bad_filenames[del\x7f.png] PASSED [ 76%]
student-tests/unit/test_images.py::test_bad_filenames[x\u2028y] PASSED [ 76%]
student-tests/unit/test_images.py::test_bad_filenames[photo\u202egnp.exe] PASSED [ 77%]
student-tests/unit/test_images.py::test_bad_filenames[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] PASSED [ 77%]
student-tests/unit/test_images.py::test_filename_must_be_single_and_present PASSED [ 77%]
student-tests/unit/test_images.py::test_query_must_be_valid_utf8 PASSED [ 78%]
student-tests/unit/test_unit.py::test_valid_passwords[Twelve-chars] PASSED [ 78%]
student-tests/unit/test_unit.py::test_valid_passwords[\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f] PASSED [ 78%]
student-tests/unit/test_unit.py::test_valid_passwords[\u043f\u0430\u0440\u043e\u043b\u044c:\u0441:\u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u044f\u043c\u0438] PASSED [ 79%]
student-tests/unit/test_unit.py::test_valid_passwords[\U0001f600\U0001f600\U0001f600\U0001f600\U0001f600\U0001f600\U0001f600\U0001f600\U0001f600\U0001f600\U0001f600\U0001f600] PASSED [ 79%]
student-tests/unit/test_unit.py::test_valid_passwords[a b c d e f g] PASSED [ 79%]
student-tests/unit/test_unit.py::test_invalid_passwords[short-11ch] PASSED [ 80%]
student-tests/unit/test_unit.py::test_invalid_passwords[\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f\u044f] PASSED [ 80%]
student-tests/unit/test_unit.py::test_invalid_passwords[ ] PASSED [ 80%]
student-tests/unit/test_unit.py::test_invalid_passwords[\t\n\u3000\t\n\u3000\t\n\u3000\t\n\u3000\t\n\u3000] PASSED [ 80%]
student-tests/unit/test_unit.py::test_invalid_passwords[\ud800\ud800\ud800\ud800\ud800\ud800\ud800\ud800\ud800\ud800\ud800\ud800] PASSED [ 81%]
student-tests/unit/test_unit.py::test_invalid_passwords[None] PASSED [ 81%]
student-tests/unit/test_unit.py::test_invalid_passwords[123456789012] PASSED [ 81%]
student-tests/unit/test_unit.py::test_text_may_contain_nul_but_not_lone_surrogates PASSED [ 82%]
student-tests/unit/test_unit.py::test_cursor_roundtrip_and_binding PASSED [ 82%]
student-tests/unit/test_unit.py::test_broken_cursors_are_400_not_500[v1|m|3f2c7a5e-0b7d-4a35-9a43-8d1f0f3b2c11|253402300800000000|11111111-1111-4111-8111-111111111111] PASSED [ 82%]
student-tests/unit/test_unit.py::test_broken_cursors_are_400_not_500[v1|m|3f2c7a5e-0b7d-4a35-9a43-8d1f0f3b2c11|9999999999999999999|11111111-1111-4111-8111-111111111111] PASSED [ 83%]
student-tests/unit/test_unit.py::test_broken_cursors_are_400_not_500[v1|m|3f2c7a5e-0b7d-4a35-9a43-8d1f0f3b2c11|-1|11111111-1111-4111-8111-111111111111] PASSED [ 83%]
student-tests/unit/test_unit.py::test_broken_cursors_are_400_not_500[v1|m|3f2c7a5e-0b7d-4a35-9a43-8d1f0f3b2c11|1|not-a-uuid] PASSED [ 83%]
student-tests/unit/test_unit.py::test_broken_cursors_are_400_not_500[v1|m|3f2c7a5e-0b7d-4a35-9a43-8d1f0f3b2c11|1|11111111-1111-4111-8111-11111111111G] PASSED [ 84%]
student-tests/unit/test_unit.py::test_broken_cursors_are_400_not_500[v2|m|3f2c7a5e-0b7d-4a35-9a43-8d1f0f3b2c11|1|11111111-1111-4111-8111-111111111111] PASSED [ 84%]
student-tests/unit/test_unit.py::test_time_helpers_are_exact PASSED [ 84%]
student-tests/unit/test_unit.py::test_basic_is_parsed_and_password_may_contain_colons PASSED [ 85%]
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[None] PASSED [ 85%]
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[] PASSED [ 85%]
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[Basic] PASSED [ 85%]
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[Basic \xe9] PASSED [ 86%]
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[Basic !!!!] PASSED [ 86%]
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[Basic bm8tY29sb24=] PASSED [ 86%]
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[Basic //46cHc=] PASSED [ 87%]
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[Basic OnBhc3N3b3Jk] PASSED [ 87%]
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[Basic YWxpY2U6] PASSED [ 87%]
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[Basic 0JDQu9C40YHQsDpwdw==] PASSED [ 88%]
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[Bearer aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] PASSED [ 88%]
student-tests/unit/test_unit.py::test_bad_basic_is_401_with_basic_challenge[Basic AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA] PASSED [ 88%]
student-tests/unit/test_unit.py::test_bad_bearer_is_401_with_bearer_challenge[None] PASSED [ 89%]
student-tests/unit/test_unit.py::test_bad_bearer_is_401_with_bearer_challenge[] PASSED [ 89%]
student-tests/unit/test_unit.py::test_bad_bearer_is_401_with_bearer_challenge[Bearer] PASSED [ 89%]
student-tests/unit/test_unit.py::test_bad_bearer_is_401_with_bearer_challenge[Bearer short] PASSED [ 90%]
student-tests/unit/test_unit.py::test_bad_bearer_is_401_with_bearer_challenge[Bearer aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!] PASSED [ 90%]
student-tests/unit/test_unit.py::test_bad_bearer_is_401_with_bearer_challenge[Basic YWxpY2U6cGFzc3dvcmQtMTIz] PASSED [ 90%]
student-tests/unit/test_unit.py::test_bad_bearer_is_401_with_bearer_challenge[Token aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] PASSED [ 90%]
student-tests/unit/test_unit.py::test_bad_bearer_is_401_with_bearer_challenge[Bearer \xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9\xe9] PASSED [ 91%]
student-tests/unit/test_unit.py::test_bearer_ok PASSED [ 91%]
student-tests/unit/test_unit.py::test_argon2id_hash_and_verify PASSED [ 91%]
student-tests/unit/test_unit.py::test_s3_settings_are_validated_and_contract_limits_cannot_be_raised PASSED [ 92%]
student-tests/unit/test_unit.py::test_settings_read_secret_files_and_contract_names PASSED [ 92%]
student-tests/unit/test_unit.py::test_valid_idempotency_keys[a] PASSED [ 92%]
student-tests/unit/test_unit.py::test_valid_idempotency_keys[kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk] PASSED [ 93%]
student-tests/unit/test_unit.py::test_valid_idempotency_keys[A-Za-z0-9._:-] PASSED [ 93%]
student-tests/unit/test_unit.py::test_valid_idempotency_keys[2026-10-16T10:00:00.1] PASSED [ 93%]
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[None] PASSED [ 94%]
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[] PASSED [ 94%]
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk] PASSED [ 94%]
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[\u043a\u043b\u044e\u0447] PASSED [ 95%]
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[a b] PASSED [ 95%]
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[a/b] PASSED [ 95%]
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[a,b] PASSED [ 95%]
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[a\tb] PASSED [ 96%]
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[a\x00b] PASSED [ 96%]
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[*] PASSED [ 96%]
student-tests/unit/test_unit.py::test_invalid_idempotency_keys[\xe9] PASSED [ 97%]
student-tests/unit/test_unit.py::test_duplicate_keys_and_garbage_json_are_rejected[{"text":"a","text":"b"}] PASSED [ 97%]
student-tests/unit/test_unit.py::test_duplicate_keys_and_garbage_json_are_rejected[{"a":{"x":1,"x":2}}] PASSED [ 97%]
student-tests/unit/test_unit.py::test_duplicate_keys_and_garbage_json_are_rejected[\xff] PASSED [ 98%]
student-tests/unit/test_unit.py::test_duplicate_keys_and_garbage_json_are_rejected[{"text":"x"} {}] PASSED [ 98%]
student-tests/unit/test_unit.py::test_attachment_ids_absent_equals_empty_and_is_validated PASSED [ 98%]
student-tests/unit/test_unit.py::test_request_fingerprint_ignores_key_order_and_default_attachments PASSED [ 99%]
student-tests/unit/test_unit.py::test_instance_id_defaults_to_hostname_and_is_validated PASSED [ 99%]
student-tests/unit/test_unit.py::test_idempotency_ttl_cannot_be_below_24_hours PASSED [ 99%]
student-tests/unit/test_unit.py::test_message_write_path_setting PASSED [100%]
================================== FAILURES ===================================
______________________ test_restart_does_not_extend_ttl _______________________
api = <conftest.Api object at 0x000002244DC7BCB0>
def test_restart_does_not_extend_ttl(api):
with api_with_env(SESSION_TTL_SECONDS="12"):
actor = api.register("ttlrestart")
session = login_session(api, actor)
restart_services("valkey", "api")
> assert seconds_left(session["expires_at"]) > 0, "restart took longer than the TTL; increase it"
E AssertionError: restart took longer than the TTL; increase it
E assert -0.024317 > 0
E + where -0.024317 = seconds_left('2026-10-25T12:00:02.431630Z')
student-tests\test_sessions.py:45: AssertionError
_____________ test_s3_outage_is_503_and_text_keeps_working[stop] ______________
api = <conftest.Api object at 0x000002244DC7BCB0>
pair = ({'id': '4b97c381-df7f-48f6-92df-bb7a17232630', 'user': {'id': '4b97c381-df7f-48f6-92df-bb7a17232630', 'username': 'al...81-df7f-48f6-92df-bb7a17232630', '1a1510cc-7f0b-423f-8645-70e2fa838cb2'], 'created_at': '2026-10-25T12:01:26.054625Z'})
how = 'stop'
@pytest.mark.parametrize("how", ["stop", "pause"])
def test_s3_outage_is_503_and_text_keeps_working(api, pair, how):
"""S3 down (stopped: connection refused; paused: no answer at all):
* readiness is 503 on every replica (and through the LB), quickly;
* uploads/downloads are 503 `unavailable` within the S3 deadline, never 500;
* the LB's degraded mode keeps chats/text messages working (HAProxy backend api_core);
* after recovery the earlier file is intact."""
alice, bob, chat = pair
att = api.upload(alice, chat, SAMPLE).json()
with service_down("s3", how):
deadline = time.monotonic() + 15
while api.client.get("/health/ready").status_code != 503:
assert time.monotonic() < deadline, "readiness did not turn 503"
time.sleep(0.5)
for replica in running_replicas():
assert probe_inside(replica, "/health/ready") == 503
assert probe_inside(replica, "/health/ready/core") == 200
started = time.monotonic()
error = api.upload(alice, chat, SAMPLE, 503).json()
assert error["error"]["code"] == "unavailable"
assert time.monotonic() - started < 8
started = time.monotonic()
api.call("GET", f"/api/v1/attachments/{att['id']}/content", 503, token=bob["token"])
assert time.monotonic() - started < 8
api.call("GET", f"/api/v1/attachments/{att['id']}", 200, token=bob["token"]) # metadata: PostgreSQL only
api.send(alice, chat, "текст работает без S3") # degraded mode
> got = api.call("GET", f"/api/v1/attachments/{att['id']}/content", 200, token=bob["token"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
student-tests\test_storage_failures.py:53:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <conftest.Api object at 0x000002244DC7BCB0>, method = 'GET'
path = '/api/v1/attachments/57b6e686-85b7-4dd3-8e02-076b19a8ca79/content'
expected = 200, token = 'S12UUVFiNSnc1NKWb-5PmdJBo9_J6P1-5TihoVd7xBs'
json_body = None, raw = None, headers = None, schema = None, lb_error_ok = False
def call(self, method: str, path: str, expected: int | tuple[int, ...], *, token: str | None = None,
json_body=None, raw: bytes | None = None, headers: dict | None = None, schema: str | None = None,
lb_error_ok: bool = False):
"""lb_error_ok: a 502/503/504 generated by HAProxy itself (no API replica answered) is
accepted without X-Instance-Id; every response of an API replica must carry it."""
h = dict(headers or {})
if token is not None:
h["Authorization"] = "Bearer " + token
if json_body is not None:
raw = json.dumps(json_body, ensure_ascii=False).encode("utf-8")
h.setdefault("Content-Type", "application/json")
response = self.client.request(method, path, content=raw, headers=h)
allowed = (expected,) if isinstance(expected, int) else expected
> assert response.status_code in allowed, (method, path, response.status_code, response.text[:300])
E AssertionError: ('GET', '/api/v1/attachments/57b6e686-85b7-4dd3-8e02-076b19a8ca79/content', 503, '{"error":{"code":"unavailable","message":"Хранилище файлов временно недоступно","request_id":"8ecf9351-b1db-4e6d-99da-89f4de083683"}}')
E assert 503 in (200,)
E + where 503 = <Response [503 Service Unavailable]>.status_code
student-tests\conftest.py:184: AssertionError
=========================== short test summary info ===========================
FAILED student-tests/test_sessions.py::test_restart_does_not_extend_ttl - Ass...
FAILED student-tests/test_storage_failures.py::test_s3_outage_is_503_and_text_keeps_working[stop]
============ 2 failed, 314 passed, 4 skipped in 1229.88s (0:20:29) ============
[exit 1, 1231.4 s]