docs: record pipeline-reliability evidence and report
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,126 +1,78 @@
|
||||
# Проверки отказов
|
||||
|
||||
- Команда: `make failure_checks`
|
||||
- Дата: 2026-10-31, 04:03:17–04:25:08 UTC; код выхода 0
|
||||
- Commit: `ff1a83b`, рабочее дерево без правок кода (на момент прогона добавлены только файлы `evidence/`)
|
||||
- Стенд: проект `mtusi-lab5-failures` со своими PostgreSQL, Valkey, S3, RabbitMQ, уборщиком, worker и четырьмя API; рабочий стенд `mtusi-lab5` не трогается; стенд и его volumes удалены в конце
|
||||
- Итог: **99 passed, 212 deselected, pytest 1288,38 с (21:28); вся команда 1311 с (21:51)**; журнал PostgreSQL стенда без признаков аварии (`crash markers 0`)
|
||||
- Параметры: уборщик — grace 20 с, интервал 1 с, плановая сверка выключена; worker — 4 попытки, пауза 5 с, срок 10 с, graceful 2 с
|
||||
- Вывод сокращён: убран лог сборки и шаги compose при подъёме и уборке, адреса API временные
|
||||
- Дата: 2026-10-31, 12:40:09–13:20:12 UTC; код выхода 0
|
||||
- Commit: `e2a6427` (ветка `feat/pipeline-reliability`), рабочее дерево без правок кода (на момент прогона добавлена только метка `evidence/rollout/pipeline-reliability/`)
|
||||
- Стенд: проект `mtusi-lab5-failures` со своими PostgreSQL, Valkey, S3, RabbitMQ, уборщиком, relay, worker и четырьмя API; рабочий стенд `mtusi-lab5` на время прогона остановлен (хост свободен); стенд отказов и его volumes удалены в конце
|
||||
- Итог: **140 passed, 219 deselected, pytest 2372,74 с (39:32); вся команда 40:03**; журнал PostgreSQL стенда без признаков аварии (`crash markers 0`). «too many clients» 45 и «administrator command» 192 — следы самих проверок (заполнение слотов, остановки PostgreSQL)
|
||||
- Тесты с прошлого полного прогона (139 из 140) не правились в этом прогоне; `test_staging_cleanup_survives_outage` с прежней правкой прошёл в полном наборе. Временных красных нет
|
||||
- Параметры: уборщик — grace 20 с, интервал 1 с, плановая сверка выключена; worker — 4 попытки, пауза 4–16 с, срок 10 с, запас аренды 2 с, рендер 8 с / 3 с CPU, graceful 2 с; relay — опрос 0,2 с, повторная публикация через 5 с
|
||||
- Вывод сокращён: убраны лог сборки и шаги compose, адреса API временные, строки `PASSED` свёрнуты в список имён
|
||||
|
||||
```text
|
||||
[failure_checks] project=mtusi-lab5-failures (working stand: mtusi-lab5)
|
||||
[failure_checks] start cleaner: grace 20 s, interval 1 s, reconcile interval 0 s (0 — off)
|
||||
[failure_checks] start worker: attempts 4, retry delay 5 s, job timeout 10 s, graceful 2 s
|
||||
[failure_checks] start api containers
|
||||
[failure_checks] ready: api=http://127.0.0.1:62260 tight=http://127.0.0.1:62264 uploads=http://127.0.0.1:62269 s3=http://127.0.0.1:62273
|
||||
[failure_checks] start worker: attempts 4, retry 4–16 s, job timeout 10 s, lease margin 2 s, render 8 s / 3 s CPU, graceful 2 s
|
||||
[failure_checks] start relay: poll 0.2 s, republish after 5 s
|
||||
[failure_checks] pytest -m fault
|
||||
collecting ... collected 311 items / 212 deselected / 99 selected
|
||||
|
||||
student-tests/test_failures.py::test_expired_token PASSED [ 1%]
|
||||
student-tests/test_failures.py::test_use_does_not_extend_session PASSED [ 2%]
|
||||
student-tests/test_failures.py::test_token_while_database_stopped PASSED [ 3%]
|
||||
student-tests/test_failures.py::test_members_failure_rolls_back_chat PASSED [ 4%]
|
||||
student-tests/test_failures.py::test_database_stopped_and_back PASSED [ 5%]
|
||||
student-tests/test_failures.py::test_pool_exhausted PASSED [ 6%]
|
||||
student-tests/test_failures.py::test_connection_limit_reached PASSED [ 7%]
|
||||
student-tests/test_failures.py::test_pool_keeps_connections PASSED [ 8%]
|
||||
student-tests/test_failures.py::test_readiness_without_database PASSED [ 9%]
|
||||
student-tests/test_failures.py::test_readiness_without_cache PASSED [ 10%]
|
||||
student-tests/test_failures.py::test_readiness_without_object_storage[stop] PASSED [ 11%]
|
||||
student-tests/test_failures.py::test_readiness_without_object_storage[pause] PASSED [ 12%]
|
||||
student-tests/test_failures.py::test_flush_cache PASSED [ 13%]
|
||||
student-tests/test_failures.py::test_valkey_stopped PASSED [ 14%]
|
||||
student-tests/test_failures.py::test_valkey_paused PASSED [ 15%]
|
||||
student-tests/test_failures.py::test_valkey_back PASSED [ 16%]
|
||||
student-tests/test_failures.py::test_message_failure_keeps_key_free PASSED [ 17%]
|
||||
student-tests/test_failures.py::test_database_outage_keeps_key_free PASSED [ 18%]
|
||||
student-tests/test_failures.py::test_key_free_after_ttl PASSED [ 19%]
|
||||
student-tests/test_failures.py::test_upload_with_object_storage_stopped PASSED [ 20%]
|
||||
student-tests/test_failures.py::test_rejected_uploads_leave_nothing PASSED [ 21%]
|
||||
student-tests/test_failures.py::test_metadata_insert_failure PASSED [ 22%]
|
||||
student-tests/test_failures.py::test_interrupted_body PASSED [ 23%]
|
||||
student-tests/test_failures.py::test_queued_failure_compensated PASSED [ 24%]
|
||||
student-tests/test_failures.py::test_killed_between_put_and_ready PASSED [ 25%]
|
||||
student-tests/test_failures.py::test_queued_commit_outcome_unknown PASSED [ 26%]
|
||||
student-tests/test_failures.py::test_upload_outlives_grace PASSED [ 27%]
|
||||
student-tests/test_failures.py::test_cleaner_failure_after_object_delete PASSED [ 28%]
|
||||
student-tests/test_failures.py::test_cleaner_survives_outages PASSED [ 29%]
|
||||
student-tests/test_failures.py::test_object_storage_stopped PASSED [ 30%]
|
||||
student-tests/test_failures.py::test_environment_does_not_change_limits PASSED [ 31%]
|
||||
student-tests/test_failures.py::test_object_storage_paused PASSED [ 32%]
|
||||
student-tests/test_failures.py::test_upload_slots_busy PASSED [ 33%]
|
||||
student-tests/test_failures.py::test_rejections_before_queue PASSED [ 34%]
|
||||
student-tests/test_failures.py::test_upload_waits_for_slot PASSED [ 35%]
|
||||
student-tests/test_failures.py::test_slot_released_after_failures PASSED [ 36%]
|
||||
student-tests/test_failures.py::test_slow_body PASSED [ 37%]
|
||||
student-tests/test_failures.py::test_upload_after_idle_s3 PASSED [ 38%]
|
||||
student-tests/test_failures.py::test_queued_while_worker_stopped PASSED [ 39%]
|
||||
student-tests/test_failures.py::test_processing_visible PASSED [ 40%]
|
||||
student-tests/test_failures.py::test_redelivery_of_ready_is_noop PASSED [ 41%]
|
||||
student-tests/test_failures.py::test_durable_state_at_202 PASSED [ 42%]
|
||||
student-tests/test_failures.py::test_transient_error_retried PASSED [ 43%]
|
||||
student-tests/test_failures.py::test_job_message_matches_schema PASSED [ 44%]
|
||||
student-tests/test_failures.py::test_queue_durable PASSED [ 45%]
|
||||
student-tests/test_failures.py::test_malformed_message_dropped PASSED [ 46%]
|
||||
student-tests/test_failures.py::test_unknown_job_acked PASSED [ 47%]
|
||||
student-tests/test_failures.py::test_worker_killed_during_processing PASSED [ 48%]
|
||||
student-tests/test_failures.py::test_duplicate_during_processing PASSED [ 49%]
|
||||
student-tests/test_failures.py::test_original_published_unchanged PASSED [ 50%]
|
||||
student-tests/test_failures.py::test_staging_corrupted PASSED [ 51%]
|
||||
student-tests/test_failures.py::test_staging_missing PASSED [ 52%]
|
||||
student-tests/test_failures.py::test_max_pixels_fit_worker_memory PASSED [ 53%]
|
||||
student-tests/test_failures.py::test_ready_failure_retried PASSED [ 54%]
|
||||
student-tests/test_failures.py::test_queued_between_attempts PASSED [ 55%]
|
||||
student-tests/test_failures.py::test_attempts_exhausted PASSED [ 56%]
|
||||
student-tests/test_failures.py::test_database_outage_during_processing PASSED [ 57%]
|
||||
student-tests/test_failures.py::test_undecodable_becomes_failed PASSED [ 58%]
|
||||
student-tests/test_failures.py::test_worker_down_api_serves PASSED [ 59%]
|
||||
student-tests/test_failures.py::test_concurrency_bounded PASSED [ 60%]
|
||||
student-tests/test_failures.py::test_api_killed_after_202 PASSED [ 61%]
|
||||
student-tests/test_failures.py::test_broker_restart_keeps_job PASSED [ 62%]
|
||||
student-tests/test_failures.py::test_broker_kill_keeps_confirmed PASSED [ 63%]
|
||||
student-tests/test_failures.py::test_defense_scenario PASSED [ 64%]
|
||||
student-tests/test_failures.py::test_upload_with_broker_stopped PASSED [ 65%]
|
||||
student-tests/test_failures.py::test_upload_with_broker_paused PASSED [ 66%]
|
||||
student-tests/test_failures.py::test_queue_deleted PASSED [ 67%]
|
||||
student-tests/test_failures.py::test_broker_recreated PASSED [ 68%]
|
||||
student-tests/test_failures.py::test_start_without_broker PASSED [ 69%]
|
||||
student-tests/test_failures.py::test_worker_survives_broker_restart PASSED [ 70%]
|
||||
student-tests/test_failures.py::test_content_before_ready PASSED [ 71%]
|
||||
student-tests/test_failures.py::test_message_with_queued_attachment PASSED [ 72%]
|
||||
student-tests/test_failures.py::test_attachment_failed_after_message PASSED [ 73%]
|
||||
student-tests/test_failures.py::test_replay_after_attachment_failed PASSED [ 74%]
|
||||
student-tests/test_failures.py::test_readiness_without_broker_and_worker[stop] PASSED [ 75%]
|
||||
student-tests/test_failures.py::test_readiness_without_broker_and_worker[pause] PASSED [ 76%]
|
||||
student-tests/test_failures.py::test_worker_stop_during_processing PASSED [ 77%]
|
||||
student-tests/test_failures.py::test_cleaner_keeps_current_work PASSED [ 78%]
|
||||
student-tests/test_failures.py::test_reconcile_finds_and_fixes PASSED [ 79%]
|
||||
student-tests/test_failures.py::test_reconcile_keeps_fresh_used_and_unknown PASSED [ 80%]
|
||||
student-tests/test_failures.py::test_reconcile_restored_original PASSED [ 81%]
|
||||
student-tests/test_failures.py::test_reconcile_change_limit PASSED [ 82%]
|
||||
student-tests/test_failures.py::test_reconcile_keeps_referenced_objects PASSED [ 83%]
|
||||
student-tests/test_failures.py::test_reconcile_limit_keeps_cleanup PASSED [ 84%]
|
||||
student-tests/test_failures.py::test_reconcile_foreign_key_untouched PASSED [ 85%]
|
||||
student-tests/test_failures.py::test_reconcile_object_storage_stopped PASSED [ 86%]
|
||||
student-tests/test_failures.py::test_reconcile_interrupted_by_database PASSED [ 87%]
|
||||
student-tests/test_failures.py::test_reconcile_under_load PASSED [ 88%]
|
||||
student-tests/test_failures.py::test_scheduled_reconcile PASSED [ 89%]
|
||||
student-tests/test_failures.py::test_reconcile_head_strategy_same_findings PASSED [ 90%]
|
||||
student-tests/test_failures.py::test_reconcile_deep_checksum PASSED [ 91%]
|
||||
student-tests/test_failures.py::test_reconcile_restore_needs_same_bytes PASSED [ 92%]
|
||||
student-tests/test_failures.py::test_reconcile_rate_limit PASSED [ 93%]
|
||||
student-tests/test_failures.py::test_reconcile_limit_stops_rechecks PASSED [ 94%]
|
||||
student-tests/test_failures.py::test_reconcile_row_with_other_id_key PASSED [ 95%]
|
||||
student-tests/test_failures.py::test_reconcile_fresh_overwrite_untouched PASSED [ 96%]
|
||||
student-tests/test_failures.py::test_reconcile_variant_objects PASSED [ 97%]
|
||||
student-tests/test_failures.py::test_reconcile_orphan_variant PASSED [ 98%]
|
||||
student-tests/test_failures.py::test_reconcile_keeps_current_work PASSED [100%]
|
||||
|
||||
=============== 99 passed, 212 deselected in 1288.38s (0:21:28) ================
|
||||
[failure_checks] postgres log: 500 lines, crash markers 0; "too many clients" 22, "administrator command" 163
|
||||
[failure_checks] cleanup
|
||||
collecting ... collected 359 items / 219 deselected / 140 selected
|
||||
=============== 140 passed, 219 deselected in 2372.74s (0:39:32) ===============
|
||||
[failure_checks] postgres log: 587 lines, crash markers 0; "too many clients" 45, "administrator command" 192
|
||||
[failure_checks] results: {'fault': 0, 'postgres': 0}
|
||||
make failure_checks 211,06s user 85,99s system 12% cpu 40:03,44 total
|
||||
```
|
||||
|
||||
«too many clients» и «administrator command» — ожидаемые записи: их вызывают `test_connection_limit_reached` (заполнение слотов) и остановки PostgreSQL в сценариях отказа.
|
||||
## Прошедшие проверки по порядку
|
||||
|
||||
```text
|
||||
test_expired_token test_use_does_not_extend_session test_token_while_database_stopped test_members_failure_rolls_back_chat
|
||||
test_database_stopped_and_back test_pool_exhausted test_connection_limit_reached test_pool_keeps_connections
|
||||
test_readiness_without_database test_readiness_without_cache test_readiness_without_object_storage[stop] test_readiness_without_object_storage[pause]
|
||||
test_flush_cache test_valkey_stopped test_valkey_paused test_valkey_back
|
||||
test_message_failure_keeps_key_free test_database_outage_keeps_key_free test_key_free_after_ttl
|
||||
test_upload_with_object_storage_stopped test_rejected_uploads_leave_nothing test_metadata_insert_failure test_interrupted_body
|
||||
test_queued_failure_compensated test_killed_between_put_and_ready test_queued_commit_outcome_unknown test_upload_outlives_grace
|
||||
test_cleaner_failure_after_object_delete test_cleaner_survives_outages test_object_storage_stopped test_environment_does_not_change_limits test_object_storage_paused
|
||||
test_upload_slots_busy test_rejections_before_queue test_upload_waits_for_slot test_slot_released_after_failures test_slow_body test_upload_after_idle_s3
|
||||
test_queued_while_worker_stopped test_processing_visible test_redelivery_of_ready_is_noop test_durable_state_at_202 test_transient_error_retried
|
||||
test_job_message_matches_schema test_queue_durable test_malformed_message_dropped test_unknown_job_acked
|
||||
test_worker_killed_during_processing test_duplicate_during_processing test_original_published_unchanged test_staging_corrupted test_staging_missing
|
||||
test_max_pixels_fit_worker_memory test_ready_failure_retried test_queued_between_attempts test_attempts_exhausted test_database_outage_during_processing
|
||||
test_undecodable_becomes_failed test_worker_down_api_serves test_concurrency_bounded test_api_killed_after_202
|
||||
test_broker_restart_keeps_job test_broker_kill_keeps_confirmed test_defense_scenario
|
||||
test_upload_with_broker_stopped test_upload_with_broker_paused test_queue_deleted test_broker_recreated test_start_without_broker test_worker_survives_broker_restart
|
||||
test_content_before_ready test_message_with_queued_attachment test_attachment_failed_after_message test_replay_after_attachment_failed
|
||||
test_readiness_without_broker_and_worker[stop] test_readiness_without_broker_and_worker[pause]
|
||||
test_worker_stop_during_processing test_worker_stop_during_render test_cleaner_keeps_current_work
|
||||
test_reconcile_finds_and_fixes test_reconcile_keeps_fresh_used_and_unknown test_reconcile_restored_original test_reconcile_change_limit
|
||||
test_reconcile_keeps_referenced_objects test_reconcile_limit_keeps_cleanup test_reconcile_foreign_key_untouched test_reconcile_object_storage_stopped
|
||||
test_reconcile_interrupted_by_database test_reconcile_under_load test_scheduled_reconcile test_reconcile_head_strategy_same_findings
|
||||
test_reconcile_deep_checksum test_reconcile_restore_needs_same_bytes test_reconcile_rate_limit test_reconcile_limit_stops_rechecks
|
||||
test_reconcile_row_with_other_id_key test_reconcile_fresh_overwrite_untouched test_reconcile_variant_objects test_reconcile_orphan_variant test_reconcile_keeps_current_work
|
||||
test_relay_killed_before_publish test_relay_killed_after_confirm test_relay_survives_broker_outage test_relay_survives_database_outage test_two_relays
|
||||
test_relay_respects_next_attempt test_lost_message_republished test_no_copies_while_queue_has_messages test_published_backlog_limit test_broker_memory_alarm
|
||||
test_crash_after_objects_before_commit test_crash_after_commit_before_ack test_retry_backoff_with_jitter test_retry_waits_outside_worker
|
||||
test_limit_pixels test_limit_oversized_staging test_limit_cpu_scan_bomb test_limit_memory test_limit_render_timeout test_render_killed
|
||||
test_hung_worker_lease_fencing test_long_attempt_keeps_lease test_last_attempt_lost
|
||||
test_replay_registry_dry_run test_replay_returns_work test_replay_ready_refused test_replay_in_progress_refused test_replay_without_source_refused test_replay_new_budget test_replay_by_code
|
||||
test_prefetch_bounded test_missing_variant test_cancelled_upload_of_previous_version
|
||||
test_staging_removed_after_ready test_staging_retention test_staging_keeps_current_work test_staging_cleanup_survives_outage test_staging_foreign_key_kept
|
||||
test_reconcile_orphan_staging test_defense_faults
|
||||
```
|
||||
|
||||
## Красные прогоны задачи 10.9: тесты ловят нарушение
|
||||
|
||||
Сняты до commit на рабочем дереве (design change `pipeline-reliability`, «Уточнения apply», п. 14): каждая регрессия применена, откачена, хэши `src` совпали со снимком до них, в commit не вошла.
|
||||
|
||||
| Регрессия | Какой тест красный | Причина в выводе |
|
||||
|---|---|---|
|
||||
| отметка `published_at` до подтверждения | `test_relay_killed_after_confirm` | `published_at` есть после KILL до подтверждения |
|
||||
| claim при живой аренде | `test_duplicate_during_processing` | нет записи `busy` |
|
||||
| фиксация без номера попытки | `test_hung_worker_lease_fencing` | нет записи `superseded` за 30 с |
|
||||
| ack до фиксации | `test_crash_after_objects_before_commit` (усиленный) | `messages_unacknowledged` 0 |
|
||||
| claim без проверки завершённого | `test_crash_after_commit_before_ack` | нет записи `finished` за 30 с |
|
||||
| replay без проверки состояния | `test_replay_ready_refused` | код 0 вместо 3 |
|
||||
| очистка без условия статуса | `test_staging_keeps_current_work` | объект staging незавершённого вложения удалён |
|
||||
| `FOR UPDATE` в очистке | `test_staging_cleanup_survives_outage` (усиленный) | сообщение ждало 4,79 с при границе 1 с |
|
||||
| рендер в процессе worker | `test_limit_cpu_scan_bomb` | `retry_exhausted` вместо `invalid_image` |
|
||||
| фиксированная пауза | `test_retry_backoff_with_jitter` | две паузы равны 4,0 |
|
||||
|
||||
Reference in New Issue
Block a user