docs: record pipeline-reliability evidence and report

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-31 16:51:29 +03:00
co-authored by Claude Opus 5.5
parent e2a6427c24
commit 6bd60532aa
38 changed files with 2802 additions and 484 deletions
+25 -36
View File
@@ -1,23 +1,24 @@
# Сценарий защиты лабы 5
- Команда: `python3 .claude/skills/run-mtusi-messenger/driver.py --port 8080 defense-scenario`
- Дата: 2026-10-31, 03:50 UTC; код выхода 0
- Commit: `ff1a83b` (ветка `feat/async-attachments`), рабочее дерево чистое
- Стенд: проект compose `mtusi-lab5`, собран `make run_docker` из `HEAD`: HAProxy, две реплики API, worker, cleaner, PostgreSQL, Valkey, S3, RabbitMQ
- Порядок действий (`README.md`, «Сценарий защиты», шаги 1–3): worker остановлен → загрузка 202 → сообщение с вложением 201 → скачивание 409 → текст 201 → рестарт API и хранилищ с сохранением volumes → worker запущен → `ready`, оригинал и thumbnail
- Дата: 2026-10-31, 13:23:21–13:24:00 UTC; код выхода 0
- Commit: `e2a6427` (ветка `feat/pipeline-reliability`), рабочее дерево без правок кода (добавлены только файлы `evidence/`)
- Стенд: проект compose `mtusi-lab5`, собран `make run_docker` из `HEAD`: HAProxy, две реплики API, relay, worker, cleaner, PostgreSQL, Valkey, S3, RabbitMQ
- Порядок действий (`README.md`, «Сценарий защиты», шаги 1–3): worker остановлен → загрузка 202 → сообщение с вложением 201 → скачивание 409 → текст 201 → сообщение в очереди (его опубликовал relay), 0 потребителей → рестарт API и хранилищ с сохранением volumes → worker запущен → `ready`, оригинал и три варианта. Шаг 4 — `evidence/attachments/defense-faults.md`
- Токенов и секретов в выводе нет; пользователи и чат синтетические
- Вывод сокращён: итоговая таблица «проверка → ожидаемо → получено» (34 строки, все совпали) заменена её итогом
```text
fixture sample.png: 111817 bytes, sha256 99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75
docker compose stop worker: 0
upload sample.png: 202
attachment id 730db74b-8e88-4ed4-bb69-0fa821f8d41e, via 3ce76b35e8aa
attachment id 0a0fe6a1-5c32-4c53-905a-43b05c6234f1, via d7f1b8c394b9
snapshot status: queued
message with the attachment: 201
message id 9716846f-448b-41c4-aebd-7b83e3264964
message id 50bc7674-f224-41c1-b060-513cad06197b
download before processing: 409
text message: 201
text message id d102d380-6f95-4712-96fb-721030ed2bf6
text message id 9c596523-2b5d-4529-9bf6-244e0e705056
job in the queue before restart: yes
queue consumers before restart: 0
scripts/restart.sh: 0
@@ -29,40 +30,28 @@ docker compose start worker: 0
attachment status: ready
download original: 200
original sha256 = uploaded: yes
variants in metadata: crop,optimized,thumbnail
download thumbnail: 200
thumbnail content type: image/jpeg
thumbnail by SOF: (256, 160)
thumbnail size by bytes: (256, 160)
thumbnail sha256 = metadata: yes
download crop: 200
crop content type: image/jpeg
crop size by bytes: (128, 128)
crop sha256 = metadata: yes
download optimized: 200
optimized content type: image/webp
optimized size by bytes: (320, 200)
optimized sha256 = metadata: yes
relay StartedAt unchanged: yes
history after restart: 200
history keeps both messages: yes
containers: StartedAt before -> after
mtusi-lab5-api-1: 2026-10-31T03:49:55.670098888Z -> 2026-10-31T03:50:35.309647378Z
mtusi-lab5-api-2: 2026-10-31T03:49:55.607322638Z -> 2026-10-31T03:50:35.244859586Z
mtusi-lab5-rabbitmq-1: 2026-10-31T03:49:47.262600342Z -> 2026-10-31T03:50:09.308230255Z
docker compose stop worker expected 0 got 0
upload sample.png expected 202 got 202
snapshot status expected queued got queued
message with the attachment expected 201 got 201
download before processing expected 409 got 409
text message expected 201 got 201
job in the queue before restart expected yes got yes
queue consumers before restart expected 0 got 0
scripts/restart.sh expected 0 got 0
LB ready after restart expected yes got yes
job in the queue after restart expected yes got yes
metadata after restart (same session) expected 200 got 200
status after restart expected queued got queued
docker compose start worker expected 0 got 0
attachment status expected ready got ready
download original expected 200 got 200
original sha256 = uploaded expected yes got yes
download thumbnail expected 200 got 200
thumbnail content type expected image/jpeg got image/jpeg
thumbnail by SOF expected (256, 160) got (256, 160)
thumbnail sha256 = metadata expected yes got yes
history after restart expected 200 got 200
history keeps both messages expected yes got yes
api and rabbitmq restarted expected yes got yes
mtusi-lab5-api-10: 2026-10-31T13:20:34.275408667Z -> 2026-10-31T13:23:49.132257549Z
mtusi-lab5-api-9: 2026-10-31T13:20:34.192033042Z -> 2026-10-31T13:23:49.056454424Z
mtusi-lab5-rabbitmq-1: 2026-10-31T13:20:26.063079844Z -> 2026-10-31T13:23:26.563060594Z
api and rabbitmq restarted: expected yes, got yes
all rows of the check table: expected = got
PASS: the file is accepted while the worker is stopped and becomes ready after the restart
worker running at the end: yes
worker and relay running at the end: yes
```