# Сценарий защиты лабы 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 - Токенов и секретов в выводе нет; пользователи и чат синтетические ```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 snapshot status: queued message with the attachment: 201 message id 9716846f-448b-41c4-aebd-7b83e3264964 download before processing: 409 text message: 201 text message id d102d380-6f95-4712-96fb-721030ed2bf6 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 download thumbnail: 200 thumbnail content type: image/jpeg thumbnail by SOF: (256, 160) thumbnail sha256 = metadata: 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 PASS: the file is accepted while the worker is stopped and becomes ready after the restart worker running at the end: yes ```