3.2 KiB
3.2 KiB
Сценарий защиты лабы 5
- Команда:
python3 .claude/skills/run-mtusi-messenger/driver.py --port 8080 defense-scenario - Дата: 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 строки, все совпали) заменена её итогом
fixture sample.png: 111817 bytes, sha256 99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75
docker compose stop worker: 0
upload sample.png: 202
attachment id 0a0fe6a1-5c32-4c53-905a-43b05c6234f1, via d7f1b8c394b9
snapshot status: queued
message with the attachment: 201
message id 50bc7674-f224-41c1-b060-513cad06197b
download before processing: 409
text message: 201
text message id 9c596523-2b5d-4529-9bf6-244e0e705056
job in the queue before restart: yes
queue consumers before restart: 0
scripts/restart.sh: 0
LB ready after restart: yes
job in the queue after restart: yes
metadata after restart (same session): 200
status after restart: queued
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 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-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 and relay running at the end: yes