diff --git a/.dockerignore b/.dockerignore index bc16e55..abeb4ed 100644 --- a/.dockerignore +++ b/.dockerignore @@ -18,3 +18,5 @@ __pycache__ node_modules evidence .DS_Store + +.secrets diff --git a/.gitignore b/.gitignore index b5a7189..dce895c 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,5 @@ coverage/ .vscode/ # Keep small, sanitized evidence summaries in evidence/ under version control. # Inspect git diff --cached: ignore rules are not a secret scanner. + +.secrets/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..99ae93d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,30 @@ +FROM python:3.12.10-slim-bookworm + +ENV PYTHONDONTWRITEBYTECODE=1 \ + PYTHONUNBUFFERED=1 \ + APP_HOST=0.0.0.0 \ + APP_PORT=8080 + +WORKDIR /app + +COPY requirements.txt . +RUN pip install --no-cache-dir --requirement requirements.txt \ + && groupadd --system --gid 10001 app \ + && useradd --system --uid 10001 --gid app --home-dir /nonexistent --shell /usr/sbin/nologin app + +COPY --chown=app:app src ./src +COPY --chown=app:app migrations ./migrations +COPY --chown=app:app scripts ./scripts +COPY --chown=app:app student-tests ./student-tests +COPY --chown=app:app tests ./tests +COPY --chown=app:app contracts ./contracts +COPY --chown=app:app lab.json ./lab.json +RUN mkdir -p evidence && chown app:app evidence + +USER 10001:10001 +EXPOSE 8080 + +HEALTHCHECK --interval=10s --timeout=3s --start-period=3s --retries=3 \ + CMD ["python", "/app/scripts/healthcheck.py"] + +CMD ["sh", "-c", "exec uvicorn src.main:app --host \"${APP_HOST}\" --port \"${APP_PORT}\" --workers 1 --timeout-graceful-shutdown 8"] diff --git a/Makefile b/Makefile index 5d86d17..ef674b4 100644 --- a/Makefile +++ b/Makefile @@ -28,3 +28,34 @@ test-persistence: test-failover: @test -n "$(ACTION_SCRIPT)" || (echo "Set ACTION_SCRIPT to your implemented executable stop-one hook"; exit 2) $(PYTHON) tests/resilience.py --mode failover --action-script "$(ACTION_SCRIPT)" --base-url "$(BASE_URL)" $(TLS_ARGS) + +.PHONY: setup start ready student-checks test-files test-file-failover test-pipeline experiment cleanup stop test-dependencies test-expiry +setup: + bash scripts/setup.sh +start: + bash scripts/start.sh +ready: + BASE_URL="$(BASE_URL)" $(PYTHON) scripts/stack.py wait --count 2 +student-checks: + $(PYTHON) student-tests/test_api.py --base-url "$(BASE_URL)" + $(PYTHON) student-tests/checks.py --base-url "$(BASE_URL)" + $(PYTHON) student-tests/idempotency.py --base-url "$(BASE_URL)" + docker exec "$$(docker compose ps --status running -q api | head -n 1)" python student-tests/database.py +test-files: + $(PYTHON) student-tests/attachments.py --base-url "$(BASE_URL)" + $(PYTHON) student-tests/variants.py --base-url "$(BASE_URL)" +test-file-failover: + BASE_URL="$(BASE_URL)" $(PYTHON) student-tests/file_failover.py +test-pipeline: + BASE_URL="$(BASE_URL)" $(PYTHON) scripts/experiment.py --repeats 1 +experiment: + BASE_URL="$(BASE_URL)" $(PYTHON) scripts/experiment.py --repeats 3 +cleanup: + docker compose run --rm --no-deps reconciler python -m src.cleanup +stop: + docker compose down + +test-dependencies: + BASE_URL="$(BASE_URL)" $(PYTHON) student-tests/dependencies.py +test-expiry: + bash scripts/test_expiry.sh diff --git a/REPORT.md b/REPORT.md index e98f75e..b228dfd 100644 --- a/REPORT.md +++ b/REPORT.md @@ -1,37 +1,408 @@ -# Отчёт — лабораторная 5 +# Лабораторная 5 — очередь и обработка изображений -- Автор, группа: TODO -- Целевая оценка; выбранный трек 5, если нужен: TODO -- Commit/PR: TODO после публикации -- Использованные источники, библиотеки и помощь ИИ: TODO +- Автор: Максим Шептунов, БВТ2301. +- Целевая оценка: 5, трек 2 — «Доказанная идемпотентность pipeline». +- Skeleton lab5: `276dbdad8a34da4c5b57fbf1879ca169b581d75b`. +- Заявленная основа подготовленного решения: собственная lab4, commit `16709c91b3e06028b10d72095fb1e5d2bacbc5ef`; соответствие этому commit отдельно не перепроверялось. +- Проверка: 26 октября 2026, WSL2 Ubuntu 22.04 / Docker Desktop. Факты окружения: evidence/local_environment.json. +- Помощь ИИ: подготовка реализации и собственных проверок +- Основные библиотеки: FastAPI 0.115.12, Uvicorn 0.34.2, Psycopg 3.2.9, redis-py 5.2.1, Pillow 12.0.0, boto3 1.40.18, argon2-cffi 23.1.0; полный фактический список — evidence/runtime_versions.json. + +README задания, обязательный контракт и публичные tests сохранены. Отдельного +файла миграции решения нет: перенос и переход API описаны здесь. Результаты ниже взяты из текущих логов WSL; прежняя облачная проверка не считается Docker-прогоном. ## Запуск из чистого clone -TODO: версии runtime/образов, prerequisites, команды создания локальных secrets/.env, build, миграций, запуска, ожидания готовности, тестов и остановки. Указать необходимые действия оператора. Не вставлять секреты. Отдельно указать безопасную остановку и команду намеренного удаления учебных данных. +Нужны Docker Desktop/Engine с Compose v2/BuildKit, Linux amd64, Python 3.10+ на +хосте. В Windows используется WSL2 Ubuntu. Порт 8080 должен быть свободен; при занятом порте сначала нужно установить владельца. При текущем запуске других работающих контейнеров не было. Для сборки нужен доступ к Docker Hub, +PyPI и GitHub Releases. -## Архитектура и решения +```bash +python3 -m venv .venv +source .venv/bin/activate +pip install -r requirements-dev.txt -r requirements-experiment.txt +chmod +x scripts/*.sh +make setup +make start +make ready +make check +make validate +make test +make student-checks +make test-files +make test-persistence ACTION_SCRIPT=scripts/restart.sh +make test-failover ACTION_SCRIPT=scripts/stop-one.sh +bash scripts/restore-api.sh +make ready +make test-file-failover +make test-dependencies +make test-expiry +make experiment +make ready +make test +``` -TODO: схема процессов/хранилищ, источник истины, транзакционные границы, ограничения. Что перенесено из lab4, что изменено в этой работе. Соответствие переменных из .env.example реальной конфигурации. +Безопасная остановка с сохранением данных: `make stop`. Намеренное удаление +учебных данных текущего проекта: `docker compose down -v`; эта команда не +применяется в проверках сохранности. + +`setup.sh` создаёт `.env` и случайные secrets в `.secrets`. Повторный setup не +меняет существующие пароли. Папка имеет права 700; файлы для UID10001 — 644 внутри +закрытой папки. Пароль PostgreSQL, MinIO root и broker password — 600. API не +получает root credentials и broker URL. В Git и build context secrets не входят. + +Все роли приложения собираются в один локальный image `mtusi2026lab5-app:1`. +База — Python 3.12.10 slim-bookworm. PostgreSQL 16.9 bookworm; cache и broker — +Redis 7.4.3 bookworm; HAProxy 3.0.11 bookworm. MinIO RELEASE.2025-04-22T22-12-26Z +и mc RELEASE.2025-04-16T18-13-26Z скачиваются из официальных GitHub Releases в +`infra/s3.Dockerfile`; закреплённые SHA-256 проверяются во время сборки. + +После старта работают db, cache, broker, s3, две api, lb, dispatcher, worker и +reconciler. `migrate` и `s3-bootstrap` завершаются с кодом 0 — это нормально. +Общий `start.sh` не использует Compose `--wait`, поскольку у фоновых процессов +нет HTTP healthcheck. Две готовые API отдельно ожидаются через LB. +Readiness API проверяет PG и S3; отсутствие worker не запрещает durable приём. +Сам прогресс pipeline проверяется smoke, статусами job и отдельными сценариями. + +Лимиты: каждая API 1 CPU/512 MiB; worker 1 CPU/768 MiB; PG и S3 по 1 CPU/512 MiB; +broker 0.5 CPU/256 MiB; dispatcher и reconciler по 0.5 CPU/256 MiB; +cache/LB по 0.5 CPU/128 MiB. Фактические значения сохраняются через inspect. +Docker-логи ограничены: 5 MiB × 2 файла на контейнер. + +## Перенос и архитектура + +Перенесены пользователи, Argon2id, PostgreSQL-сессии, Redis-кеш профиля, чаты, +сообщения, keyset-пагинация, общая идемпотентность, две API, HAProxy и приватный +MinIO. Сохранены проверка типов cursor (400 invalid_request), выбор реально +работающего контейнера вместо жёсткого индекса и исправление общего `--wait`. +Исследования масштабирования lab3 и сверки lab4 повторно не требуются. + +Изменён объявленный переход lab4 → lab5: upload возвращает **202 queued**, +а готовность определяется GET метаданных. Все bytes по-прежнему передаются в HTTP. +Сообщение может ссылаться на queued/processing; failed прикреплять нельзя (409). +Content для queued/processing/failed — 409. Для ready доступны original, +thumbnail, crop, optimized; неизвестный вариант — 404. ACL чата проверяется +при каждом запросе метаданных и содержимого. Публичный ответ не раскрывает S3 keys. + +Роли и источник истины: + +- API принимает ограниченный файл и фиксирует намерение. SQL — источник сессий, + метаданных, статусов, версий, attempts и outbox. +- Отдельный persistent Redis Streams — broker. Cache профилей остаётся другим + сервисом Redis: сброс кеша не затрагивает очередь. +- Dispatcher публикует outbox и восстанавливает брошенные leases. +- Worker забирает задания consumer group, обрабатывает изображение в дочернем + процессе и публикует результат. +- Reconciler в этой лабораторной выполняет безопасную очистку staging. +- MinIO хранит staging, неизменённые оригиналы и готовые варианты. + +Наружу опубликован только LB `127.0.0.1:8080`. Консоль MinIO выключена и привязана +к loopback контейнера. Ограниченный S3-пользователь общий для API/worker: операции +разрешены только в originals/, variants/, staging/ указанного bucket; нет IAM и +создания bucket. Broker защищён отдельным паролем, публичного порта нет. + +### Что сохранено к моменту 202 + +1. API потоково пишет максимум 10485760 bytes во временный файл. Проверяет MIME, + filename, структуру PNG/JPEG и максимум 40000000 pixels до полного декодирования. + Для JPEG проверяется наличие EOI. Считаются SHA-256 и transport Content-MD5. +2. Под блокировкой UUID вложения сохраняет полный исходник в S3 staging. +3. Одной SQL-транзакцией создаёт attachment queued, job и outbox. Общая admission + блокировка ограничивает число queued/processing заданиями MAX_PENDING_JOBS. +4. После COMMIT возвращает снимок queued, даже если worker уже успел завершиться. + +API не делает resize и полное декодирование пикселей. Нераспознаваемый формат/ +очевидное повреждение/MIME mismatch — 415, лимиты bytes/pixels — 413, опасное имя — +400. Повреждение, обнаруженное только при полном декодировании, становится failed +с безопасным кодом worker. Временный файл API не является durable staging. +При неопределённом COMMIT staging немедленно не удаляется. + +### Broker, outbox и подтверждения + +Broker использует Redis Streams consumer group `image-workers`, AOF и +`appendfsync always`, persistent volume, `maxmemory-policy noeviction`. +`XADD` отвечает producer после записи по выбранной AOF-политике. Если publish +прошёл, но dispatcher умер до фиксации published_at, он может отправить дубль. +Если умер до publish, незавершённый outbox будет опубликован после восстановления. + +Carrier соответствует `contracts/jobs.schema.json`: schema_version, job_id, +type, attachment_id, pipeline_version, attempt, created_at. Нет bytes, credentials, +URL или клиентского пути. Worker сверяет job с доверенными metadata в PG. +Некорректный carrier попадает в broker_rejections с hash/кодом, без исходного тела. + +`XACK` выполняется после ready/устойчивого terminal no-op либо после фиксации +следующей попытки в outbox/окончательного failed. Pending после смерти consumer +забирается через XAUTOCLAIM. Publisher acknowledgement и consumer ack относятся +к разным границам; доставка остаётся at least once. + +### Обработка, ограничения и варианты + +Исходник скачивается из staging с ограничением bytes и проверкой SHA-256. Затем +отдельный процесс Pillow полностью декодирует изображение, применяет EXIF +orientation, ограничивает pixels и адресное пространство до 512 MiB. Родитель +ограничивает время job (по умолчанию 30 s), включая проверяемые этапы download, +преобразования и PUT. Синхронный вызов S3 может закончиться позже deadline на +величину своего сетевого timeout (connect/read 2/5 s; Docker DNS timeout 1 s, attempts 1). + +На worker по умолчанию concurrency=1 и prefetch=1 на consumer. API допускает +четыре ограниченных upload на процесс; сверх очереди MAX_PENDING_JOBS=1000 +новые приёмы получают 503. Значения 1..4 concurrency доступны, но увеличение +требует отдельного бюджета RAM и измерений; в исследовании используется 1. + +Worker публикует неизменённый original и три варианта: + +| Вариант | Формат и правила | +| --- | --- | +| thumbnail | JPEG, вписан в 256×256, без увеличения, размеры округляются вниз | +| crop | JPEG, центрированный квадрат 128×128, маленькие изображения увеличиваются | +| optimized | WebP, вписан в 1280×1280, без увеличения | + +Alpha компонуется на белый. EXIF/ICC/XMP в вариантах не сохраняются. Качество +JPEG/WebP — 82 для pipeline v1 и 86 для v2; WebP method=4, JPEG optimize=true. +Original не перекодируется. WebP не обязан быть меньше каждого маленького PNG. +Ready фиксируется только после оригинала и всех трёх вариантов, вместе с их +размерами/checksums и внутренними keys. + +### Lease, retry, failed и replay + +Worker держит PostgreSQL session advisory lock на attachment UUID. При захвате +фиксирует processing, очередную attempt, lease token и deadline. Dispatcher +возвращает истёкший processing в очередь только если общий lock свободен. +Lease=15 s может истечь во время корректной длинной обработки; активный lock +защищает её. Зависшая обработка ограничена job timeout и лимитами процесса. + +Одна попытка не равна одному broker redelivery: устаревшие attempts и дубли +завершённых jobs подтверждаются без повторной обработки. По умолчанию максимум +5 управляемых попыток. Для временных сетевых/хранилищных ошибок — exponential +backoff с jitter, базовая пауза до 10 s + 0..0.5 s. Невалидный исходник, отсутствие +staging и неверные S3 credentials — постоянные ошибки. После исчерпания временных +попыток error_code=retry_exhausted. Текст SDK/stack trace наружу не выдаётся. + +DLQ реализована как устойчивый реестр jobs со status=failed плюс job_events. +Команды выполняются оператором внутри контейнера; публичного admin endpoint нет: + +```bash +docker compose exec -T dispatcher python -m src.jobs failed +docker compose exec -T dispatcher python -m src.jobs inspect JOB_UUID +docker compose exec -T dispatcher python -m src.jobs replay JOB_UUID +docker compose exec -T dispatcher python -m src.jobs version ATTACHMENT_UUID 2 +``` + +Replay разрешён только для текущей failed job при доступном staging. Job ID +и effect key сохраняются; номер attempt растёт, новый бюджет начинается после +явного replay. Уже ready → noop; старая версия не активируется replay-командой. +Версия повышается только отдельной операторской командой. + +### Версии и идемпотентность эффекта + +Ключ эффекта — `(attachment_id, pipeline_version, variant)`. В PG уникальна пара +attachment/version; S3 keys детерминированы и включают version. Повтор может ещё +раз выполнить PUT в тот же key, но не создаёт дополнительные variants. + +Перед processing проверяется current_job_id/version; перед публикацией — ещё +lease token и условный UPDATE текущей версии. Общий lock сериализует изменения. +Старая job после появления v2 становится no-op и не откатывает ready в processing. +Вторая версия действительно меняет настройки encoder, а не только название. + +Это не exactly-once доставка: XADD/получение/PUT могут повториться. Проверяется +однократная публикация устойчивого результата одной job и отсутствие перезаписи +текущего результата старой версией. + +### Очистка и retention + +После ready staging удаляется; отдельная сверка каждые 60 s повторяет очистку, +если worker умер после COMMIT. Failed/superseded staging и объекты без job +хранятся 86400 s. Перед удалением повторно проверяются PG, реальный LastModified +и общий lock; queued/processing не удаляются. Dry-run по умолчанию: + +```bash +make cleanup +docker compose run --rm --no-deps reconciler python -m src.cleanup --apply +``` + +Предыдущие опубликованные версии original/variants оставлены для аудита; их +автоматический GC не заявляется. Старые lab4 ready-оригиналы сохраняются миграцией; +варианты для них можно создать командой новой версии. Переносится реализация, +старые Docker volumes между разными проектами автоматически не подключаются. ## Доказательства критериев -| Критерий README | Команда/сценарий | Наблюдаемый результат | Файл доказательства | +Структура и OpenAPI проверены отдельно от работающего HTTP-приложения. Ниже результаты текущего последовательного прогона. Полный трек 2 завершён: status=PASS, checks=39; финальный HTTP smoke прошёл после серии и дополнительного отказа второй API. + +| Критерий | Команда | Наблюдение моего стенда | Evidence | | --- | --- | --- | --- | -| Публичный smoke | make test | TODO | TODO | -| Остальные пункты уровня 3 | TODO | TODO | TODO | -| Все пункты уровня 4, если заявлен | TODO | TODO | TODO | -| Выбранный трек 5, если заявлен | TODO | TODO | TODO | +| Структура/OpenAPI | make check; make validate | PASS: структура, ссылки, синтаксис и OpenAPI 3.1 | local_check.txt, local_validate.txt | +| Обязательный lab5 API | make test | PASS: публичный сквозной HTTP-сценарий | local_smoke.txt, local_final_smoke.txt | +| Минимум предыдущих работ, SQL/cursor/ключи | make student-checks | PASS: гонки регистрации, 100 сообщений от 10 клиентов, cursor, idempotency и SQL rollback | local_student_checks.txt, idempotency.json | +| Отрицательные файлы, ACL и сообщение с вложением | make test-files | PASS: MIME/filename/bytes/pixels, ACL, повтор сообщения | local_files.txt | +| Реальные thumbnail/crop/WebP, EXIF/alpha/маленький файл | make test-files | PASS: реальные форматы, размеры, белый фон, EXIF orientation, отсутствие увеличения | local_files.txt | +| Перезапуск всех хранилищ и прежняя сессия | make test-persistence | PASS: подтверждённые данные, original и старая сессия сохранены; 4 хранилища перезапущены | local_persistence.txt, containers_before_retry.json, containers_after_restart.json, persistence_scope.json | +| Отказ одной API и original через другую | make test-failover; make test-file-failover | PASS: 114 подтверждённых записей, 3 неудачные попытки, восстановление 2.581 s; original через другую API | local_failover.txt, local_file_failover.txt, attachment_failover.json | +| Redis/PG outage, expiry | make test-dependencies; make test-expiry | PASS: fallback без cache, PG → 503 и восстановление прежних данных/сессии; TTL=2 s → отказ истёкшей сессии | dependencies.json, local_dependencies.txt, local_expiry.txt | +| Worker stop, queued message, API/broker restart | make experiment | PASS ×3: 202 при выключенном worker, queued message, прежние stream IDs и ready после рестартов | pipeline_raw.json: accepted_restart_broker_api | +| Outbox COMMIT/publish и publish/mark crash | make experiment | PASS ×3 для каждого окна: outbox доставил прежнюю job после реального crash dispatcher | pipeline_raw.json: before_publish, after_publish | +| Crash до/после S3 и до ack, lease recovery | make experiment | PASS ×3 для каждого окна: до ready — 2 попытки; после COMMIT ready — 1 попытка | pipeline_raw.json: before_effect, after_original, after_effects, after_commit | +| Дубли и схема carrier | make experiment | PASS ×3: по 16 дублей, неизменные metadata/bytes, неверный carrier отклонён | pipeline_raw.json: duplicates_and_invalid_carrier | +| Reorder и stale после новой версии | make experiment | PASS ×3 для каждого случая: v2 сохранена, v1 не меняет текущие bytes/metadata | pipeline_raw.json: reorder_new_before_old, stale_after_new_ready | +| Постоянная ошибка и безопасный replay | make experiment | PASS ×3: staging_missing → явный replay той же job → ready; replay ready = noop | pipeline_raw.json: permanent_failure_replay | +| Физический S3 outage, пять попыток, failed/replay | make experiment | PASS ×3: retry_exhausted после 5 попыток; replay → ready на 6-й попытке | pipeline_raw.json: bounded_retry_and_replay | +| Retention, fresh/active и приватность | make experiment | PASS ×3: старый orphan удалён, fresh/queued сохранены, anonymous GET=403 | pipeline_raw.json: staging_retention_and_privacy | -TODO: добавить отдельную строку для каждого заявленного критерия. PASS без команды и наблюдения не является доказательством. Проверка инфраструктурного hook требует подтверждения, какие реальные процессы/хранилища перезапущены. +### Фактическое окружение и найденная ошибка -## Эксперименты и отказы +Intel Core i5-1240P; WSL видит 16 CPU. Docker Server 26.1.1, Compose +2.27.0-desktop.2; Docker видит 16 CPU и 8 187 711 488 bytes RAM. +Хостовый Python 3.10.12, runtime контейнера 3.12.10. +Фактические runtime/библиотеки/image IDs и mounts — runtime_versions.json. +Broker подтверждён с AOF=1, appendonly=yes, appendfsync=always и noeviction +(broker_runtime.json). Лимиты контейнеров сохранены в containers_before_retry.json и +containers_after_restart.json; факт перезапуска db/cache/s3/broker — +в persistence_scope.json. -TODO: гипотеза, hardware/лимиты, версии, объём данных, профиль нагрузки, concurrency/arrival rate, длительность/прогрев, повторы, успешные RPS, ошибки, p50/p95/p99, CPU/RAM. Сохранить raw summary без tokens и объяснить ограничения измерения. +Первый persistence выявил дефект infra/broker-entrypoint.sh: после первого +запуска /tmp/broker.conf принадлежал redis; повторная root redirection в sticky +/tmp блокировалась Linux protected_regular («Permission denied»). +Конфиг перенесён в /run/broker/broker.conf внутри root-owned каталога. +AOF, Redis-настройки и volume сохранены. После исправления persistence прошёл. +Неудачные логи сохранены в local_persistence_failed_initial.txt, +local_restart_diagnostic.txt, broker_restart_diagnostic.txt; успешный повтор — +local_restart_fixed.txt и local_persistence.txt. +Попытка запустить persistence до восстановления остановленного стенда также +сохранена отдельно: local_persistence_failed_stopped_stack.txt. -| Воздействие | Что ожидаем | Что наблюдали | Время восстановления / потеря данных | -| --- | --- | --- | --- | -| TODO | TODO | TODO | TODO | +Перед переносом рабочий Git был чист от tracked-изменений; существовали только +пользовательские AGENTS.md и CODEX_HANDOFF.md. Сохранены они и .git. +Решение распаковано из incoming/mtusi2026lab5_solution.zip; добавлено 47 файлов, +изменены .dockerignore, .gitignore, Makefile и REPORT.md, 32 файла совпали. +Сравнение — import_comparison.json. Текущий upstream HEAD совпал со skeleton. +Контракты, публичные tests, README и COURSE не изменены. Старые лабы и volumes +не удалялись; commit/push/MR не выполнялись. -## Ограничения и следующие шаги +## Эксперимент на 5 -TODO: какие отказы выдерживаются и какие нет; что не реализовано; где учебное упрощение; какое улучшение подтверждено, а какое пока гипотеза. +Гипотеза: durable staging/outbox, consumer group, versioned keys и проверка версии +при COMMIT позволяют пережить дубли, reorder и crashes без потери подтверждённой +работы и публикации старого результата поверх нового. + +`make experiment` выполняет 13 случаев по три раза — 39 проверок. Для каждого +создаются новые синтетические пользователи/чат/attachment/job; fixture 320×200. +Worker concurrency=1, prefetch=1, максимум 5 попыток; остальные лимиты выше. +Настройки, версии Docker/Compose, actual containers/limits фиксируются в +pipeline_environment.json. В research серии не измеряется предельный throughput. + +Fault injection — адресные одноразовые checkpoints для конкретного job UUID. +Они выключены при обычном ALLOW_FAULT_INJECTION=0. Скрипт временно пересоздаёт +worker/dispatcher с флагом 1. После устойчивой отметки checkpoint выполняется +os._exit: нет finally и ack, процесс реально умирает, Docker restart:on-failure +возвращает его. В evidence сохраняются fired_at, events, aliases/RestartCount +и состояния контейнеров. После эксперимента флаг возвращается в 0. + +Проверки не создают вручную новое задание для исправления outbox: accepted job +должна восстановиться сама. Для дубликатов/reorder намеренно публикуются повторные +carrier уже существующих jobs. Поздний v1 проверяется после готового v2. +При S3 outage сервис физически остановлен; после failed возвращается S3, +оператор явно запускает replay той же job. + +Для каждого ready проверяются original/checksum, три варианта/checksums, +ровно четыре key текущей версии, один ready event на job, очистка staging. +В duplicate/stale случаях сравнивается весь публичный Attachment до/после: +ID, updated_at, variants и checksums не должны измениться. При broker restart +проверяются те же опубликованные stream IDs после восстановления volume. + +Raw: `evidence/pipeline_raw.json`; сводка: `pipeline_summary.json`. +Каждый случай содержит длительность сценария с управляющими действиями Docker, +attempts, job events/outbox и результат инвариантов. queued_to_ready_seconds +считается между SQL-временем создания job и публикации ready, включая намеренные +остановки. Эти времена не являются чистой стоимостью resize или production SLA. +При незавершённом/ошибочном запуске summary не остаётся старым PASS. + +### Реальные результаты 26.10.2026 + +Полная команда: `make experiment` (repeats=3). Итог: **PASS, 39/39**, +все 13 случаев завершились по три раза. Сумма длительностей сценариев — +1947.325 s (32.46 min); это последовательный эксперимент с управлением +Docker и намеренными остановками, включая backoff и lease. +Fixture — PNG 320×200, 111817 bytes, SHA-256 +`99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75`. +Рабочая конфигурация: concurrency=1, prefetch=1, lease=15 s, +timeout=30 s, максимум 5 попыток до явного replay. +Отдельный прогрев и нагрузочный профиль не применялись: это проверка +корректности при отказах, не измерение предельного throughput. +RPS и p95/p99 resize в этом треке не измерялись. + +| Сценарий | Итог | Медиана полного сценария, s | Attempts итоговой job | +| --- | --- | ---: | ---: | +| accepted_restart_broker_api | 3/3 PASS | 62.692 | 1 | +| before_publish | 3/3 PASS | 45.890 | 1 | +| after_publish | 3/3 PASS | 44.544 | 1 | +| before_effect | 3/3 PASS | 45.350 | 2 | +| after_original | 3/3 PASS | 43.115 | 2 | +| after_effects | 3/3 PASS | 46.272 | 2 | +| after_commit | 3/3 PASS | 36.306 | 1 | +| duplicates_and_invalid_carrier | 3/3 PASS | 36.795 | 1 | +| reorder_new_before_old | 3/3 PASS | 57.728 | 1 | +| stale_after_new_ready | 3/3 PASS | 54.823 | 1 | +| permanent_failure_replay | 3/3 PASS | 56.230 | 2 | +| bounded_retry_and_replay | 3/3 PASS | 75.655 | 6 | +| staging_retention_and_privacy | 3/3 PASS | 37.404 | 1 | + +Время сценария включает создание данных, Docker stop/recreate/start, ожидание +готовности и проверки. queued_to_ready_seconds в raw — отдельное SQL-время +от создания job до ready; оно также включает намеренные простои. +Эти результаты не являются SLA и не сравнивают производительность компьютеров. + +Во всех ready snapshot проверены побайтный original и его checksum, checksums +трёх вариантов, ровно четыре key текущей версии и один ready event на job. +Во всех девяти случаях crash worker до ready (3 окна ×3) job завершилась +на второй попытке; после COMMIT ready во всех трёх повторах осталась одна попытка. +В каждом bounded_retry_and_replay зафиксирован failed после ровно пяти попыток +и ready той же job после операторского replay на шестой. Без replay бесконечных +попыток не было. В каждом duplicate-сценарии доставлено и подтверждено 16 дублей +(48 суммарно); весь публичный Attachment и bytes остались прежними. +Во всех шести проверках reorder/stale current_version=2; настройки v2 действительно +изменили bytes вариантов относительно v1. Это согласуется с гипотезой в пределах +проверенных окон сбоев; потери диска или целого host эксперимент не моделирует. + +После эксперимента выполнены make ready и make test, затем дополнительный +публичный failover именно mtusi2026lab5-api-2: 110 подтверждённых записей, +4 неудачные попытки, first_recovery_seconds=2.521. Первый публичный failover +и file failover останавливали api-1: 114 подтверждённых записей/3 неудачные +попытки/2.581 s; original скачан другой API за 2.386 s, failed_attempts=0. +Дополнительные доказательства: local_failover_additional_1.txt, +api_failover_additional_1.json, attachment_failover.json. +После восстановления повторно прошли ready и публичный smoke. +Две API и все фоновые службы работают; migrate и s3-bootstrap завершены с code=0. +Fault injection у worker/dispatcher/reconciler выключен (все флаги 0); +факты — runtime_versions.json, containers_final.json. +Host и container pip check не нашли конфликтов зависимостей. + +Аудит: обязательные contracts/, tests/, README и COURSE совпали с Git HEAD +и исходным решением; git diff --check прошёл. Проверка evidence и неигнорируемых +файлов на фактические значения локальных secrets и поля токенов — final_audit.json. +Секреты, .env и .venv остались локальными. Commit/push/MR не выполнялись. + +## Ограничения и источники + +Один host, LB, PG, S3 и broker остаются SPOF. Проверяются перезапуски с сохранением +volumes, не потеря диска. Физически потерянный исходник нужен из внешней копии. +AOF/persistent volume не заменяют резервную копию и репликацию. + +Stream, outbox и job_events автоматически не обрезаются; для длительной работы +нужен retention с учётом PEL и аудита. Broker ограничен 192 MiB/noeviction: +при невозможности XADD outbox сохраняется, затем MAX_PENDING_JOBS ограничивает +новые приёмы. Для прерванного до 202 HTTP-приёма гарантии задания нет; staging +без намерения очищается по retention. Дубликат upload может создать новый attachment. + +Поддерживаются pipeline версии 1 и 2. Параметры качества закреплены версией кода; +их нельзя произвольно менять под прежним номером pipeline. Переключение версии +явное и доступно только оператору. Горизонтальное масштабирование worker требует +общего PG/broker/S3 и отдельного бюджета CPU/RAM; исследование concurrency/prefetch +трек 1 не заявляется. + +Источники: README/COURSE/OpenAPI/jobs.schema/attachment-states lab5, собственная lab4; +[Redis Streams](https://redis.io/docs/latest/develop/data-types/streams/), +[XAUTOCLAIM](https://redis.io/docs/latest/commands/xautoclaim/), +[Redis AOF](https://redis.io/docs/latest/operate/oss_and_stack/management/persistence/), +[PostgreSQL locks](https://www.postgresql.org/docs/16/explicit-locking.html), +[Pillow ImageOps](https://pillow.readthedocs.io/en/stable/reference/ImageOps.html), +[MinIO release](https://github.com/minio/minio/releases/tag/RELEASE.2025-04-22T22-12-26Z). diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..23c22a2 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,389 @@ +services: + db: + image: postgres:16.9-bookworm + environment: + POSTGRES_DB: messenger + POSTGRES_USER: messenger + POSTGRES_PASSWORD_FILE: /run/secrets/db_password + secrets: + - db_password + volumes: + - postgres_data:/var/lib/postgresql/data + cpus: 1.0 + mem_limit: 512m + healthcheck: + test: + - CMD-SHELL + - pg_isready -U messenger -d messenger + interval: 2s + timeout: 3s + retries: 30 + logging: + driver: json-file + options: + max-size: 5m + max-file: '2' + cache: + image: redis:7.4.3-bookworm + command: + - redis-server + - --appendonly + - 'yes' + - --appendfsync + - everysec + volumes: + - redis_data:/data + cpus: 0.5 + mem_limit: 128m + healthcheck: + test: + - CMD + - redis-cli + - ping + interval: 2s + timeout: 3s + retries: 30 + logging: + driver: json-file + options: + max-size: 5m + max-file: '2' + migrate: + build: . + command: + - python + - -m + - src.migrate + environment: + DATABASE_URL_FILE: /run/secrets/database_url + secrets: + - database_url + cpus: 0.5 + mem_limit: 128m + depends_on: + db: + condition: service_healthy + healthcheck: + disable: true + image: mtusi2026lab5-app:1 + logging: + driver: json-file + options: + max-size: 5m + max-file: '2' + s3: + image: mtusi2026lab5-minio:2025-04-22 + build: + context: . + dockerfile: infra/s3.Dockerfile + args: + COMPONENT: minio + RELEASE: RELEASE.2025-04-22T22-12-26Z + SHA256: 53e2a2cb16c5366ea6fbbc479c19ddb4c6a0948273e752f740fb1fbf27bb817c + command: + - server + - /data + - --address + - :9000 + - --console-address + - 127.0.0.1:9001 + environment: + MINIO_ROOT_USER_FILE: /run/secrets/s3_root_user + MINIO_ROOT_PASSWORD_FILE: /run/secrets/s3_root_password + MINIO_BROWSER: 'off' + secrets: + - s3_root_user + - s3_root_password + volumes: + - s3_data:/data + cpus: 1.0 + mem_limit: 512m + healthcheck: + test: + - CMD + - python + - -c + - import urllib.request; urllib.request.urlopen("http://localhost:9000/minio/health/live",timeout=2) + interval: 2s + timeout: 3s + retries: 30 + logging: + driver: json-file + options: + max-size: 5m + max-file: '2' + s3-bootstrap: + image: mtusi2026lab5-mc:2025-04-16 + build: + context: . + dockerfile: infra/s3.Dockerfile + args: + COMPONENT: mc + RELEASE: RELEASE.2025-04-16T18-13-26Z + SHA256: ac90da87a35641be5a0ac75d49de5161ddb47d629b5ba01261b0ae9e00aea15f + entrypoint: + - /bin/sh + - /bootstrap.sh + volumes: + - ./scripts/bootstrap_s3.sh:/bootstrap.sh:ro + - ./infra:/policies:ro + secrets: + - s3_root_user + - s3_root_password + - s3_access_key_id + - s3_secret_access_key + environment: + S3_ENDPOINT: http://s3:9000 + depends_on: + s3: + condition: service_healthy + cpus: 0.5 + mem_limit: 128m + logging: + driver: json-file + options: + max-size: 5m + max-file: '2' + api: + build: . + scale: 2 + environment: + DATABASE_URL_FILE: /run/secrets/database_url + CACHE_URL: redis://cache:6379/0 + SESSION_TTL_SECONDS: ${SESSION_TTL_SECONDS:-3600} + DB_POOL_MAX: ${DB_POOL_MAX:-8} + S3_ENDPOINT: http://s3:9000 + S3_BUCKET: messenger-attachments + S3_REGION: us-east-1 + S3_ACCESS_KEY_ID_FILE: /run/secrets/s3_access_key_id + S3_SECRET_ACCESS_KEY_FILE: /run/secrets/s3_secret_access_key + MAX_UPLOAD_BYTES: '10485760' + MAX_IMAGE_PIXELS: '40000000' + MAX_PENDING_JOBS: ${MAX_PENDING_JOBS:-1000} + secrets: + - database_url + - s3_access_key_id + - s3_secret_access_key + dns_opt: + - timeout:1 + - attempts:1 + cpus: ${API_CPU:-1.0} + mem_limit: ${API_MEMORY:-512m} + stop_grace_period: 10s + depends_on: + migrate: + condition: service_completed_successfully + cache: + condition: service_healthy + s3-bootstrap: + condition: service_completed_successfully + healthcheck: + test: + - CMD + - python + - /app/scripts/healthcheck.py + interval: 2s + timeout: 4s + retries: 30 + image: mtusi2026lab5-app:1 + logging: + driver: json-file + options: + max-size: 5m + max-file: '2' + reconciler: + build: . + command: + - python + - -m + - src.cleanup + - --apply + - --loop + environment: + DATABASE_URL_FILE: /run/secrets/database_url + S3_ENDPOINT: http://s3:9000 + S3_BUCKET: messenger-attachments + S3_ACCESS_KEY_ID_FILE: /run/secrets/s3_access_key_id + S3_SECRET_ACCESS_KEY_FILE: /run/secrets/s3_secret_access_key + BROKER_URL_FILE: /run/secrets/broker_url + JOB_MAX_ATTEMPTS: ${JOB_MAX_ATTEMPTS:-5} + JOB_TIMEOUT_SECONDS: ${JOB_TIMEOUT_SECONDS:-30} + JOB_LEASE_SECONDS: ${JOB_LEASE_SECONDS:-15} + STAGING_RETENTION_SECONDS: ${STAGING_RETENTION_SECONDS:-86400} + ALLOW_FAULT_INJECTION: ${ALLOW_FAULT_INJECTION:-0} + secrets: + - database_url + - s3_access_key_id + - s3_secret_access_key + - broker_url + cpus: 0.5 + mem_limit: 256m + depends_on: + migrate: + condition: service_completed_successfully + s3-bootstrap: + condition: service_completed_successfully + healthcheck: + disable: true + image: mtusi2026lab5-app:1 + logging: + driver: json-file + options: + max-size: 5m + max-file: '2' + dns_opt: + - timeout:1 + - attempts:1 + lb: + image: haproxy:3.0.11-bookworm + ports: + - 127.0.0.1:${APP_PORT:-8080}:8080 + volumes: + - ./infra/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro + cpus: 0.5 + mem_limit: 128m + depends_on: + api: + condition: service_healthy + logging: + driver: json-file + options: + max-size: 5m + max-file: '2' + broker: + image: redis:7.4.3-bookworm + entrypoint: + - /bin/sh + - /broker.sh + volumes: + - broker_data:/data + - ./infra/broker-entrypoint.sh:/broker.sh:ro + secrets: + - broker_password + cpus: 0.5 + mem_limit: 256m + healthcheck: + test: + - CMD-SHELL + - REDISCLI_AUTH="$$(cat /run/secrets/broker_password)" redis-cli ping + interval: 2s + timeout: 3s + retries: 30 + logging: + driver: json-file + options: + max-size: 5m + max-file: '2' + dispatcher: + image: mtusi2026lab5-app:1 + build: . + command: + - python + - -m + - src.dispatcher + environment: + DATABASE_URL_FILE: /run/secrets/database_url + S3_ENDPOINT: http://s3:9000 + S3_BUCKET: messenger-attachments + S3_ACCESS_KEY_ID_FILE: /run/secrets/s3_access_key_id + S3_SECRET_ACCESS_KEY_FILE: /run/secrets/s3_secret_access_key + BROKER_URL_FILE: /run/secrets/broker_url + JOB_MAX_ATTEMPTS: ${JOB_MAX_ATTEMPTS:-5} + JOB_TIMEOUT_SECONDS: ${JOB_TIMEOUT_SECONDS:-30} + JOB_LEASE_SECONDS: ${JOB_LEASE_SECONDS:-15} + STAGING_RETENTION_SECONDS: ${STAGING_RETENTION_SECONDS:-86400} + ALLOW_FAULT_INJECTION: ${ALLOW_FAULT_INJECTION:-0} + secrets: + - database_url + - s3_access_key_id + - s3_secret_access_key + - broker_url + cpus: 0.5 + mem_limit: 256m + depends_on: + migrate: + condition: service_completed_successfully + s3-bootstrap: + condition: service_completed_successfully + broker: + condition: service_healthy + restart: on-failure + healthcheck: + disable: true + logging: + driver: json-file + options: + max-size: 5m + max-file: '2' + dns_opt: + - timeout:1 + - attempts:1 + worker: + image: mtusi2026lab5-app:1 + build: . + command: + - python + - -m + - src.worker + environment: + DATABASE_URL_FILE: /run/secrets/database_url + S3_ENDPOINT: http://s3:9000 + S3_BUCKET: messenger-attachments + S3_ACCESS_KEY_ID_FILE: /run/secrets/s3_access_key_id + S3_SECRET_ACCESS_KEY_FILE: /run/secrets/s3_secret_access_key + BROKER_URL_FILE: /run/secrets/broker_url + JOB_MAX_ATTEMPTS: ${JOB_MAX_ATTEMPTS:-5} + JOB_TIMEOUT_SECONDS: ${JOB_TIMEOUT_SECONDS:-30} + JOB_LEASE_SECONDS: ${JOB_LEASE_SECONDS:-15} + STAGING_RETENTION_SECONDS: ${STAGING_RETENTION_SECONDS:-86400} + ALLOW_FAULT_INJECTION: ${ALLOW_FAULT_INJECTION:-0} + WORKER_CONCURRENCY: ${WORKER_CONCURRENCY:-1} + WORKER_IMAGE_MEMORY_MIB: '512' + secrets: + - database_url + - s3_access_key_id + - s3_secret_access_key + - broker_url + cpus: 1.0 + mem_limit: 768m + stop_grace_period: 5s + depends_on: + migrate: + condition: service_completed_successfully + s3-bootstrap: + condition: service_completed_successfully + broker: + condition: service_healthy + restart: on-failure + healthcheck: + disable: true + logging: + driver: json-file + options: + max-size: 5m + max-file: '2' + dns_opt: + - timeout:1 + - attempts:1 +volumes: + postgres_data: null + redis_data: null + s3_data: null + broker_data: null +secrets: + db_password: + file: .secrets/db_password + database_url: + file: .secrets/database_url + s3_root_user: + file: .secrets/s3_root_user + s3_root_password: + file: .secrets/s3_root_password + s3_access_key_id: + file: .secrets/s3_access_key_id + s3_secret_access_key: + file: .secrets/s3_secret_access_key + broker_password: + file: .secrets/broker_password + broker_url: + file: .secrets/broker_url diff --git a/evidence/api_failover_additional_1.json b/evidence/api_failover_additional_1.json new file mode 100644 index 0000000..1bf4100 --- /dev/null +++ b/evidence/api_failover_additional_1.json @@ -0,0 +1,340 @@ +{ + "target": "768f094b3536:ba81595e", + "stopped_container": "768f094b3536247e53a7fa69357a507504aa11cd094149723e47ec1758b0805d", + "before": [ + { + "id": "6d5ccd7883e55d222f7bcb15064b8a7c0d5722ca54f2c941d4ba35b1e1ef4128", + "name": "mtusi2026lab5-api-1", + "hostname": "6d5ccd7883e5", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:44:11.837673643Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "768f094b3536247e53a7fa69357a507504aa11cd094149723e47ec1758b0805d", + "name": "mtusi2026lab5-api-2", + "hostname": "768f094b3536", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:44:12.329596734Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:44:16.426131982Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:21:15.687084123Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:21:23.472099949Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "9dddbe68f5014a882f21775814a22bff73c2e7afa06aec44f6afaacf862e0938", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "9dddbe68f501", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:53:56.773872211Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:20:11.844174641Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:21:01.323626814Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": true, + "started_at": "2026-10-26T13:53:57.612149851Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:52:45.447139686Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:21:01.324968308Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "e1b41eef77857e6216dd324988b41d2a7386ee93c2405dce35e9f22917c914dd", + "name": "mtusi2026lab5-worker-1", + "hostname": "e1b41eef7785", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:53:56.773642491Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } + ], + "after": [ + { + "id": "6d5ccd7883e55d222f7bcb15064b8a7c0d5722ca54f2c941d4ba35b1e1ef4128", + "name": "mtusi2026lab5-api-1", + "hostname": "6d5ccd7883e5", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:44:11.837673643Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "768f094b3536247e53a7fa69357a507504aa11cd094149723e47ec1758b0805d", + "name": "mtusi2026lab5-api-2", + "hostname": "768f094b3536", + "service": "api", + "running": false, + "started_at": "2026-10-26T13:44:12.329596734Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:44:16.426131982Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:21:15.687084123Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:21:23.472099949Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "9dddbe68f5014a882f21775814a22bff73c2e7afa06aec44f6afaacf862e0938", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "9dddbe68f501", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:53:56.773872211Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:20:11.844174641Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:21:01.323626814Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": true, + "started_at": "2026-10-26T13:53:57.612149851Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:52:45.447139686Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:21:01.324968308Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "e1b41eef77857e6216dd324988b41d2a7386ee93c2405dce35e9f22917c914dd", + "name": "mtusi2026lab5-worker-1", + "hostname": "e1b41eef7785", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:53:56.773642491Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } + ] +} diff --git a/evidence/attachment_failover.json b/evidence/attachment_failover.json new file mode 100644 index 0000000..f83f694 --- /dev/null +++ b/evidence/attachment_failover.json @@ -0,0 +1,349 @@ +{ + "status": "PASS", + "uploader": "19035f4f4225:4d87e6fb", + "downloader": "8f4a872818e5:968954bd", + "recovery_seconds": 2.3859084759999405, + "failed_attempts": 0, + "original_size": 111817, + "checksum_verified": true, + "stop": { + "target": "19035f4f4225:4d87e6fb", + "stopped_container": "19035f4f4225999dacd97a3f68c06cd1a08c18b720efcaa4a6c3af76ceb3512c", + "before": [ + { + "id": "19035f4f4225999dacd97a3f68c06cd1a08c18b720efcaa4a6c3af76ceb3512c", + "name": "mtusi2026lab5-api-1", + "hostname": "19035f4f4225", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:20:51.434643261Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "8f4a872818e5648c47a76de51084bc0af53672fe0095a1b1f64e1fbe76266c70", + "name": "mtusi2026lab5-api-2", + "hostname": "8f4a872818e5", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:20:07.260090532Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:19:58.542392464Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:19:58.561302804Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:19:58.562034277Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "006c11ae2e2c025877906965f955d50a070e03dcefdf10251219d986aa951287", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "006c11ae2e2c", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:20:11.830304855Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:20:11.844174641Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:20:46.898485224Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": true, + "started_at": "2026-10-26T13:20:11.405575488Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:19:58.541630268Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:20:46.909369372Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "8f8673d67ca93d49031a9e5f55cd6fbf532142965a466de61353b15112472775", + "name": "mtusi2026lab5-worker-1", + "hostname": "8f8673d67ca9", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:20:11.799525654Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } + ], + "after": [ + { + "id": "19035f4f4225999dacd97a3f68c06cd1a08c18b720efcaa4a6c3af76ceb3512c", + "name": "mtusi2026lab5-api-1", + "hostname": "19035f4f4225", + "service": "api", + "running": false, + "started_at": "2026-10-26T13:20:51.434643261Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "8f4a872818e5648c47a76de51084bc0af53672fe0095a1b1f64e1fbe76266c70", + "name": "mtusi2026lab5-api-2", + "hostname": "8f4a872818e5", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:20:07.260090532Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:19:58.542392464Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:19:58.561302804Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:19:58.562034277Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "006c11ae2e2c025877906965f955d50a070e03dcefdf10251219d986aa951287", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "006c11ae2e2c", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:20:11.830304855Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:20:11.844174641Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:20:46.898485224Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": true, + "started_at": "2026-10-26T13:20:11.405575488Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:19:58.541630268Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:20:46.909369372Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "8f8673d67ca93d49031a9e5f55cd6fbf532142965a466de61353b15112472775", + "name": "mtusi2026lab5-worker-1", + "hostname": "8f8673d67ca9", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:20:11.799525654Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } + ] + } +} diff --git a/evidence/broker_restart_diagnostic.txt b/evidence/broker_restart_diagnostic.txt new file mode 100644 index 0000000..43633b3 --- /dev/null +++ b/evidence/broker_restart_diagnostic.txt @@ -0,0 +1,53 @@ +broker-1 | 1:C 26 Oct 2026 13:16:13.246 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo +broker-1 | 1:C 26 Oct 2026 13:16:13.246 * Redis version=7.4.3, bits=64, commit=00000000, modified=0, pid=1, just started +broker-1 | 1:C 26 Oct 2026 13:16:13.246 * Configuration loaded +broker-1 | 1:M 26 Oct 2026 13:16:13.247 * monotonic clock: POSIX clock_gettime +broker-1 | 1:M 26 Oct 2026 13:16:13.249 * Running mode=standalone, port=6379. +broker-1 | 1:M 26 Oct 2026 13:16:13.250 * Server initialized +broker-1 | 1:M 26 Oct 2026 13:16:13.259 * Creating AOF base file appendonly.aof.1.base.rdb on server start +broker-1 | 1:M 26 Oct 2026 13:16:13.272 * Creating AOF incr file appendonly.aof.1.incr.aof on server start +broker-1 | 1:M 26 Oct 2026 13:16:13.272 * Ready to accept connections tcp +broker-1 | 1:signal-handler (1793020629) Received SIGTERM scheduling shutdown... +broker-1 | 1:M 26 Oct 2026 13:17:10.009 * User requested shutdown... +broker-1 | 1:M 26 Oct 2026 13:17:10.010 * Calling fsync() on the AOF file. +broker-1 | 1:M 26 Oct 2026 13:17:10.011 # Redis is now ready to exit, bye bye... +broker-1 | /broker.sh: 4: cannot create /tmp/broker.conf: Permission denied +broker-1 | /broker.sh: 4: cannot create /tmp/broker.conf: Permission denied +broker-1 | 1:C 26 Oct 2026 13:18:36.800 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo +broker-1 | 1:C 26 Oct 2026 13:18:36.800 * Redis version=7.4.3, bits=64, commit=00000000, modified=0, pid=1, just started +broker-1 | 1:C 26 Oct 2026 13:18:36.800 * Configuration loaded +broker-1 | 1:M 26 Oct 2026 13:18:36.801 * monotonic clock: POSIX clock_gettime +broker-1 | 1:M 26 Oct 2026 13:18:36.807 * Running mode=standalone, port=6379. +broker-1 | 1:M 26 Oct 2026 13:18:36.808 * Server initialized +broker-1 | 1:M 26 Oct 2026 13:18:36.815 * Reading RDB base file on AOF loading... +broker-1 | 1:M 26 Oct 2026 13:18:36.815 * Loading RDB produced by version 7.4.3 +broker-1 | 1:M 26 Oct 2026 13:18:36.815 * RDB age 143 seconds +broker-1 | 1:M 26 Oct 2026 13:18:36.815 * RDB memory usage when created 0.90 Mb +broker-1 | 1:M 26 Oct 2026 13:18:36.815 * RDB is base AOF +broker-1 | 1:M 26 Oct 2026 13:18:36.815 * Done loading RDB, keys loaded: 0, keys expired: 0. +broker-1 | 1:M 26 Oct 2026 13:18:36.816 * DB loaded from base file appendonly.aof.1.base.rdb: 0.008 seconds +broker-1 | 1:M 26 Oct 2026 13:18:36.816 * DB loaded from incr file appendonly.aof.1.incr.aof: 0.000 seconds +broker-1 | 1:M 26 Oct 2026 13:18:36.816 * DB loaded from append only file: 0.008 seconds +broker-1 | 1:M 26 Oct 2026 13:18:36.816 * Opening AOF incr file appendonly.aof.1.incr.aof on server start +broker-1 | 1:M 26 Oct 2026 13:18:36.816 * Ready to accept connections tcp +broker-1 | 1:signal-handler (1793020796) Received SIGTERM scheduling shutdown... +broker-1 | 1:M 26 Oct 2026 13:19:56.437 * User requested shutdown... +broker-1 | 1:M 26 Oct 2026 13:19:56.437 * Calling fsync() on the AOF file. +broker-1 | 1:M 26 Oct 2026 13:19:56.438 # Redis is now ready to exit, bye bye... +broker-1 | 1:C 26 Oct 2026 13:19:58.573 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo +broker-1 | 1:C 26 Oct 2026 13:19:58.573 * Redis version=7.4.3, bits=64, commit=00000000, modified=0, pid=1, just started +broker-1 | 1:C 26 Oct 2026 13:19:58.573 * Configuration loaded +broker-1 | 1:M 26 Oct 2026 13:19:58.573 * monotonic clock: POSIX clock_gettime +broker-1 | 1:M 26 Oct 2026 13:19:58.574 * Running mode=standalone, port=6379. +broker-1 | 1:M 26 Oct 2026 13:19:58.574 * Server initialized +broker-1 | 1:M 26 Oct 2026 13:19:58.574 * Reading RDB base file on AOF loading... +broker-1 | 1:M 26 Oct 2026 13:19:58.575 * Loading RDB produced by version 7.4.3 +broker-1 | 1:M 26 Oct 2026 13:19:58.575 * RDB age 225 seconds +broker-1 | 1:M 26 Oct 2026 13:19:58.575 * RDB memory usage when created 0.90 Mb +broker-1 | 1:M 26 Oct 2026 13:19:58.575 * RDB is base AOF +broker-1 | 1:M 26 Oct 2026 13:19:58.575 * Done loading RDB, keys loaded: 0, keys expired: 0. +broker-1 | 1:M 26 Oct 2026 13:19:58.576 * DB loaded from base file appendonly.aof.1.base.rdb: 0.001 seconds +broker-1 | 1:M 26 Oct 2026 13:19:58.576 * DB loaded from incr file appendonly.aof.1.incr.aof: 0.000 seconds +broker-1 | 1:M 26 Oct 2026 13:19:58.576 * DB loaded from append only file: 0.001 seconds +broker-1 | 1:M 26 Oct 2026 13:19:58.576 * Opening AOF incr file appendonly.aof.1.incr.aof on server start +broker-1 | 1:M 26 Oct 2026 13:19:58.576 * Ready to accept connections tcp diff --git a/evidence/broker_runtime.json b/evidence/broker_runtime.json new file mode 100644 index 0000000..7311e86 --- /dev/null +++ b/evidence/broker_runtime.json @@ -0,0 +1 @@ +{"config": {"appendonly": "yes", "maxmemory-policy": "noeviction", "appendfsync": "always"}, "aof_enabled": 1} diff --git a/evidence/container_pip_check.txt b/evidence/container_pip_check.txt new file mode 100644 index 0000000..5e339fd --- /dev/null +++ b/evidence/container_pip_check.txt @@ -0,0 +1,2 @@ +WARNING: The directory '/nonexistent/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag. +No broken requirements found. diff --git a/evidence/containers_after_restart.json b/evidence/containers_after_restart.json new file mode 100644 index 0000000..4c974c5 --- /dev/null +++ b/evidence/containers_after_restart.json @@ -0,0 +1,169 @@ +[ + { + "id": "19035f4f4225999dacd97a3f68c06cd1a08c18b720efcaa4a6c3af76ceb3512c", + "name": "mtusi2026lab5-api-1", + "hostname": "19035f4f4225", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:20:07.596155423Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "8f4a872818e5648c47a76de51084bc0af53672fe0095a1b1f64e1fbe76266c70", + "name": "mtusi2026lab5-api-2", + "hostname": "8f4a872818e5", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:20:07.260090532Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:19:58.542392464Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:19:58.561302804Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:19:58.562034277Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "006c11ae2e2c025877906965f955d50a070e03dcefdf10251219d986aa951287", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "006c11ae2e2c", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:20:11.830304855Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:20:11.844174641Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:16:16.209515476Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": true, + "started_at": "2026-10-26T13:20:11.405575488Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:19:58.541630268Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:16:16.236792755Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "8f8673d67ca93d49031a9e5f55cd6fbf532142965a466de61353b15112472775", + "name": "mtusi2026lab5-worker-1", + "hostname": "8f8673d67ca9", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:20:11.799525654Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } +] diff --git a/evidence/containers_before.json b/evidence/containers_before.json new file mode 100644 index 0000000..571c194 --- /dev/null +++ b/evidence/containers_before.json @@ -0,0 +1,169 @@ +[ + { + "id": "ca5bb0478ca73a96fb5298cba384bd0df6d7527cb44b4cb634aeb6bdbe69362a", + "name": "mtusi2026lab5-api-1", + "hostname": "ca5bb0478ca7", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:16:21.613946914Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "c754d451d0549989cb98b8d8a5ec3d0b0b71f60540d088338c2019c0c1d8d541", + "name": "mtusi2026lab5-api-2", + "hostname": "c754d451d054", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:16:22.355787701Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:16:13.228812174Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:16:13.22282282Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:16:13.188626791Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "896657e8d5c7d804714969b92ea1095774dd370e529c54a7a6fec9faf9920b11", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "896657e8d5c7", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:16:22.01758076Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "53ca4a2a0ae5230e8757cd2afa56cf7b81a29478133e19e5bff78ef9d1dc5bc5", + "name": "mtusi2026lab5-lb-1", + "hostname": "53ca4a2a0ae5", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:16:25.589983116Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:16:16.209515476Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "207315a71a98bf9414dcf3e3e0e7a60b06ac7efa4be311ecc3c96b35fe9a2ffe", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "207315a71a98", + "service": "reconciler", + "running": true, + "started_at": "2026-10-26T13:16:21.961770232Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:16:13.224363452Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:16:16.236792755Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "2d350ddc0288bd874db28476e4aaf52c526efe177a3e3b9322bb772566d80f38", + "name": "mtusi2026lab5-worker-1", + "hostname": "2d350ddc0288", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:16:22.005089023Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } +] diff --git a/evidence/containers_before_retry.json b/evidence/containers_before_retry.json new file mode 100644 index 0000000..866d3cc --- /dev/null +++ b/evidence/containers_before_retry.json @@ -0,0 +1,169 @@ +[ + { + "id": "19035f4f4225999dacd97a3f68c06cd1a08c18b720efcaa4a6c3af76ceb3512c", + "name": "mtusi2026lab5-api-1", + "hostname": "19035f4f4225", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:18:48.494760073Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "8f4a872818e5648c47a76de51084bc0af53672fe0095a1b1f64e1fbe76266c70", + "name": "mtusi2026lab5-api-2", + "hostname": "8f4a872818e5", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:18:48.028291998Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:18:36.75300028Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:18:36.846503039Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:18:36.751584245Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "006c11ae2e2c025877906965f955d50a070e03dcefdf10251219d986aa951287", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "006c11ae2e2c", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:18:56.084910077Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:18:56.176194222Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:16:16.209515476Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": true, + "started_at": "2026-10-26T13:18:56.085817704Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:18:36.673896353Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:16:16.236792755Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "8f8673d67ca93d49031a9e5f55cd6fbf532142965a466de61353b15112472775", + "name": "mtusi2026lab5-worker-1", + "hostname": "8f8673d67ca9", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:18:56.139328157Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } +] diff --git a/evidence/containers_final.json b/evidence/containers_final.json new file mode 100644 index 0000000..eb90b98 --- /dev/null +++ b/evidence/containers_final.json @@ -0,0 +1,169 @@ +[ + { + "id": "6d5ccd7883e55d222f7bcb15064b8a7c0d5722ca54f2c941d4ba35b1e1ef4128", + "name": "mtusi2026lab5-api-1", + "hostname": "6d5ccd7883e5", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:44:11.837673643Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "768f094b3536247e53a7fa69357a507504aa11cd094149723e47ec1758b0805d", + "name": "mtusi2026lab5-api-2", + "hostname": "768f094b3536", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:54:49.167634924Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:44:16.426131982Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:21:15.687084123Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:21:23.472099949Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "9dddbe68f5014a882f21775814a22bff73c2e7afa06aec44f6afaacf862e0938", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "9dddbe68f501", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:53:56.773872211Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:20:11.844174641Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:54:45.19857437Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": true, + "started_at": "2026-10-26T13:53:57.612149851Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:52:45.447139686Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:54:45.195760693Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "e1b41eef77857e6216dd324988b41d2a7386ee93c2405dce35e9f22917c914dd", + "name": "mtusi2026lab5-worker-1", + "hostname": "e1b41eef7785", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:53:56.773642491Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } +] diff --git a/evidence/containers_persistence_failed.json b/evidence/containers_persistence_failed.json new file mode 100644 index 0000000..eb4f7ee --- /dev/null +++ b/evidence/containers_persistence_failed.json @@ -0,0 +1,150 @@ +[ + { + "id": "ca5bb0478ca73a96fb5298cba384bd0df6d7527cb44b4cb634aeb6bdbe69362a", + "name": "mtusi2026lab5-api-1", + "hostname": "ca5bb0478ca7", + "service": "api", + "running": false, + "started_at": "2026-10-26T13:16:21.613946914Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "c754d451d0549989cb98b8d8a5ec3d0b0b71f60540d088338c2019c0c1d8d541", + "name": "mtusi2026lab5-api-2", + "hostname": "c754d451d054", + "service": "api", + "running": false, + "started_at": "2026-10-26T13:16:22.355787701Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": false, + "started_at": "2026-10-26T13:17:12.497514045Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": {} + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:17:12.211996217Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:17:12.512948413Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "896657e8d5c7d804714969b92ea1095774dd370e529c54a7a6fec9faf9920b11", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "896657e8d5c7", + "service": "dispatcher", + "running": false, + "started_at": "2026-10-26T13:16:22.01758076Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": {} + }, + { + "id": "53ca4a2a0ae5230e8757cd2afa56cf7b81a29478133e19e5bff78ef9d1dc5bc5", + "name": "mtusi2026lab5-lb-1", + "hostname": "53ca4a2a0ae5", + "service": "lb", + "running": false, + "started_at": "2026-10-26T13:16:25.589983116Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:16:16.209515476Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "207315a71a98bf9414dcf3e3e0e7a60b06ac7efa4be311ecc3c96b35fe9a2ffe", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "207315a71a98", + "service": "reconciler", + "running": false, + "started_at": "2026-10-26T13:16:21.961770232Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": {} + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:17:12.503154994Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:16:16.236792755Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "2d350ddc0288bd874db28476e4aaf52c526efe177a3e3b9322bb772566d80f38", + "name": "mtusi2026lab5-worker-1", + "hostname": "2d350ddc0288", + "service": "worker", + "running": false, + "started_at": "2026-10-26T13:16:22.005089023Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": {} + } +] diff --git a/evidence/dependencies.json b/evidence/dependencies.json new file mode 100644 index 0000000..3941ea1 --- /dev/null +++ b/evidence/dependencies.json @@ -0,0 +1,8 @@ +{ + "redis": "PASS", + "postgres": [ + 503, + 503 + ], + "old_token_message_original_preserved": true +} diff --git a/evidence/final_audit.json b/evidence/final_audit.json new file mode 100644 index 0000000..010da0e --- /dev/null +++ b/evidence/final_audit.json @@ -0,0 +1,32 @@ +{ + "status": "PASS", + "captured_at": "2026-10-26T13:58:31.163387+00:00", + "checks": { + "public_files_unchanged": true, + "git_diff_check": true, + "no_local_secret_values_in_git_candidates": true, + "no_token_fields_in_evidence_json": true, + "private_paths_ignored": true, + "pipeline_pass_39": true, + "thirteen_cases_three_repeats": true, + "all_case_status_pass": true, + "fault_injection_disabled": true, + "two_api_running": true, + "required_services_running": true, + "instructions_preserved": true, + "git_metadata_preserved": true, + "report_context_present": true + }, + "public_files_checked": 16, + "public_mismatches": [], + "secret_match_files": [], + "sensitive_json_fields": [], + "ignored_private_paths": { + ".env": true, + ".secrets/db_password": true, + ".secrets/database_url": true, + ".venv/bin/python": true + }, + "git_diff_check_output": "", + "git_head": "276dbdad8a34da4c5b57fbf1879ca169b581d75b" +} diff --git a/evidence/idempotency.json b/evidence/idempotency.json new file mode 100644 index 0000000..e21e58d --- /dev/null +++ b/evidence/idempotency.json @@ -0,0 +1,9 @@ +{ + "status": "PASS", + "concurrent_requests": 32, + "observed_instances": 2, + "messages_after_race": 1, + "conflict": 409, + "invalid_key": 400, + "logout": 401 +} \ No newline at end of file diff --git a/evidence/import_comparison.json b/evidence/import_comparison.json new file mode 100644 index 0000000..5dbf6b7 --- /dev/null +++ b/evidence/import_comparison.json @@ -0,0 +1,98 @@ +{ + "added": [ + "Dockerfile", + "compose.yaml", + "infra/broker-entrypoint.sh", + "infra/haproxy.cfg", + "infra/minio-entrypoint.sh", + "infra/s3-api-policy.json", + "infra/s3.Dockerfile", + "migrations/001_initial.sql", + "migrations/002_idempotency.sql", + "migrations/003_attachments.sql", + "migrations/004_pipeline.sql", + "requirements-experiment.txt", + "requirements.txt", + "scripts/bootstrap_s3.sh", + "scripts/experiment.py", + "scripts/healthcheck.py", + "scripts/restart.sh", + "scripts/restore-api.sh", + "scripts/setup.sh", + "scripts/stack.py", + "scripts/start.sh", + "scripts/stop-one.sh", + "scripts/test_expiry.sh", + "scripts/wait_ready.py", + "src/__init__.py", + "src/attachments.py", + "src/broker.py", + "src/cleanup.py", + "src/config.py", + "src/dispatcher.py", + "src/errors.py", + "src/faults.py", + "src/image_pipeline.py", + "src/jobs.py", + "src/main.py", + "src/migrate.py", + "src/storage.py", + "src/worker.py", + "student-tests/attachments.py", + "student-tests/checks.py", + "student-tests/database.py", + "student-tests/dependencies.py", + "student-tests/file_failover.py", + "student-tests/idempotency.py", + "student-tests/pipeline_scenario.py", + "student-tests/test_api.py", + "student-tests/variants.py" + ], + "changed": [ + ".dockerignore", + ".gitignore", + "Makefile", + "REPORT.md" + ], + "same": [ + ".env.example", + ".github/pull_request_template.md", + ".github/workflows/contracts.yml", + "CONTRIBUTING.md", + "COURSE.md", + "Dockerfile.example", + "MAINTAINERS.md", + "README.md", + "compose.example.yaml", + "contracts/README.md", + "contracts/attachment-states.md", + "contracts/examples.json", + "contracts/infrastructure.json", + "contracts/jobs.schema.json", + "contracts/openapi.json", + "evidence/README.md", + "examples/requests.http", + "infra/README.md", + "lab.json", + "requirements-dev.txt", + "scripts/check_contract.py", + "scripts/restart.example.sh", + "scripts/stop-one.example.sh", + "scripts/validate_openapi.py", + "tests/README.md", + "tests/client.py", + "tests/fixtures/README.md", + "tests/fixtures/sample.png", + "tests/image_probe.py", + "tests/load.py", + "tests/resilience.py", + "tests/smoke.py" + ], + "preserved": [ + ".git", + "AGENTS.md", + "CODEX_HANDOFF.md" + ], + "source_archive_sha256": "434c735cf6f870ed4e462563a192ea7ed82c9517d1411fb6f9d84ed4cd03d863", + "source_archive": "/home/kitsune/visotka/incoming/mtusi2026lab5_solution.zip" +} diff --git a/evidence/last_stop.json b/evidence/last_stop.json new file mode 100644 index 0000000..1bf4100 --- /dev/null +++ b/evidence/last_stop.json @@ -0,0 +1,340 @@ +{ + "target": "768f094b3536:ba81595e", + "stopped_container": "768f094b3536247e53a7fa69357a507504aa11cd094149723e47ec1758b0805d", + "before": [ + { + "id": "6d5ccd7883e55d222f7bcb15064b8a7c0d5722ca54f2c941d4ba35b1e1ef4128", + "name": "mtusi2026lab5-api-1", + "hostname": "6d5ccd7883e5", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:44:11.837673643Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "768f094b3536247e53a7fa69357a507504aa11cd094149723e47ec1758b0805d", + "name": "mtusi2026lab5-api-2", + "hostname": "768f094b3536", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:44:12.329596734Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:44:16.426131982Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:21:15.687084123Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:21:23.472099949Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "9dddbe68f5014a882f21775814a22bff73c2e7afa06aec44f6afaacf862e0938", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "9dddbe68f501", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:53:56.773872211Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:20:11.844174641Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:21:01.323626814Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": true, + "started_at": "2026-10-26T13:53:57.612149851Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:52:45.447139686Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:21:01.324968308Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "e1b41eef77857e6216dd324988b41d2a7386ee93c2405dce35e9f22917c914dd", + "name": "mtusi2026lab5-worker-1", + "hostname": "e1b41eef7785", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:53:56.773642491Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } + ], + "after": [ + { + "id": "6d5ccd7883e55d222f7bcb15064b8a7c0d5722ca54f2c941d4ba35b1e1ef4128", + "name": "mtusi2026lab5-api-1", + "hostname": "6d5ccd7883e5", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:44:11.837673643Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "768f094b3536247e53a7fa69357a507504aa11cd094149723e47ec1758b0805d", + "name": "mtusi2026lab5-api-2", + "hostname": "768f094b3536", + "service": "api", + "running": false, + "started_at": "2026-10-26T13:44:12.329596734Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:44:16.426131982Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:21:15.687084123Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:21:23.472099949Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "9dddbe68f5014a882f21775814a22bff73c2e7afa06aec44f6afaacf862e0938", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "9dddbe68f501", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:53:56.773872211Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:20:11.844174641Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:21:01.323626814Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": true, + "started_at": "2026-10-26T13:53:57.612149851Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:52:45.447139686Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:21:01.324968308Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "e1b41eef77857e6216dd324988b41d2a7386ee93c2405dce35e9f22917c914dd", + "name": "mtusi2026lab5-worker-1", + "hostname": "e1b41eef7785", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:53:56.773642491Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } + ] +} diff --git a/evidence/local_check.txt b/evidence/local_check.txt new file mode 100644 index 0000000..9a55330 --- /dev/null +++ b/evidence/local_check.txt @@ -0,0 +1,2 @@ +python3 scripts/check_contract.py +PASS: offline skeleton structure, local refs and Python syntax; application NOT tested. diff --git a/evidence/local_dependencies.txt b/evidence/local_dependencies.txt new file mode 100644 index 0000000..f2025d8 --- /dev/null +++ b/evidence/local_dependencies.txt @@ -0,0 +1,2 @@ +BASE_URL="http://localhost:8080" python3 student-tests/dependencies.py +PASS: Redis fallback, PostgreSQL 503 and recovery, old token/message/original preserved diff --git a/evidence/local_environment.json b/evidence/local_environment.json new file mode 100644 index 0000000..022f7e9 --- /dev/null +++ b/evidence/local_environment.json @@ -0,0 +1,21 @@ +{ + "captured_at": "2026-10-26T13:16:22.365436+00:00", + "uname": { + "system": "Linux", + "node": "LAPTOP-66HKAM8B", + "release": "5.15.146.1-microsoft-standard-WSL2", + "version": "#1 SMP Thu Jan 11 04:09:03 UTC 2024", + "machine": "x86_64", + "processor": "x86_64" + }, + "cpu_model": "12th Gen Intel(R) Core(TM) i5-1240P", + "host_cpus": 16, + "host_python": "3.10.12", + "docker_server": "26.1.1", + "docker_cpus": 16, + "docker_memory_bytes": 8187711488, + "compose": "2.27.0-desktop.2", + "disk": "Filesystem Size Used Avail Use% Mounted on\n/dev/sde 1007G 7.6G 949G 1% /", + "git_head": "276dbdad8a34da4c5b57fbf1879ca169b581d75b", + "upstream_head": "276dbdad8a34da4c5b57fbf1879ca169b581d75b\tHEAD" +} diff --git a/evidence/local_experiment.txt b/evidence/local_experiment.txt new file mode 100644 index 0000000..2f12ab8 --- /dev/null +++ b/evidence/local_experiment.txt @@ -0,0 +1,41 @@ +BASE_URL="http://localhost:8080" python3 scripts/experiment.py --repeats 3 +PASS: accepted_restart_broker_api, repeat 1/3 +PASS: before_publish, repeat 1/3 +PASS: after_publish, repeat 1/3 +PASS: before_effect, repeat 1/3 +PASS: after_original, repeat 1/3 +PASS: after_effects, repeat 1/3 +PASS: after_commit, repeat 1/3 +PASS: duplicates_and_invalid_carrier, repeat 1/3 +PASS: reorder_new_before_old, repeat 1/3 +PASS: stale_after_new_ready, repeat 1/3 +PASS: permanent_failure_replay, repeat 1/3 +PASS: bounded_retry_and_replay, repeat 1/3 +PASS: staging_retention_and_privacy, repeat 1/3 +PASS: accepted_restart_broker_api, repeat 2/3 +PASS: before_publish, repeat 2/3 +PASS: after_publish, repeat 2/3 +PASS: before_effect, repeat 2/3 +PASS: after_original, repeat 2/3 +PASS: after_effects, repeat 2/3 +PASS: after_commit, repeat 2/3 +PASS: duplicates_and_invalid_carrier, repeat 2/3 +PASS: reorder_new_before_old, repeat 2/3 +PASS: stale_after_new_ready, repeat 2/3 +PASS: permanent_failure_replay, repeat 2/3 +PASS: bounded_retry_and_replay, repeat 2/3 +PASS: staging_retention_and_privacy, repeat 2/3 +PASS: accepted_restart_broker_api, repeat 3/3 +PASS: before_publish, repeat 3/3 +PASS: after_publish, repeat 3/3 +PASS: before_effect, repeat 3/3 +PASS: after_original, repeat 3/3 +PASS: after_effects, repeat 3/3 +PASS: after_commit, repeat 3/3 +PASS: duplicates_and_invalid_carrier, repeat 3/3 +PASS: reorder_new_before_old, repeat 3/3 +PASS: stale_after_new_ready, repeat 3/3 +PASS: permanent_failure_replay, repeat 3/3 +PASS: bounded_retry_and_replay, repeat 3/3 +PASS: staging_retention_and_privacy, repeat 3/3 +Experiment completed; results saved in evidence/ diff --git a/evidence/local_expiry.txt b/evidence/local_expiry.txt new file mode 100644 index 0000000..a411085 --- /dev/null +++ b/evidence/local_expiry.txt @@ -0,0 +1,20 @@ +bash scripts/test_expiry.sh + Container mtusi2026lab5-api-2 Recreate + Container mtusi2026lab5-api-1 Recreate + Container mtusi2026lab5-api-2 Recreated + Container mtusi2026lab5-api-1 Recreated + Container mtusi2026lab5-api-1 Starting + Container mtusi2026lab5-api-1 Started + Container mtusi2026lab5-api-2 Starting + Container mtusi2026lab5-api-2 Started +API ready: 2896c7c8071b:d9fb9ed4, 60f92a7fb3ee:50d56ff0 +PASS: short TTL expiry + Container mtusi2026lab5-api-1 Recreate + Container mtusi2026lab5-api-2 Recreate + Container mtusi2026lab5-api-2 Recreated + Container mtusi2026lab5-api-1 Recreated + Container mtusi2026lab5-api-2 Starting + Container mtusi2026lab5-api-2 Started + Container mtusi2026lab5-api-1 Starting + Container mtusi2026lab5-api-1 Started +API ready: 10ea4363b2a5:8701cfd9, f0e7bd13e2a9:0fe67afe diff --git a/evidence/local_failover.txt b/evidence/local_failover.txt new file mode 100644 index 0000000..73f317c --- /dev/null +++ b/evidence/local_failover.txt @@ -0,0 +1,4 @@ +python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://localhost:8080" +Executing explicit failover hook; hook output suppressed to avoid leaking secrets. +{"observed_instances_before": 2, "successful_writes": 114, "failed_attempts": 3, "first_recovery_seconds": 2.581} +PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence. diff --git a/evidence/local_failover_additional_1.txt b/evidence/local_failover_additional_1.txt new file mode 100644 index 0000000..41a8437 --- /dev/null +++ b/evidence/local_failover_additional_1.txt @@ -0,0 +1,4 @@ +python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://localhost:8080" +Executing explicit failover hook; hook output suppressed to avoid leaking secrets. +{"observed_instances_before": 2, "successful_writes": 110, "failed_attempts": 4, "first_recovery_seconds": 2.521} +PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence. diff --git a/evidence/local_file_failover.txt b/evidence/local_file_failover.txt new file mode 100644 index 0000000..c9482da --- /dev/null +++ b/evidence/local_file_failover.txt @@ -0,0 +1,2 @@ +BASE_URL="http://localhost:8080" python3 student-tests/file_failover.py +PASS: upload API stopped, original downloaded by other API with existing token diff --git a/evidence/local_files.txt b/evidence/local_files.txt new file mode 100644 index 0000000..4f7aaab --- /dev/null +++ b/evidence/local_files.txt @@ -0,0 +1,4 @@ +python3 student-tests/attachments.py --base-url "http://localhost:8080" +PASS: PNG/JPEG, bytes/pixels limits, filename/MIME, ACL, attachment message replay +python3 student-tests/variants.py --base-url "http://localhost:8080" +PASS: thumbnail/crop/WebP bytes, sizes, EXIF orientation, white alpha, no upscaling, ACL diff --git a/evidence/local_final_ready.txt b/evidence/local_final_ready.txt new file mode 100644 index 0000000..46da226 --- /dev/null +++ b/evidence/local_final_ready.txt @@ -0,0 +1,2 @@ +BASE_URL="http://localhost:8080" python3 scripts/stack.py wait --count 2 +API ready: 6d5ccd7883e5:4a86795b, 768f094b3536:7add9f11 diff --git a/evidence/local_final_smoke.txt b/evidence/local_final_smoke.txt new file mode 100644 index 0000000..df05fe2 --- /dev/null +++ b/evidence/local_final_smoke.txt @@ -0,0 +1,2 @@ +python3 tests/smoke.py --base-url "http://localhost:8080" +PASS: lab5 public API scenario; infrastructure and grading evidence remain separate. diff --git a/evidence/local_install.txt b/evidence/local_install.txt new file mode 100644 index 0000000..484dedd --- /dev/null +++ b/evidence/local_install.txt @@ -0,0 +1,45 @@ +Collecting openapi-spec-validator==0.7.2 + Using cached openapi_spec_validator-0.7.2-py3-none-any.whl (39 kB) +Collecting Pillow==12.0.0 + Using cached pillow-12.0.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (7.0 MB) +Collecting jsonschema-path<0.4.0,>=0.3.1 + Using cached jsonschema_path-0.3.4-py3-none-any.whl (14 kB) +Collecting openapi-schema-validator<0.7.0,>=0.6.0 + Using cached openapi_schema_validator-0.6.3-py3-none-any.whl (8.8 kB) +Collecting lazy-object-proxy<2.0.0,>=1.7.1 + Using cached lazy_object_proxy-1.12.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (67 kB) +Collecting jsonschema<5.0.0,>=4.18.0 + Using cached jsonschema-4.26.0-py3-none-any.whl (90 kB) +Collecting attrs>=22.2.0 + Using cached attrs-26.1.0-py3-none-any.whl (67 kB) +Collecting referencing>=0.28.4 + Using cached referencing-0.37.0-py3-none-any.whl (26 kB) +Collecting jsonschema-specifications>=2023.03.6 + Using cached jsonschema_specifications-2025.9.1-py3-none-any.whl (18 kB) +Collecting rpds-py>=0.25.0 + Using cached rpds_py-0.30.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (390 kB) +Collecting pathable<0.5.0,>=0.4.1 + Using cached pathable-0.4.4-py3-none-any.whl (9.6 kB) +Collecting PyYAML>=5.1 + Using cached pyyaml-6.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (770 kB) +Collecting requests<3.0.0,>=2.31.0 + Using cached requests-2.34.2-py3-none-any.whl (73 kB) +Collecting referencing>=0.28.4 + Using cached referencing-0.36.2-py3-none-any.whl (26 kB) +Collecting rfc3339-validator + Using cached rfc3339_validator-0.1.4-py2.py3-none-any.whl (3.5 kB) +Collecting typing-extensions>=4.4.0 + Using cached typing_extensions-4.16.0-py3-none-any.whl (45 kB) +Collecting certifi>=2023.5.7 + Downloading certifi-2026.10.23-py3-none-any.whl (135 kB) + ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 135.1/135.1 KB 4.4 MB/s eta 0:00:00 +Collecting urllib3<3,>=1.26 + Using cached urllib3-2.8.0-py3-none-any.whl (135 kB) +Collecting charset_normalizer<4,>=2 + Using cached charset_normalizer-3.5.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (271 kB) +Collecting idna<4,>=2.5 + Using cached idna-3.20-py3-none-any.whl (69 kB) +Collecting six + Using cached six-1.17.0-py2.py3-none-any.whl (11 kB) +Installing collected packages: urllib3, typing-extensions, six, rpds-py, PyYAML, Pillow, pathable, lazy-object-proxy, idna, charset_normalizer, certifi, attrs, rfc3339-validator, requests, referencing, jsonschema-specifications, jsonschema-path, jsonschema, openapi-schema-validator, openapi-spec-validator +Successfully installed Pillow-12.0.0 PyYAML-6.0.3 attrs-26.1.0 certifi-2026.10.23 charset_normalizer-3.5.2 idna-3.20 jsonschema-4.26.0 jsonschema-path-0.3.4 jsonschema-specifications-2025.9.1 lazy-object-proxy-1.12.0 openapi-schema-validator-0.6.3 openapi-spec-validator-0.7.2 pathable-0.4.4 referencing-0.36.2 requests-2.34.2 rfc3339-validator-0.1.4 rpds-py-0.30.0 six-1.17.0 typing-extensions-4.16.0 urllib3-2.8.0 diff --git a/evidence/local_persistence.txt b/evidence/local_persistence.txt new file mode 100644 index 0000000..793b001 --- /dev/null +++ b/evidence/local_persistence.txt @@ -0,0 +1,3 @@ +python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://localhost:8080" +Executing explicit persistence hook; hook output suppressed to avoid leaking secrets. +PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence. diff --git a/evidence/local_persistence_failed_initial.txt b/evidence/local_persistence_failed_initial.txt new file mode 100644 index 0000000..35cf7ac --- /dev/null +++ b/evidence/local_persistence_failed_initial.txt @@ -0,0 +1,4 @@ +python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://localhost:8080" +Executing explicit persistence hook; hook output suppressed to avoid leaking secrets. +FAIL: restart hook failed (inspect your script locally) +make: *** [Makefile:26: test-persistence] Error 1 diff --git a/evidence/local_persistence_failed_stopped_stack.txt b/evidence/local_persistence_failed_stopped_stack.txt new file mode 100644 index 0000000..997f5bf --- /dev/null +++ b/evidence/local_persistence_failed_stopped_stack.txt @@ -0,0 +1,3 @@ +python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://localhost:8080" +FAIL: GET /health/live: connection/TLS failure (URLError) +make: *** [Makefile:26: test-persistence] Error 1 diff --git a/evidence/local_pip_check.txt b/evidence/local_pip_check.txt new file mode 100644 index 0000000..c688d8c --- /dev/null +++ b/evidence/local_pip_check.txt @@ -0,0 +1 @@ +No broken requirements found. diff --git a/evidence/local_ready.txt b/evidence/local_ready.txt new file mode 100644 index 0000000..e7ee5cd --- /dev/null +++ b/evidence/local_ready.txt @@ -0,0 +1,2 @@ +BASE_URL="http://localhost:8080" python3 scripts/stack.py wait --count 2 +API ready: c754d451d054:f8ee8f14, ca5bb0478ca7:e2d9a089 diff --git a/evidence/local_restart_diagnostic.txt b/evidence/local_restart_diagnostic.txt new file mode 100644 index 0000000..4faf3ba --- /dev/null +++ b/evidence/local_restart_diagnostic.txt @@ -0,0 +1,40 @@ + Container mtusi2026lab5-dispatcher-1 Stopping + Container mtusi2026lab5-lb-1 Stopping + Container mtusi2026lab5-worker-1 Stopping + Container mtusi2026lab5-reconciler-1 Stopping + Container mtusi2026lab5-dispatcher-1 Stopped + Container mtusi2026lab5-lb-1 Stopped + Container mtusi2026lab5-api-2 Stopping + Container mtusi2026lab5-api-1 Stopping + Container mtusi2026lab5-worker-1 Stopped + Container mtusi2026lab5-broker-1 Stopping + Container mtusi2026lab5-reconciler-1 Stopped + Container mtusi2026lab5-api-1 Stopped + Container mtusi2026lab5-broker-1 Stopped + Container mtusi2026lab5-api-2 Stopped + Container mtusi2026lab5-db-1 Stopping + Container mtusi2026lab5-cache-1 Stopping + Container mtusi2026lab5-s3-1 Stopping + Container mtusi2026lab5-s3-1 Stopped + Container mtusi2026lab5-cache-1 Stopped + Container mtusi2026lab5-db-1 Stopped + Container mtusi2026lab5-db-1 Created + Container mtusi2026lab5-s3-1 Created + Container mtusi2026lab5-cache-1 Created + Container mtusi2026lab5-broker-1 Created + Container mtusi2026lab5-cache-1 Starting + Container mtusi2026lab5-s3-1 Starting + Container mtusi2026lab5-db-1 Starting + Container mtusi2026lab5-broker-1 Starting + Container mtusi2026lab5-db-1 Started + Container mtusi2026lab5-broker-1 Started + Container mtusi2026lab5-s3-1 Started + Container mtusi2026lab5-cache-1 Started + Container mtusi2026lab5-db-1 Waiting + Container mtusi2026lab5-s3-1 Waiting + Container mtusi2026lab5-cache-1 Waiting + Container mtusi2026lab5-broker-1 Waiting + Container mtusi2026lab5-db-1 Healthy + Container mtusi2026lab5-s3-1 Healthy + Container mtusi2026lab5-cache-1 Healthy +container mtusi2026lab5-broker-1 exited (2) diff --git a/evidence/local_restart_fixed.txt b/evidence/local_restart_fixed.txt new file mode 100644 index 0000000..e231e7d --- /dev/null +++ b/evidence/local_restart_fixed.txt @@ -0,0 +1,70 @@ + Container mtusi2026lab5-reconciler-1 Stopping + Container mtusi2026lab5-worker-1 Stopping + Container mtusi2026lab5-lb-1 Stopping + Container mtusi2026lab5-dispatcher-1 Stopping + Container mtusi2026lab5-lb-1 Stopped + Container mtusi2026lab5-api-2 Stopping + Container mtusi2026lab5-api-1 Stopping + Container mtusi2026lab5-reconciler-1 Stopped + Container mtusi2026lab5-dispatcher-1 Stopped + Container mtusi2026lab5-worker-1 Stopped + Container mtusi2026lab5-broker-1 Stopping + Container mtusi2026lab5-api-2 Stopped + Container mtusi2026lab5-api-1 Stopped + Container mtusi2026lab5-cache-1 Stopping + Container mtusi2026lab5-db-1 Stopping + Container mtusi2026lab5-s3-1 Stopping + Container mtusi2026lab5-broker-1 Stopped + Container mtusi2026lab5-s3-1 Stopped + Container mtusi2026lab5-db-1 Stopped + Container mtusi2026lab5-cache-1 Stopped + Container mtusi2026lab5-db-1 Created + Container mtusi2026lab5-cache-1 Created + Container mtusi2026lab5-s3-1 Created + Container mtusi2026lab5-broker-1 Created + Container mtusi2026lab5-s3-1 Starting + Container mtusi2026lab5-cache-1 Starting + Container mtusi2026lab5-db-1 Starting + Container mtusi2026lab5-broker-1 Starting + Container mtusi2026lab5-s3-1 Started + Container mtusi2026lab5-broker-1 Started + Container mtusi2026lab5-db-1 Started + Container mtusi2026lab5-cache-1 Started + Container mtusi2026lab5-cache-1 Waiting + Container mtusi2026lab5-db-1 Waiting + Container mtusi2026lab5-broker-1 Waiting + Container mtusi2026lab5-s3-1 Waiting + Container mtusi2026lab5-broker-1 Healthy + Container mtusi2026lab5-s3-1 Healthy + Container mtusi2026lab5-cache-1 Healthy + Container mtusi2026lab5-db-1 Healthy +Private bucket and limited API credentials ready + Container mtusi2026lab5-api-1 Recreate + Container mtusi2026lab5-api-2 Recreate + Container mtusi2026lab5-api-1 Recreated + Container mtusi2026lab5-api-2 Recreated + Container mtusi2026lab5-api-2 Starting + Container mtusi2026lab5-api-2 Started + Container mtusi2026lab5-api-1 Starting + Container mtusi2026lab5-api-1 Started + Container mtusi2026lab5-api-2 Waiting + Container mtusi2026lab5-api-1 Waiting + Container mtusi2026lab5-api-2 Healthy + Container mtusi2026lab5-api-1 Healthy + Container mtusi2026lab5-worker-1 Recreate + Container mtusi2026lab5-dispatcher-1 Recreate + Container mtusi2026lab5-lb-1 Recreate + Container mtusi2026lab5-reconciler-1 Recreate + Container mtusi2026lab5-lb-1 Recreated + Container mtusi2026lab5-reconciler-1 Recreated + Container mtusi2026lab5-worker-1 Recreated + Container mtusi2026lab5-dispatcher-1 Recreated + Container mtusi2026lab5-dispatcher-1 Starting + Container mtusi2026lab5-worker-1 Starting + Container mtusi2026lab5-lb-1 Starting + Container mtusi2026lab5-reconciler-1 Starting + Container mtusi2026lab5-reconciler-1 Started + Container mtusi2026lab5-dispatcher-1 Started + Container mtusi2026lab5-worker-1 Started + Container mtusi2026lab5-lb-1 Started +API ready: 19035f4f4225:387e2313, 8f4a872818e5:131c6854 diff --git a/evidence/local_restore_api_1.txt b/evidence/local_restore_api_1.txt new file mode 100644 index 0000000..a6ef21f --- /dev/null +++ b/evidence/local_restore_api_1.txt @@ -0,0 +1,17 @@ + Container mtusi2026lab5-db-1 Waiting + Container mtusi2026lab5-s3-1 Waiting + Container mtusi2026lab5-db-1 Healthy + Container mtusi2026lab5-migrate-1 Starting + Container mtusi2026lab5-s3-1 Healthy + Container mtusi2026lab5-s3-bootstrap-1 Starting + Container mtusi2026lab5-s3-bootstrap-1 Started + Container mtusi2026lab5-migrate-1 Started + Container mtusi2026lab5-s3-bootstrap-1 Waiting + Container mtusi2026lab5-migrate-1 Waiting + Container mtusi2026lab5-cache-1 Waiting + Container mtusi2026lab5-cache-1 Healthy + Container mtusi2026lab5-migrate-1 Exited + Container mtusi2026lab5-s3-bootstrap-1 Exited + Container mtusi2026lab5-api-2 Starting + Container mtusi2026lab5-api-2 Started +API ready: 6d5ccd7883e5:4a86795b, 768f094b3536:7add9f11 diff --git a/evidence/local_setup.txt b/evidence/local_setup.txt new file mode 100644 index 0000000..dd940a4 --- /dev/null +++ b/evidence/local_setup.txt @@ -0,0 +1,2 @@ +bash scripts/setup.sh +Локальные настройки подготовлены; секреты не выводятся. diff --git a/evidence/local_smoke.txt b/evidence/local_smoke.txt new file mode 100644 index 0000000..df05fe2 --- /dev/null +++ b/evidence/local_smoke.txt @@ -0,0 +1,2 @@ +python3 tests/smoke.py --base-url "http://localhost:8080" +PASS: lab5 public API scenario; infrastructure and grading evidence remain separate. diff --git a/evidence/local_start.txt b/evidence/local_start.txt new file mode 100644 index 0000000..d219eb7 --- /dev/null +++ b/evidence/local_start.txt @@ -0,0 +1,788 @@ +bash scripts/start.sh + broker Pulling + lb Pulling + cache Pulling + b1badc6e5066 Already exists + 93966a25fd29 Pulling fs layer + 7fffeaaf8311 Pulling fs layer + 4125f09b2efb Pulling fs layer + 426458412bd2 Pulling fs layer + 4f4fb700ef54 Pulling fs layer + 426458412bd2 Waiting + 4f4fb700ef54 Waiting + 61320b01ae5e Pulling fs layer + f8f9e5369fdd Pulling fs layer + 5cf79f4aceb3 Pulling fs layer + 698c8d1b3fd1 Pulling fs layer + 601d7fdb78f5 Pulling fs layer + 98e4482f5fee Pulling fs layer + 4f4fb700ef54 Pulling fs layer + 0eeb2b86c9b7 Pulling fs layer + 61320b01ae5e Waiting + 601d7fdb78f5 Waiting + 98e4482f5fee Waiting + 4f4fb700ef54 Waiting + 0eeb2b86c9b7 Waiting + f8f9e5369fdd Waiting + 5cf79f4aceb3 Waiting + 698c8d1b3fd1 Waiting + 7fffeaaf8311 Downloading [==================================================>] 1.159kB/1.159kB + 7fffeaaf8311 Verifying Checksum + 7fffeaaf8311 Download complete + 93966a25fd29 Downloading [> ] 49.15kB/3.51MB + 4125f09b2efb Downloading [> ] 96.97kB/9.437MB + 93966a25fd29 Downloading [============> ] 863.9kB/3.51MB + 4125f09b2efb Downloading [==> ] 391.9kB/9.437MB + 93966a25fd29 Downloading [=================================> ] 2.337MB/3.51MB + 4125f09b2efb Downloading [=====> ] 980.1kB/9.437MB + 61320b01ae5e Pulling fs layer + f8f9e5369fdd Pulling fs layer + 5cf79f4aceb3 Pulling fs layer + 698c8d1b3fd1 Pulling fs layer + 601d7fdb78f5 Pulling fs layer + 98e4482f5fee Pulling fs layer + 61320b01ae5e Waiting + 4f4fb700ef54 Pulling fs layer + 0eeb2b86c9b7 Pulling fs layer + 0eeb2b86c9b7 Waiting + f8f9e5369fdd Waiting + 5cf79f4aceb3 Waiting + 698c8d1b3fd1 Waiting + 601d7fdb78f5 Waiting + 98e4482f5fee Waiting + 4f4fb700ef54 Waiting + 93966a25fd29 Downloading [==================================================>] 3.51MB/3.51MB + 93966a25fd29 Verifying Checksum + 93966a25fd29 Download complete + 93966a25fd29 Extracting [> ] 65.54kB/3.51MB + 4125f09b2efb Downloading [==========> ] 2.061MB/9.437MB + 4125f09b2efb Downloading [========================> ] 4.598MB/9.437MB + 93966a25fd29 Extracting [===> ] 262.1kB/3.51MB + 4125f09b2efb Downloading [===================================> ] 6.758MB/9.437MB + 93966a25fd29 Extracting [=========================> ] 1.769MB/3.51MB + 426458412bd2 Downloading [==================================================>] 448B/448B + 426458412bd2 Verifying Checksum + 426458412bd2 Download complete + 4125f09b2efb Downloading [===============================================> ] 8.881MB/9.437MB + 4125f09b2efb Verifying Checksum + 4125f09b2efb Download complete + 93966a25fd29 Extracting [============================================> ] 3.146MB/3.51MB + 93966a25fd29 Extracting [==================================================>] 3.51MB/3.51MB + 93966a25fd29 Extracting [==================================================>] 3.51MB/3.51MB + 93966a25fd29 Pull complete + 7fffeaaf8311 Extracting [==================================================>] 1.159kB/1.159kB + 7fffeaaf8311 Extracting [==================================================>] 1.159kB/1.159kB + 7fffeaaf8311 Pull complete + 4125f09b2efb Extracting [> ] 98.3kB/9.437MB + 4f4fb700ef54 Downloading [==================================================>] 32B/32B + 4f4fb700ef54 Verifying Checksum + 4f4fb700ef54 Download complete + 4125f09b2efb Extracting [=============> ] 2.556MB/9.437MB + 4125f09b2efb Extracting [====================================> ] 6.881MB/9.437MB + 4125f09b2efb Extracting [==================================================>] 9.437MB/9.437MB + 4125f09b2efb Pull complete + 426458412bd2 Extracting [==================================================>] 448B/448B + 426458412bd2 Extracting [==================================================>] 448B/448B + 426458412bd2 Pull complete + 4f4fb700ef54 Extracting [==================================================>] 32B/32B + 4f4fb700ef54 Extracting [==================================================>] 32B/32B + 61320b01ae5e Downloading [> ] 294.2kB/28.23MB + 61320b01ae5e Downloading [> ] 294.2kB/28.23MB + 4f4fb700ef54 Pull complete + lb Pulled + 61320b01ae5e Downloading [===> ] 1.769MB/28.23MB + 61320b01ae5e Downloading [===> ] 1.769MB/28.23MB + f8f9e5369fdd Downloading [==================================================>] 1.104kB/1.104kB + f8f9e5369fdd Verifying Checksum + f8f9e5369fdd Download complete + f8f9e5369fdd Downloading [==================================================>] 1.104kB/1.104kB + f8f9e5369fdd Verifying Checksum + f8f9e5369fdd Download complete + 61320b01ae5e Downloading [======> ] 3.833MB/28.23MB + 61320b01ae5e Downloading [======> ] 3.833MB/28.23MB + 5cf79f4aceb3 Verifying Checksum + 5cf79f4aceb3 Download complete + 5cf79f4aceb3 Downloading [==================================================>] 874B/874B + 5cf79f4aceb3 Download complete + 61320b01ae5e Downloading [==========> ] 5.898MB/28.23MB + 61320b01ae5e Downloading [==========> ] 5.898MB/28.23MB + 61320b01ae5e Downloading [==============> ] 8.257MB/28.23MB + 61320b01ae5e Downloading [==============> ] 8.257MB/28.23MB + 61320b01ae5e Downloading [==================> ] 10.62MB/28.23MB + 61320b01ae5e Downloading [==================> ] 10.62MB/28.23MB + 61320b01ae5e Downloading [======================> ] 12.68MB/28.23MB + 61320b01ae5e Downloading [======================> ] 12.68MB/28.23MB + 61320b01ae5e Downloading [==========================> ] 14.74MB/28.23MB + 61320b01ae5e Downloading [==========================> ] 14.74MB/28.23MB + 61320b01ae5e Downloading [==============================> ] 17.1MB/28.23MB + 61320b01ae5e Downloading [==============================> ] 17.1MB/28.23MB + 61320b01ae5e Downloading [==================================> ] 19.46MB/28.23MB + 61320b01ae5e Downloading [==================================> ] 19.46MB/28.23MB + 601d7fdb78f5 Downloading [> ] 162.5kB/15.34MB + 601d7fdb78f5 Downloading [> ] 162.5kB/15.34MB + 61320b01ae5e Downloading [=====================================> ] 20.94MB/28.23MB + 61320b01ae5e Downloading [=====================================> ] 20.94MB/28.23MB + 601d7fdb78f5 Downloading [====> ] 1.301MB/15.34MB + 601d7fdb78f5 Downloading [====> ] 1.301MB/15.34MB + 61320b01ae5e Downloading [=======================================> ] 22.12MB/28.23MB + 61320b01ae5e Downloading [=======================================> ] 22.12MB/28.23MB + 601d7fdb78f5 Downloading [========> ] 2.613MB/15.34MB + 601d7fdb78f5 Downloading [========> ] 2.613MB/15.34MB + 61320b01ae5e Downloading [=========================================> ] 23.3MB/28.23MB + 61320b01ae5e Downloading [=========================================> ] 23.3MB/28.23MB + 601d7fdb78f5 Downloading [============> ] 3.9MB/15.34MB + 601d7fdb78f5 Downloading [============> ] 3.9MB/15.34MB + 61320b01ae5e Downloading [===========================================> ] 24.48MB/28.23MB + 61320b01ae5e Downloading [===========================================> ] 24.48MB/28.23MB + 601d7fdb78f5 Downloading [================> ] 5.18MB/15.34MB + 601d7fdb78f5 Downloading [================> ] 5.18MB/15.34MB + 61320b01ae5e Downloading [=============================================> ] 25.95MB/28.23MB + 61320b01ae5e Downloading [=============================================> ] 25.95MB/28.23MB + 601d7fdb78f5 Downloading [=====================> ] 6.459MB/15.34MB + 601d7fdb78f5 Downloading [=====================> ] 6.459MB/15.34MB + 61320b01ae5e Downloading [================================================> ] 27.13MB/28.23MB + 61320b01ae5e Downloading [================================================> ] 27.13MB/28.23MB + 601d7fdb78f5 Downloading [=========================> ] 7.737MB/15.34MB + 601d7fdb78f5 Downloading [=========================> ] 7.737MB/15.34MB + 61320b01ae5e Verifying Checksum + 61320b01ae5e Download complete + 61320b01ae5e Verifying Checksum + 61320b01ae5e Download complete + 601d7fdb78f5 Downloading [=============================> ] 9.179MB/15.34MB + 601d7fdb78f5 Downloading [=============================> ] 9.179MB/15.34MB + 698c8d1b3fd1 Downloading [> ] 15.74kB/1.438MB + 698c8d1b3fd1 Downloading [> ] 15.74kB/1.438MB + 61320b01ae5e Extracting [> ] 294.9kB/28.23MB + 61320b01ae5e Extracting [> ] 294.9kB/28.23MB + 698c8d1b3fd1 Downloading [===================================> ] 1.013MB/1.438MB + 698c8d1b3fd1 Downloading [===================================> ] 1.013MB/1.438MB + 601d7fdb78f5 Downloading [==================================> ] 10.46MB/15.34MB + 601d7fdb78f5 Downloading [==================================> ] 10.46MB/15.34MB + 698c8d1b3fd1 Download complete + 698c8d1b3fd1 Download complete + 61320b01ae5e Extracting [===> ] 1.769MB/28.23MB + 61320b01ae5e Extracting [===> ] 1.769MB/28.23MB + 601d7fdb78f5 Downloading [=======================================> ] 12.09MB/15.34MB + 601d7fdb78f5 Downloading [=======================================> ] 12.09MB/15.34MB + 61320b01ae5e Extracting [======> ] 3.539MB/28.23MB + 61320b01ae5e Extracting [======> ] 3.539MB/28.23MB + 601d7fdb78f5 Downloading [=============================================> ] 14.02MB/15.34MB + 601d7fdb78f5 Downloading [=============================================> ] 14.02MB/15.34MB + 601d7fdb78f5 Verifying Checksum + 601d7fdb78f5 Download complete + 601d7fdb78f5 Verifying Checksum + 601d7fdb78f5 Download complete + 61320b01ae5e Extracting [=========> ] 5.308MB/28.23MB + 61320b01ae5e Extracting [=========> ] 5.308MB/28.23MB + 61320b01ae5e Extracting [=============> ] 7.668MB/28.23MB + 61320b01ae5e Extracting [=============> ] 7.668MB/28.23MB + 98e4482f5fee Download complete + 98e4482f5fee Downloading [==================================================>] 97B/97B + 98e4482f5fee Download complete + 61320b01ae5e Extracting [================> ] 9.142MB/28.23MB + 61320b01ae5e Extracting [================> ] 9.142MB/28.23MB + 4f4fb700ef54 Download complete + 4f4fb700ef54 Downloading [==================================================>] 32B/32B + 4f4fb700ef54 Verifying Checksum + 4f4fb700ef54 Download complete + 61320b01ae5e Extracting [=================> ] 10.03MB/28.23MB + 61320b01ae5e Extracting [=================> ] 10.03MB/28.23MB + 61320b01ae5e Extracting [===================> ] 11.21MB/28.23MB + 61320b01ae5e Extracting [===================> ] 11.21MB/28.23MB + 61320b01ae5e Extracting [=========================> ] 14.45MB/28.23MB + 61320b01ae5e Extracting [=========================> ] 14.45MB/28.23MB + 0eeb2b86c9b7 Download complete + 0eeb2b86c9b7 Downloading [==================================================>] 572B/572B + 0eeb2b86c9b7 Verifying Checksum + 0eeb2b86c9b7 Download complete + 61320b01ae5e Extracting [================================> ] 18.58MB/28.23MB + 61320b01ae5e Extracting [================================> ] 18.58MB/28.23MB + 61320b01ae5e Extracting [======================================> ] 21.82MB/28.23MB + 61320b01ae5e Extracting [======================================> ] 21.82MB/28.23MB + 61320b01ae5e Extracting [=========================================> ] 23.3MB/28.23MB + 61320b01ae5e Extracting [=========================================> ] 23.3MB/28.23MB + 61320b01ae5e Extracting [==========================================> ] 23.89MB/28.23MB + 61320b01ae5e Extracting [==========================================> ] 23.89MB/28.23MB + 61320b01ae5e Extracting [===========================================> ] 24.77MB/28.23MB + 61320b01ae5e Extracting [===========================================> ] 24.77MB/28.23MB + 61320b01ae5e Extracting [===============================================> ] 26.84MB/28.23MB + 61320b01ae5e Extracting [===============================================> ] 26.84MB/28.23MB + 61320b01ae5e Extracting [================================================> ] 27.13MB/28.23MB + 61320b01ae5e Extracting [================================================> ] 27.13MB/28.23MB + 61320b01ae5e Extracting [================================================> ] 27.43MB/28.23MB + 61320b01ae5e Extracting [================================================> ] 27.43MB/28.23MB + 61320b01ae5e Extracting [=================================================> ] 28.02MB/28.23MB + 61320b01ae5e Extracting [=================================================> ] 28.02MB/28.23MB + 61320b01ae5e Extracting [==================================================>] 28.23MB/28.23MB + 61320b01ae5e Extracting [==================================================>] 28.23MB/28.23MB + 61320b01ae5e Pull complete + 61320b01ae5e Pull complete + f8f9e5369fdd Extracting [==================================================>] 1.104kB/1.104kB + f8f9e5369fdd Extracting [==================================================>] 1.104kB/1.104kB + f8f9e5369fdd Extracting [==================================================>] 1.104kB/1.104kB + f8f9e5369fdd Extracting [==================================================>] 1.104kB/1.104kB + f8f9e5369fdd Pull complete + f8f9e5369fdd Pull complete + 5cf79f4aceb3 Extracting [==================================================>] 874B/874B + 5cf79f4aceb3 Extracting [==================================================>] 874B/874B + 5cf79f4aceb3 Extracting [==================================================>] 874B/874B + 5cf79f4aceb3 Extracting [==================================================>] 874B/874B + 5cf79f4aceb3 Pull complete + 5cf79f4aceb3 Pull complete + 698c8d1b3fd1 Extracting [=> ] 32.77kB/1.438MB + 698c8d1b3fd1 Extracting [=> ] 32.77kB/1.438MB + 698c8d1b3fd1 Extracting [==================================================>] 1.438MB/1.438MB + 698c8d1b3fd1 Extracting [==================================================>] 1.438MB/1.438MB + 698c8d1b3fd1 Extracting [==================================================>] 1.438MB/1.438MB + 698c8d1b3fd1 Extracting [==================================================>] 1.438MB/1.438MB + 698c8d1b3fd1 Pull complete + 698c8d1b3fd1 Pull complete + 601d7fdb78f5 Extracting [> ] 163.8kB/15.34MB + 601d7fdb78f5 Extracting [> ] 163.8kB/15.34MB + 601d7fdb78f5 Extracting [=========> ] 2.785MB/15.34MB + 601d7fdb78f5 Extracting [=========> ] 2.785MB/15.34MB + 601d7fdb78f5 Extracting [=====================> ] 6.717MB/15.34MB + 601d7fdb78f5 Extracting [=====================> ] 6.717MB/15.34MB + 601d7fdb78f5 Extracting [==================================> ] 10.65MB/15.34MB + 601d7fdb78f5 Extracting [==================================> ] 10.65MB/15.34MB + 601d7fdb78f5 Extracting [==============================================> ] 14.25MB/15.34MB + 601d7fdb78f5 Extracting [==============================================> ] 14.25MB/15.34MB + 601d7fdb78f5 Extracting [==================================================>] 15.34MB/15.34MB + 601d7fdb78f5 Extracting [==================================================>] 15.34MB/15.34MB + 601d7fdb78f5 Pull complete + 601d7fdb78f5 Pull complete + 98e4482f5fee Extracting [==================================================>] 97B/97B + 98e4482f5fee Extracting [==================================================>] 97B/97B + 98e4482f5fee Extracting [==================================================>] 97B/97B + 98e4482f5fee Extracting [==================================================>] 97B/97B + 98e4482f5fee Pull complete + 98e4482f5fee Pull complete + 4f4fb700ef54 Extracting [==================================================>] 32B/32B + 4f4fb700ef54 Extracting [==================================================>] 32B/32B + 4f4fb700ef54 Extracting [==================================================>] 32B/32B + 4f4fb700ef54 Extracting [==================================================>] 32B/32B + 4f4fb700ef54 Pull complete + 4f4fb700ef54 Pull complete + 0eeb2b86c9b7 Extracting [==================================================>] 572B/572B + 0eeb2b86c9b7 Extracting [==================================================>] 572B/572B + 0eeb2b86c9b7 Extracting [==================================================>] 572B/572B + 0eeb2b86c9b7 Extracting [==================================================>] 572B/572B + 0eeb2b86c9b7 Pull complete + 0eeb2b86c9b7 Pull complete + cache Pulled + broker Pulled +#0 building with "default" instance using docker driver + +#1 [s3 internal] load build definition from s3.Dockerfile +#1 transferring dockerfile: 922B 0.0s done +#1 DONE 0.1s + +#2 [migrate internal] load build definition from Dockerfile +#2 transferring dockerfile: 1.04kB done +#2 DONE 0.0s + +#3 [migrate internal] load metadata for docker.io/library/python:3.12.10-slim-bookworm +#3 DONE 4.8s + +#4 [s3] resolve image config for docker-image://docker.io/docker/dockerfile:1.7.0 +#4 DONE 4.9s + +#5 [migrate internal] load .dockerignore +#5 transferring context: 206B done +#5 DONE 0.1s + +#6 [migrate 1/12] FROM docker.io/library/python:3.12.10-slim-bookworm@sha256:fd95fa221297a88e1cf49c55ec1828edd7c5a428187e67b5d1805692d11588db +#6 resolve docker.io/library/python:3.12.10-slim-bookworm@sha256:fd95fa221297a88e1cf49c55ec1828edd7c5a428187e67b5d1805692d11588db 0.0s done +#6 ... + +#7 [migrate internal] load build context +#7 transferring context: 450.17kB 0.0s done +#7 DONE 0.0s + +#6 [migrate 1/12] FROM docker.io/library/python:3.12.10-slim-bookworm@sha256:fd95fa221297a88e1cf49c55ec1828edd7c5a428187e67b5d1805692d11588db +#6 sha256:be1274d3cce09d8126f8176203ba1e91f6733a713c1185ba01ee704759b0b62d 0B / 3.51MB 0.1s +#6 sha256:8991c9200d621283b06ae395129d454c998e0f55095e106055240b5956ab2a2a 0B / 13.66MB 0.1s +#6 sha256:fd95fa221297a88e1cf49c55ec1828edd7c5a428187e67b5d1805692d11588db 9.13kB / 9.13kB done +#6 sha256:97983fa8cc88343512862c62307159a82261c3528dc025f79e5a3f7af43e50b4 1.75kB / 1.75kB done +#6 sha256:acf8897bf01a3a0ea273a50a58fc10b6317a3e360bd29aa7c9246a54d7c63e88 5.57kB / 5.57kB done +#6 sha256:be1274d3cce09d8126f8176203ba1e91f6733a713c1185ba01ee704759b0b62d 1.05MB / 3.51MB 1.0s +#6 sha256:be1274d3cce09d8126f8176203ba1e91f6733a713c1185ba01ee704759b0b62d 2.10MB / 3.51MB 1.1s +#6 extracting sha256:be1274d3cce09d8126f8176203ba1e91f6733a713c1185ba01ee704759b0b62d +#6 sha256:be1274d3cce09d8126f8176203ba1e91f6733a713c1185ba01ee704759b0b62d 3.51MB / 3.51MB 1.2s done +#6 sha256:8991c9200d621283b06ae395129d454c998e0f55095e106055240b5956ab2a2a 1.05MB / 13.66MB 1.2s +#6 sha256:7a1cb8b882211b870d7e639e775f91e423a526092b4b3eadefbab6aa7457910d 0B / 249B 1.2s +#6 sha256:8991c9200d621283b06ae395129d454c998e0f55095e106055240b5956ab2a2a 3.15MB / 13.66MB 1.3s +#6 sha256:8991c9200d621283b06ae395129d454c998e0f55095e106055240b5956ab2a2a 7.34MB / 13.66MB 1.5s +#6 ... + +#8 [s3] docker-image://docker.io/docker/dockerfile:1.7.0@sha256:dbbd5e059e8a07ff7ea6233b213b36aa516b4c53c645f1817a4dd18b83cbea56 +#8 resolve docker.io/docker/dockerfile:1.7.0@sha256:dbbd5e059e8a07ff7ea6233b213b36aa516b4c53c645f1817a4dd18b83cbea56 0.0s done +#8 sha256:dbbd5e059e8a07ff7ea6233b213b36aa516b4c53c645f1817a4dd18b83cbea56 8.40kB / 8.40kB done +#8 sha256:4611ea7b7d89ce41ec5c63df83076ccec3fe8daa32a2d9c96e5decb72e9a8d67 482B / 482B done +#8 sha256:ab56f6885c985024a40925d2fa322df997655db5f361ad9f221861f9c665a290 1.26kB / 1.26kB done +#8 sha256:ccef65a67ab38a038c615e74c797b11a43d36505710abe93c87b021401bebd81 11.98MB / 11.98MB 1.2s done +#8 extracting sha256:ccef65a67ab38a038c615e74c797b11a43d36505710abe93c87b021401bebd81 0.3s done +#8 DONE 1.6s + +#6 [migrate 1/12] FROM docker.io/library/python:3.12.10-slim-bookworm@sha256:fd95fa221297a88e1cf49c55ec1828edd7c5a428187e67b5d1805692d11588db +#6 sha256:8991c9200d621283b06ae395129d454c998e0f55095e106055240b5956ab2a2a 9.44MB / 13.66MB 1.6s +#6 extracting sha256:be1274d3cce09d8126f8176203ba1e91f6733a713c1185ba01ee704759b0b62d 0.4s done +#6 sha256:8991c9200d621283b06ae395129d454c998e0f55095e106055240b5956ab2a2a 13.66MB / 13.66MB 1.7s done +#6 sha256:7a1cb8b882211b870d7e639e775f91e423a526092b4b3eadefbab6aa7457910d 249B / 249B 1.8s done +#6 extracting sha256:8991c9200d621283b06ae395129d454c998e0f55095e106055240b5956ab2a2a +#6 ... + +#3 [s3 internal] load metadata for docker.io/library/python:3.12.10-slim-bookworm +#3 DONE 5.1s + +#6 [migrate 1/12] FROM docker.io/library/python:3.12.10-slim-bookworm@sha256:fd95fa221297a88e1cf49c55ec1828edd7c5a428187e67b5d1805692d11588db +#6 ... + +#9 [s3 internal] load .dockerignore +#9 transferring context: 206B done +#9 DONE 0.0s + +#6 [migrate 1/12] FROM docker.io/library/python:3.12.10-slim-bookworm@sha256:fd95fa221297a88e1cf49c55ec1828edd7c5a428187e67b5d1805692d11588db +#6 ... + +#10 [s3 internal] load build context +#10 transferring context: 241B done +#10 DONE 0.0s + +#6 [s3 1/12] FROM docker.io/library/python:3.12.10-slim-bookworm@sha256:fd95fa221297a88e1cf49c55ec1828edd7c5a428187e67b5d1805692d11588db +#6 resolve docker.io/library/python:3.12.10-slim-bookworm@sha256:fd95fa221297a88e1cf49c55ec1828edd7c5a428187e67b5d1805692d11588db 0.0s done +#6 sha256:be1274d3cce09d8126f8176203ba1e91f6733a713c1185ba01ee704759b0b62d 3.51MB / 3.51MB 1.2s done +#6 sha256:8991c9200d621283b06ae395129d454c998e0f55095e106055240b5956ab2a2a 13.66MB / 13.66MB 1.7s done +#6 sha256:fd95fa221297a88e1cf49c55ec1828edd7c5a428187e67b5d1805692d11588db 9.13kB / 9.13kB done +#6 sha256:97983fa8cc88343512862c62307159a82261c3528dc025f79e5a3f7af43e50b4 1.75kB / 1.75kB done +#6 sha256:acf8897bf01a3a0ea273a50a58fc10b6317a3e360bd29aa7c9246a54d7c63e88 5.57kB / 5.57kB done +#6 extracting sha256:be1274d3cce09d8126f8176203ba1e91f6733a713c1185ba01ee704759b0b62d 0.4s done +#6 sha256:7a1cb8b882211b870d7e639e775f91e423a526092b4b3eadefbab6aa7457910d 249B / 249B 1.8s done +#6 extracting sha256:8991c9200d621283b06ae395129d454c998e0f55095e106055240b5956ab2a2a 1.0s done +#6 extracting sha256:7a1cb8b882211b870d7e639e775f91e423a526092b4b3eadefbab6aa7457910d +#6 extracting sha256:7a1cb8b882211b870d7e639e775f91e423a526092b4b3eadefbab6aa7457910d done +#6 DONE 3.1s + +#11 [s3 2/3] RUN python - <<'PY' +#11 ... + +#12 [migrate 2/12] WORKDIR /app +#12 DONE 0.2s + +#13 [migrate 3/12] COPY requirements.txt . +#13 DONE 0.0s + +#14 [migrate 4/12] RUN pip install --no-cache-dir --requirement requirements.txt && groupadd --system --gid 10001 app && useradd --system --uid 10001 --gid app --home-dir /nonexistent --shell /usr/sbin/nologin app +#14 1.460 Collecting annotated-types==0.8.0 (from -r requirements.txt (line 1)) +#14 1.668 Downloading annotated_types-0.8.0-py3-none-any.whl.metadata (15 kB) +#14 1.771 Collecting anyio==4.15.1 (from -r requirements.txt (line 2)) +#14 1.940 Downloading anyio-4.15.1-py3-none-any.whl.metadata (4.7 kB) +#14 2.677 Collecting click==8.5.0 (from -r requirements.txt (line 3)) +#14 2.750 Downloading click-8.5.0-py3-none-any.whl.metadata (2.6 kB) +#14 2.899 Collecting fastapi==0.115.12 (from -r requirements.txt (line 4)) +#14 2.972 Downloading fastapi-0.115.12-py3-none-any.whl.metadata (27 kB) +#14 3.075 Collecting h11==0.16.0 (from -r requirements.txt (line 5)) +#14 3.148 Downloading h11-0.16.0-py3-none-any.whl.metadata (8.3 kB) +#14 3.239 Collecting idna==3.20 (from -r requirements.txt (line 6)) +#14 3.313 Downloading idna-3.20-py3-none-any.whl.metadata (7.2 kB) +#14 3.628 Collecting pydantic==2.11.5 (from -r requirements.txt (line 7)) +#14 3.697 Downloading pydantic-2.11.5-py3-none-any.whl.metadata (67 kB) +#14 4.742 Collecting pydantic_core==2.33.2 (from -r requirements.txt (line 8)) +#14 4.814 Downloading pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.8 kB) +#14 5.023 Collecting starlette==0.46.2 (from -r requirements.txt (line 9)) +#14 5.132 Downloading starlette-0.46.2-py3-none-any.whl.metadata (6.2 kB) +#14 5.664 Collecting typing-inspection==0.4.4 (from -r requirements.txt (line 10)) +#14 5.767 Downloading typing_inspection-0.4.4-py3-none-any.whl.metadata (2.6 kB) +#14 6.639 Collecting typing_extensions==4.16.0 (from -r requirements.txt (line 11)) +#14 6.712 Downloading typing_extensions-4.16.0-py3-none-any.whl.metadata (3.3 kB) +#14 7.817 Collecting uvicorn==0.34.2 (from -r requirements.txt (line 12)) +#14 7.888 Downloading uvicorn-0.34.2-py3-none-any.whl.metadata (6.5 kB) +#14 9.398 Collecting psycopg==3.2.9 (from psycopg[binary]==3.2.9->-r requirements.txt (line 13)) +#14 9.476 Downloading psycopg-3.2.9-py3-none-any.whl.metadata (4.5 kB) +#14 9.702 Collecting psycopg-pool==3.3.3 (from -r requirements.txt (line 14)) +#14 9.838 Downloading psycopg_pool-3.3.3-py3-none-any.whl.metadata (2.8 kB) +#14 9.949 Collecting redis==5.2.1 (from -r requirements.txt (line 15)) +#14 ... + +#11 [s3 2/3] RUN python - <<'PY' +#11 DONE 10.3s + +#15 [s3 3/3] COPY infra/minio-entrypoint.sh /entrypoint.sh +#15 DONE 0.0s + +#14 [migrate 4/12] RUN pip install --no-cache-dir --requirement requirements.txt && groupadd --system --gid 10001 app && useradd --system --uid 10001 --gid app --home-dir /nonexistent --shell /usr/sbin/nologin app +#14 10.03 Downloading redis-5.2.1-py3-none-any.whl.metadata (9.1 kB) +#14 ... + +#16 [s3] exporting to image +#16 exporting layers +#16 exporting layers 0.4s done +#16 writing image sha256:5816bd699104d2cd34fc3b5540a48972cb088ef213383ef48b523882868d907f done +#16 naming to docker.io/library/mtusi2026lab5-minio:2025-04-22 done +#16 DONE 0.4s + +#14 [migrate 4/12] RUN pip install --no-cache-dir --requirement requirements.txt && groupadd --system --gid 10001 app && useradd --system --uid 10001 --gid app --home-dir /nonexistent --shell /usr/sbin/nologin app +#14 10.33 Collecting argon2-cffi==23.1.0 (from -r requirements.txt (line 16)) +#14 10.45 Downloading argon2_cffi-23.1.0-py3-none-any.whl.metadata (5.2 kB) +#14 ... + +#17 [s3-bootstrap internal] load build definition from s3.Dockerfile +#17 transferring dockerfile: 922B done +#17 DONE 0.0s + +#14 [migrate 4/12] RUN pip install --no-cache-dir --requirement requirements.txt && groupadd --system --gid 10001 app && useradd --system --uid 10001 --gid app --home-dir /nonexistent --shell /usr/sbin/nologin app +#14 11.05 Collecting boto3==1.40.18 (from -r requirements.txt (line 17)) +#14 11.19 Downloading boto3-1.40.18-py3-none-any.whl.metadata (6.7 kB) +#14 ... + +#4 [s3-bootstrap] resolve image config for docker-image://docker.io/docker/dockerfile:1.7.0 +#4 DONE 5.3s + +#8 [s3-bootstrap] docker-image://docker.io/docker/dockerfile:1.7.0@sha256:dbbd5e059e8a07ff7ea6233b213b36aa516b4c53c645f1817a4dd18b83cbea56 +#8 CACHED + +#3 [s3-bootstrap internal] load metadata for docker.io/library/python:3.12.10-slim-bookworm +#3 DONE 5.3s + +#14 [migrate 4/12] RUN pip install --no-cache-dir --requirement requirements.txt && groupadd --system --gid 10001 app && useradd --system --uid 10001 --gid app --home-dir /nonexistent --shell /usr/sbin/nologin app +#14 11.63 Collecting Pillow==12.0.0 (from -r requirements.txt (line 18)) +#14 11.70 Downloading pillow-12.0.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (8.8 kB) +#14 ... + +#6 [s3-bootstrap 1/12] FROM docker.io/library/python:3.12.10-slim-bookworm@sha256:fd95fa221297a88e1cf49c55ec1828edd7c5a428187e67b5d1805692d11588db +#6 resolve docker.io/library/python:3.12.10-slim-bookworm@sha256:fd95fa221297a88e1cf49c55ec1828edd7c5a428187e67b5d1805692d11588db 0.0s done +#6 sha256:be1274d3cce09d8126f8176203ba1e91f6733a713c1185ba01ee704759b0b62d 3.51MB / 3.51MB 1.2s done +#6 sha256:8991c9200d621283b06ae395129d454c998e0f55095e106055240b5956ab2a2a 13.66MB / 13.66MB 1.7s done +#6 sha256:fd95fa221297a88e1cf49c55ec1828edd7c5a428187e67b5d1805692d11588db 9.13kB / 9.13kB done +#6 sha256:97983fa8cc88343512862c62307159a82261c3528dc025f79e5a3f7af43e50b4 1.75kB / 1.75kB done +#6 sha256:acf8897bf01a3a0ea273a50a58fc10b6317a3e360bd29aa7c9246a54d7c63e88 5.57kB / 5.57kB done +#6 extracting sha256:be1274d3cce09d8126f8176203ba1e91f6733a713c1185ba01ee704759b0b62d 0.4s done +#6 sha256:7a1cb8b882211b870d7e639e775f91e423a526092b4b3eadefbab6aa7457910d 249B / 249B 1.8s done +#6 extracting sha256:8991c9200d621283b06ae395129d454c998e0f55095e106055240b5956ab2a2a 1.0s done +#6 extracting sha256:7a1cb8b882211b870d7e639e775f91e423a526092b4b3eadefbab6aa7457910d done +#6 DONE 3.1s + +#18 [s3-bootstrap internal] load .dockerignore +#18 transferring context: 206B done +#18 DONE 0.0s + +#19 [s3-bootstrap internal] load build context +#19 transferring context: 72B done +#19 DONE 0.0s + +#14 [migrate 4/12] RUN pip install --no-cache-dir --requirement requirements.txt && groupadd --system --gid 10001 app && useradd --system --uid 10001 --gid app --home-dir /nonexistent --shell /usr/sbin/nologin app +#14 12.02 Collecting argon2-cffi-bindings (from argon2-cffi==23.1.0->-r requirements.txt (line 16)) +#14 12.09 Downloading argon2_cffi_bindings-26.1.0-cp310-abi3-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl.metadata (7.5 kB) +#14 12.88 Collecting botocore<1.41.0,>=1.40.18 (from boto3==1.40.18->-r requirements.txt (line 17)) +#14 12.96 Downloading botocore-1.40.76-py3-none-any.whl.metadata (5.9 kB) +#14 13.03 Collecting jmespath<2.0.0,>=0.7.1 (from boto3==1.40.18->-r requirements.txt (line 17)) +#14 13.11 Downloading jmespath-1.1.0-py3-none-any.whl.metadata (7.6 kB) +#14 13.19 Collecting s3transfer<0.14.0,>=0.13.0 (from boto3==1.40.18->-r requirements.txt (line 17)) +#14 13.26 Downloading s3transfer-0.13.1-py3-none-any.whl.metadata (1.7 kB) +#14 13.58 Collecting psycopg-binary==3.2.9 (from psycopg[binary]==3.2.9->-r requirements.txt (line 13)) +#14 13.70 Downloading psycopg_binary-3.2.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.9 kB) +#14 14.44 Collecting python-dateutil<3.0.0,>=2.1 (from botocore<1.41.0,>=1.40.18->boto3==1.40.18->-r requirements.txt (line 17)) +#14 14.51 Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl.metadata (8.4 kB) +#14 14.92 Collecting urllib3!=2.2.0,<3,>=1.25.4 (from botocore<1.41.0,>=1.40.18->boto3==1.40.18->-r requirements.txt (line 17)) +#14 ... + +#20 [s3-bootstrap 2/3] RUN python - <<'PY' +#20 DONE 3.2s + +#14 [migrate 4/12] RUN pip install --no-cache-dir --requirement requirements.txt && groupadd --system --gid 10001 app && useradd --system --uid 10001 --gid app --home-dir /nonexistent --shell /usr/sbin/nologin app +#14 15.00 Downloading urllib3-2.8.0-py3-none-any.whl.metadata (7.4 kB) +#14 ... + +#21 [s3-bootstrap 3/3] COPY infra/minio-entrypoint.sh /entrypoint.sh +#21 DONE 0.0s + +#22 [s3-bootstrap] exporting to image +#22 exporting layers 0.1s done +#22 writing image sha256:fb106f2cfb8c434ddc7dd0f668013cf6421f7ec382eb71f151ccdd6b1b8ff2b4 done +#22 naming to docker.io/library/mtusi2026lab5-mc:2025-04-16 done +#22 DONE 0.2s + +#14 [migrate 4/12] RUN pip install --no-cache-dir --requirement requirements.txt && groupadd --system --gid 10001 app && useradd --system --uid 10001 --gid app --home-dir /nonexistent --shell /usr/sbin/nologin app +#14 15.74 Collecting cffi>=1.0.1 (from argon2-cffi-bindings->argon2-cffi==23.1.0->-r requirements.txt (line 16)) +#14 15.81 Downloading cffi-2.1.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (2.5 kB) +#14 15.91 Collecting pycparser (from cffi>=1.0.1->argon2-cffi-bindings->argon2-cffi==23.1.0->-r requirements.txt (line 16)) +#14 15.98 Downloading pycparser-3.12-py3-none-any.whl.metadata (9.7 kB) +#14 16.07 Collecting six>=1.5 (from python-dateutil<3.0.0,>=2.1->botocore<1.41.0,>=1.40.18->boto3==1.40.18->-r requirements.txt (line 17)) +#14 16.15 Downloading six-1.17.0-py2.py3-none-any.whl.metadata (1.7 kB) +#14 16.28 Downloading annotated_types-0.8.0-py3-none-any.whl (13 kB) +#14 16.36 Downloading anyio-4.15.1-py3-none-any.whl (132 kB) +#14 16.46 Downloading click-8.5.0-py3-none-any.whl (125 kB) +#14 16.54 Downloading fastapi-0.115.12-py3-none-any.whl (95 kB) +#14 16.63 Downloading h11-0.16.0-py3-none-any.whl (37 kB) +#14 16.71 Downloading idna-3.20-py3-none-any.whl (69 kB) +#14 16.79 Downloading pydantic-2.11.5-py3-none-any.whl (444 kB) +#14 16.90 Downloading pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.0 MB) +#14 16.99 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 30.8 MB/s eta 0:00:00 +#14 17.06 Downloading starlette-0.46.2-py3-none-any.whl (72 kB) +#14 17.13 Downloading typing_inspection-0.4.4-py3-none-any.whl (14 kB) +#14 17.21 Downloading typing_extensions-4.16.0-py3-none-any.whl (45 kB) +#14 17.29 Downloading uvicorn-0.34.2-py3-none-any.whl (62 kB) +#14 17.37 Downloading psycopg-3.2.9-py3-none-any.whl (202 kB) +#14 17.48 Downloading psycopg_pool-3.3.3-py3-none-any.whl (40 kB) +#14 17.55 Downloading redis-5.2.1-py3-none-any.whl (261 kB) +#14 17.82 Downloading argon2_cffi-23.1.0-py3-none-any.whl (15 kB) +#14 17.89 Downloading boto3-1.40.18-py3-none-any.whl (140 kB) +#14 17.98 Downloading pillow-12.0.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (7.0 MB) +#14 18.22 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.0/7.0 MB 30.7 MB/s eta 0:00:00 +#14 18.29 Downloading psycopg_binary-3.2.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.4 MB) +#14 18.45 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.4/4.4 MB 29.6 MB/s eta 0:00:00 +#14 18.52 Downloading botocore-1.40.76-py3-none-any.whl (14.2 MB) +#14 18.98 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.2/14.2 MB 33.2 MB/s eta 0:00:00 +#14 19.05 Downloading jmespath-1.1.0-py3-none-any.whl (20 kB) +#14 19.13 Downloading s3transfer-0.13.1-py3-none-any.whl (85 kB) +#14 19.22 Downloading argon2_cffi_bindings-26.1.0-cp310-abi3-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl (26 kB) +#14 19.30 Downloading cffi-2.1.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (221 kB) +#14 19.40 Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB) +#14 19.49 Downloading urllib3-2.8.0-py3-none-any.whl (135 kB) +#14 19.58 Downloading six-1.17.0-py2.py3-none-any.whl (11 kB) +#14 19.65 Downloading pycparser-3.12-py3-none-any.whl (62 kB) +#14 19.84 Installing collected packages: urllib3, typing_extensions, six, redis, pycparser, psycopg-binary, Pillow, jmespath, idna, h11, click, annotated-types, uvicorn, typing-inspection, python-dateutil, pydantic_core, psycopg-pool, psycopg, cffi, anyio, starlette, pydantic, botocore, argon2-cffi-bindings, s3transfer, fastapi, argon2-cffi, boto3 +#14 24.24 Successfully installed Pillow-12.0.0 annotated-types-0.8.0 anyio-4.15.1 argon2-cffi-23.1.0 argon2-cffi-bindings-26.1.0 boto3-1.40.18 botocore-1.40.76 cffi-2.1.1 click-8.5.0 fastapi-0.115.12 h11-0.16.0 idna-3.20 jmespath-1.1.0 psycopg-3.2.9 psycopg-binary-3.2.9 psycopg-pool-3.3.3 pycparser-3.12 pydantic-2.11.5 pydantic_core-2.33.2 python-dateutil-2.9.0.post0 redis-5.2.1 s3transfer-0.13.1 six-1.17.0 starlette-0.46.2 typing-inspection-0.4.4 typing_extensions-4.16.0 urllib3-2.8.0 uvicorn-0.34.2 +#14 24.25 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning. +#14 24.83 +#14 24.83 [notice] A new release of pip is available: 25.0.1 -> 26.2.2 +#14 24.83 [notice] To update, run: pip install --upgrade pip +#14 25.27 useradd warning: app's uid 10001 is greater than SYS_UID_MAX 999 +#14 DONE 25.6s + +#23 [migrate 5/12] COPY --chown=app:app src ./src +#23 DONE 0.1s + +#24 [migrate 6/12] COPY --chown=app:app migrations ./migrations +#24 DONE 0.1s + +#25 [migrate 7/12] COPY --chown=app:app scripts ./scripts +#25 DONE 0.1s + +#26 [migrate 8/12] COPY --chown=app:app student-tests ./student-tests +#26 DONE 0.1s + +#27 [migrate 9/12] COPY --chown=app:app tests ./tests +#27 DONE 0.1s + +#28 [migrate 10/12] COPY --chown=app:app contracts ./contracts +#28 DONE 0.1s + +#29 [migrate 11/12] COPY --chown=app:app lab.json ./lab.json +#29 DONE 0.1s + +#30 [migrate 12/12] RUN mkdir -p evidence && chown app:app evidence +#30 DONE 0.4s + +#31 [migrate] exporting to image +#31 exporting layers +#31 exporting layers 0.8s done +#31 writing image sha256:d4d240b899fecf1f585ce789cdead97f4fb5a7e6a8ded25dacd68b99673631c8 done +#31 naming to docker.io/library/mtusi2026lab5-app:1 0.0s done +#31 DONE 0.9s + +#32 [api internal] load build definition from Dockerfile +#32 transferring dockerfile: 1.04kB done +#32 DONE 0.0s + +#33 [worker internal] load build definition from Dockerfile +#33 transferring dockerfile: 1.04kB done +#33 DONE 0.0s + +#34 [reconciler internal] load build definition from Dockerfile +#34 transferring dockerfile: 1.04kB done +#34 DONE 0.0s + +#35 [dispatcher internal] load build definition from Dockerfile +#35 transferring dockerfile: 1.04kB done +#35 DONE 0.0s + +#3 [dispatcher internal] load metadata for docker.io/library/python:3.12.10-slim-bookworm +#3 DONE 5.8s + +#36 [dispatcher internal] load .dockerignore +#36 transferring context: 206B done +#36 DONE 0.0s + +#37 [api internal] load .dockerignore +#37 transferring context: 206B done +#37 DONE 0.0s + +#6 [dispatcher 1/12] FROM docker.io/library/python:3.12.10-slim-bookworm@sha256:fd95fa221297a88e1cf49c55ec1828edd7c5a428187e67b5d1805692d11588db +#6 DONE 3.1s + +#38 [dispatcher internal] load build context +#38 transferring context: 450.17kB 0.0s done +#38 DONE 0.1s + +#6 [reconciler 1/12] FROM docker.io/library/python:3.12.10-slim-bookworm@sha256:fd95fa221297a88e1cf49c55ec1828edd7c5a428187e67b5d1805692d11588db +#6 DONE 3.1s + +#39 [worker internal] load .dockerignore +#39 transferring context: 206B done +#39 DONE 0.1s + +#40 [reconciler internal] load .dockerignore +#40 transferring context: 206B done +#40 DONE 0.1s + +#41 [api internal] load build context +#41 transferring context: 2.56kB done +#41 DONE 0.1s + +#42 [api 3/12] COPY requirements.txt . +#42 CACHED + +#43 [api 5/12] COPY --chown=app:app src ./src +#43 CACHED + +#44 [api 6/12] COPY --chown=app:app migrations ./migrations +#44 CACHED + +#45 [api 7/12] COPY --chown=app:app scripts ./scripts +#45 CACHED + +#12 [api 2/12] WORKDIR /app +#12 CACHED + +#46 [api 9/12] COPY --chown=app:app tests ./tests +#46 CACHED + +#47 [api 8/12] COPY --chown=app:app student-tests ./student-tests +#47 CACHED + +#48 [api 4/12] RUN pip install --no-cache-dir --requirement requirements.txt && groupadd --system --gid 10001 app && useradd --system --uid 10001 --gid app --home-dir /nonexistent --shell /usr/sbin/nologin app +#48 CACHED + +#49 [api 11/12] COPY --chown=app:app lab.json ./lab.json +#49 CACHED + +#50 [api 10/12] COPY --chown=app:app contracts ./contracts +#50 CACHED + +#51 [dispatcher 12/12] RUN mkdir -p evidence && chown app:app evidence +#51 CACHED + +#52 [worker internal] load build context +#52 transferring context: 450.17kB 0.0s done +#52 DONE 0.1s + +#53 [reconciler internal] load build context +#53 transferring context: 450.17kB 0.0s done +#53 DONE 0.1s + +#54 [dispatcher] exporting to image +#54 exporting layers done +#54 writing image sha256:8fa38e90348237d1270d416add296597851602705c0dd9131fe6985cb6d32355 done +#54 naming to docker.io/library/mtusi2026lab5-app:1 0.0s done +#54 DONE 0.1s + +#51 [worker 12/12] RUN mkdir -p evidence && chown app:app evidence +#51 CACHED + +#55 [api] exporting to image +#55 exporting layers done +#55 writing image sha256:f2874ab605053a9472f855c42418f0bce879324625d189413e4b1663f644d077 done +#55 naming to docker.io/library/mtusi2026lab5-app:1 0.0s done +#55 DONE 0.1s + +#56 [reconciler] exporting to image +#56 exporting layers done +#56 writing image sha256:43b0177bf9d4adfbe14dd5e03bdf2deb916755ccf7f12e7a03697bc53c381ff8 done +#56 naming to docker.io/library/mtusi2026lab5-app:1 0.0s done +#56 DONE 0.1s + +#57 [worker] exporting to image +#57 exporting layers done +#57 writing image sha256:4a85fcc4882db2f88339832df15fb6c6806da842209445bdcfc56500a1d32c0b done +#57 naming to docker.io/library/mtusi2026lab5-app:1 0.0s done +#57 DONE 0.1s + Network mtusi2026lab5_default Creating + Network mtusi2026lab5_default Created + Volume "mtusi2026lab5_s3_data" Creating + Volume "mtusi2026lab5_s3_data" Created + Volume "mtusi2026lab5_postgres_data" Creating + Volume "mtusi2026lab5_postgres_data" Created + Volume "mtusi2026lab5_redis_data" Creating + Volume "mtusi2026lab5_redis_data" Created + Volume "mtusi2026lab5_broker_data" Creating + Volume "mtusi2026lab5_broker_data" Created + Container mtusi2026lab5-s3-1 Creating + Container mtusi2026lab5-cache-1 Creating + Container mtusi2026lab5-db-1 Creating + Container mtusi2026lab5-broker-1 Creating + Container mtusi2026lab5-s3-1 Created + Container mtusi2026lab5-s3-bootstrap-1 Creating + Container mtusi2026lab5-cache-1 Created + Container mtusi2026lab5-broker-1 Created + Container mtusi2026lab5-db-1 Created + Container mtusi2026lab5-migrate-1 Creating + Container mtusi2026lab5-s3-bootstrap-1 Created + Container mtusi2026lab5-migrate-1 Created + Container mtusi2026lab5-api-2 Creating + Container mtusi2026lab5-dispatcher-1 Creating + Container mtusi2026lab5-reconciler-1 Creating + Container mtusi2026lab5-api-1 Creating + Container mtusi2026lab5-worker-1 Creating + Container mtusi2026lab5-dispatcher-1 Created + Container mtusi2026lab5-api-2 Created + Container mtusi2026lab5-api-1 Created + Container mtusi2026lab5-lb-1 Creating + Container mtusi2026lab5-worker-1 Created + Container mtusi2026lab5-reconciler-1 Created + Container mtusi2026lab5-lb-1 Created + Container mtusi2026lab5-broker-1 Starting + Container mtusi2026lab5-s3-1 Starting + Container mtusi2026lab5-cache-1 Starting + Container mtusi2026lab5-db-1 Starting + Container mtusi2026lab5-db-1 Started + Container mtusi2026lab5-db-1 Waiting + Container mtusi2026lab5-cache-1 Started + Container mtusi2026lab5-broker-1 Started + Container mtusi2026lab5-s3-1 Started + Container mtusi2026lab5-s3-1 Waiting + Container mtusi2026lab5-db-1 Healthy + Container mtusi2026lab5-migrate-1 Starting + Container mtusi2026lab5-s3-1 Healthy + Container mtusi2026lab5-s3-bootstrap-1 Starting + Container mtusi2026lab5-migrate-1 Started + Container mtusi2026lab5-s3-bootstrap-1 Started + Container mtusi2026lab5-migrate-1 Waiting + Container mtusi2026lab5-s3-bootstrap-1 Waiting + Container mtusi2026lab5-broker-1 Waiting + Container mtusi2026lab5-migrate-1 Waiting + Container mtusi2026lab5-migrate-1 Waiting + Container mtusi2026lab5-s3-bootstrap-1 Waiting + Container mtusi2026lab5-s3-bootstrap-1 Waiting + Container mtusi2026lab5-broker-1 Waiting + Container mtusi2026lab5-migrate-1 Waiting + Container mtusi2026lab5-cache-1 Waiting + Container mtusi2026lab5-s3-bootstrap-1 Waiting + Container mtusi2026lab5-cache-1 Healthy + Container mtusi2026lab5-broker-1 Healthy + Container mtusi2026lab5-broker-1 Healthy + Container mtusi2026lab5-migrate-1 Exited + Container mtusi2026lab5-migrate-1 Exited + Container mtusi2026lab5-migrate-1 Exited + Container mtusi2026lab5-migrate-1 Exited + Container mtusi2026lab5-s3-bootstrap-1 Exited + Container mtusi2026lab5-api-1 Starting + Container mtusi2026lab5-s3-bootstrap-1 Exited + Container mtusi2026lab5-worker-1 Starting + Container mtusi2026lab5-s3-bootstrap-1 Exited + Container mtusi2026lab5-dispatcher-1 Starting + Container mtusi2026lab5-s3-bootstrap-1 Exited + Container mtusi2026lab5-reconciler-1 Starting + Container mtusi2026lab5-api-1 Started + Container mtusi2026lab5-api-2 Starting + Container mtusi2026lab5-reconciler-1 Started + Container mtusi2026lab5-worker-1 Started + Container mtusi2026lab5-dispatcher-1 Started + Container mtusi2026lab5-api-2 Started + Container mtusi2026lab5-api-1 Waiting + Container mtusi2026lab5-api-2 Waiting + Container mtusi2026lab5-api-1 Healthy + Container mtusi2026lab5-api-2 Healthy + Container mtusi2026lab5-lb-1 Starting + Container mtusi2026lab5-lb-1 Started +API ready: c754d451d054:f8ee8f14, ca5bb0478ca7:e2d9a089 diff --git a/evidence/local_student_checks.txt b/evidence/local_student_checks.txt new file mode 100644 index 0000000..adb4fde --- /dev/null +++ b/evidence/local_student_checks.txt @@ -0,0 +1,10 @@ +python3 student-tests/test_api.py --base-url "http://localhost:8080" +PASS: malformed JSON/media type, duplicate username, blank message, outsider access, pagination +PASS: 10 clients created exactly 100 unique messages +python3 student-tests/checks.py --base-url "http://localhost:8080" +PASS: registration race, invalid input, cursor scope/types on two API, read-after-write, logout +python3 student-tests/idempotency.py --base-url "http://localhost:8080" +PASS: shared idempotency, scope, conflict and auth on replay +docker exec "$(docker compose ps --status running -q api | head -n 1)" python student-tests/database.py +PASS: rollback of chat + members; migration reapplied twice +PASS: persisted key expiry, atomic message/result rollback diff --git a/evidence/local_validate.txt b/evidence/local_validate.txt new file mode 100644 index 0000000..683be25 --- /dev/null +++ b/evidence/local_validate.txt @@ -0,0 +1,2 @@ +python3 scripts/validate_openapi.py +PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested. diff --git a/evidence/persistence_scope.json b/evidence/persistence_scope.json new file mode 100644 index 0000000..fbffd22 --- /dev/null +++ b/evidence/persistence_scope.json @@ -0,0 +1,37 @@ +{ + "status": "PASS", + "services": [ + { + "service": "db", + "id_before": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "id_after": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "started_before": "2026-10-26T13:18:36.751584245Z", + "started_after": "2026-10-26T13:19:58.562034277Z", + "running_after": true + }, + { + "service": "cache", + "id_before": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "id_after": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "started_before": "2026-10-26T13:18:36.846503039Z", + "started_after": "2026-10-26T13:19:58.561302804Z", + "running_after": true + }, + { + "service": "s3", + "id_before": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "id_after": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "started_before": "2026-10-26T13:18:36.673896353Z", + "started_after": "2026-10-26T13:19:58.541630268Z", + "running_after": true + }, + { + "service": "broker", + "id_before": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "id_after": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "started_before": "2026-10-26T13:18:36.75300028Z", + "started_after": "2026-10-26T13:19:58.542392464Z", + "running_after": true + } + ] +} diff --git a/evidence/pipeline_environment.json b/evidence/pipeline_environment.json new file mode 100644 index 0000000..e43bdf0 --- /dev/null +++ b/evidence/pipeline_environment.json @@ -0,0 +1,183 @@ +{ + "docker": "26.1.1", + "compose": "2.27.0-desktop.2", + "containers": [ + { + "id": "10ea4363b2a5f35e57da2eadac37541d1fb79292374a094a91916dc915812413", + "name": "mtusi2026lab5-api-1", + "hostname": "10ea4363b2a5", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:21:35.945103161Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "f0e7bd13e2a91cd0f56b2b81ec96311b7a062799bde37df093e6262530b8233e", + "name": "mtusi2026lab5-api-2", + "hostname": "f0e7bd13e2a9", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:21:35.516908782Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:19:58.542392464Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:21:15.687084123Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:21:23.472099949Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "006c11ae2e2c025877906965f955d50a070e03dcefdf10251219d986aa951287", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "006c11ae2e2c", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:20:11.830304855Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:20:11.844174641Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:21:01.323626814Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": true, + "started_at": "2026-10-26T13:20:11.405575488Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:19:58.541630268Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:21:01.324968308Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "8f8673d67ca93d49031a9e5f55cd6fbf532142965a466de61353b15112472775", + "name": "mtusi2026lab5-worker-1", + "hostname": "8f8673d67ca9", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:20:11.799525654Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } + ], + "client_cpus": 16, + "pipeline": { + "job_max_attempts": 5, + "job_timeout_seconds": 30, + "job_lease_seconds": 15, + "staging_retention_seconds": 86400, + "max_pending_jobs": 1000, + "worker_concurrency": 1, + "prefetch_per_consumer": 1 + } +} diff --git a/evidence/pipeline_raw.json b/evidence/pipeline_raw.json new file mode 100644 index 0000000..f40904d --- /dev/null +++ b/evidence/pipeline_raw.json @@ -0,0 +1,10559 @@ +{ + "status": "PASS", + "track": 2, + "repeats": 3, + "cases": [ + { + "case": "accepted_restart_broker_api", + "repetition": 1, + "status": "PASS", + "elapsed_seconds": 71.657, + "queued": { + "status": "PASS", + "attachment_id": "1d66f442-b982-4db0-97d8-bd73dfa6174b", + "job_id": "84b443a3-051c-4b2d-a8e2-bbc5bd223357", + "accepted_status": 202, + "content_status": 409 + }, + "broker_preserved": { + "status": "PASS", + "stream_ids": [ + "1793020982029-0" + ] + }, + "result": { + "status": "PASS", + "attachment": { + "id": "1d66f442-b982-4db0-97d8-bd73dfa6174b", + "chat_id": "c710599a-90f1-42c0-b99e-4e3a9a2c35d3", + "owner_id": "77549fd7-c07a-4b37-a461-89476b491d38", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:23:01.953016Z", + "updated_at": "2026-10-26T13:23:41.741137Z" + }, + "job_id": "84b443a3-051c-4b2d-a8e2-bbc5bd223357", + "pipeline_version": 1, + "attempts": 1, + "current_keys": [ + "originals/1d66f442-b982-4db0-97d8-bd73dfa6174b/v1/original", + "variants/1d66f442-b982-4db0-97d8-bd73dfa6174b/v1/crop.jpg", + "variants/1d66f442-b982-4db0-97d8-bd73dfa6174b/v1/optimized.webp", + "variants/1d66f442-b982-4db0-97d8-bd73dfa6174b/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/1d66f442-b982-4db0-97d8-bd73dfa6174b/v1/original", + "variants/1d66f442-b982-4db0-97d8-bd73dfa6174b/v1/crop.jpg", + "variants/1d66f442-b982-4db0-97d8-bd73dfa6174b/v1/optimized.webp", + "variants/1d66f442-b982-4db0-97d8-bd73dfa6174b/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 39.785908, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:23:01.973591+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793020982029-0" + }, + "created_at": "2026-10-26 13:23:02.059024+00:00" + }, + { + "event": "processing", + "details": { + "worker": "70974bcc2ff8:a01fd810:0", + "attempt": 1, + "stream_id": "1793020982029-0" + }, + "created_at": "2026-10-26 13:23:41.178948+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 1, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:23:41.742138+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:23:02.057737+00:00", + "stream_id": "1793020982029-0" + } + ] + }, + "infrastructure": [ + { + "id": "8190e6eb492874b1a8401da55b15b6b3fc0da8149107d387ce18d381fcea7a42", + "name": "mtusi2026lab5-api-1", + "hostname": "8190e6eb4928", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:23:26.570363024Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "65b80779d089c17cb1d161d2ad36ff8c37c8430b568dffca19a0e03676d1dbf4", + "name": "mtusi2026lab5-api-2", + "hostname": "65b80779d089", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:23:27.006231611Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:23:30.870122449Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:21:15.687084123Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:21:23.472099949Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "1b25c681064655cccd668a794976460cf0e914a13f121410c6df0842e5d25e18", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "1b25c6810646", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:23:38.319556022Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:20:11.844174641Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:21:01.323626814Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": false, + "started_at": "2026-10-26T13:20:11.405575488Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": {} + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:19:58.541630268Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:21:01.324968308Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "70974bcc2ff8d4c2a9f787c1347bdebdbe02633b1253aeaa7cd89099fb7de40d", + "name": "mtusi2026lab5-worker-1", + "hostname": "70974bcc2ff8", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:23:39.657284559Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } + ] + }, + { + "case": "before_publish", + "repetition": 1, + "status": "PASS", + "elapsed_seconds": 45.89, + "fault": { + "status": "PASS", + "phase": "before_publish" + }, + "result": { + "status": "PASS", + "attachment": { + "id": "db3e2d38-bf47-4a52-96a1-d14dddecb4aa", + "chat_id": "ca980d80-9c25-493d-b81c-3501d8c2802f", + "owner_id": "e491b1b9-164d-481d-be07-3089b531bd46", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:24:09.598851Z", + "updated_at": "2026-10-26T13:24:24.546829Z" + }, + "job_id": "330bdffe-05b4-44b0-ac04-2934b1a45f9e", + "pipeline_version": 1, + "attempts": 1, + "current_keys": [ + "originals/db3e2d38-bf47-4a52-96a1-d14dddecb4aa/v1/original", + "variants/db3e2d38-bf47-4a52-96a1-d14dddecb4aa/v1/crop.jpg", + "variants/db3e2d38-bf47-4a52-96a1-d14dddecb4aa/v1/optimized.webp", + "variants/db3e2d38-bf47-4a52-96a1-d14dddecb4aa/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/db3e2d38-bf47-4a52-96a1-d14dddecb4aa/v1/original", + "variants/db3e2d38-bf47-4a52-96a1-d14dddecb4aa/v1/crop.jpg", + "variants/db3e2d38-bf47-4a52-96a1-d14dddecb4aa/v1/optimized.webp", + "variants/db3e2d38-bf47-4a52-96a1-d14dddecb4aa/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 14.946563, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:24:09.605021+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793021063960-0" + }, + "created_at": "2026-10-26 13:24:23.988997+00:00" + }, + { + "event": "processing", + "details": { + "worker": "261bbb0f52e1:0e4419a7:0", + "attempt": 1, + "stream_id": "1793021063960-0" + }, + "created_at": "2026-10-26 13:24:23.926625+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 1, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:24:24.547927+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:24:23.988003+00:00", + "stream_id": "1793021063960-0" + } + ] + }, + "infrastructure": [ + { + "id": "8190e6eb492874b1a8401da55b15b6b3fc0da8149107d387ce18d381fcea7a42", + "name": "mtusi2026lab5-api-1", + "hostname": "8190e6eb4928", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:23:26.570363024Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "65b80779d089c17cb1d161d2ad36ff8c37c8430b568dffca19a0e03676d1dbf4", + "name": "mtusi2026lab5-api-2", + "hostname": "65b80779d089", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:23:27.006231611Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:23:30.870122449Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:21:15.687084123Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:21:23.472099949Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "567d5f36328057f901c46963947ce64bcf98736a7603b377dda5b8ed37b2b3a8", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "567d5f363280", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:24:21.28434259Z", + "restart_count": 1, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:20:11.844174641Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:21:01.323626814Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": false, + "started_at": "2026-10-26T13:20:11.405575488Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": {} + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:19:58.541630268Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:21:01.324968308Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "261bbb0f52e16e7583662deaf3843ff523273c91832489941c0f1ed74701d1a9", + "name": "mtusi2026lab5-worker-1", + "hostname": "261bbb0f52e1", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:24:23.445768455Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } + ] + }, + { + "case": "after_publish", + "repetition": 1, + "status": "PASS", + "elapsed_seconds": 47.297, + "fault": { + "status": "PASS", + "phase": "after_publish" + }, + "result": { + "status": "PASS", + "attachment": { + "id": "3d83ce82-4489-48d2-a66a-07dac02ccb6b", + "chat_id": "bb5ec3cb-30bd-486c-ac6d-8ea318574417", + "owner_id": "370e2df7-3feb-4d72-a454-788f5b9b62ed", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:24:52.528438Z", + "updated_at": "2026-10-26T13:25:10.462698Z" + }, + "job_id": "6ef78e1e-2640-47a1-8f6f-98b893a951cf", + "pipeline_version": 1, + "attempts": 1, + "current_keys": [ + "originals/3d83ce82-4489-48d2-a66a-07dac02ccb6b/v1/original", + "variants/3d83ce82-4489-48d2-a66a-07dac02ccb6b/v1/crop.jpg", + "variants/3d83ce82-4489-48d2-a66a-07dac02ccb6b/v1/optimized.webp", + "variants/3d83ce82-4489-48d2-a66a-07dac02ccb6b/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/3d83ce82-4489-48d2-a66a-07dac02ccb6b/v1/original", + "variants/3d83ce82-4489-48d2-a66a-07dac02ccb6b/v1/crop.jpg", + "variants/3d83ce82-4489-48d2-a66a-07dac02ccb6b/v1/optimized.webp", + "variants/3d83ce82-4489-48d2-a66a-07dac02ccb6b/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 17.93259, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:24:52.535957+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793021108269-0" + }, + "created_at": "2026-10-26 13:25:08.304179+00:00" + }, + { + "event": "processing", + "details": { + "worker": "eca7e147693f:965cd549:0", + "attempt": 1, + "stream_id": "1793021103752-0" + }, + "created_at": "2026-10-26 13:25:09.679102+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 1, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:25:10.463885+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021108269-0" + }, + "created_at": "2026-10-26 13:25:10.564217+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:25:08.300492+00:00", + "stream_id": "1793021108269-0" + } + ] + }, + "infrastructure": [ + { + "id": "8190e6eb492874b1a8401da55b15b6b3fc0da8149107d387ce18d381fcea7a42", + "name": "mtusi2026lab5-api-1", + "hostname": "8190e6eb4928", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:23:26.570363024Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "65b80779d089c17cb1d161d2ad36ff8c37c8430b568dffca19a0e03676d1dbf4", + "name": "mtusi2026lab5-api-2", + "hostname": "65b80779d089", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:23:27.006231611Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:23:30.870122449Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:21:15.687084123Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:21:23.472099949Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "d4ad4d2262c1ccd6904394d7b9642db164b45b2af15cb605e0ed259e09d932d7", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "d4ad4d2262c1", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:25:04.543299651Z", + "restart_count": 1, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:20:11.844174641Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:21:01.323626814Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": false, + "started_at": "2026-10-26T13:20:11.405575488Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": {} + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:19:58.541630268Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:21:01.324968308Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "eca7e147693f3f31684b25034db66dc53d79dc910e2d4dd070e0dd6143cb44c4", + "name": "mtusi2026lab5-worker-1", + "hostname": "eca7e147693f", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:25:07.621182123Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } + ] + }, + { + "case": "before_effect", + "repetition": 1, + "status": "PASS", + "elapsed_seconds": 45.14, + "fault": { + "status": "PASS", + "phase": "before_effect" + }, + "result": { + "status": "PASS", + "attachment": { + "id": "3c76e780-b52d-4f82-b10a-79a8427ed899", + "chat_id": "67d85d0c-2142-4c9b-ac35-ca9425cd0607", + "owner_id": "a0148b66-19fc-4d03-b820-0c3e57ee520f", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:25:28.023091Z", + "updated_at": "2026-10-26T13:25:54.499637Z" + }, + "job_id": "3e8a396c-08b5-4d47-95e9-e03155693c65", + "pipeline_version": 1, + "attempts": 2, + "current_keys": [ + "originals/3c76e780-b52d-4f82-b10a-79a8427ed899/v1/original", + "variants/3c76e780-b52d-4f82-b10a-79a8427ed899/v1/crop.jpg", + "variants/3c76e780-b52d-4f82-b10a-79a8427ed899/v1/optimized.webp", + "variants/3c76e780-b52d-4f82-b10a-79a8427ed899/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/3c76e780-b52d-4f82-b10a-79a8427ed899/v1/original", + "variants/3c76e780-b52d-4f82-b10a-79a8427ed899/v1/crop.jpg", + "variants/3c76e780-b52d-4f82-b10a-79a8427ed899/v1/optimized.webp", + "variants/3c76e780-b52d-4f82-b10a-79a8427ed899/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 26.475843, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:25:28.026015+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793021128057-0" + }, + "created_at": "2026-10-26 13:25:28.076959+00:00" + }, + { + "event": "processing", + "details": { + "worker": "0779ec5e04c2:83cbe2a2:0", + "attempt": 1, + "stream_id": "1793021128057-0" + }, + "created_at": "2026-10-26 13:25:36.511801+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "lease_expired", + "attempt": 1, + "delay_seconds": 1.045 + }, + "created_at": "2026-10-26 13:25:52.570993+00:00" + }, + { + "event": "lease_recovered", + "details": {}, + "created_at": "2026-10-26 13:25:52.572055+00:00" + }, + { + "event": "published", + "details": { + "attempt": 2, + "stream_id": "1793021153726-0" + }, + "created_at": "2026-10-26 13:25:53.745918+00:00" + }, + { + "event": "processing", + "details": { + "worker": "0779ec5e04c2:c723749c:0", + "attempt": 2, + "stream_id": "1793021153726-0" + }, + "created_at": "2026-10-26 13:25:53.810740+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 2, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:25:54.500561+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:25:28.076111+00:00", + "stream_id": "1793021128057-0" + }, + { + "attempt": 2, + "published_at": "2026-10-26 13:25:53.745054+00:00", + "stream_id": "1793021153726-0" + } + ] + }, + "infrastructure": [ + { + "id": "8190e6eb492874b1a8401da55b15b6b3fc0da8149107d387ce18d381fcea7a42", + "name": "mtusi2026lab5-api-1", + "hostname": "8190e6eb4928", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:23:26.570363024Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "65b80779d089c17cb1d161d2ad36ff8c37c8430b568dffca19a0e03676d1dbf4", + "name": "mtusi2026lab5-api-2", + "hostname": "65b80779d089", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:23:27.006231611Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:23:30.870122449Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:21:15.687084123Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:21:23.472099949Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "d4ad4d2262c1ccd6904394d7b9642db164b45b2af15cb605e0ed259e09d932d7", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "d4ad4d2262c1", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:25:04.543299651Z", + "restart_count": 1, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:20:11.844174641Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:21:01.323626814Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": false, + "started_at": "2026-10-26T13:20:11.405575488Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": {} + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:19:58.541630268Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:21:01.324968308Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "0779ec5e04c2b6177d6b9bbde525a888c4b4cfe0e9ce4312cbc5980f4407eaf4", + "name": "mtusi2026lab5-worker-1", + "hostname": "0779ec5e04c2", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:25:37.315549783Z", + "restart_count": 1, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } + ] + }, + { + "case": "after_original", + "repetition": 1, + "status": "PASS", + "elapsed_seconds": 46.47, + "fault": { + "status": "PASS", + "phase": "after_original" + }, + "result": { + "status": "PASS", + "attachment": { + "id": "ca307b9e-a459-4a89-8c1a-55671707f527", + "chat_id": "a5a5cf2f-88d4-4246-8e65-52fe1d98f2ce", + "owner_id": "89485f95-1c1d-4bca-9477-e46da4203172", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:26:12.427822Z", + "updated_at": "2026-10-26T13:26:39.498719Z" + }, + "job_id": "33e589a5-49d0-4b59-952f-3cdaa1d23cca", + "pipeline_version": 1, + "attempts": 2, + "current_keys": [ + "originals/ca307b9e-a459-4a89-8c1a-55671707f527/v1/original", + "variants/ca307b9e-a459-4a89-8c1a-55671707f527/v1/crop.jpg", + "variants/ca307b9e-a459-4a89-8c1a-55671707f527/v1/optimized.webp", + "variants/ca307b9e-a459-4a89-8c1a-55671707f527/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/ca307b9e-a459-4a89-8c1a-55671707f527/v1/original", + "variants/ca307b9e-a459-4a89-8c1a-55671707f527/v1/crop.jpg", + "variants/ca307b9e-a459-4a89-8c1a-55671707f527/v1/optimized.webp", + "variants/ca307b9e-a459-4a89-8c1a-55671707f527/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 27.069658, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:26:12.432937+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793021172672-0" + }, + "created_at": "2026-10-26 13:26:12.709295+00:00" + }, + { + "event": "processing", + "details": { + "worker": "7233f66c3bf9:3485f858:0", + "attempt": 1, + "stream_id": "1793021172672-0" + }, + "created_at": "2026-10-26 13:26:21.679819+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "lease_expired", + "attempt": 1, + "delay_seconds": 1.392 + }, + "created_at": "2026-10-26 13:26:37.143266+00:00" + }, + { + "event": "lease_recovered", + "details": {}, + "created_at": "2026-10-26 13:26:37.144254+00:00" + }, + { + "event": "published", + "details": { + "attempt": 2, + "stream_id": "1793021198731-0" + }, + "created_at": "2026-10-26 13:26:38.754788+00:00" + }, + { + "event": "processing", + "details": { + "worker": "7233f66c3bf9:b9d0e9fa:0", + "attempt": 2, + "stream_id": "1793021198731-0" + }, + "created_at": "2026-10-26 13:26:38.825314+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 2, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:26:39.499648+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:26:12.708297+00:00", + "stream_id": "1793021172672-0" + }, + { + "attempt": 2, + "published_at": "2026-10-26 13:26:38.754067+00:00", + "stream_id": "1793021198731-0" + } + ] + }, + "infrastructure": [ + { + "id": "8190e6eb492874b1a8401da55b15b6b3fc0da8149107d387ce18d381fcea7a42", + "name": "mtusi2026lab5-api-1", + "hostname": "8190e6eb4928", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:23:26.570363024Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "65b80779d089c17cb1d161d2ad36ff8c37c8430b568dffca19a0e03676d1dbf4", + "name": "mtusi2026lab5-api-2", + "hostname": "65b80779d089", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:23:27.006231611Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:23:30.870122449Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:21:15.687084123Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:21:23.472099949Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "d4ad4d2262c1ccd6904394d7b9642db164b45b2af15cb605e0ed259e09d932d7", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "d4ad4d2262c1", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:25:04.543299651Z", + "restart_count": 1, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:20:11.844174641Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:21:01.323626814Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": false, + "started_at": "2026-10-26T13:20:11.405575488Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": {} + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:19:58.541630268Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:21:01.324968308Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "7233f66c3bf99399b220ca64d2482f75d56440d5886f8066d517b87b283fd921", + "name": "mtusi2026lab5-worker-1", + "hostname": "7233f66c3bf9", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:26:23.246049032Z", + "restart_count": 1, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } + ] + }, + { + "case": "after_effects", + "repetition": 1, + "status": "PASS", + "elapsed_seconds": 48.112, + "fault": { + "status": "PASS", + "phase": "after_effects" + }, + "result": { + "status": "PASS", + "attachment": { + "id": "657d11af-3ddb-449d-aad2-9c4430021772", + "chat_id": "3c8e3fd1-64d0-45cf-9f47-addfa92ad252", + "owner_id": "9f5d963d-83df-42f8-92a1-288fb2325f83", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:26:55.913046Z", + "updated_at": "2026-10-26T13:27:25.240288Z" + }, + "job_id": "9d57b92a-c98f-4f55-84f9-7f4055885d5c", + "pipeline_version": 1, + "attempts": 2, + "current_keys": [ + "originals/657d11af-3ddb-449d-aad2-9c4430021772/v1/original", + "variants/657d11af-3ddb-449d-aad2-9c4430021772/v1/crop.jpg", + "variants/657d11af-3ddb-449d-aad2-9c4430021772/v1/optimized.webp", + "variants/657d11af-3ddb-449d-aad2-9c4430021772/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/657d11af-3ddb-449d-aad2-9c4430021772/v1/original", + "variants/657d11af-3ddb-449d-aad2-9c4430021772/v1/crop.jpg", + "variants/657d11af-3ddb-449d-aad2-9c4430021772/v1/optimized.webp", + "variants/657d11af-3ddb-449d-aad2-9c4430021772/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 29.325745, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:26:55.916960+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793021216052-0" + }, + "created_at": "2026-10-26 13:26:56.082861+00:00" + }, + { + "event": "processing", + "details": { + "worker": "423e912d75dc:77be74de:0", + "attempt": 1, + "stream_id": "1793021216052-0" + }, + "created_at": "2026-10-26 13:27:06.590250+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "lease_expired", + "attempt": 1, + "delay_seconds": 1.485 + }, + "created_at": "2026-10-26 13:27:22.681096+00:00" + }, + { + "event": "lease_recovered", + "details": {}, + "created_at": "2026-10-26 13:27:22.681631+00:00" + }, + { + "event": "published", + "details": { + "attempt": 2, + "stream_id": "1793021244294-0" + }, + "created_at": "2026-10-26 13:27:24.348726+00:00" + }, + { + "event": "processing", + "details": { + "worker": "423e912d75dc:80878184:0", + "attempt": 2, + "stream_id": "1793021244294-0" + }, + "created_at": "2026-10-26 13:27:24.417074+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 2, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:27:25.241698+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:26:56.081854+00:00", + "stream_id": "1793021216052-0" + }, + { + "attempt": 2, + "published_at": "2026-10-26 13:27:24.347987+00:00", + "stream_id": "1793021244294-0" + } + ] + }, + "infrastructure": [ + { + "id": "8190e6eb492874b1a8401da55b15b6b3fc0da8149107d387ce18d381fcea7a42", + "name": "mtusi2026lab5-api-1", + "hostname": "8190e6eb4928", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:23:26.570363024Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "65b80779d089c17cb1d161d2ad36ff8c37c8430b568dffca19a0e03676d1dbf4", + "name": "mtusi2026lab5-api-2", + "hostname": "65b80779d089", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:23:27.006231611Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:23:30.870122449Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:21:15.687084123Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:21:23.472099949Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "d4ad4d2262c1ccd6904394d7b9642db164b45b2af15cb605e0ed259e09d932d7", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "d4ad4d2262c1", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:25:04.543299651Z", + "restart_count": 1, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:20:11.844174641Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:21:01.323626814Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": false, + "started_at": "2026-10-26T13:20:11.405575488Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": {} + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:19:58.541630268Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:21:01.324968308Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "423e912d75dc52ed49b73ccbaa593f609a2faf5defec750c3de2b5177059a7a4", + "name": "mtusi2026lab5-worker-1", + "hostname": "423e912d75dc", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:27:08.224729037Z", + "restart_count": 1, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } + ] + }, + { + "case": "after_commit", + "repetition": 1, + "status": "PASS", + "elapsed_seconds": 37.76, + "fault": { + "status": "PASS", + "phase": "after_commit" + }, + "result": { + "status": "PASS", + "attachment": { + "id": "94e062f3-da2f-4c10-9b1f-99d4a89888b1", + "chat_id": "da62d32f-731a-4a96-951b-9908a707a8d1", + "owner_id": "5f27eef3-8629-4363-a945-4733c144a6d1", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:27:42.823263Z", + "updated_at": "2026-10-26T13:27:52.912022Z" + }, + "job_id": "b525339d-c446-4527-9970-f20ca8388382", + "pipeline_version": 1, + "attempts": 1, + "current_keys": [ + "originals/94e062f3-da2f-4c10-9b1f-99d4a89888b1/v1/original", + "variants/94e062f3-da2f-4c10-9b1f-99d4a89888b1/v1/crop.jpg", + "variants/94e062f3-da2f-4c10-9b1f-99d4a89888b1/v1/optimized.webp", + "variants/94e062f3-da2f-4c10-9b1f-99d4a89888b1/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/94e062f3-da2f-4c10-9b1f-99d4a89888b1/v1/original", + "variants/94e062f3-da2f-4c10-9b1f-99d4a89888b1/v1/crop.jpg", + "variants/94e062f3-da2f-4c10-9b1f-99d4a89888b1/v1/optimized.webp", + "variants/94e062f3-da2f-4c10-9b1f-99d4a89888b1/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 10.087207, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:27:42.828038+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793021263040-0" + }, + "created_at": "2026-10-26 13:27:43.067099+00:00" + }, + { + "event": "processing", + "details": { + "worker": "a2adcc37a65a:8a64ad42:0", + "attempt": 1, + "stream_id": "1793021263040-0" + }, + "created_at": "2026-10-26 13:27:52.095732+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 1, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:27:52.913259+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:27:43.066125+00:00", + "stream_id": "1793021263040-0" + } + ] + }, + "infrastructure": [ + { + "id": "8190e6eb492874b1a8401da55b15b6b3fc0da8149107d387ce18d381fcea7a42", + "name": "mtusi2026lab5-api-1", + "hostname": "8190e6eb4928", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:23:26.570363024Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "65b80779d089c17cb1d161d2ad36ff8c37c8430b568dffca19a0e03676d1dbf4", + "name": "mtusi2026lab5-api-2", + "hostname": "65b80779d089", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:23:27.006231611Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:23:30.870122449Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:21:15.687084123Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:21:23.472099949Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "d4ad4d2262c1ccd6904394d7b9642db164b45b2af15cb605e0ed259e09d932d7", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "d4ad4d2262c1", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:25:04.543299651Z", + "restart_count": 1, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:20:11.844174641Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:21:01.323626814Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": false, + "started_at": "2026-10-26T13:20:11.405575488Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": {} + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:19:58.541630268Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:21:01.324968308Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a2adcc37a65ada7780ef39e2b2a52538d7638c24041a23921e2cef0befeccb40", + "name": "mtusi2026lab5-worker-1", + "hostname": "a2adcc37a65a", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:27:53.695558265Z", + "restart_count": 1, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } + ] + }, + { + "case": "duplicates_and_invalid_carrier", + "repetition": 1, + "status": "PASS", + "elapsed_seconds": 36.732, + "duplicates": { + "status": "PASS", + "acked": 16 + }, + "invalid_carrier": { + "status": "PASS", + "error_code": "invalid_job" + }, + "result": { + "status": "PASS", + "attachment": { + "id": "d3fd431d-5020-4dd5-8b9e-551af984940f", + "chat_id": "03480332-d64c-4cb3-a51a-f11a4d2301ef", + "owner_id": "a5c8eb23-65ce-4993-a02b-9915c237d257", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:28:12.493612Z", + "updated_at": "2026-10-26T13:28:13.358483Z" + }, + "job_id": "ed144f58-f682-454a-b8b8-267859b20ed8", + "pipeline_version": 1, + "attempts": 1, + "current_keys": [ + "originals/d3fd431d-5020-4dd5-8b9e-551af984940f/v1/original", + "variants/d3fd431d-5020-4dd5-8b9e-551af984940f/v1/crop.jpg", + "variants/d3fd431d-5020-4dd5-8b9e-551af984940f/v1/optimized.webp", + "variants/d3fd431d-5020-4dd5-8b9e-551af984940f/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/d3fd431d-5020-4dd5-8b9e-551af984940f/v1/original", + "variants/d3fd431d-5020-4dd5-8b9e-551af984940f/v1/crop.jpg", + "variants/d3fd431d-5020-4dd5-8b9e-551af984940f/v1/optimized.webp", + "variants/d3fd431d-5020-4dd5-8b9e-551af984940f/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 0.863594, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:28:12.499383+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793021292554-0" + }, + "created_at": "2026-10-26 13:28:12.582069+00:00" + }, + { + "event": "processing", + "details": { + "worker": "a2adcc37a65a:9c049f3f:0", + "attempt": 1, + "stream_id": "1793021292554-0" + }, + "created_at": "2026-10-26 13:28:12.601805+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 1, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:28:13.360137+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021306564-0" + }, + "created_at": "2026-10-26 13:28:26.652151+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021306577-0" + }, + "created_at": "2026-10-26 13:28:26.721426+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021306583-0" + }, + "created_at": "2026-10-26 13:28:26.783516+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021306588-0" + }, + "created_at": "2026-10-26 13:28:26.846422+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021306593-0" + }, + "created_at": "2026-10-26 13:28:26.918696+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021306597-0" + }, + "created_at": "2026-10-26 13:28:27.009636+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021306602-0" + }, + "created_at": "2026-10-26 13:28:27.086044+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021306606-0" + }, + "created_at": "2026-10-26 13:28:27.170304+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021306610-0" + }, + "created_at": "2026-10-26 13:28:27.246612+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021306615-0" + }, + "created_at": "2026-10-26 13:28:27.306825+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021306620-0" + }, + "created_at": "2026-10-26 13:28:27.437514+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021306624-0" + }, + "created_at": "2026-10-26 13:28:27.516737+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021306628-0" + }, + "created_at": "2026-10-26 13:28:27.583255+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021306632-0" + }, + "created_at": "2026-10-26 13:28:27.679598+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021306637-0" + }, + "created_at": "2026-10-26 13:28:27.748277+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021306641-0" + }, + "created_at": "2026-10-26 13:28:27.828047+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:28:12.581058+00:00", + "stream_id": "1793021292554-0" + } + ] + } + }, + { + "case": "reorder_new_before_old", + "repetition": 1, + "status": "PASS", + "elapsed_seconds": 64.115, + "result": { + "status": "PASS", + "attachment": { + "id": "513419b6-285a-4e4b-8124-d612439b3a7c", + "chat_id": "47a28c1f-35bb-440e-9999-36eb396c8c3a", + "owner_id": "fedd5456-0ab6-4a96-aede-4300b4b1a231", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "7c48d87d777b22ad9fb287b08a98625f17a30dc88f07769e16cd132e83b70537", + "size_bytes": 4786, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "c22eb305df23f9f08f812ff14e0b20cc94f060cb36058e8a6818f82130d59599", + "size_bytes": 1837, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "40128c713a9d3f9f5ef480b5630743e89616384f04a6eda5921baf5e5c46f34c", + "size_bytes": 2808, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:29:04.751733Z", + "updated_at": "2026-10-26T13:29:27.224467Z" + }, + "job_id": "3a36478b-2b56-465c-8bd7-fb9968f24301", + "pipeline_version": 2, + "attempts": 1, + "current_keys": [ + "originals/513419b6-285a-4e4b-8124-d612439b3a7c/v2/original", + "variants/513419b6-285a-4e4b-8124-d612439b3a7c/v2/crop.jpg", + "variants/513419b6-285a-4e4b-8124-d612439b3a7c/v2/optimized.webp", + "variants/513419b6-285a-4e4b-8124-d612439b3a7c/v2/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/513419b6-285a-4e4b-8124-d612439b3a7c/v2/original", + "variants/513419b6-285a-4e4b-8124-d612439b3a7c/v2/crop.jpg", + "variants/513419b6-285a-4e4b-8124-d612439b3a7c/v2/optimized.webp", + "variants/513419b6-285a-4e4b-8124-d612439b3a7c/v2/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "7c48d87d777b22ad9fb287b08a98625f17a30dc88f07769e16cd132e83b70537", + "crop": "c22eb305df23f9f08f812ff14e0b20cc94f060cb36058e8a6818f82130d59599", + "optimized": "40128c713a9d3f9f5ef480b5630743e89616384f04a6eda5921baf5e5c46f34c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 17.490225, + "events": [ + { + "event": "version_created", + "details": { + "pipeline_version": 2 + }, + "created_at": "2026-10-26 13:29:09.738273+00:00" + }, + { + "event": "processing", + "details": { + "worker": "5551638b75b8:df9177a0:0", + "attempt": 1, + "stream_id": "1793021355962-0" + }, + "created_at": "2026-10-26 13:29:26.314114+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 1, + "pipeline_version": 2 + }, + "created_at": "2026-10-26 13:29:27.225388+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": null, + "stream_id": null + } + ] + }, + "old_job": { + "job": { + "id": "fe34706a-5820-435d-8106-b87fca102b1e", + "attachment_id": "513419b6-285a-4e4b-8124-d612439b3a7c", + "pipeline_version": 1, + "status": "superseded", + "staging_key": "staging/513419b6-285a-4e4b-8124-d612439b3a7c/fe34706a-5820-435d-8106-b87fca102b1e", + "attempts": 0, + "budget_start": 0, + "available_at": "2026-10-26 13:29:04.752399+00:00", + "lease_until": null, + "lease_token": null, + "error_code": null, + "staged_deleted_at": null, + "created_at": "2026-10-26 13:29:04.752399+00:00", + "updated_at": "2026-10-26 13:29:09.732953+00:00" + }, + "attachment": { + "status": "ready", + "pipeline_version": 2, + "current_job_id": "3a36478b-2b56-465c-8bd7-fb9968f24301", + "object_key": "originals/513419b6-285a-4e4b-8124-d612439b3a7c/v2/original", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "7c48d87d777b22ad9fb287b08a98625f17a30dc88f07769e16cd132e83b70537", + "size_bytes": 4786, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "c22eb305df23f9f08f812ff14e0b20cc94f060cb36058e8a6818f82130d59599", + "size_bytes": 1837, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "40128c713a9d3f9f5ef480b5630743e89616384f04a6eda5921baf5e5c46f34c", + "size_bytes": 2808, + "content_type": "image/webp" + } + ], + "variant_keys": { + "crop": "variants/513419b6-285a-4e4b-8124-d612439b3a7c/v2/crop.jpg", + "optimized": "variants/513419b6-285a-4e4b-8124-d612439b3a7c/v2/optimized.webp", + "thumbnail": "variants/513419b6-285a-4e4b-8124-d612439b3a7c/v2/thumbnail.jpg" + }, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "size_bytes": 111817 + }, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:29:04.754310+00:00" + }, + { + "event": "stale_ignored", + "details": { + "stream_id": "1793021362092-0", + "current_version": 2 + }, + "created_at": "2026-10-26 13:29:27.302572+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": null, + "stream_id": null + } + ], + "faults": [] + } + }, + { + "case": "stale_after_new_ready", + "repetition": 1, + "status": "PASS", + "elapsed_seconds": 57.804, + "result": { + "status": "PASS", + "attachment": { + "id": "893e7666-f5b4-480e-9b56-d78f9234771e", + "chat_id": "04b062b3-a0a3-4f7f-a1fb-b22c74a586aa", + "owner_id": "109bef90-501a-498c-82e8-10468f9d7007", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "7c48d87d777b22ad9fb287b08a98625f17a30dc88f07769e16cd132e83b70537", + "size_bytes": 4786, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "c22eb305df23f9f08f812ff14e0b20cc94f060cb36058e8a6818f82130d59599", + "size_bytes": 1837, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "40128c713a9d3f9f5ef480b5630743e89616384f04a6eda5921baf5e5c46f34c", + "size_bytes": 2808, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:29:49.702181Z", + "updated_at": "2026-10-26T13:30:07.580456Z" + }, + "job_id": "b4e7d673-8d07-4cfa-b723-44ab5e872c7c", + "pipeline_version": 2, + "attempts": 1, + "current_keys": [ + "originals/893e7666-f5b4-480e-9b56-d78f9234771e/v2/original", + "variants/893e7666-f5b4-480e-9b56-d78f9234771e/v2/crop.jpg", + "variants/893e7666-f5b4-480e-9b56-d78f9234771e/v2/optimized.webp", + "variants/893e7666-f5b4-480e-9b56-d78f9234771e/v2/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/893e7666-f5b4-480e-9b56-d78f9234771e/v1/original", + "originals/893e7666-f5b4-480e-9b56-d78f9234771e/v2/original", + "variants/893e7666-f5b4-480e-9b56-d78f9234771e/v1/crop.jpg", + "variants/893e7666-f5b4-480e-9b56-d78f9234771e/v1/optimized.webp", + "variants/893e7666-f5b4-480e-9b56-d78f9234771e/v1/thumbnail.jpg", + "variants/893e7666-f5b4-480e-9b56-d78f9234771e/v2/crop.jpg", + "variants/893e7666-f5b4-480e-9b56-d78f9234771e/v2/optimized.webp", + "variants/893e7666-f5b4-480e-9b56-d78f9234771e/v2/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "7c48d87d777b22ad9fb287b08a98625f17a30dc88f07769e16cd132e83b70537", + "crop": "c22eb305df23f9f08f812ff14e0b20cc94f060cb36058e8a6818f82130d59599", + "optimized": "40128c713a9d3f9f5ef480b5630743e89616384f04a6eda5921baf5e5c46f34c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 0.827029, + "events": [ + { + "event": "version_created", + "details": { + "pipeline_version": 2 + }, + "created_at": "2026-10-26 13:30:06.756391+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793021406820-0" + }, + "created_at": "2026-10-26 13:30:06.843911+00:00" + }, + { + "event": "processing", + "details": { + "worker": "5551638b75b8:df9177a0:0", + "attempt": 1, + "stream_id": "1793021406820-0" + }, + "created_at": "2026-10-26 13:30:06.858206+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 1, + "pipeline_version": 2 + }, + "created_at": "2026-10-26 13:30:07.581764+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:30:06.843174+00:00", + "stream_id": "1793021406820-0" + } + ] + }, + "old_job": { + "job": { + "id": "cd091d12-31bb-499a-8451-fce3ed66477d", + "attachment_id": "893e7666-f5b4-480e-9b56-d78f9234771e", + "pipeline_version": 1, + "status": "ready", + "staging_key": "staging/893e7666-f5b4-480e-9b56-d78f9234771e/cd091d12-31bb-499a-8451-fce3ed66477d", + "attempts": 1, + "budget_start": 0, + "available_at": "2026-10-26 13:29:49.702864+00:00", + "lease_until": null, + "lease_token": null, + "error_code": null, + "staged_deleted_at": "2026-10-26 13:29:50.548523+00:00", + "created_at": "2026-10-26 13:29:49.702864+00:00", + "updated_at": "2026-10-26 13:29:50.514301+00:00" + }, + "attachment": { + "status": "ready", + "pipeline_version": 2, + "current_job_id": "b4e7d673-8d07-4cfa-b723-44ab5e872c7c", + "object_key": "originals/893e7666-f5b4-480e-9b56-d78f9234771e/v2/original", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "7c48d87d777b22ad9fb287b08a98625f17a30dc88f07769e16cd132e83b70537", + "size_bytes": 4786, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "c22eb305df23f9f08f812ff14e0b20cc94f060cb36058e8a6818f82130d59599", + "size_bytes": 1837, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "40128c713a9d3f9f5ef480b5630743e89616384f04a6eda5921baf5e5c46f34c", + "size_bytes": 2808, + "content_type": "image/webp" + } + ], + "variant_keys": { + "crop": "variants/893e7666-f5b4-480e-9b56-d78f9234771e/v2/crop.jpg", + "optimized": "variants/893e7666-f5b4-480e-9b56-d78f9234771e/v2/optimized.webp", + "thumbnail": "variants/893e7666-f5b4-480e-9b56-d78f9234771e/v2/thumbnail.jpg" + }, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "size_bytes": 111817 + }, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:29:49.704768+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793021389810-0" + }, + "created_at": "2026-10-26 13:29:49.846675+00:00" + }, + { + "event": "processing", + "details": { + "worker": "5551638b75b8:df9177a0:0", + "attempt": 1, + "stream_id": "1793021389810-0" + }, + "created_at": "2026-10-26 13:29:49.859113+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 1, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:29:50.514881+00:00" + }, + { + "event": "stale_ignored", + "details": { + "stream_id": "1793021422415-0", + "current_version": 2 + }, + "created_at": "2026-10-26 13:30:22.462973+00:00" + }, + { + "event": "stale_ignored", + "details": { + "stream_id": "1793021422429-0", + "current_version": 2 + }, + "created_at": "2026-10-26 13:30:22.515663+00:00" + }, + { + "event": "stale_ignored", + "details": { + "stream_id": "1793021422435-0", + "current_version": 2 + }, + "created_at": "2026-10-26 13:30:22.559937+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:29:49.844288+00:00", + "stream_id": "1793021389810-0" + } + ], + "faults": [] + } + }, + { + "case": "permanent_failure_replay", + "repetition": 1, + "status": "PASS", + "elapsed_seconds": 63.609, + "failed": { + "status": "PASS", + "error_code": "staging_missing", + "attempts": 1, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:30:52.027944+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793021452153-0" + }, + "created_at": "2026-10-26 13:30:52.180772+00:00" + }, + { + "event": "processing", + "details": { + "worker": "87e84e629ce3:0a5810af:0", + "attempt": 1, + "stream_id": "1793021452153-0" + }, + "created_at": "2026-10-26 13:31:02.450523+00:00" + }, + { + "event": "failed", + "details": { + "code": "staging_missing", + "attempt": 1 + }, + "created_at": "2026-10-26 13:31:02.558161+00:00" + } + ] + }, + "ready_replay": { + "status": "noop", + "reason": "already_ready" + }, + "result": { + "status": "PASS", + "attachment": { + "id": "ce867b0f-894b-42d0-af29-34a2c24f5c8d", + "chat_id": "c799f8a9-d01c-459a-8519-f3ad40980e3c", + "owner_id": "4efc6198-68af-41f7-99b2-b9b3d43e40aa", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:30:52.024799Z", + "updated_at": "2026-10-26T13:31:24.077972Z" + }, + "job_id": "0285e3f7-db72-4576-9431-380af1099c47", + "pipeline_version": 1, + "attempts": 2, + "current_keys": [ + "originals/ce867b0f-894b-42d0-af29-34a2c24f5c8d/v1/original", + "variants/ce867b0f-894b-42d0-af29-34a2c24f5c8d/v1/crop.jpg", + "variants/ce867b0f-894b-42d0-af29-34a2c24f5c8d/v1/optimized.webp", + "variants/ce867b0f-894b-42d0-af29-34a2c24f5c8d/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/ce867b0f-894b-42d0-af29-34a2c24f5c8d/v1/original", + "variants/ce867b0f-894b-42d0-af29-34a2c24f5c8d/v1/crop.jpg", + "variants/ce867b0f-894b-42d0-af29-34a2c24f5c8d/v1/optimized.webp", + "variants/ce867b0f-894b-42d0-af29-34a2c24f5c8d/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 32.052426, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:30:52.027944+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793021452153-0" + }, + "created_at": "2026-10-26 13:30:52.180772+00:00" + }, + { + "event": "processing", + "details": { + "worker": "87e84e629ce3:0a5810af:0", + "attempt": 1, + "stream_id": "1793021452153-0" + }, + "created_at": "2026-10-26 13:31:02.450523+00:00" + }, + { + "event": "failed", + "details": { + "code": "staging_missing", + "attempt": 1 + }, + "created_at": "2026-10-26 13:31:02.558161+00:00" + }, + { + "event": "operator_replay", + "details": { + "next_attempt": 2 + }, + "created_at": "2026-10-26 13:31:22.956745+00:00" + }, + { + "event": "published", + "details": { + "attempt": 2, + "stream_id": "1793021483130-0" + }, + "created_at": "2026-10-26 13:31:23.160191+00:00" + }, + { + "event": "processing", + "details": { + "worker": "87e84e629ce3:0a5810af:0", + "attempt": 2, + "stream_id": "1793021483130-0" + }, + "created_at": "2026-10-26 13:31:23.178679+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 2, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:31:24.079561+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:30:52.179957+00:00", + "stream_id": "1793021452153-0" + }, + { + "attempt": 2, + "published_at": "2026-10-26 13:31:23.159186+00:00", + "stream_id": "1793021483130-0" + } + ] + } + }, + { + "case": "bounded_retry_and_replay", + "repetition": 1, + "status": "PASS", + "elapsed_seconds": 76.263, + "unready": { + "status": "PASS", + "readiness_and_content": [ + 503, + 503 + ] + }, + "failed": { + "status": "PASS", + "error_code": "retry_exhausted", + "attempts": 5, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:31:52.265865+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793021512501-0" + }, + "created_at": "2026-10-26 13:31:52.538392+00:00" + }, + { + "event": "processing", + "details": { + "worker": "258b4e530020:fab63ec7:0", + "attempt": 1, + "stream_id": "1793021512501-0" + }, + "created_at": "2026-10-26 13:32:06.718404+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "storage_unavailable", + "attempt": 1, + "delay_seconds": 1.268 + }, + "created_at": "2026-10-26 13:32:07.838232+00:00" + }, + { + "event": "published", + "details": { + "attempt": 2, + "stream_id": "1793021529196-0" + }, + "created_at": "2026-10-26 13:32:09.224582+00:00" + }, + { + "event": "processing", + "details": { + "worker": "258b4e530020:fab63ec7:0", + "attempt": 2, + "stream_id": "1793021529196-0" + }, + "created_at": "2026-10-26 13:32:09.244272+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "storage_unavailable", + "attempt": 2, + "delay_seconds": 2.189 + }, + "created_at": "2026-10-26 13:32:10.297619+00:00" + }, + { + "event": "published", + "details": { + "attempt": 3, + "stream_id": "1793021532682-0" + }, + "created_at": "2026-10-26 13:32:12.755223+00:00" + }, + { + "event": "processing", + "details": { + "worker": "258b4e530020:fab63ec7:0", + "attempt": 3, + "stream_id": "1793021532682-0" + }, + "created_at": "2026-10-26 13:32:12.771786+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "storage_unavailable", + "attempt": 3, + "delay_seconds": 4.015 + }, + "created_at": "2026-10-26 13:32:13.810474+00:00" + }, + { + "event": "published", + "details": { + "attempt": 4, + "stream_id": "1793021538006-0" + }, + "created_at": "2026-10-26 13:32:18.041068+00:00" + }, + { + "event": "processing", + "details": { + "worker": "258b4e530020:fab63ec7:0", + "attempt": 4, + "stream_id": "1793021538006-0" + }, + "created_at": "2026-10-26 13:32:18.059177+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "storage_unavailable", + "attempt": 4, + "delay_seconds": 8.214 + }, + "created_at": "2026-10-26 13:32:19.099641+00:00" + }, + { + "event": "published", + "details": { + "attempt": 5, + "stream_id": "1793021547542-0" + }, + "created_at": "2026-10-26 13:32:27.565474+00:00" + }, + { + "event": "processing", + "details": { + "worker": "258b4e530020:fab63ec7:0", + "attempt": 5, + "stream_id": "1793021547542-0" + }, + "created_at": "2026-10-26 13:32:27.581820+00:00" + }, + { + "event": "failed", + "details": { + "code": "retry_exhausted", + "attempt": 5 + }, + "created_at": "2026-10-26 13:32:28.607289+00:00" + } + ] + }, + "result": { + "status": "PASS", + "attachment": { + "id": "b587d84b-a40f-4921-85e2-b0c65f8ee1e3", + "chat_id": "6576d7e1-e58b-4d9b-a2bf-9e8bf7520b48", + "owner_id": "70b27ba4-2755-4611-93c4-c4a0b778484c", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:31:52.261066Z", + "updated_at": "2026-10-26T13:32:42.335592Z" + }, + "job_id": "b77fab39-a712-46b2-9a8a-6ca2e252c511", + "pipeline_version": 1, + "attempts": 6, + "current_keys": [ + "originals/b587d84b-a40f-4921-85e2-b0c65f8ee1e3/v1/original", + "variants/b587d84b-a40f-4921-85e2-b0c65f8ee1e3/v1/crop.jpg", + "variants/b587d84b-a40f-4921-85e2-b0c65f8ee1e3/v1/optimized.webp", + "variants/b587d84b-a40f-4921-85e2-b0c65f8ee1e3/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/b587d84b-a40f-4921-85e2-b0c65f8ee1e3/v1/original", + "variants/b587d84b-a40f-4921-85e2-b0c65f8ee1e3/v1/crop.jpg", + "variants/b587d84b-a40f-4921-85e2-b0c65f8ee1e3/v1/optimized.webp", + "variants/b587d84b-a40f-4921-85e2-b0c65f8ee1e3/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 50.073584, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:31:52.265865+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793021512501-0" + }, + "created_at": "2026-10-26 13:31:52.538392+00:00" + }, + { + "event": "processing", + "details": { + "worker": "258b4e530020:fab63ec7:0", + "attempt": 1, + "stream_id": "1793021512501-0" + }, + "created_at": "2026-10-26 13:32:06.718404+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "storage_unavailable", + "attempt": 1, + "delay_seconds": 1.268 + }, + "created_at": "2026-10-26 13:32:07.838232+00:00" + }, + { + "event": "published", + "details": { + "attempt": 2, + "stream_id": "1793021529196-0" + }, + "created_at": "2026-10-26 13:32:09.224582+00:00" + }, + { + "event": "processing", + "details": { + "worker": "258b4e530020:fab63ec7:0", + "attempt": 2, + "stream_id": "1793021529196-0" + }, + "created_at": "2026-10-26 13:32:09.244272+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "storage_unavailable", + "attempt": 2, + "delay_seconds": 2.189 + }, + "created_at": "2026-10-26 13:32:10.297619+00:00" + }, + { + "event": "published", + "details": { + "attempt": 3, + "stream_id": "1793021532682-0" + }, + "created_at": "2026-10-26 13:32:12.755223+00:00" + }, + { + "event": "processing", + "details": { + "worker": "258b4e530020:fab63ec7:0", + "attempt": 3, + "stream_id": "1793021532682-0" + }, + "created_at": "2026-10-26 13:32:12.771786+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "storage_unavailable", + "attempt": 3, + "delay_seconds": 4.015 + }, + "created_at": "2026-10-26 13:32:13.810474+00:00" + }, + { + "event": "published", + "details": { + "attempt": 4, + "stream_id": "1793021538006-0" + }, + "created_at": "2026-10-26 13:32:18.041068+00:00" + }, + { + "event": "processing", + "details": { + "worker": "258b4e530020:fab63ec7:0", + "attempt": 4, + "stream_id": "1793021538006-0" + }, + "created_at": "2026-10-26 13:32:18.059177+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "storage_unavailable", + "attempt": 4, + "delay_seconds": 8.214 + }, + "created_at": "2026-10-26 13:32:19.099641+00:00" + }, + { + "event": "published", + "details": { + "attempt": 5, + "stream_id": "1793021547542-0" + }, + "created_at": "2026-10-26 13:32:27.565474+00:00" + }, + { + "event": "processing", + "details": { + "worker": "258b4e530020:fab63ec7:0", + "attempt": 5, + "stream_id": "1793021547542-0" + }, + "created_at": "2026-10-26 13:32:27.581820+00:00" + }, + { + "event": "failed", + "details": { + "code": "retry_exhausted", + "attempt": 5 + }, + "created_at": "2026-10-26 13:32:28.607289+00:00" + }, + { + "event": "operator_replay", + "details": { + "next_attempt": 6 + }, + "created_at": "2026-10-26 13:32:41.090555+00:00" + }, + { + "event": "published", + "details": { + "attempt": 6, + "stream_id": "1793021561327-0" + }, + "created_at": "2026-10-26 13:32:41.357043+00:00" + }, + { + "event": "processing", + "details": { + "worker": "258b4e530020:fab63ec7:0", + "attempt": 6, + "stream_id": "1793021561327-0" + }, + "created_at": "2026-10-26 13:32:41.372501+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 6, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:32:42.337201+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:31:52.537229+00:00", + "stream_id": "1793021512501-0" + }, + { + "attempt": 2, + "published_at": "2026-10-26 13:32:09.223426+00:00", + "stream_id": "1793021529196-0" + }, + { + "attempt": 3, + "published_at": "2026-10-26 13:32:12.754252+00:00", + "stream_id": "1793021532682-0" + }, + { + "attempt": 4, + "published_at": "2026-10-26 13:32:18.039302+00:00", + "stream_id": "1793021538006-0" + }, + { + "attempt": 5, + "published_at": "2026-10-26 13:32:27.564564+00:00", + "stream_id": "1793021547542-0" + }, + { + "attempt": 6, + "published_at": "2026-10-26 13:32:41.356119+00:00", + "stream_id": "1793021561327-0" + } + ] + } + }, + { + "case": "staging_retention_and_privacy", + "repetition": 1, + "status": "PASS", + "elapsed_seconds": 38.349, + "cleanup": { + "status": "PASS", + "orphan_removed": true, + "fresh_and_queued_preserved": true, + "dry_run": { + "mode": "dry-run", + "retention_seconds": 2, + "objects_scanned": 4, + "actions": [ + { + "key": "staging/13586ea5-1398-420f-a653-8b3572edddcb/d94ff471-e3a4-46d6-8c12-e4b9b1a8c689", + "reason": "retention", + "applied": false + }, + { + "key": "staging/513419b6-285a-4e4b-8124-d612439b3a7c/fe34706a-5820-435d-8106-b87fca102b1e", + "reason": "retention", + "applied": false + } + ] + }, + "apply": { + "mode": "apply", + "retention_seconds": 2, + "objects_scanned": 4, + "actions": [ + { + "key": "staging/13586ea5-1398-420f-a653-8b3572edddcb/d94ff471-e3a4-46d6-8c12-e4b9b1a8c689", + "reason": "retention", + "applied": true + }, + { + "key": "staging/513419b6-285a-4e4b-8124-d612439b3a7c/fe34706a-5820-435d-8106-b87fca102b1e", + "reason": "retention", + "applied": true + } + ] + } + }, + "privacy": { + "status": "PASS", + "anonymous_get": 403 + }, + "result": { + "status": "PASS", + "attachment": { + "id": "ae9fd3df-b771-429d-b363-fb7cf3a95ba6", + "chat_id": "018e8e04-2d17-46f6-a2f1-52127f466630", + "owner_id": "c57e6f2e-7f4b-4092-92b3-5154871ef9e2", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:33:03.897558Z", + "updated_at": "2026-10-26T13:33:16.796660Z" + }, + "job_id": "6bf6b0f4-4cda-4ffc-9479-889699edabbe", + "pipeline_version": 1, + "attempts": 1, + "current_keys": [ + "originals/ae9fd3df-b771-429d-b363-fb7cf3a95ba6/v1/original", + "variants/ae9fd3df-b771-429d-b363-fb7cf3a95ba6/v1/crop.jpg", + "variants/ae9fd3df-b771-429d-b363-fb7cf3a95ba6/v1/optimized.webp", + "variants/ae9fd3df-b771-429d-b363-fb7cf3a95ba6/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/ae9fd3df-b771-429d-b363-fb7cf3a95ba6/v1/original", + "variants/ae9fd3df-b771-429d-b363-fb7cf3a95ba6/v1/crop.jpg", + "variants/ae9fd3df-b771-429d-b363-fb7cf3a95ba6/v1/optimized.webp", + "variants/ae9fd3df-b771-429d-b363-fb7cf3a95ba6/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 12.898152, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:33:03.901680+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793021584073-0" + }, + "created_at": "2026-10-26 13:33:04.101687+00:00" + }, + { + "event": "processing", + "details": { + "worker": "fbd68f1e469a:d065c745:0", + "attempt": 1, + "stream_id": "1793021584073-0" + }, + "created_at": "2026-10-26 13:33:16.116665+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 1, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:33:16.797543+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:33:04.100886+00:00", + "stream_id": "1793021584073-0" + } + ] + } + }, + { + "case": "accepted_restart_broker_api", + "repetition": 2, + "status": "PASS", + "elapsed_seconds": 62.692, + "queued": { + "status": "PASS", + "attachment_id": "e4d1a141-ef15-4c63-b2a7-03e839b2dfcf", + "job_id": "9f0bb250-5ee9-42c9-a55b-cf47f17ffbcb", + "accepted_status": 202, + "content_status": 409 + }, + "broker_preserved": { + "status": "PASS", + "stream_ids": [ + "1793021622744-0" + ] + }, + "result": { + "status": "PASS", + "attachment": { + "id": "e4d1a141-ef15-4c63-b2a7-03e839b2dfcf", + "chat_id": "02cbb526-c1ae-4ea7-8d30-5b04b80650f3", + "owner_id": "1d81cff1-d076-410c-b1a6-44ac813ab8b8", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:33:42.660772Z", + "updated_at": "2026-10-26T13:34:23.716158Z" + }, + "job_id": "9f0bb250-5ee9-42c9-a55b-cf47f17ffbcb", + "pipeline_version": 1, + "attempts": 1, + "current_keys": [ + "originals/e4d1a141-ef15-4c63-b2a7-03e839b2dfcf/v1/original", + "variants/e4d1a141-ef15-4c63-b2a7-03e839b2dfcf/v1/crop.jpg", + "variants/e4d1a141-ef15-4c63-b2a7-03e839b2dfcf/v1/optimized.webp", + "variants/e4d1a141-ef15-4c63-b2a7-03e839b2dfcf/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/e4d1a141-ef15-4c63-b2a7-03e839b2dfcf/v1/original", + "variants/e4d1a141-ef15-4c63-b2a7-03e839b2dfcf/v1/crop.jpg", + "variants/e4d1a141-ef15-4c63-b2a7-03e839b2dfcf/v1/optimized.webp", + "variants/e4d1a141-ef15-4c63-b2a7-03e839b2dfcf/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 41.054169, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:33:42.666356+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793021622744-0" + }, + "created_at": "2026-10-26 13:33:42.774765+00:00" + }, + { + "event": "processing", + "details": { + "worker": "7fc1ebd60986:61f27ae0:0", + "attempt": 1, + "stream_id": "1793021622744-0" + }, + "created_at": "2026-10-26 13:34:23.070958+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 1, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:34:23.717059+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:33:42.773805+00:00", + "stream_id": "1793021622744-0" + } + ] + }, + "infrastructure": [ + { + "id": "91b4b02fe068bfafc66c8295790d3f1461af53f72cf7be75be02f12cc1ad64ca", + "name": "mtusi2026lab5-api-1", + "hostname": "91b4b02fe068", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:34:08.07680889Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "8aeb8f8481ed607e6d1d18d19c64b55c7f478744f48e61be06792713f0eac67b", + "name": "mtusi2026lab5-api-2", + "hostname": "8aeb8f8481ed", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:34:07.605323424Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:34:12.05513654Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:21:15.687084123Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:21:23.472099949Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "d4ad4d2262c1ccd6904394d7b9642db164b45b2af15cb605e0ed259e09d932d7", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "d4ad4d2262c1", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:34:20.459598453Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:20:11.844174641Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:21:01.323626814Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": false, + "started_at": "2026-10-26T13:20:11.405575488Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": {} + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:32:30.035280163Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:21:01.324968308Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "7fc1ebd60986b0c52e833bfcdfa9fa2ba5abae5f380483a10f60c24e4ab00515", + "name": "mtusi2026lab5-worker-1", + "hostname": "7fc1ebd60986", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:34:21.282933923Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } + ] + }, + { + "case": "before_publish", + "repetition": 2, + "status": "PASS", + "elapsed_seconds": 45.961, + "fault": { + "status": "PASS", + "phase": "before_publish" + }, + "result": { + "status": "PASS", + "attachment": { + "id": "e94b8d3f-071e-42e4-a9a0-dfed8ab8e8ff", + "chat_id": "27e6e737-8d0a-47de-a7a3-0dbc263a5646", + "owner_id": "daedc2bd-2271-4970-87be-65adbeb56d74", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:34:52.844632Z", + "updated_at": "2026-10-26T13:35:07.444250Z" + }, + "job_id": "ddc27a2f-198f-46d2-85f5-0ee6ee5e8229", + "pipeline_version": 1, + "attempts": 1, + "current_keys": [ + "originals/e94b8d3f-071e-42e4-a9a0-dfed8ab8e8ff/v1/original", + "variants/e94b8d3f-071e-42e4-a9a0-dfed8ab8e8ff/v1/crop.jpg", + "variants/e94b8d3f-071e-42e4-a9a0-dfed8ab8e8ff/v1/optimized.webp", + "variants/e94b8d3f-071e-42e4-a9a0-dfed8ab8e8ff/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/e94b8d3f-071e-42e4-a9a0-dfed8ab8e8ff/v1/original", + "variants/e94b8d3f-071e-42e4-a9a0-dfed8ab8e8ff/v1/crop.jpg", + "variants/e94b8d3f-071e-42e4-a9a0-dfed8ab8e8ff/v1/optimized.webp", + "variants/e94b8d3f-071e-42e4-a9a0-dfed8ab8e8ff/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 14.596752, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:34:52.853915+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793021705418-0" + }, + "created_at": "2026-10-26 13:35:05.444071+00:00" + }, + { + "event": "processing", + "details": { + "worker": "548eba02147d:5d18972c:0", + "attempt": 1, + "stream_id": "1793021705418-0" + }, + "created_at": "2026-10-26 13:35:06.709587+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 1, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:35:07.445213+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:35:05.443337+00:00", + "stream_id": "1793021705418-0" + } + ] + }, + "infrastructure": [ + { + "id": "91b4b02fe068bfafc66c8295790d3f1461af53f72cf7be75be02f12cc1ad64ca", + "name": "mtusi2026lab5-api-1", + "hostname": "91b4b02fe068", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:34:08.07680889Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "8aeb8f8481ed607e6d1d18d19c64b55c7f478744f48e61be06792713f0eac67b", + "name": "mtusi2026lab5-api-2", + "hostname": "8aeb8f8481ed", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:34:07.605323424Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:34:12.05513654Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:21:15.687084123Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:21:23.472099949Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "d8dfa91ecfe646fdfe4bcbbb80f6e44d09913c27d4b1f088f0a662d5a35d37c6", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "d8dfa91ecfe6", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:35:02.916210063Z", + "restart_count": 1, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:20:11.844174641Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:21:01.323626814Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": false, + "started_at": "2026-10-26T13:20:11.405575488Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": {} + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:32:30.035280163Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:21:01.324968308Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "548eba02147d79db44953f8a1969d07c84323cbb6a7f300c424111f881cef213", + "name": "mtusi2026lab5-worker-1", + "hostname": "548eba02147d", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:35:05.214825506Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } + ] + }, + { + "case": "after_publish", + "repetition": 2, + "status": "PASS", + "elapsed_seconds": 44.544, + "fault": { + "status": "PASS", + "phase": "after_publish" + }, + "result": { + "status": "PASS", + "attachment": { + "id": "61aca7e9-e8c1-4f77-ab62-021c9cb27b61", + "chat_id": "9dc38cb8-2df1-4c2a-9479-7da3b174fd5b", + "owner_id": "86a75337-a8fa-4b8f-9d93-49cedb6d3698", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:35:35.178144Z", + "updated_at": "2026-10-26T13:35:50.269615Z" + }, + "job_id": "98a202d3-5a74-4057-b186-a27c5c8e9ec7", + "pipeline_version": 1, + "attempts": 1, + "current_keys": [ + "originals/61aca7e9-e8c1-4f77-ab62-021c9cb27b61/v1/original", + "variants/61aca7e9-e8c1-4f77-ab62-021c9cb27b61/v1/crop.jpg", + "variants/61aca7e9-e8c1-4f77-ab62-021c9cb27b61/v1/optimized.webp", + "variants/61aca7e9-e8c1-4f77-ab62-021c9cb27b61/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/61aca7e9-e8c1-4f77-ab62-021c9cb27b61/v1/original", + "variants/61aca7e9-e8c1-4f77-ab62-021c9cb27b61/v1/crop.jpg", + "variants/61aca7e9-e8c1-4f77-ab62-021c9cb27b61/v1/optimized.webp", + "variants/61aca7e9-e8c1-4f77-ab62-021c9cb27b61/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 15.090506, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:35:35.182252+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793021748467-0" + }, + "created_at": "2026-10-26 13:35:48.484209+00:00" + }, + { + "event": "processing", + "details": { + "worker": "ae623ceed7ea:bf90b170:0", + "attempt": 1, + "stream_id": "1793021744799-0" + }, + "created_at": "2026-10-26 13:35:49.488587+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 1, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:35:50.270974+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021748467-0" + }, + "created_at": "2026-10-26 13:35:50.356430+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:35:48.483055+00:00", + "stream_id": "1793021748467-0" + } + ] + }, + "infrastructure": [ + { + "id": "91b4b02fe068bfafc66c8295790d3f1461af53f72cf7be75be02f12cc1ad64ca", + "name": "mtusi2026lab5-api-1", + "hostname": "91b4b02fe068", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:34:08.07680889Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "8aeb8f8481ed607e6d1d18d19c64b55c7f478744f48e61be06792713f0eac67b", + "name": "mtusi2026lab5-api-2", + "hostname": "8aeb8f8481ed", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:34:07.605323424Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:34:12.05513654Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:21:15.687084123Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:21:23.472099949Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "93c098bd0b1fc31c50e0879250d007312928d9a3a0282a1a160aec3915437f99", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "93c098bd0b1f", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:35:45.500310015Z", + "restart_count": 1, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:20:11.844174641Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:21:01.323626814Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": false, + "started_at": "2026-10-26T13:20:11.405575488Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": {} + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:32:30.035280163Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:21:01.324968308Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "ae623ceed7eac52938444197e4dd89b4d6cc43cb33c5d6145b834a845415ba13", + "name": "mtusi2026lab5-worker-1", + "hostname": "ae623ceed7ea", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:35:47.774698207Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } + ] + }, + { + "case": "before_effect", + "repetition": 2, + "status": "PASS", + "elapsed_seconds": 45.969, + "fault": { + "status": "PASS", + "phase": "before_effect" + }, + "result": { + "status": "PASS", + "attachment": { + "id": "c9a5e847-5972-44af-8608-51752903163e", + "chat_id": "dd9d344f-b28d-4c15-bc49-1609f7072cd0", + "owner_id": "e01d97f7-e9d7-47f4-8466-00adafc769b2", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:36:07.572877Z", + "updated_at": "2026-10-26T13:36:35.052075Z" + }, + "job_id": "6416df23-aa19-4c4d-8bca-7ee62abc21f9", + "pipeline_version": 1, + "attempts": 2, + "current_keys": [ + "originals/c9a5e847-5972-44af-8608-51752903163e/v1/original", + "variants/c9a5e847-5972-44af-8608-51752903163e/v1/crop.jpg", + "variants/c9a5e847-5972-44af-8608-51752903163e/v1/optimized.webp", + "variants/c9a5e847-5972-44af-8608-51752903163e/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/c9a5e847-5972-44af-8608-51752903163e/v1/original", + "variants/c9a5e847-5972-44af-8608-51752903163e/v1/crop.jpg", + "variants/c9a5e847-5972-44af-8608-51752903163e/v1/optimized.webp", + "variants/c9a5e847-5972-44af-8608-51752903163e/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 27.478507, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:36:07.575890+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793021767683-0" + }, + "created_at": "2026-10-26 13:36:07.821097+00:00" + }, + { + "event": "processing", + "details": { + "worker": "b4b070e5f5d3:3d9dba95:0", + "attempt": 1, + "stream_id": "1793021767683-0" + }, + "created_at": "2026-10-26 13:36:16.447257+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "lease_expired", + "attempt": 1, + "delay_seconds": 1.485 + }, + "created_at": "2026-10-26 13:36:32.591801+00:00" + }, + { + "event": "lease_recovered", + "details": {}, + "created_at": "2026-10-26 13:36:32.593346+00:00" + }, + { + "event": "published", + "details": { + "attempt": 2, + "stream_id": "1793021794235-0" + }, + "created_at": "2026-10-26 13:36:34.272099+00:00" + }, + { + "event": "processing", + "details": { + "worker": "b4b070e5f5d3:497474ad:0", + "attempt": 2, + "stream_id": "1793021794235-0" + }, + "created_at": "2026-10-26 13:36:34.343533+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 2, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:36:35.053529+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:36:07.820249+00:00", + "stream_id": "1793021767683-0" + }, + { + "attempt": 2, + "published_at": "2026-10-26 13:36:34.270886+00:00", + "stream_id": "1793021794235-0" + } + ] + }, + "infrastructure": [ + { + "id": "91b4b02fe068bfafc66c8295790d3f1461af53f72cf7be75be02f12cc1ad64ca", + "name": "mtusi2026lab5-api-1", + "hostname": "91b4b02fe068", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:34:08.07680889Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "8aeb8f8481ed607e6d1d18d19c64b55c7f478744f48e61be06792713f0eac67b", + "name": "mtusi2026lab5-api-2", + "hostname": "8aeb8f8481ed", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:34:07.605323424Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:34:12.05513654Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:21:15.687084123Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:21:23.472099949Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "93c098bd0b1fc31c50e0879250d007312928d9a3a0282a1a160aec3915437f99", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "93c098bd0b1f", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:35:45.500310015Z", + "restart_count": 1, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:20:11.844174641Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:21:01.323626814Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": false, + "started_at": "2026-10-26T13:20:11.405575488Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": {} + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:32:30.035280163Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:21:01.324968308Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "b4b070e5f5d31dccff63a23787a6925a1f754963e43b85436a38be47d5e365df", + "name": "mtusi2026lab5-worker-1", + "hostname": "b4b070e5f5d3", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:36:17.173122307Z", + "restart_count": 1, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } + ] + }, + { + "case": "after_original", + "repetition": 2, + "status": "PASS", + "elapsed_seconds": 43.115, + "fault": { + "status": "PASS", + "phase": "after_original" + }, + "result": { + "status": "PASS", + "attachment": { + "id": "533207fe-2838-4513-8867-12f6192b76a2", + "chat_id": "96fabe23-88a2-4e66-bc1d-76ed78ba911b", + "owner_id": "a4d29b40-62fa-4310-8765-eba8a54a530a", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:36:50.390561Z", + "updated_at": "2026-10-26T13:37:17.038754Z" + }, + "job_id": "889f89bb-fa96-4ca8-9ad0-fd468ff43788", + "pipeline_version": 1, + "attempts": 2, + "current_keys": [ + "originals/533207fe-2838-4513-8867-12f6192b76a2/v1/original", + "variants/533207fe-2838-4513-8867-12f6192b76a2/v1/crop.jpg", + "variants/533207fe-2838-4513-8867-12f6192b76a2/v1/optimized.webp", + "variants/533207fe-2838-4513-8867-12f6192b76a2/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/533207fe-2838-4513-8867-12f6192b76a2/v1/original", + "variants/533207fe-2838-4513-8867-12f6192b76a2/v1/crop.jpg", + "variants/533207fe-2838-4513-8867-12f6192b76a2/v1/optimized.webp", + "variants/533207fe-2838-4513-8867-12f6192b76a2/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 26.647257, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:36:50.394832+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793021810571-0" + }, + "created_at": "2026-10-26 13:36:50.598761+00:00" + }, + { + "event": "processing", + "details": { + "worker": "e557a5c6c211:1bd20a5e:0", + "attempt": 1, + "stream_id": "1793021810571-0" + }, + "created_at": "2026-10-26 13:36:59.060549+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "lease_expired", + "attempt": 1, + "delay_seconds": 1.166 + }, + "created_at": "2026-10-26 13:37:14.867247+00:00" + }, + { + "event": "lease_recovered", + "details": {}, + "created_at": "2026-10-26 13:37:14.868561+00:00" + }, + { + "event": "published", + "details": { + "attempt": 2, + "stream_id": "1793021836244-0" + }, + "created_at": "2026-10-26 13:37:16.268383+00:00" + }, + { + "event": "processing", + "details": { + "worker": "e557a5c6c211:c50527b4:0", + "attempt": 2, + "stream_id": "1793021836244-0" + }, + "created_at": "2026-10-26 13:37:16.344169+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 2, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:37:17.040098+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:36:50.598018+00:00", + "stream_id": "1793021810571-0" + }, + { + "attempt": 2, + "published_at": "2026-10-26 13:37:16.267659+00:00", + "stream_id": "1793021836244-0" + } + ] + }, + "infrastructure": [ + { + "id": "91b4b02fe068bfafc66c8295790d3f1461af53f72cf7be75be02f12cc1ad64ca", + "name": "mtusi2026lab5-api-1", + "hostname": "91b4b02fe068", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:34:08.07680889Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "8aeb8f8481ed607e6d1d18d19c64b55c7f478744f48e61be06792713f0eac67b", + "name": "mtusi2026lab5-api-2", + "hostname": "8aeb8f8481ed", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:34:07.605323424Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:34:12.05513654Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:21:15.687084123Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:21:23.472099949Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "93c098bd0b1fc31c50e0879250d007312928d9a3a0282a1a160aec3915437f99", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "93c098bd0b1f", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:35:45.500310015Z", + "restart_count": 1, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:20:11.844174641Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:21:01.323626814Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": false, + "started_at": "2026-10-26T13:20:11.405575488Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": {} + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:32:30.035280163Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:21:01.324968308Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "e557a5c6c2112fd3906f99d33d6e38feb044a99e04229cc256f84bb342a80dd3", + "name": "mtusi2026lab5-worker-1", + "hostname": "e557a5c6c211", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:37:00.466504443Z", + "restart_count": 1, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } + ] + }, + { + "case": "after_effects", + "repetition": 2, + "status": "PASS", + "elapsed_seconds": 46.272, + "fault": { + "status": "PASS", + "phase": "after_effects" + }, + "result": { + "status": "PASS", + "attachment": { + "id": "0f573f91-c8d6-45b1-8fd0-66b85976dde9", + "chat_id": "dd35ec1f-7b63-4c8a-8f0e-682155953533", + "owner_id": "d1173619-c39b-477d-afd9-b74aa28ab95d", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:37:33.037326Z", + "updated_at": "2026-10-26T13:38:00.423101Z" + }, + "job_id": "e6e39566-6696-44eb-9d1a-215dcf286794", + "pipeline_version": 1, + "attempts": 2, + "current_keys": [ + "originals/0f573f91-c8d6-45b1-8fd0-66b85976dde9/v1/original", + "variants/0f573f91-c8d6-45b1-8fd0-66b85976dde9/v1/crop.jpg", + "variants/0f573f91-c8d6-45b1-8fd0-66b85976dde9/v1/optimized.webp", + "variants/0f573f91-c8d6-45b1-8fd0-66b85976dde9/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/0f573f91-c8d6-45b1-8fd0-66b85976dde9/v1/original", + "variants/0f573f91-c8d6-45b1-8fd0-66b85976dde9/v1/crop.jpg", + "variants/0f573f91-c8d6-45b1-8fd0-66b85976dde9/v1/optimized.webp", + "variants/0f573f91-c8d6-45b1-8fd0-66b85976dde9/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 27.385173, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:37:33.039444+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793021853065-0" + }, + "created_at": "2026-10-26 13:37:33.084455+00:00" + }, + { + "event": "processing", + "details": { + "worker": "014f932d45ba:46dacdc4:0", + "attempt": 1, + "stream_id": "1793021853065-0" + }, + "created_at": "2026-10-26 13:37:41.616361+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "lease_expired", + "attempt": 1, + "delay_seconds": 1.209 + }, + "created_at": "2026-10-26 13:37:58.220008+00:00" + }, + { + "event": "lease_recovered", + "details": {}, + "created_at": "2026-10-26 13:37:58.220691+00:00" + }, + { + "event": "published", + "details": { + "attempt": 2, + "stream_id": "1793021879607-0" + }, + "created_at": "2026-10-26 13:37:59.641258+00:00" + }, + { + "event": "processing", + "details": { + "worker": "014f932d45ba:a7869d33:0", + "attempt": 2, + "stream_id": "1793021879607-0" + }, + "created_at": "2026-10-26 13:37:59.704296+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 2, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:38:00.424141+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:37:33.083703+00:00", + "stream_id": "1793021853065-0" + }, + { + "attempt": 2, + "published_at": "2026-10-26 13:37:59.640410+00:00", + "stream_id": "1793021879607-0" + } + ] + }, + "infrastructure": [ + { + "id": "91b4b02fe068bfafc66c8295790d3f1461af53f72cf7be75be02f12cc1ad64ca", + "name": "mtusi2026lab5-api-1", + "hostname": "91b4b02fe068", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:34:08.07680889Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "8aeb8f8481ed607e6d1d18d19c64b55c7f478744f48e61be06792713f0eac67b", + "name": "mtusi2026lab5-api-2", + "hostname": "8aeb8f8481ed", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:34:07.605323424Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:34:12.05513654Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:21:15.687084123Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:21:23.472099949Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "93c098bd0b1fc31c50e0879250d007312928d9a3a0282a1a160aec3915437f99", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "93c098bd0b1f", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:35:45.500310015Z", + "restart_count": 1, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:20:11.844174641Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:21:01.323626814Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": false, + "started_at": "2026-10-26T13:20:11.405575488Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": {} + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:32:30.035280163Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:21:01.324968308Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "014f932d45ba90b0db5c05083b518d6c45f5a652dbb5a6bdef08baac7ec511a5", + "name": "mtusi2026lab5-worker-1", + "hostname": "014f932d45ba", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:37:43.168742088Z", + "restart_count": 1, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } + ] + }, + { + "case": "after_commit", + "repetition": 2, + "status": "PASS", + "elapsed_seconds": 35.696, + "fault": { + "status": "PASS", + "phase": "after_commit" + }, + "result": { + "status": "PASS", + "attachment": { + "id": "8e2a0d0d-6d7c-4449-afb5-3d1382fc1eee", + "chat_id": "dd3beab4-8f88-426a-afa9-85232ea5ee96", + "owner_id": "9ce78afb-c1ae-4a08-81fb-c55350322a3d", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:38:16.425411Z", + "updated_at": "2026-10-26T13:38:25.919211Z" + }, + "job_id": "15e35a61-4dce-4bed-9c54-eb848f92d82d", + "pipeline_version": 1, + "attempts": 1, + "current_keys": [ + "originals/8e2a0d0d-6d7c-4449-afb5-3d1382fc1eee/v1/original", + "variants/8e2a0d0d-6d7c-4449-afb5-3d1382fc1eee/v1/crop.jpg", + "variants/8e2a0d0d-6d7c-4449-afb5-3d1382fc1eee/v1/optimized.webp", + "variants/8e2a0d0d-6d7c-4449-afb5-3d1382fc1eee/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/8e2a0d0d-6d7c-4449-afb5-3d1382fc1eee/v1/original", + "variants/8e2a0d0d-6d7c-4449-afb5-3d1382fc1eee/v1/crop.jpg", + "variants/8e2a0d0d-6d7c-4449-afb5-3d1382fc1eee/v1/optimized.webp", + "variants/8e2a0d0d-6d7c-4449-afb5-3d1382fc1eee/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 9.493077, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:38:16.428574+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793021896609-0" + }, + "created_at": "2026-10-26 13:38:16.640739+00:00" + }, + { + "event": "processing", + "details": { + "worker": "c6351177346e:5d0d101b:0", + "attempt": 1, + "stream_id": "1793021896609-0" + }, + "created_at": "2026-10-26 13:38:25.278501+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 1, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:38:25.920281+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:38:16.639373+00:00", + "stream_id": "1793021896609-0" + } + ] + }, + "infrastructure": [ + { + "id": "91b4b02fe068bfafc66c8295790d3f1461af53f72cf7be75be02f12cc1ad64ca", + "name": "mtusi2026lab5-api-1", + "hostname": "91b4b02fe068", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:34:08.07680889Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "8aeb8f8481ed607e6d1d18d19c64b55c7f478744f48e61be06792713f0eac67b", + "name": "mtusi2026lab5-api-2", + "hostname": "8aeb8f8481ed", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:34:07.605323424Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:34:12.05513654Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:21:15.687084123Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:21:23.472099949Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "93c098bd0b1fc31c50e0879250d007312928d9a3a0282a1a160aec3915437f99", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "93c098bd0b1f", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:35:45.500310015Z", + "restart_count": 1, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:20:11.844174641Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:21:01.323626814Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": false, + "started_at": "2026-10-26T13:20:11.405575488Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": {} + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:32:30.035280163Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:21:01.324968308Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "c6351177346e68747e31b85530ba809f67b2b50f482ecbfa57a95fdbfa016910", + "name": "mtusi2026lab5-worker-1", + "hostname": "c6351177346e", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:38:26.614004447Z", + "restart_count": 1, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } + ] + }, + { + "case": "duplicates_and_invalid_carrier", + "repetition": 2, + "status": "PASS", + "elapsed_seconds": 37.623, + "duplicates": { + "status": "PASS", + "acked": 16 + }, + "invalid_carrier": { + "status": "PASS", + "error_code": "invalid_job" + }, + "result": { + "status": "PASS", + "attachment": { + "id": "70fd4db2-14c7-4ccf-8c0e-09c85bdefb5e", + "chat_id": "b1b1b819-017f-4d51-85e7-18e7e359a1cb", + "owner_id": "ad9a2280-5fba-41cd-9b09-7666e7b7e783", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:38:44.969890Z", + "updated_at": "2026-10-26T13:38:45.785524Z" + }, + "job_id": "d664a6a4-60db-4e59-8a40-0a81eaa13ad3", + "pipeline_version": 1, + "attempts": 1, + "current_keys": [ + "originals/70fd4db2-14c7-4ccf-8c0e-09c85bdefb5e/v1/original", + "variants/70fd4db2-14c7-4ccf-8c0e-09c85bdefb5e/v1/crop.jpg", + "variants/70fd4db2-14c7-4ccf-8c0e-09c85bdefb5e/v1/optimized.webp", + "variants/70fd4db2-14c7-4ccf-8c0e-09c85bdefb5e/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/70fd4db2-14c7-4ccf-8c0e-09c85bdefb5e/v1/original", + "variants/70fd4db2-14c7-4ccf-8c0e-09c85bdefb5e/v1/crop.jpg", + "variants/70fd4db2-14c7-4ccf-8c0e-09c85bdefb5e/v1/optimized.webp", + "variants/70fd4db2-14c7-4ccf-8c0e-09c85bdefb5e/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 0.814969, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:38:44.972518+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793021925093-0" + }, + "created_at": "2026-10-26 13:38:45.116746+00:00" + }, + { + "event": "processing", + "details": { + "worker": "c6351177346e:befc3847:0", + "attempt": 1, + "stream_id": "1793021925093-0" + }, + "created_at": "2026-10-26 13:38:45.126847+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 1, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:38:45.787124+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021940997-0" + }, + "created_at": "2026-10-26 13:39:01.062905+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021941006-0" + }, + "created_at": "2026-10-26 13:39:01.134664+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021941010-0" + }, + "created_at": "2026-10-26 13:39:01.213961+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021941012-0" + }, + "created_at": "2026-10-26 13:39:01.281607+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021941014-0" + }, + "created_at": "2026-10-26 13:39:01.352773+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021941020-0" + }, + "created_at": "2026-10-26 13:39:01.422199+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021941022-0" + }, + "created_at": "2026-10-26 13:39:01.490493+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021941025-0" + }, + "created_at": "2026-10-26 13:39:01.557585+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021941028-0" + }, + "created_at": "2026-10-26 13:39:01.615609+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021941030-0" + }, + "created_at": "2026-10-26 13:39:01.680464+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021941033-0" + }, + "created_at": "2026-10-26 13:39:01.766840+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021941036-0" + }, + "created_at": "2026-10-26 13:39:01.876348+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021941039-0" + }, + "created_at": "2026-10-26 13:39:01.945597+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021941042-0" + }, + "created_at": "2026-10-26 13:39:02.020278+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021941044-0" + }, + "created_at": "2026-10-26 13:39:02.088313+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793021941049-0" + }, + "created_at": "2026-10-26 13:39:02.152224+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:38:45.116081+00:00", + "stream_id": "1793021925093-0" + } + ] + } + }, + { + "case": "reorder_new_before_old", + "repetition": 2, + "status": "PASS", + "elapsed_seconds": 56.452, + "result": { + "status": "PASS", + "attachment": { + "id": "42aac211-5a10-4271-9e11-301ee25ff952", + "chat_id": "7004ac99-5805-4bc2-a01c-727b88cd8f3e", + "owner_id": "793c39d5-cbc8-4443-ab92-09150f7a5a96", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "7c48d87d777b22ad9fb287b08a98625f17a30dc88f07769e16cd132e83b70537", + "size_bytes": 4786, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "c22eb305df23f9f08f812ff14e0b20cc94f060cb36058e8a6818f82130d59599", + "size_bytes": 1837, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "40128c713a9d3f9f5ef480b5630743e89616384f04a6eda5921baf5e5c46f34c", + "size_bytes": 2808, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:39:38.170918Z", + "updated_at": "2026-10-26T13:39:56.160762Z" + }, + "job_id": "5db6985e-53ea-42cc-a099-9499f79d2d5b", + "pipeline_version": 2, + "attempts": 1, + "current_keys": [ + "originals/42aac211-5a10-4271-9e11-301ee25ff952/v2/original", + "variants/42aac211-5a10-4271-9e11-301ee25ff952/v2/crop.jpg", + "variants/42aac211-5a10-4271-9e11-301ee25ff952/v2/optimized.webp", + "variants/42aac211-5a10-4271-9e11-301ee25ff952/v2/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/42aac211-5a10-4271-9e11-301ee25ff952/v2/original", + "variants/42aac211-5a10-4271-9e11-301ee25ff952/v2/crop.jpg", + "variants/42aac211-5a10-4271-9e11-301ee25ff952/v2/optimized.webp", + "variants/42aac211-5a10-4271-9e11-301ee25ff952/v2/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "7c48d87d777b22ad9fb287b08a98625f17a30dc88f07769e16cd132e83b70537", + "crop": "c22eb305df23f9f08f812ff14e0b20cc94f060cb36058e8a6818f82130d59599", + "optimized": "40128c713a9d3f9f5ef480b5630743e89616384f04a6eda5921baf5e5c46f34c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 13.781479, + "events": [ + { + "event": "version_created", + "details": { + "pipeline_version": 2 + }, + "created_at": "2026-10-26 13:39:42.383256+00:00" + }, + { + "event": "processing", + "details": { + "worker": "610afb3c2691:a51201ad:0", + "attempt": 1, + "stream_id": "1793021987264-0" + }, + "created_at": "2026-10-26 13:39:55.412736+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 1, + "pipeline_version": 2 + }, + "created_at": "2026-10-26 13:39:56.161708+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": null, + "stream_id": null + } + ] + }, + "old_job": { + "job": { + "id": "efaf5012-e53e-437a-8f6a-a5bdae13dfa1", + "attachment_id": "42aac211-5a10-4271-9e11-301ee25ff952", + "pipeline_version": 1, + "status": "superseded", + "staging_key": "staging/42aac211-5a10-4271-9e11-301ee25ff952/efaf5012-e53e-437a-8f6a-a5bdae13dfa1", + "attempts": 0, + "budget_start": 0, + "available_at": "2026-10-26 13:39:38.171951+00:00", + "lease_until": null, + "lease_token": null, + "error_code": null, + "staged_deleted_at": null, + "created_at": "2026-10-26 13:39:38.171951+00:00", + "updated_at": "2026-10-26 13:39:42.377021+00:00" + }, + "attachment": { + "status": "ready", + "pipeline_version": 2, + "current_job_id": "5db6985e-53ea-42cc-a099-9499f79d2d5b", + "object_key": "originals/42aac211-5a10-4271-9e11-301ee25ff952/v2/original", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "7c48d87d777b22ad9fb287b08a98625f17a30dc88f07769e16cd132e83b70537", + "size_bytes": 4786, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "c22eb305df23f9f08f812ff14e0b20cc94f060cb36058e8a6818f82130d59599", + "size_bytes": 1837, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "40128c713a9d3f9f5ef480b5630743e89616384f04a6eda5921baf5e5c46f34c", + "size_bytes": 2808, + "content_type": "image/webp" + } + ], + "variant_keys": { + "crop": "variants/42aac211-5a10-4271-9e11-301ee25ff952/v2/crop.jpg", + "optimized": "variants/42aac211-5a10-4271-9e11-301ee25ff952/v2/optimized.webp", + "thumbnail": "variants/42aac211-5a10-4271-9e11-301ee25ff952/v2/thumbnail.jpg" + }, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "size_bytes": 111817 + }, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:39:38.175565+00:00" + }, + { + "event": "stale_ignored", + "details": { + "stream_id": "1793021991959-0", + "current_version": 2 + }, + "created_at": "2026-10-26 13:39:56.213828+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": null, + "stream_id": null + } + ], + "faults": [] + } + }, + { + "case": "stale_after_new_ready", + "repetition": 2, + "status": "PASS", + "elapsed_seconds": 54.266, + "result": { + "status": "PASS", + "attachment": { + "id": "59e4e51e-c97e-4f3d-a155-153c6906d935", + "chat_id": "52f7b21b-16ac-48a1-a289-5d6015ee57cc", + "owner_id": "704a96f0-e7b4-4391-9c3c-5cc1691cbbe4", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "7c48d87d777b22ad9fb287b08a98625f17a30dc88f07769e16cd132e83b70537", + "size_bytes": 4786, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "c22eb305df23f9f08f812ff14e0b20cc94f060cb36058e8a6818f82130d59599", + "size_bytes": 1837, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "40128c713a9d3f9f5ef480b5630743e89616384f04a6eda5921baf5e5c46f34c", + "size_bytes": 2808, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:40:16.361824Z", + "updated_at": "2026-10-26T13:40:33.435161Z" + }, + "job_id": "2bc59a16-e2a3-4e87-9672-43129166abb0", + "pipeline_version": 2, + "attempts": 1, + "current_keys": [ + "originals/59e4e51e-c97e-4f3d-a155-153c6906d935/v2/original", + "variants/59e4e51e-c97e-4f3d-a155-153c6906d935/v2/crop.jpg", + "variants/59e4e51e-c97e-4f3d-a155-153c6906d935/v2/optimized.webp", + "variants/59e4e51e-c97e-4f3d-a155-153c6906d935/v2/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/59e4e51e-c97e-4f3d-a155-153c6906d935/v1/original", + "originals/59e4e51e-c97e-4f3d-a155-153c6906d935/v2/original", + "variants/59e4e51e-c97e-4f3d-a155-153c6906d935/v1/crop.jpg", + "variants/59e4e51e-c97e-4f3d-a155-153c6906d935/v1/optimized.webp", + "variants/59e4e51e-c97e-4f3d-a155-153c6906d935/v1/thumbnail.jpg", + "variants/59e4e51e-c97e-4f3d-a155-153c6906d935/v2/crop.jpg", + "variants/59e4e51e-c97e-4f3d-a155-153c6906d935/v2/optimized.webp", + "variants/59e4e51e-c97e-4f3d-a155-153c6906d935/v2/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "7c48d87d777b22ad9fb287b08a98625f17a30dc88f07769e16cd132e83b70537", + "crop": "c22eb305df23f9f08f812ff14e0b20cc94f060cb36058e8a6818f82130d59599", + "optimized": "40128c713a9d3f9f5ef480b5630743e89616384f04a6eda5921baf5e5c46f34c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 0.982759, + "events": [ + { + "event": "version_created", + "details": { + "pipeline_version": 2 + }, + "created_at": "2026-10-26 13:40:32.455683+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793022032581-0" + }, + "created_at": "2026-10-26 13:40:32.622773+00:00" + }, + { + "event": "processing", + "details": { + "worker": "610afb3c2691:a51201ad:0", + "attempt": 1, + "stream_id": "1793022032581-0" + }, + "created_at": "2026-10-26 13:40:32.684530+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 1, + "pipeline_version": 2 + }, + "created_at": "2026-10-26 13:40:33.436284+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:40:32.621566+00:00", + "stream_id": "1793022032581-0" + } + ] + }, + "old_job": { + "job": { + "id": "b812bf9b-6d56-4ef5-942a-eaa654bcb611", + "attachment_id": "59e4e51e-c97e-4f3d-a155-153c6906d935", + "pipeline_version": 1, + "status": "ready", + "staging_key": "staging/59e4e51e-c97e-4f3d-a155-153c6906d935/b812bf9b-6d56-4ef5-942a-eaa654bcb611", + "attempts": 1, + "budget_start": 0, + "available_at": "2026-10-26 13:40:16.362829+00:00", + "lease_until": null, + "lease_token": null, + "error_code": null, + "staged_deleted_at": "2026-10-26 13:40:17.316649+00:00", + "created_at": "2026-10-26 13:40:16.362829+00:00", + "updated_at": "2026-10-26 13:40:17.286945+00:00" + }, + "attachment": { + "status": "ready", + "pipeline_version": 2, + "current_job_id": "2bc59a16-e2a3-4e87-9672-43129166abb0", + "object_key": "originals/59e4e51e-c97e-4f3d-a155-153c6906d935/v2/original", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "7c48d87d777b22ad9fb287b08a98625f17a30dc88f07769e16cd132e83b70537", + "size_bytes": 4786, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "c22eb305df23f9f08f812ff14e0b20cc94f060cb36058e8a6818f82130d59599", + "size_bytes": 1837, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "40128c713a9d3f9f5ef480b5630743e89616384f04a6eda5921baf5e5c46f34c", + "size_bytes": 2808, + "content_type": "image/webp" + } + ], + "variant_keys": { + "crop": "variants/59e4e51e-c97e-4f3d-a155-153c6906d935/v2/crop.jpg", + "optimized": "variants/59e4e51e-c97e-4f3d-a155-153c6906d935/v2/optimized.webp", + "thumbnail": "variants/59e4e51e-c97e-4f3d-a155-153c6906d935/v2/thumbnail.jpg" + }, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "size_bytes": 111817 + }, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:40:16.365671+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793022016525-0" + }, + "created_at": "2026-10-26 13:40:16.550880+00:00" + }, + { + "event": "processing", + "details": { + "worker": "610afb3c2691:a51201ad:0", + "attempt": 1, + "stream_id": "1793022016525-0" + }, + "created_at": "2026-10-26 13:40:16.570657+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 1, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:40:17.287634+00:00" + }, + { + "event": "stale_ignored", + "details": { + "stream_id": "1793022047226-0", + "current_version": 2 + }, + "created_at": "2026-10-26 13:40:47.267232+00:00" + }, + { + "event": "stale_ignored", + "details": { + "stream_id": "1793022047240-0", + "current_version": 2 + }, + "created_at": "2026-10-26 13:40:47.311913+00:00" + }, + { + "event": "stale_ignored", + "details": { + "stream_id": "1793022047245-0", + "current_version": 2 + }, + "created_at": "2026-10-26 13:40:47.352428+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:40:16.549859+00:00", + "stream_id": "1793022016525-0" + } + ], + "faults": [] + } + }, + { + "case": "permanent_failure_replay", + "repetition": 2, + "status": "PASS", + "elapsed_seconds": 54.281, + "failed": { + "status": "PASS", + "error_code": "staging_missing", + "attempts": 1, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:41:13.573996+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793022073724-0" + }, + "created_at": "2026-10-26 13:41:13.748944+00:00" + }, + { + "event": "processing", + "details": { + "worker": "d7aa5e9a5321:116c38ce:0", + "attempt": 1, + "stream_id": "1793022073724-0" + }, + "created_at": "2026-10-26 13:41:22.135917+00:00" + }, + { + "event": "failed", + "details": { + "code": "staging_missing", + "attempt": 1 + }, + "created_at": "2026-10-26 13:41:22.240217+00:00" + } + ] + }, + "ready_replay": { + "status": "noop", + "reason": "already_ready" + }, + "result": { + "status": "PASS", + "attachment": { + "id": "5959f973-3a5b-4615-9e14-7c88ad67d8c6", + "chat_id": "3a11d7a0-474a-4353-8786-8512509654b3", + "owner_id": "30abeb0e-7d7c-41e6-9767-1fd65f42c28f", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:41:13.569737Z", + "updated_at": "2026-10-26T13:41:40.009018Z" + }, + "job_id": "44bc9f98-4dab-4d6a-acb4-0040eae3d1cb", + "pipeline_version": 1, + "attempts": 2, + "current_keys": [ + "originals/5959f973-3a5b-4615-9e14-7c88ad67d8c6/v1/original", + "variants/5959f973-3a5b-4615-9e14-7c88ad67d8c6/v1/crop.jpg", + "variants/5959f973-3a5b-4615-9e14-7c88ad67d8c6/v1/optimized.webp", + "variants/5959f973-3a5b-4615-9e14-7c88ad67d8c6/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/5959f973-3a5b-4615-9e14-7c88ad67d8c6/v1/original", + "variants/5959f973-3a5b-4615-9e14-7c88ad67d8c6/v1/crop.jpg", + "variants/5959f973-3a5b-4615-9e14-7c88ad67d8c6/v1/optimized.webp", + "variants/5959f973-3a5b-4615-9e14-7c88ad67d8c6/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 26.438432, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:41:13.573996+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793022073724-0" + }, + "created_at": "2026-10-26 13:41:13.748944+00:00" + }, + { + "event": "processing", + "details": { + "worker": "d7aa5e9a5321:116c38ce:0", + "attempt": 1, + "stream_id": "1793022073724-0" + }, + "created_at": "2026-10-26 13:41:22.135917+00:00" + }, + { + "event": "failed", + "details": { + "code": "staging_missing", + "attempt": 1 + }, + "created_at": "2026-10-26 13:41:22.240217+00:00" + }, + { + "event": "operator_replay", + "details": { + "next_attempt": 2 + }, + "created_at": "2026-10-26 13:41:39.209303+00:00" + }, + { + "event": "published", + "details": { + "attempt": 2, + "stream_id": "1793022099271-0" + }, + "created_at": "2026-10-26 13:41:39.301858+00:00" + }, + { + "event": "processing", + "details": { + "worker": "d7aa5e9a5321:116c38ce:0", + "attempt": 2, + "stream_id": "1793022099271-0" + }, + "created_at": "2026-10-26 13:41:39.317367+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 2, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:41:40.015025+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:41:13.748148+00:00", + "stream_id": "1793022073724-0" + }, + { + "attempt": 2, + "published_at": "2026-10-26 13:41:39.301081+00:00", + "stream_id": "1793022099271-0" + } + ] + } + }, + { + "case": "bounded_retry_and_replay", + "repetition": 2, + "status": "PASS", + "elapsed_seconds": 71.052, + "unready": { + "status": "PASS", + "readiness_and_content": [ + 503, + 503 + ] + }, + "failed": { + "status": "PASS", + "error_code": "retry_exhausted", + "attempts": 5, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:42:05.172514+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793022125243-0" + }, + "created_at": "2026-10-26 13:42:05.264785+00:00" + }, + { + "event": "processing", + "details": { + "worker": "506894e33225:3ffd86ed:0", + "attempt": 1, + "stream_id": "1793022125243-0" + }, + "created_at": "2026-10-26 13:42:17.935465+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "storage_unavailable", + "attempt": 1, + "delay_seconds": 1.211 + }, + "created_at": "2026-10-26 13:42:19.002980+00:00" + }, + { + "event": "published", + "details": { + "attempt": 2, + "stream_id": "1793022140448-0" + }, + "created_at": "2026-10-26 13:42:20.481819+00:00" + }, + { + "event": "processing", + "details": { + "worker": "506894e33225:3ffd86ed:0", + "attempt": 2, + "stream_id": "1793022140448-0" + }, + "created_at": "2026-10-26 13:42:20.512613+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "storage_unavailable", + "attempt": 2, + "delay_seconds": 2.168 + }, + "created_at": "2026-10-26 13:42:21.543337+00:00" + }, + { + "event": "published", + "details": { + "attempt": 3, + "stream_id": "1793022143939-0" + }, + "created_at": "2026-10-26 13:42:23.963404+00:00" + }, + { + "event": "processing", + "details": { + "worker": "506894e33225:3ffd86ed:0", + "attempt": 3, + "stream_id": "1793022143939-0" + }, + "created_at": "2026-10-26 13:42:23.981040+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "storage_unavailable", + "attempt": 3, + "delay_seconds": 4.202 + }, + "created_at": "2026-10-26 13:42:25.004515+00:00" + }, + { + "event": "published", + "details": { + "attempt": 4, + "stream_id": "1793022149403-0" + }, + "created_at": "2026-10-26 13:42:29.426201+00:00" + }, + { + "event": "processing", + "details": { + "worker": "506894e33225:3ffd86ed:0", + "attempt": 4, + "stream_id": "1793022149403-0" + }, + "created_at": "2026-10-26 13:42:29.452705+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "storage_unavailable", + "attempt": 4, + "delay_seconds": 8.153 + }, + "created_at": "2026-10-26 13:42:30.478645+00:00" + }, + { + "event": "published", + "details": { + "attempt": 5, + "stream_id": "1793022158788-0" + }, + "created_at": "2026-10-26 13:42:38.814347+00:00" + }, + { + "event": "processing", + "details": { + "worker": "506894e33225:3ffd86ed:0", + "attempt": 5, + "stream_id": "1793022158788-0" + }, + "created_at": "2026-10-26 13:42:38.834988+00:00" + }, + { + "event": "failed", + "details": { + "code": "retry_exhausted", + "attempt": 5 + }, + "created_at": "2026-10-26 13:42:39.860831+00:00" + } + ] + }, + "result": { + "status": "PASS", + "attachment": { + "id": "c31e1baf-d371-4069-8a48-a82218231092", + "chat_id": "d3f520f7-80cb-4a1e-a9a5-6276567e4fe3", + "owner_id": "d2de97bc-0eb0-415e-82fa-51fbaee4ceb7", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:42:05.168949Z", + "updated_at": "2026-10-26T13:42:54.009501Z" + }, + "job_id": "5ddaa776-51fc-4e27-a6c5-c0ab428693f1", + "pipeline_version": 1, + "attempts": 6, + "current_keys": [ + "originals/c31e1baf-d371-4069-8a48-a82218231092/v1/original", + "variants/c31e1baf-d371-4069-8a48-a82218231092/v1/crop.jpg", + "variants/c31e1baf-d371-4069-8a48-a82218231092/v1/optimized.webp", + "variants/c31e1baf-d371-4069-8a48-a82218231092/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/c31e1baf-d371-4069-8a48-a82218231092/v1/original", + "variants/c31e1baf-d371-4069-8a48-a82218231092/v1/crop.jpg", + "variants/c31e1baf-d371-4069-8a48-a82218231092/v1/optimized.webp", + "variants/c31e1baf-d371-4069-8a48-a82218231092/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 48.839615, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:42:05.172514+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793022125243-0" + }, + "created_at": "2026-10-26 13:42:05.264785+00:00" + }, + { + "event": "processing", + "details": { + "worker": "506894e33225:3ffd86ed:0", + "attempt": 1, + "stream_id": "1793022125243-0" + }, + "created_at": "2026-10-26 13:42:17.935465+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "storage_unavailable", + "attempt": 1, + "delay_seconds": 1.211 + }, + "created_at": "2026-10-26 13:42:19.002980+00:00" + }, + { + "event": "published", + "details": { + "attempt": 2, + "stream_id": "1793022140448-0" + }, + "created_at": "2026-10-26 13:42:20.481819+00:00" + }, + { + "event": "processing", + "details": { + "worker": "506894e33225:3ffd86ed:0", + "attempt": 2, + "stream_id": "1793022140448-0" + }, + "created_at": "2026-10-26 13:42:20.512613+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "storage_unavailable", + "attempt": 2, + "delay_seconds": 2.168 + }, + "created_at": "2026-10-26 13:42:21.543337+00:00" + }, + { + "event": "published", + "details": { + "attempt": 3, + "stream_id": "1793022143939-0" + }, + "created_at": "2026-10-26 13:42:23.963404+00:00" + }, + { + "event": "processing", + "details": { + "worker": "506894e33225:3ffd86ed:0", + "attempt": 3, + "stream_id": "1793022143939-0" + }, + "created_at": "2026-10-26 13:42:23.981040+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "storage_unavailable", + "attempt": 3, + "delay_seconds": 4.202 + }, + "created_at": "2026-10-26 13:42:25.004515+00:00" + }, + { + "event": "published", + "details": { + "attempt": 4, + "stream_id": "1793022149403-0" + }, + "created_at": "2026-10-26 13:42:29.426201+00:00" + }, + { + "event": "processing", + "details": { + "worker": "506894e33225:3ffd86ed:0", + "attempt": 4, + "stream_id": "1793022149403-0" + }, + "created_at": "2026-10-26 13:42:29.452705+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "storage_unavailable", + "attempt": 4, + "delay_seconds": 8.153 + }, + "created_at": "2026-10-26 13:42:30.478645+00:00" + }, + { + "event": "published", + "details": { + "attempt": 5, + "stream_id": "1793022158788-0" + }, + "created_at": "2026-10-26 13:42:38.814347+00:00" + }, + { + "event": "processing", + "details": { + "worker": "506894e33225:3ffd86ed:0", + "attempt": 5, + "stream_id": "1793022158788-0" + }, + "created_at": "2026-10-26 13:42:38.834988+00:00" + }, + { + "event": "failed", + "details": { + "code": "retry_exhausted", + "attempt": 5 + }, + "created_at": "2026-10-26 13:42:39.860831+00:00" + }, + { + "event": "operator_replay", + "details": { + "next_attempt": 6 + }, + "created_at": "2026-10-26 13:42:52.941732+00:00" + }, + { + "event": "published", + "details": { + "attempt": 6, + "stream_id": "1793022173187-0" + }, + "created_at": "2026-10-26 13:42:53.215859+00:00" + }, + { + "event": "processing", + "details": { + "worker": "506894e33225:3ffd86ed:0", + "attempt": 6, + "stream_id": "1793022173187-0" + }, + "created_at": "2026-10-26 13:42:53.244562+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 6, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:42:54.011256+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:42:05.264043+00:00", + "stream_id": "1793022125243-0" + }, + { + "attempt": 2, + "published_at": "2026-10-26 13:42:20.480878+00:00", + "stream_id": "1793022140448-0" + }, + { + "attempt": 3, + "published_at": "2026-10-26 13:42:23.962610+00:00", + "stream_id": "1793022143939-0" + }, + { + "attempt": 4, + "published_at": "2026-10-26 13:42:29.425442+00:00", + "stream_id": "1793022149403-0" + }, + { + "attempt": 5, + "published_at": "2026-10-26 13:42:38.813657+00:00", + "stream_id": "1793022158788-0" + }, + { + "attempt": 6, + "published_at": "2026-10-26 13:42:53.214837+00:00", + "stream_id": "1793022173187-0" + } + ] + } + }, + { + "case": "staging_retention_and_privacy", + "repetition": 2, + "status": "PASS", + "elapsed_seconds": 36.23, + "cleanup": { + "status": "PASS", + "orphan_removed": true, + "fresh_and_queued_preserved": true, + "dry_run": { + "mode": "dry-run", + "retention_seconds": 2, + "objects_scanned": 4, + "actions": [ + { + "key": "staging/42aac211-5a10-4271-9e11-301ee25ff952/efaf5012-e53e-437a-8f6a-a5bdae13dfa1", + "reason": "retention", + "applied": false + }, + { + "key": "staging/64bb7d19-f0d1-4f24-b199-9239c273a638/1241eb3a-3ce0-490c-837b-5b5cd6286a8f", + "reason": "retention", + "applied": false + } + ] + }, + "apply": { + "mode": "apply", + "retention_seconds": 2, + "objects_scanned": 4, + "actions": [ + { + "key": "staging/42aac211-5a10-4271-9e11-301ee25ff952/efaf5012-e53e-437a-8f6a-a5bdae13dfa1", + "reason": "retention", + "applied": true + }, + { + "key": "staging/64bb7d19-f0d1-4f24-b199-9239c273a638/1241eb3a-3ce0-490c-837b-5b5cd6286a8f", + "reason": "retention", + "applied": true + } + ] + } + }, + "privacy": { + "status": "PASS", + "anonymous_get": 403 + }, + "result": { + "status": "PASS", + "attachment": { + "id": "d84c110f-b6db-4419-821a-a9b852b22ff7", + "chat_id": "ecee945b-2079-43fe-80e3-74a2c84295b9", + "owner_id": "00a5db51-3ba7-4b83-8003-475d03ee6902", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:43:14.009385Z", + "updated_at": "2026-10-26T13:43:26.748910Z" + }, + "job_id": "0f2293f1-715c-4b07-91b4-c0066fdc7186", + "pipeline_version": 1, + "attempts": 1, + "current_keys": [ + "originals/d84c110f-b6db-4419-821a-a9b852b22ff7/v1/original", + "variants/d84c110f-b6db-4419-821a-a9b852b22ff7/v1/crop.jpg", + "variants/d84c110f-b6db-4419-821a-a9b852b22ff7/v1/optimized.webp", + "variants/d84c110f-b6db-4419-821a-a9b852b22ff7/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/d84c110f-b6db-4419-821a-a9b852b22ff7/v1/original", + "variants/d84c110f-b6db-4419-821a-a9b852b22ff7/v1/crop.jpg", + "variants/d84c110f-b6db-4419-821a-a9b852b22ff7/v1/optimized.webp", + "variants/d84c110f-b6db-4419-821a-a9b852b22ff7/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 12.73872, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:43:14.013670+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793022194031-0" + }, + "created_at": "2026-10-26 13:43:14.058913+00:00" + }, + { + "event": "processing", + "details": { + "worker": "0d9db4075662:3ca61680:0", + "attempt": 1, + "stream_id": "1793022194031-0" + }, + "created_at": "2026-10-26 13:43:26.053858+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 1, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:43:26.749855+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:43:14.056982+00:00", + "stream_id": "1793022194031-0" + } + ] + } + }, + { + "case": "accepted_restart_broker_api", + "repetition": 3, + "status": "PASS", + "elapsed_seconds": 58.798, + "queued": { + "status": "PASS", + "attachment_id": "e90fa936-2ed3-4926-a59d-1d7b71b0c95d", + "job_id": "279b5b67-163f-49fc-9016-18e0012d3894", + "accepted_status": 202, + "content_status": 409 + }, + "broker_preserved": { + "status": "PASS", + "stream_ids": [ + "1793022228896-0" + ] + }, + "result": { + "status": "PASS", + "attachment": { + "id": "e90fa936-2ed3-4926-a59d-1d7b71b0c95d", + "chat_id": "13c6c238-453f-4207-b5c3-3e433f8a650a", + "owner_id": "ffd3ff75-b817-4067-86a4-536db8393f7f", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:43:48.725708Z", + "updated_at": "2026-10-26T13:44:27.853175Z" + }, + "job_id": "279b5b67-163f-49fc-9016-18e0012d3894", + "pipeline_version": 1, + "attempts": 1, + "current_keys": [ + "originals/e90fa936-2ed3-4926-a59d-1d7b71b0c95d/v1/original", + "variants/e90fa936-2ed3-4926-a59d-1d7b71b0c95d/v1/crop.jpg", + "variants/e90fa936-2ed3-4926-a59d-1d7b71b0c95d/v1/optimized.webp", + "variants/e90fa936-2ed3-4926-a59d-1d7b71b0c95d/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/e90fa936-2ed3-4926-a59d-1d7b71b0c95d/v1/original", + "variants/e90fa936-2ed3-4926-a59d-1d7b71b0c95d/v1/crop.jpg", + "variants/e90fa936-2ed3-4926-a59d-1d7b71b0c95d/v1/optimized.webp", + "variants/e90fa936-2ed3-4926-a59d-1d7b71b0c95d/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 39.126732, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:43:48.728890+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793022228896-0" + }, + "created_at": "2026-10-26 13:43:48.922580+00:00" + }, + { + "event": "processing", + "details": { + "worker": "bb2074370a2a:2419efbc:0", + "attempt": 1, + "stream_id": "1793022228896-0" + }, + "created_at": "2026-10-26 13:44:27.191290+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 1, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:44:27.854206+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:43:48.920685+00:00", + "stream_id": "1793022228896-0" + } + ] + }, + "infrastructure": [ + { + "id": "6d5ccd7883e55d222f7bcb15064b8a7c0d5722ca54f2c941d4ba35b1e1ef4128", + "name": "mtusi2026lab5-api-1", + "hostname": "6d5ccd7883e5", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:44:11.837673643Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "768f094b3536247e53a7fa69357a507504aa11cd094149723e47ec1758b0805d", + "name": "mtusi2026lab5-api-2", + "hostname": "768f094b3536", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:44:12.329596734Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:44:16.426131982Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:21:15.687084123Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:21:23.472099949Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "93c098bd0b1fc31c50e0879250d007312928d9a3a0282a1a160aec3915437f99", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "93c098bd0b1f", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:44:24.601592475Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:20:11.844174641Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:21:01.323626814Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": false, + "started_at": "2026-10-26T13:20:11.405575488Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": {} + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:42:41.359086382Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:21:01.324968308Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "bb2074370a2a888f81ee7ee45ce097b7e6e1c67ffaa6b68f38e96703352e4d91", + "name": "mtusi2026lab5-worker-1", + "hostname": "bb2074370a2a", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:44:25.403785348Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } + ] + }, + { + "case": "before_publish", + "repetition": 3, + "status": "PASS", + "elapsed_seconds": 44.345, + "fault": { + "status": "PASS", + "phase": "before_publish" + }, + "result": { + "status": "PASS", + "attachment": { + "id": "39df3076-d0eb-4b87-b7df-0d8aef4356dc", + "chat_id": "139a4279-6871-4b33-90ca-e3f65473abd2", + "owner_id": "b8ffda6b-c242-4f7d-ba9d-ea772aceff43", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:44:55.474188Z", + "updated_at": "2026-10-26T13:45:09.279580Z" + }, + "job_id": "5dabfbbe-e0fa-43bc-ab0d-abdef4fa7996", + "pipeline_version": 1, + "attempts": 1, + "current_keys": [ + "originals/39df3076-d0eb-4b87-b7df-0d8aef4356dc/v1/original", + "variants/39df3076-d0eb-4b87-b7df-0d8aef4356dc/v1/crop.jpg", + "variants/39df3076-d0eb-4b87-b7df-0d8aef4356dc/v1/optimized.webp", + "variants/39df3076-d0eb-4b87-b7df-0d8aef4356dc/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/39df3076-d0eb-4b87-b7df-0d8aef4356dc/v1/original", + "variants/39df3076-d0eb-4b87-b7df-0d8aef4356dc/v1/crop.jpg", + "variants/39df3076-d0eb-4b87-b7df-0d8aef4356dc/v1/optimized.webp", + "variants/39df3076-d0eb-4b87-b7df-0d8aef4356dc/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 13.804601, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:44:55.477536+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793022307530-0" + }, + "created_at": "2026-10-26 13:45:07.553387+00:00" + }, + { + "event": "processing", + "details": { + "worker": "30d099a5aa98:d5f77788:0", + "attempt": 1, + "stream_id": "1793022307530-0" + }, + "created_at": "2026-10-26 13:45:08.643318+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 1, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:45:09.280470+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:45:07.552588+00:00", + "stream_id": "1793022307530-0" + } + ] + }, + "infrastructure": [ + { + "id": "6d5ccd7883e55d222f7bcb15064b8a7c0d5722ca54f2c941d4ba35b1e1ef4128", + "name": "mtusi2026lab5-api-1", + "hostname": "6d5ccd7883e5", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:44:11.837673643Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "768f094b3536247e53a7fa69357a507504aa11cd094149723e47ec1758b0805d", + "name": "mtusi2026lab5-api-2", + "hostname": "768f094b3536", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:44:12.329596734Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:44:16.426131982Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:21:15.687084123Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:21:23.472099949Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "6f5fff13ee0555b9e2881c5d33ae6ae3aa82fbf459d66e6ea1e919a31d6e67f7", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "6f5fff13ee05", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:45:04.472823846Z", + "restart_count": 1, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:20:11.844174641Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:21:01.323626814Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": false, + "started_at": "2026-10-26T13:20:11.405575488Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": {} + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:42:41.359086382Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:21:01.324968308Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "30d099a5aa989de8ddc70b081113c43d37a9d97db727aa935da5969fcb0b0e45", + "name": "mtusi2026lab5-worker-1", + "hostname": "30d099a5aa98", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:45:06.881202495Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } + ] + }, + { + "case": "after_publish", + "repetition": 3, + "status": "PASS", + "elapsed_seconds": 43.539, + "fault": { + "status": "PASS", + "phase": "after_publish" + }, + "result": { + "status": "PASS", + "attachment": { + "id": "2d8b7e7e-103c-4287-b2b3-591d0b6779c1", + "chat_id": "3c921002-d6e4-4eb0-9be3-97ee4bee2958", + "owner_id": "0ec343cf-cde7-41cd-8897-5e2de9493781", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:45:37.058188Z", + "updated_at": "2026-10-26T13:45:51.525975Z" + }, + "job_id": "4b83e41b-b5ba-4d12-9fca-4048484982ad", + "pipeline_version": 1, + "attempts": 1, + "current_keys": [ + "originals/2d8b7e7e-103c-4287-b2b3-591d0b6779c1/v1/original", + "variants/2d8b7e7e-103c-4287-b2b3-591d0b6779c1/v1/crop.jpg", + "variants/2d8b7e7e-103c-4287-b2b3-591d0b6779c1/v1/optimized.webp", + "variants/2d8b7e7e-103c-4287-b2b3-591d0b6779c1/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/2d8b7e7e-103c-4287-b2b3-591d0b6779c1/v1/original", + "variants/2d8b7e7e-103c-4287-b2b3-591d0b6779c1/v1/crop.jpg", + "variants/2d8b7e7e-103c-4287-b2b3-591d0b6779c1/v1/optimized.webp", + "variants/2d8b7e7e-103c-4287-b2b3-591d0b6779c1/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 14.466856, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:45:37.061837+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793022349539-0" + }, + "created_at": "2026-10-26 13:45:49.558206+00:00" + }, + { + "event": "processing", + "details": { + "worker": "01e954f3cfdd:e6b03043:0", + "attempt": 1, + "stream_id": "1793022345939-0" + }, + "created_at": "2026-10-26 13:45:50.831994+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 1, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:45:51.527012+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793022349539-0" + }, + "created_at": "2026-10-26 13:45:51.596969+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:45:49.557079+00:00", + "stream_id": "1793022349539-0" + } + ] + }, + "infrastructure": [ + { + "id": "6d5ccd7883e55d222f7bcb15064b8a7c0d5722ca54f2c941d4ba35b1e1ef4128", + "name": "mtusi2026lab5-api-1", + "hostname": "6d5ccd7883e5", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:44:11.837673643Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "768f094b3536247e53a7fa69357a507504aa11cd094149723e47ec1758b0805d", + "name": "mtusi2026lab5-api-2", + "hostname": "768f094b3536", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:44:12.329596734Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:44:16.426131982Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:21:15.687084123Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:21:23.472099949Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "b4495d205895f02a2e2124902e5eb8b917df90be1570c0d5b7ddb4aeb4fca852", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "b4495d205895", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:45:46.608217339Z", + "restart_count": 1, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:20:11.844174641Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:21:01.323626814Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": false, + "started_at": "2026-10-26T13:20:11.405575488Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": {} + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:42:41.359086382Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:21:01.324968308Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "01e954f3cfddcfd86fd881d62dc63db6b07988dc9153b2efdf68b8d4cce263c7", + "name": "mtusi2026lab5-worker-1", + "hostname": "01e954f3cfdd", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:45:49.078691809Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } + ] + }, + { + "case": "before_effect", + "repetition": 3, + "status": "PASS", + "elapsed_seconds": 45.35, + "fault": { + "status": "PASS", + "phase": "before_effect" + }, + "result": { + "status": "PASS", + "attachment": { + "id": "273e2966-afac-4888-a694-2bfc160f4dbf", + "chat_id": "12bc23a9-b81c-41e0-89ea-7a968be71056", + "owner_id": "4e89f8ef-132b-425e-9a62-a6fc0c3cd6e3", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:46:08.725387Z", + "updated_at": "2026-10-26T13:46:35.770652Z" + }, + "job_id": "867dc7eb-fc57-420e-a618-d37f78958cd3", + "pipeline_version": 1, + "attempts": 2, + "current_keys": [ + "originals/273e2966-afac-4888-a694-2bfc160f4dbf/v1/original", + "variants/273e2966-afac-4888-a694-2bfc160f4dbf/v1/crop.jpg", + "variants/273e2966-afac-4888-a694-2bfc160f4dbf/v1/optimized.webp", + "variants/273e2966-afac-4888-a694-2bfc160f4dbf/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/273e2966-afac-4888-a694-2bfc160f4dbf/v1/original", + "variants/273e2966-afac-4888-a694-2bfc160f4dbf/v1/crop.jpg", + "variants/273e2966-afac-4888-a694-2bfc160f4dbf/v1/optimized.webp", + "variants/273e2966-afac-4888-a694-2bfc160f4dbf/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 27.044251, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:46:08.730183+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793022368760-0" + }, + "created_at": "2026-10-26 13:46:08.777331+00:00" + }, + { + "event": "processing", + "details": { + "worker": "9e490404a4c7:ea64f610:0", + "attempt": 1, + "stream_id": "1793022368760-0" + }, + "created_at": "2026-10-26 13:46:17.559160+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "lease_expired", + "attempt": 1, + "delay_seconds": 1.038 + }, + "created_at": "2026-10-26 13:46:33.832425+00:00" + }, + { + "event": "lease_recovered", + "details": {}, + "created_at": "2026-10-26 13:46:33.833128+00:00" + }, + { + "event": "published", + "details": { + "attempt": 2, + "stream_id": "1793022394987-0" + }, + "created_at": "2026-10-26 13:46:35.012749+00:00" + }, + { + "event": "processing", + "details": { + "worker": "9e490404a4c7:92b43e46:0", + "attempt": 2, + "stream_id": "1793022394987-0" + }, + "created_at": "2026-10-26 13:46:35.089287+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 2, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:46:35.772029+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:46:08.776510+00:00", + "stream_id": "1793022368760-0" + }, + { + "attempt": 2, + "published_at": "2026-10-26 13:46:35.012044+00:00", + "stream_id": "1793022394987-0" + } + ] + }, + "infrastructure": [ + { + "id": "6d5ccd7883e55d222f7bcb15064b8a7c0d5722ca54f2c941d4ba35b1e1ef4128", + "name": "mtusi2026lab5-api-1", + "hostname": "6d5ccd7883e5", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:44:11.837673643Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "768f094b3536247e53a7fa69357a507504aa11cd094149723e47ec1758b0805d", + "name": "mtusi2026lab5-api-2", + "hostname": "768f094b3536", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:44:12.329596734Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:44:16.426131982Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:21:15.687084123Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:21:23.472099949Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "b4495d205895f02a2e2124902e5eb8b917df90be1570c0d5b7ddb4aeb4fca852", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "b4495d205895", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:45:46.608217339Z", + "restart_count": 1, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:20:11.844174641Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:21:01.323626814Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": false, + "started_at": "2026-10-26T13:20:11.405575488Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": {} + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:42:41.359086382Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:21:01.324968308Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "9e490404a4c7d0fce43d2b638d32f951d625b2ff31d788d95263db09cf533909", + "name": "mtusi2026lab5-worker-1", + "hostname": "9e490404a4c7", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:46:18.339695557Z", + "restart_count": 1, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } + ] + }, + { + "case": "after_original", + "repetition": 3, + "status": "PASS", + "elapsed_seconds": 42.34, + "fault": { + "status": "PASS", + "phase": "after_original" + }, + "result": { + "status": "PASS", + "attachment": { + "id": "0ee025b7-b5c2-4617-840b-3e26324a947e", + "chat_id": "b7aa984a-f3d8-467e-8417-512409925a90", + "owner_id": "0ed4d90b-712b-4e5f-a11f-d10645b3aa18", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:46:51.466114Z", + "updated_at": "2026-10-26T13:47:16.782572Z" + }, + "job_id": "e58fb54e-0220-4840-9542-0341934a28b3", + "pipeline_version": 1, + "attempts": 2, + "current_keys": [ + "originals/0ee025b7-b5c2-4617-840b-3e26324a947e/v1/original", + "variants/0ee025b7-b5c2-4617-840b-3e26324a947e/v1/crop.jpg", + "variants/0ee025b7-b5c2-4617-840b-3e26324a947e/v1/optimized.webp", + "variants/0ee025b7-b5c2-4617-840b-3e26324a947e/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/0ee025b7-b5c2-4617-840b-3e26324a947e/v1/original", + "variants/0ee025b7-b5c2-4617-840b-3e26324a947e/v1/crop.jpg", + "variants/0ee025b7-b5c2-4617-840b-3e26324a947e/v1/optimized.webp", + "variants/0ee025b7-b5c2-4617-840b-3e26324a947e/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 25.315811, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:46:51.468368+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793022411682-0" + }, + "created_at": "2026-10-26 13:46:51.700279+00:00" + }, + { + "event": "processing", + "details": { + "worker": "c05617ace791:bb5f2451:0", + "attempt": 1, + "stream_id": "1793022411682-0" + }, + "created_at": "2026-10-26 13:46:59.704009+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "lease_expired", + "attempt": 1, + "delay_seconds": 1.089 + }, + "created_at": "2026-10-26 13:47:14.735568+00:00" + }, + { + "event": "lease_recovered", + "details": {}, + "created_at": "2026-10-26 13:47:14.736599+00:00" + }, + { + "event": "old_attempt_ignored", + "details": { + "attempt": 1 + }, + "created_at": "2026-10-26 13:47:15.253226+00:00" + }, + { + "event": "published", + "details": { + "attempt": 2, + "stream_id": "1793022435897-0" + }, + "created_at": "2026-10-26 13:47:15.928241+00:00" + }, + { + "event": "processing", + "details": { + "worker": "c05617ace791:1d05162c:0", + "attempt": 2, + "stream_id": "1793022435897-0" + }, + "created_at": "2026-10-26 13:47:16.013634+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 2, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:47:16.783646+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:46:51.699480+00:00", + "stream_id": "1793022411682-0" + }, + { + "attempt": 2, + "published_at": "2026-10-26 13:47:15.927424+00:00", + "stream_id": "1793022435897-0" + } + ] + }, + "infrastructure": [ + { + "id": "6d5ccd7883e55d222f7bcb15064b8a7c0d5722ca54f2c941d4ba35b1e1ef4128", + "name": "mtusi2026lab5-api-1", + "hostname": "6d5ccd7883e5", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:44:11.837673643Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "768f094b3536247e53a7fa69357a507504aa11cd094149723e47ec1758b0805d", + "name": "mtusi2026lab5-api-2", + "hostname": "768f094b3536", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:44:12.329596734Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:44:16.426131982Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:21:15.687084123Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:21:23.472099949Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "b4495d205895f02a2e2124902e5eb8b917df90be1570c0d5b7ddb4aeb4fca852", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "b4495d205895", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:45:46.608217339Z", + "restart_count": 1, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:20:11.844174641Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:21:01.323626814Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": false, + "started_at": "2026-10-26T13:20:11.405575488Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": {} + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:42:41.359086382Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:21:01.324968308Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "c05617ace79151b9986eb4c3927c9d1ab91227aae51d87946d1d4ee69bcf6baa", + "name": "mtusi2026lab5-worker-1", + "hostname": "c05617ace791", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:47:00.94587627Z", + "restart_count": 1, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } + ] + }, + { + "case": "after_effects", + "repetition": 3, + "status": "PASS", + "elapsed_seconds": 44.661, + "fault": { + "status": "PASS", + "phase": "after_effects" + }, + "result": { + "status": "PASS", + "attachment": { + "id": "8d892a55-91c8-447b-ae96-68dda3265f78", + "chat_id": "1eed4b6a-f3ff-4f8f-b760-078e1d0d6eba", + "owner_id": "058e39ba-4f56-47fe-b480-0a7983cfdf44", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:47:32.611133Z", + "updated_at": "2026-10-26T13:47:59.283869Z" + }, + "job_id": "9d1cc410-6f80-4942-8fc3-c0402830bbdf", + "pipeline_version": 1, + "attempts": 2, + "current_keys": [ + "originals/8d892a55-91c8-447b-ae96-68dda3265f78/v1/original", + "variants/8d892a55-91c8-447b-ae96-68dda3265f78/v1/crop.jpg", + "variants/8d892a55-91c8-447b-ae96-68dda3265f78/v1/optimized.webp", + "variants/8d892a55-91c8-447b-ae96-68dda3265f78/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/8d892a55-91c8-447b-ae96-68dda3265f78/v1/original", + "variants/8d892a55-91c8-447b-ae96-68dda3265f78/v1/crop.jpg", + "variants/8d892a55-91c8-447b-ae96-68dda3265f78/v1/optimized.webp", + "variants/8d892a55-91c8-447b-ae96-68dda3265f78/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 26.671925, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:47:32.615134+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793022452769-0" + }, + "created_at": "2026-10-26 13:47:32.796611+00:00" + }, + { + "event": "processing", + "details": { + "worker": "5a0ece80fcc0:956c190d:0", + "attempt": 1, + "stream_id": "1793022452769-0" + }, + "created_at": "2026-10-26 13:47:41.388555+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "lease_expired", + "attempt": 1, + "delay_seconds": 1.457 + }, + "created_at": "2026-10-26 13:47:56.871491+00:00" + }, + { + "event": "lease_recovered", + "details": {}, + "created_at": "2026-10-26 13:47:56.872528+00:00" + }, + { + "event": "published", + "details": { + "attempt": 2, + "stream_id": "1793022478485-0" + }, + "created_at": "2026-10-26 13:47:58.517502+00:00" + }, + { + "event": "processing", + "details": { + "worker": "5a0ece80fcc0:e305c1ef:0", + "attempt": 2, + "stream_id": "1793022478485-0" + }, + "created_at": "2026-10-26 13:47:58.591359+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 2, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:47:59.285253+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:47:32.795155+00:00", + "stream_id": "1793022452769-0" + }, + { + "attempt": 2, + "published_at": "2026-10-26 13:47:58.516483+00:00", + "stream_id": "1793022478485-0" + } + ] + }, + "infrastructure": [ + { + "id": "6d5ccd7883e55d222f7bcb15064b8a7c0d5722ca54f2c941d4ba35b1e1ef4128", + "name": "mtusi2026lab5-api-1", + "hostname": "6d5ccd7883e5", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:44:11.837673643Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "768f094b3536247e53a7fa69357a507504aa11cd094149723e47ec1758b0805d", + "name": "mtusi2026lab5-api-2", + "hostname": "768f094b3536", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:44:12.329596734Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:44:16.426131982Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:21:15.687084123Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:21:23.472099949Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "b4495d205895f02a2e2124902e5eb8b917df90be1570c0d5b7ddb4aeb4fca852", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "b4495d205895", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:45:46.608217339Z", + "restart_count": 1, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:20:11.844174641Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:21:01.323626814Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": false, + "started_at": "2026-10-26T13:20:11.405575488Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": {} + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:42:41.359086382Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:21:01.324968308Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "5a0ece80fcc0bbcb30bb6675b7eb2a357a61d5dd3c4b3d12be361a3ff17455db", + "name": "mtusi2026lab5-worker-1", + "hostname": "5a0ece80fcc0", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:47:42.835139318Z", + "restart_count": 1, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } + ] + }, + { + "case": "after_commit", + "repetition": 3, + "status": "PASS", + "elapsed_seconds": 36.306, + "fault": { + "status": "PASS", + "phase": "after_commit" + }, + "result": { + "status": "PASS", + "attachment": { + "id": "df892b55-c9a4-47fb-9f6e-5d4dd686f036", + "chat_id": "518ae70a-53f4-42f6-9744-011d8ff01680", + "owner_id": "86c35412-6033-479d-8df2-f806006a0d4b", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:48:15.711422Z", + "updated_at": "2026-10-26T13:48:23.840617Z" + }, + "job_id": "e7516e96-9314-4cf7-ad2a-86e63c89f5e5", + "pipeline_version": 1, + "attempts": 1, + "current_keys": [ + "originals/df892b55-c9a4-47fb-9f6e-5d4dd686f036/v1/original", + "variants/df892b55-c9a4-47fb-9f6e-5d4dd686f036/v1/crop.jpg", + "variants/df892b55-c9a4-47fb-9f6e-5d4dd686f036/v1/optimized.webp", + "variants/df892b55-c9a4-47fb-9f6e-5d4dd686f036/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/df892b55-c9a4-47fb-9f6e-5d4dd686f036/v1/original", + "variants/df892b55-c9a4-47fb-9f6e-5d4dd686f036/v1/crop.jpg", + "variants/df892b55-c9a4-47fb-9f6e-5d4dd686f036/v1/optimized.webp", + "variants/df892b55-c9a4-47fb-9f6e-5d4dd686f036/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 8.128291, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:48:15.715443+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793022495831-0" + }, + "created_at": "2026-10-26 13:48:15.861425+00:00" + }, + { + "event": "processing", + "details": { + "worker": "8632a9051256:41bf4653:0", + "attempt": 1, + "stream_id": "1793022495831-0" + }, + "created_at": "2026-10-26 13:48:23.227970+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 1, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:48:23.841509+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:48:15.860183+00:00", + "stream_id": "1793022495831-0" + } + ] + }, + "infrastructure": [ + { + "id": "6d5ccd7883e55d222f7bcb15064b8a7c0d5722ca54f2c941d4ba35b1e1ef4128", + "name": "mtusi2026lab5-api-1", + "hostname": "6d5ccd7883e5", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:44:11.837673643Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "768f094b3536247e53a7fa69357a507504aa11cd094149723e47ec1758b0805d", + "name": "mtusi2026lab5-api-2", + "hostname": "768f094b3536", + "service": "api", + "running": true, + "started_at": "2026-10-26T13:44:12.329596734Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "926c8de7fdfd9772c439414fc2e468cc0c23c641b68a83b84e4d8cb4e4998548", + "name": "mtusi2026lab5-broker-1", + "hostname": "926c8de7fdfd", + "service": "broker", + "running": true, + "started_at": "2026-10-26T13:44:16.426131982Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "664d5065e4e2057903eaf1e47fe90f099597e81d28324c54f81141d3255a6f63", + "name": "mtusi2026lab5-cache-1", + "hostname": "664d5065e4e2", + "service": "cache", + "running": true, + "started_at": "2026-10-26T13:21:15.687084123Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "6379/tcp": null + } + }, + { + "id": "a8efd18d965de2c9a1c93cf00e9230cb17f6b769af6446228ded6d262c12f650", + "name": "mtusi2026lab5-db-1", + "hostname": "a8efd18d965d", + "service": "db", + "running": true, + "started_at": "2026-10-26T13:21:23.472099949Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": { + "5432/tcp": null + } + }, + { + "id": "b4495d205895f02a2e2124902e5eb8b917df90be1570c0d5b7ddb4aeb4fca852", + "name": "mtusi2026lab5-dispatcher-1", + "hostname": "b4495d205895", + "service": "dispatcher", + "running": true, + "started_at": "2026-10-26T13:45:46.608217339Z", + "restart_count": 1, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": { + "8080/tcp": null + } + }, + { + "id": "17d5d00bd730356064b7324bfb190a5726be5dde524938e43a0e95fda8a097d2", + "name": "mtusi2026lab5-lb-1", + "hostname": "17d5d00bd730", + "service": "lb", + "running": true, + "started_at": "2026-10-26T13:20:11.844174641Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": { + "8080/tcp": [ + { + "HostIp": "127.0.0.1", + "HostPort": "8080" + } + ] + } + }, + { + "id": "85c2bb372517d143c1bc4f0d62f919c03fcd0b2922f6d80527b5dd967afc87a2", + "name": "mtusi2026lab5-migrate-1", + "hostname": "85c2bb372517", + "service": "migrate", + "running": false, + "started_at": "2026-10-26T13:21:01.323626814Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "a62f7b1a9e058209c3e1c8e99fc418406270224effc82faa4bf1587d1250c18a", + "name": "mtusi2026lab5-reconciler-1", + "hostname": "a62f7b1a9e05", + "service": "reconciler", + "running": false, + "started_at": "2026-10-26T13:20:11.405575488Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 268435456, + "published_ports": {} + }, + { + "id": "5bd819ea48506fa8a38869e22ddc3607f8f9aeb23348b4b46aa594acdd61466a", + "name": "mtusi2026lab5-s3-1", + "hostname": "5bd819ea4850", + "service": "s3", + "running": true, + "started_at": "2026-10-26T13:42:41.359086382Z", + "restart_count": 0, + "cpu_limit": 1.0, + "memory_limit_bytes": 536870912, + "published_ports": {} + }, + { + "id": "9a802ad7d2417be1c16ff80944bc599eeb8ad9bcd0c91ab7c0dbfa761154b22c", + "name": "mtusi2026lab5-s3-bootstrap-1", + "hostname": "9a802ad7d241", + "service": "s3-bootstrap", + "running": false, + "started_at": "2026-10-26T13:21:01.324968308Z", + "restart_count": 0, + "cpu_limit": 0.5, + "memory_limit_bytes": 134217728, + "published_ports": {} + }, + { + "id": "8632a9051256a72a6d84891a2fed60b8f4925851e40f19810576580884966af6", + "name": "mtusi2026lab5-worker-1", + "hostname": "8632a9051256", + "service": "worker", + "running": true, + "started_at": "2026-10-26T13:48:24.53862788Z", + "restart_count": 1, + "cpu_limit": 1.0, + "memory_limit_bytes": 805306368, + "published_ports": { + "8080/tcp": null + } + } + ] + }, + { + "case": "duplicates_and_invalid_carrier", + "repetition": 3, + "status": "PASS", + "elapsed_seconds": 36.795, + "duplicates": { + "status": "PASS", + "acked": 16 + }, + "invalid_carrier": { + "status": "PASS", + "error_code": "invalid_job" + }, + "result": { + "status": "PASS", + "attachment": { + "id": "19cbf328-dde3-4ad7-a829-8d8333bef096", + "chat_id": "c97f1fb0-ecba-463d-9ec2-6c3ce5bbf4ef", + "owner_id": "cd38bcf8-6f49-4737-a833-8c06a822bc7b", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:48:45.328637Z", + "updated_at": "2026-10-26T13:48:46.109826Z" + }, + "job_id": "531e1706-d100-4caa-a8ea-df4b8d5441e3", + "pipeline_version": 1, + "attempts": 1, + "current_keys": [ + "originals/19cbf328-dde3-4ad7-a829-8d8333bef096/v1/original", + "variants/19cbf328-dde3-4ad7-a829-8d8333bef096/v1/crop.jpg", + "variants/19cbf328-dde3-4ad7-a829-8d8333bef096/v1/optimized.webp", + "variants/19cbf328-dde3-4ad7-a829-8d8333bef096/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/19cbf328-dde3-4ad7-a829-8d8333bef096/v1/original", + "variants/19cbf328-dde3-4ad7-a829-8d8333bef096/v1/crop.jpg", + "variants/19cbf328-dde3-4ad7-a829-8d8333bef096/v1/optimized.webp", + "variants/19cbf328-dde3-4ad7-a829-8d8333bef096/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 0.780387, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:48:45.331993+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793022525396-0" + }, + "created_at": "2026-10-26 13:48:45.414978+00:00" + }, + { + "event": "processing", + "details": { + "worker": "8632a9051256:bbfecc87:0", + "attempt": 1, + "stream_id": "1793022525396-0" + }, + "created_at": "2026-10-26 13:48:45.434006+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 1, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:48:46.111267+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793022539622-0" + }, + "created_at": "2026-10-26 13:48:59.701175+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793022539631-0" + }, + "created_at": "2026-10-26 13:48:59.785279+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793022539635-0" + }, + "created_at": "2026-10-26 13:48:59.867819+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793022539638-0" + }, + "created_at": "2026-10-26 13:48:59.977192+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793022539641-0" + }, + "created_at": "2026-10-26 13:49:00.052573+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793022539645-0" + }, + "created_at": "2026-10-26 13:49:00.128499+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793022539650-0" + }, + "created_at": "2026-10-26 13:49:00.201406+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793022539654-0" + }, + "created_at": "2026-10-26 13:49:00.278208+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793022539661-0" + }, + "created_at": "2026-10-26 13:49:00.354208+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793022539667-0" + }, + "created_at": "2026-10-26 13:49:00.417467+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793022539672-0" + }, + "created_at": "2026-10-26 13:49:00.495312+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793022539688-0" + }, + "created_at": "2026-10-26 13:49:00.571519+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793022539696-0" + }, + "created_at": "2026-10-26 13:49:00.658083+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793022539700-0" + }, + "created_at": "2026-10-26 13:49:00.746312+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793022539713-0" + }, + "created_at": "2026-10-26 13:49:00.827337+00:00" + }, + { + "event": "duplicate_ready", + "details": { + "stream_id": "1793022539716-0" + }, + "created_at": "2026-10-26 13:49:00.922607+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:48:45.414054+00:00", + "stream_id": "1793022525396-0" + } + ] + } + }, + { + "case": "reorder_new_before_old", + "repetition": 3, + "status": "PASS", + "elapsed_seconds": 57.728, + "result": { + "status": "PASS", + "attachment": { + "id": "88954087-051b-4690-9606-309c03d7fa9b", + "chat_id": "c64ba0bb-437f-441b-a148-0f813c60117c", + "owner_id": "bb85564e-7a85-47f3-9b44-5161df2ec6bc", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "7c48d87d777b22ad9fb287b08a98625f17a30dc88f07769e16cd132e83b70537", + "size_bytes": 4786, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "c22eb305df23f9f08f812ff14e0b20cc94f060cb36058e8a6818f82130d59599", + "size_bytes": 1837, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "40128c713a9d3f9f5ef480b5630743e89616384f04a6eda5921baf5e5c46f34c", + "size_bytes": 2808, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:49:35.513148Z", + "updated_at": "2026-10-26T13:49:53.685071Z" + }, + "job_id": "1dc730de-c86d-4c9f-8a72-97ce34864f13", + "pipeline_version": 2, + "attempts": 1, + "current_keys": [ + "originals/88954087-051b-4690-9606-309c03d7fa9b/v2/original", + "variants/88954087-051b-4690-9606-309c03d7fa9b/v2/crop.jpg", + "variants/88954087-051b-4690-9606-309c03d7fa9b/v2/optimized.webp", + "variants/88954087-051b-4690-9606-309c03d7fa9b/v2/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/88954087-051b-4690-9606-309c03d7fa9b/v2/original", + "variants/88954087-051b-4690-9606-309c03d7fa9b/v2/crop.jpg", + "variants/88954087-051b-4690-9606-309c03d7fa9b/v2/optimized.webp", + "variants/88954087-051b-4690-9606-309c03d7fa9b/v2/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "7c48d87d777b22ad9fb287b08a98625f17a30dc88f07769e16cd132e83b70537", + "crop": "c22eb305df23f9f08f812ff14e0b20cc94f060cb36058e8a6818f82130d59599", + "optimized": "40128c713a9d3f9f5ef480b5630743e89616384f04a6eda5921baf5e5c46f34c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 12.997531, + "events": [ + { + "event": "version_created", + "details": { + "pipeline_version": 2 + }, + "created_at": "2026-10-26 13:49:40.690231+00:00" + }, + { + "event": "processing", + "details": { + "worker": "5c7ecb9cb0be:89d8851c:0", + "attempt": 1, + "stream_id": "1793022584459-0" + }, + "created_at": "2026-10-26 13:49:52.984633+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 1, + "pipeline_version": 2 + }, + "created_at": "2026-10-26 13:49:53.686392+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": null, + "stream_id": null + } + ] + }, + "old_job": { + "job": { + "id": "e9ac3114-05b0-49e6-ac47-e080f7766b0d", + "attachment_id": "88954087-051b-4690-9606-309c03d7fa9b", + "pipeline_version": 1, + "status": "superseded", + "staging_key": "staging/88954087-051b-4690-9606-309c03d7fa9b/e9ac3114-05b0-49e6-ac47-e080f7766b0d", + "attempts": 0, + "budget_start": 0, + "available_at": "2026-10-26 13:49:35.513952+00:00", + "lease_until": null, + "lease_token": null, + "error_code": null, + "staged_deleted_at": null, + "created_at": "2026-10-26 13:49:35.513952+00:00", + "updated_at": "2026-10-26 13:49:40.686695+00:00" + }, + "attachment": { + "status": "ready", + "pipeline_version": 2, + "current_job_id": "1dc730de-c86d-4c9f-8a72-97ce34864f13", + "object_key": "originals/88954087-051b-4690-9606-309c03d7fa9b/v2/original", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "7c48d87d777b22ad9fb287b08a98625f17a30dc88f07769e16cd132e83b70537", + "size_bytes": 4786, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "c22eb305df23f9f08f812ff14e0b20cc94f060cb36058e8a6818f82130d59599", + "size_bytes": 1837, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "40128c713a9d3f9f5ef480b5630743e89616384f04a6eda5921baf5e5c46f34c", + "size_bytes": 2808, + "content_type": "image/webp" + } + ], + "variant_keys": { + "crop": "variants/88954087-051b-4690-9606-309c03d7fa9b/v2/crop.jpg", + "optimized": "variants/88954087-051b-4690-9606-309c03d7fa9b/v2/optimized.webp", + "thumbnail": "variants/88954087-051b-4690-9606-309c03d7fa9b/v2/thumbnail.jpg" + }, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "size_bytes": 111817 + }, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:49:35.516417+00:00" + }, + { + "event": "stale_ignored", + "details": { + "stream_id": "1793022589637-0", + "current_version": 2 + }, + "created_at": "2026-10-26 13:49:53.748462+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": null, + "stream_id": null + } + ], + "faults": [] + } + }, + { + "case": "stale_after_new_ready", + "repetition": 3, + "status": "PASS", + "elapsed_seconds": 54.823, + "result": { + "status": "PASS", + "attachment": { + "id": "1a80399b-de8c-4515-9831-96d8c99ff7d7", + "chat_id": "36d51c12-b68d-4f10-9fc4-1931f4f37cb5", + "owner_id": "8ad2252b-ccd1-4558-9527-76cc097e43b2", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "7c48d87d777b22ad9fb287b08a98625f17a30dc88f07769e16cd132e83b70537", + "size_bytes": 4786, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "c22eb305df23f9f08f812ff14e0b20cc94f060cb36058e8a6818f82130d59599", + "size_bytes": 1837, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "40128c713a9d3f9f5ef480b5630743e89616384f04a6eda5921baf5e5c46f34c", + "size_bytes": 2808, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:50:15.813414Z", + "updated_at": "2026-10-26T13:50:32.957119Z" + }, + "job_id": "a7026dac-65ce-46fb-8f74-8f7677244d6d", + "pipeline_version": 2, + "attempts": 1, + "current_keys": [ + "originals/1a80399b-de8c-4515-9831-96d8c99ff7d7/v2/original", + "variants/1a80399b-de8c-4515-9831-96d8c99ff7d7/v2/crop.jpg", + "variants/1a80399b-de8c-4515-9831-96d8c99ff7d7/v2/optimized.webp", + "variants/1a80399b-de8c-4515-9831-96d8c99ff7d7/v2/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/1a80399b-de8c-4515-9831-96d8c99ff7d7/v1/original", + "originals/1a80399b-de8c-4515-9831-96d8c99ff7d7/v2/original", + "variants/1a80399b-de8c-4515-9831-96d8c99ff7d7/v1/crop.jpg", + "variants/1a80399b-de8c-4515-9831-96d8c99ff7d7/v1/optimized.webp", + "variants/1a80399b-de8c-4515-9831-96d8c99ff7d7/v1/thumbnail.jpg", + "variants/1a80399b-de8c-4515-9831-96d8c99ff7d7/v2/crop.jpg", + "variants/1a80399b-de8c-4515-9831-96d8c99ff7d7/v2/optimized.webp", + "variants/1a80399b-de8c-4515-9831-96d8c99ff7d7/v2/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "7c48d87d777b22ad9fb287b08a98625f17a30dc88f07769e16cd132e83b70537", + "crop": "c22eb305df23f9f08f812ff14e0b20cc94f060cb36058e8a6818f82130d59599", + "optimized": "40128c713a9d3f9f5ef480b5630743e89616384f04a6eda5921baf5e5c46f34c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 0.917731, + "events": [ + { + "event": "version_created", + "details": { + "pipeline_version": 2 + }, + "created_at": "2026-10-26 13:50:32.044434+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793022632202-0" + }, + "created_at": "2026-10-26 13:50:32.228103+00:00" + }, + { + "event": "processing", + "details": { + "worker": "5c7ecb9cb0be:89d8851c:0", + "attempt": 1, + "stream_id": "1793022632202-0" + }, + "created_at": "2026-10-26 13:50:32.245569+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 1, + "pipeline_version": 2 + }, + "created_at": "2026-10-26 13:50:32.958208+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:50:32.227403+00:00", + "stream_id": "1793022632202-0" + } + ] + }, + "old_job": { + "job": { + "id": "23546e6d-40ea-4ead-a4db-e272494156f5", + "attachment_id": "1a80399b-de8c-4515-9831-96d8c99ff7d7", + "pipeline_version": 1, + "status": "ready", + "staging_key": "staging/1a80399b-de8c-4515-9831-96d8c99ff7d7/23546e6d-40ea-4ead-a4db-e272494156f5", + "attempts": 1, + "budget_start": 0, + "available_at": "2026-10-26 13:50:15.814585+00:00", + "lease_until": null, + "lease_token": null, + "error_code": null, + "staged_deleted_at": "2026-10-26 13:50:16.937981+00:00", + "created_at": "2026-10-26 13:50:15.814585+00:00", + "updated_at": "2026-10-26 13:50:16.910961+00:00" + }, + "attachment": { + "status": "ready", + "pipeline_version": 2, + "current_job_id": "a7026dac-65ce-46fb-8f74-8f7677244d6d", + "object_key": "originals/1a80399b-de8c-4515-9831-96d8c99ff7d7/v2/original", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "7c48d87d777b22ad9fb287b08a98625f17a30dc88f07769e16cd132e83b70537", + "size_bytes": 4786, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "c22eb305df23f9f08f812ff14e0b20cc94f060cb36058e8a6818f82130d59599", + "size_bytes": 1837, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "40128c713a9d3f9f5ef480b5630743e89616384f04a6eda5921baf5e5c46f34c", + "size_bytes": 2808, + "content_type": "image/webp" + } + ], + "variant_keys": { + "crop": "variants/1a80399b-de8c-4515-9831-96d8c99ff7d7/v2/crop.jpg", + "optimized": "variants/1a80399b-de8c-4515-9831-96d8c99ff7d7/v2/optimized.webp", + "thumbnail": "variants/1a80399b-de8c-4515-9831-96d8c99ff7d7/v2/thumbnail.jpg" + }, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "size_bytes": 111817 + }, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:50:15.816907+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793022616044-0" + }, + "created_at": "2026-10-26 13:50:16.074072+00:00" + }, + { + "event": "processing", + "details": { + "worker": "5c7ecb9cb0be:89d8851c:0", + "attempt": 1, + "stream_id": "1793022616044-0" + }, + "created_at": "2026-10-26 13:50:16.091305+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 1, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:50:16.911566+00:00" + }, + { + "event": "stale_ignored", + "details": { + "stream_id": "1793022647084-0", + "current_version": 2 + }, + "created_at": "2026-10-26 13:50:47.120699+00:00" + }, + { + "event": "stale_ignored", + "details": { + "stream_id": "1793022647093-0", + "current_version": 2 + }, + "created_at": "2026-10-26 13:50:47.154523+00:00" + }, + { + "event": "stale_ignored", + "details": { + "stream_id": "1793022647096-0", + "current_version": 2 + }, + "created_at": "2026-10-26 13:50:47.195649+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:50:16.073206+00:00", + "stream_id": "1793022616044-0" + } + ], + "faults": [] + } + }, + { + "case": "permanent_failure_replay", + "repetition": 3, + "status": "PASS", + "elapsed_seconds": 56.23, + "failed": { + "status": "PASS", + "error_code": "staging_missing", + "attempts": 1, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:51:13.304814+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793022673356-0" + }, + "created_at": "2026-10-26 13:51:13.380689+00:00" + }, + { + "event": "processing", + "details": { + "worker": "35111ea58736:a94289ac:0", + "attempt": 1, + "stream_id": "1793022673356-0" + }, + "created_at": "2026-10-26 13:51:22.746532+00:00" + }, + { + "event": "failed", + "details": { + "code": "staging_missing", + "attempt": 1 + }, + "created_at": "2026-10-26 13:51:22.846506+00:00" + } + ] + }, + "ready_replay": { + "status": "noop", + "reason": "already_ready" + }, + "result": { + "status": "PASS", + "attachment": { + "id": "f1cfe70a-cf49-4d7c-8b30-94111157eb4e", + "chat_id": "f495ac1b-be85-49f7-8acd-f625f38cd560", + "owner_id": "adb49776-f54a-4336-ba92-0d87455f0895", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:51:13.299710Z", + "updated_at": "2026-10-26T13:51:41.795208Z" + }, + "job_id": "0d0d80c8-4a30-402e-9b56-aea98bc70155", + "pipeline_version": 1, + "attempts": 2, + "current_keys": [ + "originals/f1cfe70a-cf49-4d7c-8b30-94111157eb4e/v1/original", + "variants/f1cfe70a-cf49-4d7c-8b30-94111157eb4e/v1/crop.jpg", + "variants/f1cfe70a-cf49-4d7c-8b30-94111157eb4e/v1/optimized.webp", + "variants/f1cfe70a-cf49-4d7c-8b30-94111157eb4e/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/f1cfe70a-cf49-4d7c-8b30-94111157eb4e/v1/original", + "variants/f1cfe70a-cf49-4d7c-8b30-94111157eb4e/v1/crop.jpg", + "variants/f1cfe70a-cf49-4d7c-8b30-94111157eb4e/v1/optimized.webp", + "variants/f1cfe70a-cf49-4d7c-8b30-94111157eb4e/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 28.494664, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:51:13.304814+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793022673356-0" + }, + "created_at": "2026-10-26 13:51:13.380689+00:00" + }, + { + "event": "processing", + "details": { + "worker": "35111ea58736:a94289ac:0", + "attempt": 1, + "stream_id": "1793022673356-0" + }, + "created_at": "2026-10-26 13:51:22.746532+00:00" + }, + { + "event": "failed", + "details": { + "code": "staging_missing", + "attempt": 1 + }, + "created_at": "2026-10-26 13:51:22.846506+00:00" + }, + { + "event": "operator_replay", + "details": { + "next_attempt": 2 + }, + "created_at": "2026-10-26 13:51:40.671979+00:00" + }, + { + "event": "published", + "details": { + "attempt": 2, + "stream_id": "1793022700829-0" + }, + "created_at": "2026-10-26 13:51:40.859118+00:00" + }, + { + "event": "processing", + "details": { + "worker": "35111ea58736:a94289ac:0", + "attempt": 2, + "stream_id": "1793022700829-0" + }, + "created_at": "2026-10-26 13:51:40.890177+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 2, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:51:41.797935+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:51:13.379856+00:00", + "stream_id": "1793022673356-0" + }, + { + "attempt": 2, + "published_at": "2026-10-26 13:51:40.858346+00:00", + "stream_id": "1793022700829-0" + } + ] + } + }, + { + "case": "bounded_retry_and_replay", + "repetition": 3, + "status": "PASS", + "elapsed_seconds": 75.655, + "unready": { + "status": "PASS", + "readiness_and_content": [ + 503, + 503 + ] + }, + "failed": { + "status": "PASS", + "error_code": "retry_exhausted", + "attempts": 5, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:52:06.982609+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793022727088-0" + }, + "created_at": "2026-10-26 13:52:07.111235+00:00" + }, + { + "event": "processing", + "details": { + "worker": "8a2113dcc83b:fffc888b:0", + "attempt": 1, + "stream_id": "1793022727088-0" + }, + "created_at": "2026-10-26 13:52:21.316547+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "storage_unavailable", + "attempt": 1, + "delay_seconds": 1.422 + }, + "created_at": "2026-10-26 13:52:22.407996+00:00" + }, + { + "event": "published", + "details": { + "attempt": 2, + "stream_id": "1793022744054-0" + }, + "created_at": "2026-10-26 13:52:24.083613+00:00" + }, + { + "event": "processing", + "details": { + "worker": "8a2113dcc83b:fffc888b:0", + "attempt": 2, + "stream_id": "1793022744054-0" + }, + "created_at": "2026-10-26 13:52:24.125230+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "storage_unavailable", + "attempt": 2, + "delay_seconds": 2.345 + }, + "created_at": "2026-10-26 13:52:25.169577+00:00" + }, + { + "event": "published", + "details": { + "attempt": 3, + "stream_id": "1793022747547-0" + }, + "created_at": "2026-10-26 13:52:27.576723+00:00" + }, + { + "event": "processing", + "details": { + "worker": "8a2113dcc83b:fffc888b:0", + "attempt": 3, + "stream_id": "1793022747547-0" + }, + "created_at": "2026-10-26 13:52:27.590897+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "storage_unavailable", + "attempt": 3, + "delay_seconds": 4.282 + }, + "created_at": "2026-10-26 13:52:28.623992+00:00" + }, + { + "event": "published", + "details": { + "attempt": 4, + "stream_id": "1793022753049-0" + }, + "created_at": "2026-10-26 13:52:33.070849+00:00" + }, + { + "event": "processing", + "details": { + "worker": "8a2113dcc83b:fffc888b:0", + "attempt": 4, + "stream_id": "1793022753049-0" + }, + "created_at": "2026-10-26 13:52:33.092176+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "storage_unavailable", + "attempt": 4, + "delay_seconds": 8.287 + }, + "created_at": "2026-10-26 13:52:34.124250+00:00" + }, + { + "event": "published", + "details": { + "attempt": 5, + "stream_id": "1793022762474-0" + }, + "created_at": "2026-10-26 13:52:42.495460+00:00" + }, + { + "event": "processing", + "details": { + "worker": "8a2113dcc83b:fffc888b:0", + "attempt": 5, + "stream_id": "1793022762474-0" + }, + "created_at": "2026-10-26 13:52:42.509967+00:00" + }, + { + "event": "failed", + "details": { + "code": "retry_exhausted", + "attempt": 5 + }, + "created_at": "2026-10-26 13:52:43.548344+00:00" + } + ] + }, + "result": { + "status": "PASS", + "attachment": { + "id": "ec47b5b1-c7c9-4800-84d9-01e09fcc879f", + "chat_id": "a070e814-bc9d-474a-9347-1448d7e51fbf", + "owner_id": "566e0b08-82ed-4016-908c-7df6afc752b3", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:52:06.978181Z", + "updated_at": "2026-10-26T13:52:59.011903Z" + }, + "job_id": "025cce91-6f6f-441d-946c-c54cb725b951", + "pipeline_version": 1, + "attempts": 6, + "current_keys": [ + "originals/ec47b5b1-c7c9-4800-84d9-01e09fcc879f/v1/original", + "variants/ec47b5b1-c7c9-4800-84d9-01e09fcc879f/v1/crop.jpg", + "variants/ec47b5b1-c7c9-4800-84d9-01e09fcc879f/v1/optimized.webp", + "variants/ec47b5b1-c7c9-4800-84d9-01e09fcc879f/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/ec47b5b1-c7c9-4800-84d9-01e09fcc879f/v1/original", + "variants/ec47b5b1-c7c9-4800-84d9-01e09fcc879f/v1/crop.jpg", + "variants/ec47b5b1-c7c9-4800-84d9-01e09fcc879f/v1/optimized.webp", + "variants/ec47b5b1-c7c9-4800-84d9-01e09fcc879f/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 52.03265, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:52:06.982609+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793022727088-0" + }, + "created_at": "2026-10-26 13:52:07.111235+00:00" + }, + { + "event": "processing", + "details": { + "worker": "8a2113dcc83b:fffc888b:0", + "attempt": 1, + "stream_id": "1793022727088-0" + }, + "created_at": "2026-10-26 13:52:21.316547+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "storage_unavailable", + "attempt": 1, + "delay_seconds": 1.422 + }, + "created_at": "2026-10-26 13:52:22.407996+00:00" + }, + { + "event": "published", + "details": { + "attempt": 2, + "stream_id": "1793022744054-0" + }, + "created_at": "2026-10-26 13:52:24.083613+00:00" + }, + { + "event": "processing", + "details": { + "worker": "8a2113dcc83b:fffc888b:0", + "attempt": 2, + "stream_id": "1793022744054-0" + }, + "created_at": "2026-10-26 13:52:24.125230+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "storage_unavailable", + "attempt": 2, + "delay_seconds": 2.345 + }, + "created_at": "2026-10-26 13:52:25.169577+00:00" + }, + { + "event": "published", + "details": { + "attempt": 3, + "stream_id": "1793022747547-0" + }, + "created_at": "2026-10-26 13:52:27.576723+00:00" + }, + { + "event": "processing", + "details": { + "worker": "8a2113dcc83b:fffc888b:0", + "attempt": 3, + "stream_id": "1793022747547-0" + }, + "created_at": "2026-10-26 13:52:27.590897+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "storage_unavailable", + "attempt": 3, + "delay_seconds": 4.282 + }, + "created_at": "2026-10-26 13:52:28.623992+00:00" + }, + { + "event": "published", + "details": { + "attempt": 4, + "stream_id": "1793022753049-0" + }, + "created_at": "2026-10-26 13:52:33.070849+00:00" + }, + { + "event": "processing", + "details": { + "worker": "8a2113dcc83b:fffc888b:0", + "attempt": 4, + "stream_id": "1793022753049-0" + }, + "created_at": "2026-10-26 13:52:33.092176+00:00" + }, + { + "event": "retry_scheduled", + "details": { + "code": "storage_unavailable", + "attempt": 4, + "delay_seconds": 8.287 + }, + "created_at": "2026-10-26 13:52:34.124250+00:00" + }, + { + "event": "published", + "details": { + "attempt": 5, + "stream_id": "1793022762474-0" + }, + "created_at": "2026-10-26 13:52:42.495460+00:00" + }, + { + "event": "processing", + "details": { + "worker": "8a2113dcc83b:fffc888b:0", + "attempt": 5, + "stream_id": "1793022762474-0" + }, + "created_at": "2026-10-26 13:52:42.509967+00:00" + }, + { + "event": "failed", + "details": { + "code": "retry_exhausted", + "attempt": 5 + }, + "created_at": "2026-10-26 13:52:43.548344+00:00" + }, + { + "event": "operator_replay", + "details": { + "next_attempt": 6 + }, + "created_at": "2026-10-26 13:52:58.236344+00:00" + }, + { + "event": "published", + "details": { + "attempt": 6, + "stream_id": "1793022778273-0" + }, + "created_at": "2026-10-26 13:52:58.293287+00:00" + }, + { + "event": "processing", + "details": { + "worker": "8a2113dcc83b:fffc888b:0", + "attempt": 6, + "stream_id": "1793022778273-0" + }, + "created_at": "2026-10-26 13:52:58.309857+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 6, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:52:59.013032+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:52:07.110518+00:00", + "stream_id": "1793022727088-0" + }, + { + "attempt": 2, + "published_at": "2026-10-26 13:52:24.082466+00:00", + "stream_id": "1793022744054-0" + }, + { + "attempt": 3, + "published_at": "2026-10-26 13:52:27.575479+00:00", + "stream_id": "1793022747547-0" + }, + { + "attempt": 4, + "published_at": "2026-10-26 13:52:33.069690+00:00", + "stream_id": "1793022753049-0" + }, + { + "attempt": 5, + "published_at": "2026-10-26 13:52:42.494480+00:00", + "stream_id": "1793022762474-0" + }, + { + "attempt": 6, + "published_at": "2026-10-26 13:52:58.292521+00:00", + "stream_id": "1793022778273-0" + } + ] + } + }, + { + "case": "staging_retention_and_privacy", + "repetition": 3, + "status": "PASS", + "elapsed_seconds": 37.404, + "cleanup": { + "status": "PASS", + "orphan_removed": true, + "fresh_and_queued_preserved": true, + "dry_run": { + "mode": "dry-run", + "retention_seconds": 2, + "objects_scanned": 4, + "actions": [ + { + "key": "staging/88954087-051b-4690-9606-309c03d7fa9b/e9ac3114-05b0-49e6-ac47-e080f7766b0d", + "reason": "retention", + "applied": false + }, + { + "key": "staging/9b54633d-1a3b-4836-8c64-03354ff0aea7/0ebf3687-fe1a-4e17-b7fb-bbe9e5be2820", + "reason": "retention", + "applied": false + } + ] + }, + "apply": { + "mode": "apply", + "retention_seconds": 2, + "objects_scanned": 4, + "actions": [ + { + "key": "staging/88954087-051b-4690-9606-309c03d7fa9b/e9ac3114-05b0-49e6-ac47-e080f7766b0d", + "reason": "retention", + "applied": true + }, + { + "key": "staging/9b54633d-1a3b-4836-8c64-03354ff0aea7/0ebf3687-fe1a-4e17-b7fb-bbe9e5be2820", + "reason": "retention", + "applied": true + } + ] + } + }, + "privacy": { + "status": "PASS", + "anonymous_get": 403 + }, + "result": { + "status": "PASS", + "attachment": { + "id": "0ea144cd-d3cb-4a6f-a230-76c934381857", + "chat_id": "d0af4ab4-9312-4458-98a1-03f8096311c8", + "owner_id": "6bdddc2d-3e72-4f19-a8e3-eeb8bd413819", + "filename": "pipeline.png", + "content_type": "image/png", + "size_bytes": 111817, + "sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "status": "ready", + "variants": [ + { + "name": "thumbnail", + "width": 256, + "height": 160, + "sha256": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "size_bytes": 4352, + "content_type": "image/jpeg" + }, + { + "name": "crop", + "width": 128, + "height": 128, + "sha256": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "size_bytes": 1724, + "content_type": "image/jpeg" + }, + { + "name": "optimized", + "width": 320, + "height": 200, + "sha256": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c", + "size_bytes": 2576, + "content_type": "image/webp" + } + ], + "error_code": null, + "created_at": "2026-10-26T13:53:19.472356Z", + "updated_at": "2026-10-26T13:53:32.934199Z" + }, + "job_id": "76f04f93-0a39-495b-9fad-1cfeb3dac18f", + "pipeline_version": 1, + "attempts": 1, + "current_keys": [ + "originals/0ea144cd-d3cb-4a6f-a230-76c934381857/v1/original", + "variants/0ea144cd-d3cb-4a6f-a230-76c934381857/v1/crop.jpg", + "variants/0ea144cd-d3cb-4a6f-a230-76c934381857/v1/optimized.webp", + "variants/0ea144cd-d3cb-4a6f-a230-76c934381857/v1/thumbnail.jpg" + ], + "all_final_keys": [ + "originals/0ea144cd-d3cb-4a6f-a230-76c934381857/v1/original", + "variants/0ea144cd-d3cb-4a6f-a230-76c934381857/v1/crop.jpg", + "variants/0ea144cd-d3cb-4a6f-a230-76c934381857/v1/optimized.webp", + "variants/0ea144cd-d3cb-4a6f-a230-76c934381857/v1/thumbnail.jpg" + ], + "variants_sha256": { + "thumbnail": "2c2ec89bd1a94eb6129f2e45d51e9b8fcebe8651b8af3cdc2b16789a6a888b16", + "crop": "2ce7735c61ec3387b95b607c788a5398f029dbcef1ab9844c46a9ffe88bb56bb", + "optimized": "b0021a56abe58c6346f8fcae3a3e9820fa230e40286de35b1c50127d8f04e49c" + }, + "original_sha256": "99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75", + "ready_commits": 1, + "staging_deleted": true, + "queued_to_ready_seconds": 13.461069, + "events": [ + { + "event": "accepted", + "details": {}, + "created_at": "2026-10-26 13:53:19.475821+00:00" + }, + { + "event": "published", + "details": { + "attempt": 1, + "stream_id": "1793022799539-0" + }, + "created_at": "2026-10-26 13:53:19.561879+00:00" + }, + { + "event": "processing", + "details": { + "worker": "e041f3a9dae0:f8cf7493:0", + "attempt": 1, + "stream_id": "1793022799539-0" + }, + "created_at": "2026-10-26 13:53:32.254064+00:00" + }, + { + "event": "ready", + "details": { + "attempt": 1, + "pipeline_version": 1 + }, + "created_at": "2026-10-26 13:53:32.935266+00:00" + } + ], + "outbox": [ + { + "attempt": 1, + "published_at": "2026-10-26 13:53:19.561128+00:00", + "stream_id": "1793022799539-0" + } + ] + } + } + ] +} diff --git a/evidence/pipeline_summary.json b/evidence/pipeline_summary.json new file mode 100644 index 0000000..4176714 --- /dev/null +++ b/evidence/pipeline_summary.json @@ -0,0 +1,94 @@ +{ + "status": "PASS", + "track": 2, + "cases": [ + { + "case": "accepted_restart_broker_api", + "repetitions": 3, + "status": "PASS", + "median_seconds": 62.692 + }, + { + "case": "before_publish", + "repetitions": 3, + "status": "PASS", + "median_seconds": 45.89 + }, + { + "case": "after_publish", + "repetitions": 3, + "status": "PASS", + "median_seconds": 44.544 + }, + { + "case": "before_effect", + "repetitions": 3, + "status": "PASS", + "median_seconds": 45.35 + }, + { + "case": "after_original", + "repetitions": 3, + "status": "PASS", + "median_seconds": 43.115 + }, + { + "case": "after_effects", + "repetitions": 3, + "status": "PASS", + "median_seconds": 46.272 + }, + { + "case": "after_commit", + "repetitions": 3, + "status": "PASS", + "median_seconds": 36.306 + }, + { + "case": "duplicates_and_invalid_carrier", + "repetitions": 3, + "status": "PASS", + "median_seconds": 36.795 + }, + { + "case": "reorder_new_before_old", + "repetitions": 3, + "status": "PASS", + "median_seconds": 57.728 + }, + { + "case": "stale_after_new_ready", + "repetitions": 3, + "status": "PASS", + "median_seconds": 54.823 + }, + { + "case": "permanent_failure_replay", + "repetitions": 3, + "status": "PASS", + "median_seconds": 56.23 + }, + { + "case": "bounded_retry_and_replay", + "repetitions": 3, + "status": "PASS", + "median_seconds": 75.655 + }, + { + "case": "staging_retention_and_privacy", + "repetitions": 3, + "status": "PASS", + "median_seconds": 37.404 + } + ], + "checks": 39, + "invariants": [ + "accepted work preserved", + "one ready commit per job", + "exactly three named variants", + "original checksum preserved", + "stale version cannot replace current metadata/bytes", + "bounded retries and explicit replay", + "staging cleanup protects active jobs" + ] +} diff --git a/evidence/runtime_versions.json b/evidence/runtime_versions.json new file mode 100644 index 0000000..138e90b --- /dev/null +++ b/evidence/runtime_versions.json @@ -0,0 +1,145 @@ +{ + "db": "postgres (PostgreSQL) 16.9 (Debian 16.9-1.pgdg120+1)", + "cache": "Redis server v=7.4.3 sha=00000000:0 malloc=jemalloc-5.3.0 bits=64 build=33b32145ce3464c9", + "broker": "Redis server v=7.4.3 sha=00000000:0 malloc=jemalloc-5.3.0 bits=64 build=33b32145ce3464c9", + "s3": "minio version RELEASE.2025-04-22T22-12-26Z (commit-id=0d7408fc9969caf07de6a8c3a84f9fbb10a6739e)\nRuntime: go1.24.2 linux/amd64\nLicense: GNU AGPLv3 - https://www.gnu.org/licenses/agpl-3.0.html\nCopyright: 2015-2025 MinIO, Inc.", + "api": "Python 3.12.10", + "lb": "HAProxy version 3.0.11-9e587df 2025/06/02 - https://haproxy.org/\nStatus: long-term supported branch - will stop receiving fixes around Q2 2029.\nKnown bugs: http://www.haproxy.org/bugs/bugs-3.0.11.html\nRunning on: Linux 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64", + "application_dependencies": [ + "annotated-types==0.8.0", + "anyio==4.15.1", + "argon2-cffi==23.1.0", + "argon2-cffi-bindings==26.1.0", + "boto3==1.40.18", + "botocore==1.40.76", + "cffi==2.1.1", + "click==8.5.0", + "fastapi==0.115.12", + "h11==0.16.0", + "idna==3.20", + "jmespath==1.1.0", + "pillow==12.0.0", + "psycopg==3.2.9", + "psycopg-binary==3.2.9", + "psycopg-pool==3.3.3", + "pycparser==3.12", + "pydantic==2.11.5", + "pydantic_core==2.33.2", + "python-dateutil==2.9.0.post0", + "redis==5.2.1", + "s3transfer==0.13.1", + "six==1.17.0", + "starlette==0.46.2", + "typing-inspection==0.4.4", + "typing_extensions==4.16.0", + "urllib3==2.8.0", + "uvicorn==0.34.2" + ], + "images_mounts": [ + { + "service": "api", + "image": "mtusi2026lab5-app:1", + "image_id": "sha256:4a85fcc4882db2f88339832df15fb6c6806da842209445bdcfc56500a1d32c0b", + "mounts": [] + }, + { + "service": "api", + "image": "mtusi2026lab5-app:1", + "image_id": "sha256:4a85fcc4882db2f88339832df15fb6c6806da842209445bdcfc56500a1d32c0b", + "mounts": [] + }, + { + "service": "broker", + "image": "redis:7.4.3-bookworm", + "image_id": "sha256:ce466e2d8c6f3332d781ad10c4cb3e0b97df2b0c5c2be2e930e8367c4e3b3fba", + "mounts": [ + { + "type": "volume", + "name": "mtusi2026lab5_broker_data", + "destination": "/data", + "rw": true + } + ] + }, + { + "service": "cache", + "image": "redis:7.4.3-bookworm", + "image_id": "sha256:ce466e2d8c6f3332d781ad10c4cb3e0b97df2b0c5c2be2e930e8367c4e3b3fba", + "mounts": [ + { + "type": "volume", + "name": "mtusi2026lab5_redis_data", + "destination": "/data", + "rw": true + } + ] + }, + { + "service": "db", + "image": "postgres:16.9-bookworm", + "image_id": "sha256:00d06ace1e0b51d5ef8170bbc38557092c83253c9f21ad68a85a49d46c825ce0", + "mounts": [ + { + "type": "volume", + "name": "mtusi2026lab5_postgres_data", + "destination": "/var/lib/postgresql/data", + "rw": true + } + ] + }, + { + "service": "dispatcher", + "image": "mtusi2026lab5-app:1", + "image_id": "sha256:4a85fcc4882db2f88339832df15fb6c6806da842209445bdcfc56500a1d32c0b", + "mounts": [] + }, + { + "service": "lb", + "image": "haproxy:3.0.11-bookworm", + "image_id": "sha256:1b8bb9f4c3dde476fb1cfd2875ff1fa694d6224c4b7e4adbdba7de5a79d80b23", + "mounts": [] + }, + { + "service": "migrate", + "image": "mtusi2026lab5-app:1", + "image_id": "sha256:4a85fcc4882db2f88339832df15fb6c6806da842209445bdcfc56500a1d32c0b", + "mounts": [] + }, + { + "service": "reconciler", + "image": "mtusi2026lab5-app:1", + "image_id": "sha256:4a85fcc4882db2f88339832df15fb6c6806da842209445bdcfc56500a1d32c0b", + "mounts": [] + }, + { + "service": "s3", + "image": "mtusi2026lab5-minio:2025-04-22", + "image_id": "sha256:5816bd699104d2cd34fc3b5540a48972cb088ef213383ef48b523882868d907f", + "mounts": [ + { + "type": "volume", + "name": "mtusi2026lab5_s3_data", + "destination": "/data", + "rw": true + } + ] + }, + { + "service": "s3-bootstrap", + "image": "mtusi2026lab5-mc:2025-04-16", + "image_id": "sha256:fb106f2cfb8c434ddc7dd0f668013cf6421f7ec382eb71f151ccdd6b1b8ff2b4", + "mounts": [] + }, + { + "service": "worker", + "image": "mtusi2026lab5-app:1", + "image_id": "sha256:4a85fcc4882db2f88339832df15fb6c6806da842209445bdcfc56500a1d32c0b", + "mounts": [] + } + ], + "fault_flags": { + "dispatcher": "0", + "reconciler": "0", + "worker": "0" + } +} diff --git a/infra/broker-entrypoint.sh b/infra/broker-entrypoint.sh new file mode 100644 index 0000000..8bb81db --- /dev/null +++ b/infra/broker-entrypoint.sh @@ -0,0 +1,18 @@ +#!/bin/sh +set -eu +# Пароль не передаётся аргументом процесса и не печатается в лог. +# Root-owned directory avoids sticky /tmp protected_regular on container restart. +mkdir -p /run/broker +chmod 755 /run/broker +{ + echo 'dir /data' + echo 'appendonly yes' + echo 'appendfsync always' + echo 'save ""' + echo 'maxmemory 192mb' + echo 'maxmemory-policy noeviction' + printf 'requirepass %s\n' "$(cat /run/secrets/broker_password)" +} > /run/broker/broker.conf +chmod 600 /run/broker/broker.conf +chown redis:redis /run/broker/broker.conf +exec /usr/local/bin/docker-entrypoint.sh redis-server /run/broker/broker.conf diff --git a/infra/haproxy.cfg b/infra/haproxy.cfg new file mode 100644 index 0000000..ab4d853 --- /dev/null +++ b/infra/haproxy.cfg @@ -0,0 +1,37 @@ +global + log stdout format raw local0 + maxconn 2048 + +defaults + mode http + log global + option httplog + timeout connect 500ms + timeout client 30s + timeout server 50s + timeout check 1s + retries 0 + +resolvers docker + nameserver dns 127.0.0.11:53 + resolve_retries 1 + timeout resolve 1s + timeout retry 1s + hold valid 1s + hold nx 1s + hold other 1s + hold refused 1s + hold timeout 1s + hold obsolete 1s + +frontend public + bind :8080 + http-request deny if { path_beg /internal/ } + default_backend messenger + +backend messenger + balance roundrobin + option httpchk GET /health/ready + http-check expect status 200 + default-server inter 1s fastinter 500ms downinter 1s fall 2 rise 1 + server-template api 1-4 api:8080 check resolvers docker init-addr none resolve-prefer ipv4 diff --git a/infra/minio-entrypoint.sh b/infra/minio-entrypoint.sh new file mode 100644 index 0000000..5aba08e --- /dev/null +++ b/infra/minio-entrypoint.sh @@ -0,0 +1,5 @@ +#!/bin/sh +set -eu +export MINIO_ROOT_USER="$(cat /run/secrets/s3_root_user)" +export MINIO_ROOT_PASSWORD="$(cat /run/secrets/s3_root_password)" +exec minio "$@" diff --git a/infra/s3-api-policy.json b/infra/s3-api-policy.json new file mode 100644 index 0000000..bd561fd --- /dev/null +++ b/infra/s3-api-policy.json @@ -0,0 +1,45 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "s3:GetBucketLocation" + ], + "Resource": [ + "arn:aws:s3:::messenger-attachments" + ] + }, + { + "Effect": "Allow", + "Action": [ + "s3:ListBucket" + ], + "Resource": [ + "arn:aws:s3:::messenger-attachments" + ], + "Condition": { + "StringLike": { + "s3:prefix": [ + "originals/*", + "staging/*", + "variants/*" + ] + } + } + }, + { + "Effect": "Allow", + "Action": [ + "s3:GetObject", + "s3:PutObject", + "s3:DeleteObject" + ], + "Resource": [ + "arn:aws:s3:::messenger-attachments/originals/*", + "arn:aws:s3:::messenger-attachments/staging/*", + "arn:aws:s3:::messenger-attachments/variants/*" + ] + } + ] +} diff --git a/infra/s3.Dockerfile b/infra/s3.Dockerfile new file mode 100644 index 0000000..ca1e2b5 --- /dev/null +++ b/infra/s3.Dockerfile @@ -0,0 +1,27 @@ +# syntax=docker/dockerfile:1.7.0 +FROM python:3.12.10-slim-bookworm +ARG COMPONENT +ARG RELEASE +ARG SHA256 +RUN python - <<'PY' +import hashlib +import os +from pathlib import Path +import shutil +import urllib.request + +component = os.environ['COMPONENT'] +release = os.environ['RELEASE'] +assert component in {'minio', 'mc'} +name = f'{component}.linux-amd64.{release}' +url = f'https://github.com/minio/{component}/releases/download/{release}/{name}' +target = Path('/usr/local/bin') / component +with urllib.request.urlopen(url, timeout=180) as response, target.open('wb') as file: + shutil.copyfileobj(response, file) +with target.open('rb') as file: + digest = hashlib.file_digest(file, 'sha256').hexdigest() +assert digest == os.environ['SHA256'], 'Unexpected binary checksum' +target.chmod(0o755) +PY +COPY infra/minio-entrypoint.sh /entrypoint.sh +ENTRYPOINT ["/bin/sh", "/entrypoint.sh"] diff --git a/migrations/001_initial.sql b/migrations/001_initial.sql new file mode 100644 index 0000000..b3b6328 --- /dev/null +++ b/migrations/001_initial.sql @@ -0,0 +1,36 @@ +-- Сначала схема и ограничения, затем запросы приложения. +CREATE TABLE users ( + id uuid PRIMARY KEY, + username varchar(32) NOT NULL UNIQUE CHECK (username ~ '^[a-z0-9_]{3,32}$'), + display_name varchar(100) NOT NULL CHECK (length(btrim(display_name)) > 0), + password_hash text NOT NULL, + created_at timestamptz NOT NULL DEFAULT clock_timestamp() +); +CREATE TABLE chats ( + id uuid PRIMARY KEY, + title varchar(100) NOT NULL CHECK (length(btrim(title)) > 0), + created_at timestamptz NOT NULL DEFAULT clock_timestamp() +); +CREATE TABLE chat_members ( + chat_id uuid NOT NULL REFERENCES chats(id) ON DELETE CASCADE, + user_id uuid NOT NULL REFERENCES users(id), + PRIMARY KEY (chat_id, user_id) +); +CREATE INDEX chat_members_user_idx ON chat_members(user_id, chat_id); +CREATE INDEX chats_order_idx ON chats(created_at, id); +CREATE TABLE messages ( + id uuid PRIMARY KEY, + chat_id uuid NOT NULL REFERENCES chats(id), + sender_id uuid NOT NULL, + text varchar(4000) NOT NULL CHECK (length(btrim(text)) > 0), + created_at timestamptz NOT NULL DEFAULT clock_timestamp(), + FOREIGN KEY (chat_id, sender_id) REFERENCES chat_members(chat_id, user_id) +); +-- Equality по chat_id и range/order по двум полям курсора. +CREATE INDEX messages_history_idx ON messages(chat_id, created_at, id); +CREATE TABLE sessions ( + token_hash char(64) PRIMARY KEY, + user_id uuid NOT NULL REFERENCES users(id), + expires_at timestamptz NOT NULL +); +CREATE INDEX sessions_expiry_idx ON sessions(expires_at); diff --git a/migrations/002_idempotency.sql b/migrations/002_idempotency.sql new file mode 100644 index 0000000..d293758 --- /dev/null +++ b/migrations/002_idempotency.sql @@ -0,0 +1,10 @@ +CREATE TABLE message_requests ( + user_id uuid NOT NULL REFERENCES users(id), + chat_id uuid NOT NULL REFERENCES chats(id), + request_key varchar(128) NOT NULL, + body_hash char(64) NOT NULL, + response jsonb NOT NULL, + expires_at timestamptz NOT NULL, + PRIMARY KEY (user_id, chat_id, request_key) +); +CREATE INDEX message_requests_expiry_idx ON message_requests(expires_at); diff --git a/migrations/003_attachments.sql b/migrations/003_attachments.sql new file mode 100644 index 0000000..c35917e --- /dev/null +++ b/migrations/003_attachments.sql @@ -0,0 +1,41 @@ +CREATE TABLE attachments ( + id uuid PRIMARY KEY, + chat_id uuid NOT NULL REFERENCES chats(id), + owner_id uuid NOT NULL REFERENCES users(id), + filename varchar(255) NOT NULL, + content_type text NOT NULL CHECK (content_type IN ('image/png', 'image/jpeg')), + size_bytes integer NOT NULL CHECK (size_bytes BETWEEN 1 AND 10485760), + sha256 char(64) NOT NULL, + object_key text NOT NULL UNIQUE, + status text NOT NULL CHECK (status IN ('uploading', 'ready', 'missing')), + lease_until timestamptz NOT NULL, + error_code text, + created_at timestamptz NOT NULL DEFAULT clock_timestamp(), + updated_at timestamptz NOT NULL DEFAULT clock_timestamp() +); +CREATE INDEX attachments_chat_idx ON attachments(chat_id, created_at, id); +CREATE TABLE message_attachments ( + message_id uuid NOT NULL REFERENCES messages(id) ON DELETE CASCADE, + attachment_id uuid NOT NULL REFERENCES attachments(id), + position smallint NOT NULL CHECK (position BETWEEN 0 AND 9), + PRIMARY KEY (message_id, position), + UNIQUE (message_id, attachment_id) +); +ALTER TABLE messages DROP CONSTRAINT messages_text_check; +CREATE FUNCTION check_message_content() RETURNS trigger LANGUAGE plpgsql AS $$ +BEGIN + IF length(btrim(NEW.text))=0 AND NOT EXISTS ( + SELECT 1 FROM message_attachments WHERE message_id=NEW.id + ) THEN + RAISE EXCEPTION 'message needs text or attachment' USING ERRCODE='23514'; + END IF; + RETURN NEW; +END; +$$; +-- Проверяем в конце транзакции, когда связи вложений уже вставлены. +CREATE CONSTRAINT TRIGGER message_content +AFTER INSERT OR UPDATE ON messages DEFERRABLE INITIALLY DEFERRED +FOR EACH ROW EXECUTE FUNCTION check_message_content(); +-- Прежние текстовые повторы остаются совместимыми с расширенной схемой Message. +UPDATE message_requests SET response=response || '{"attachment_ids": []}'::jsonb +WHERE NOT response ? 'attachment_ids'; diff --git a/migrations/004_pipeline.sql b/migrations/004_pipeline.sql new file mode 100644 index 0000000..7c70afe --- /dev/null +++ b/migrations/004_pipeline.sql @@ -0,0 +1,57 @@ +ALTER TABLE attachments DROP CONSTRAINT attachments_status_check; +UPDATE attachments SET status='failed',error_code='legacy_incomplete' WHERE status IN ('uploading','missing'); +ALTER TABLE attachments ADD CONSTRAINT attachments_status_check CHECK (status IN ('queued','processing','ready','failed')); +ALTER TABLE attachments ADD COLUMN pipeline_version integer NOT NULL DEFAULT 1 CHECK (pipeline_version>0); +ALTER TABLE attachments ADD COLUMN variants jsonb NOT NULL DEFAULT '[]'; +ALTER TABLE attachments ADD COLUMN variant_keys jsonb NOT NULL DEFAULT '{}'; + +CREATE TABLE jobs ( + id uuid PRIMARY KEY, + attachment_id uuid NOT NULL REFERENCES attachments(id), + pipeline_version integer NOT NULL CHECK (pipeline_version>0), + status text NOT NULL CHECK (status IN ('queued','processing','ready','failed','superseded')), + staging_key text NOT NULL UNIQUE, + attempts integer NOT NULL DEFAULT 0, + budget_start integer NOT NULL DEFAULT 0, + available_at timestamptz NOT NULL DEFAULT clock_timestamp(), + lease_until timestamptz, + lease_token uuid, + error_code text, + staged_deleted_at timestamptz, + created_at timestamptz NOT NULL DEFAULT clock_timestamp(), + updated_at timestamptz NOT NULL DEFAULT clock_timestamp(), + UNIQUE (attachment_id,pipeline_version) +); +ALTER TABLE attachments ADD COLUMN current_job_id uuid REFERENCES jobs(id); +CREATE INDEX jobs_schedule_idx ON jobs(status,available_at); +CREATE TABLE job_outbox ( + id bigserial PRIMARY KEY, + job_id uuid NOT NULL REFERENCES jobs(id), + attempt integer NOT NULL CHECK (attempt>0), + published_at timestamptz, + stream_id text, + created_at timestamptz NOT NULL DEFAULT clock_timestamp(), + UNIQUE (job_id,attempt) +); +CREATE INDEX job_outbox_pending_idx ON job_outbox(id) WHERE published_at IS NULL; +CREATE TABLE job_events ( + id bigserial PRIMARY KEY, + job_id uuid NOT NULL REFERENCES jobs(id), + event text NOT NULL, + details jsonb NOT NULL DEFAULT '{}', + created_at timestamptz NOT NULL DEFAULT clock_timestamp() +); +-- Точечные одноразовые сбои нужны для воспроизводимого эксперимента трека 2. +-- Исполнение разрешено только с ALLOW_FAULT_INJECTION=1; UUID конкретной job обязателен. +CREATE TABLE pipeline_faults ( + job_id uuid NOT NULL REFERENCES jobs(id), + phase text NOT NULL, + fired_at timestamptz, + PRIMARY KEY (job_id,phase) +); +CREATE TABLE broker_rejections ( + stream_id text PRIMARY KEY, + sha256 char(64) NOT NULL, + error_code text NOT NULL, + created_at timestamptz NOT NULL DEFAULT clock_timestamp() +); diff --git a/requirements-experiment.txt b/requirements-experiment.txt new file mode 100644 index 0000000..7126a79 --- /dev/null +++ b/requirements-experiment.txt @@ -0,0 +1 @@ +Pillow==12.0.0 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..4c0ac28 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,18 @@ +annotated-types==0.8.0 +anyio==4.15.1 +click==8.5.0 +fastapi==0.115.12 +h11==0.16.0 +idna==3.20 +pydantic==2.11.5 +pydantic_core==2.33.2 +starlette==0.46.2 +typing-inspection==0.4.4 +typing_extensions==4.16.0 +uvicorn==0.34.2 +psycopg[binary]==3.2.9 +psycopg-pool==3.3.3 +redis==5.2.1 +argon2-cffi==23.1.0 +boto3==1.40.18 +Pillow==12.0.0 diff --git a/scripts/bootstrap_s3.sh b/scripts/bootstrap_s3.sh new file mode 100755 index 0000000..4e6c04c --- /dev/null +++ b/scripts/bootstrap_s3.sh @@ -0,0 +1,19 @@ +#!/bin/sh +set -eu +endpoint="${S3_ENDPOINT:-http://s3:9000}" +bucket="messenger-attachments" +export MC_CONFIG_DIR=/tmp/mc-config +attempt=0 +until mc alias set local "$endpoint" "$(cat /run/secrets/s3_root_user)" \ + "$(cat /run/secrets/s3_root_password)" >/dev/null 2>&1; do + attempt=$((attempt + 1)) + test "$attempt" -lt 60 || exit 1 + sleep 1 +done +mc mb --ignore-existing "local/$bucket" >/dev/null +mc anonymous set none "local/$bucket" >/dev/null +mc admin policy create local messenger-api /policies/s3-api-policy.json >/dev/null +mc admin user add local "$(cat /run/secrets/s3_access_key_id)" \ + "$(cat /run/secrets/s3_secret_access_key)" >/dev/null +mc admin policy attach local messenger-api --user "$(cat /run/secrets/s3_access_key_id)" >/dev/null +echo 'Private bucket and limited API credentials ready' diff --git a/scripts/experiment.py b/scripts/experiment.py new file mode 100644 index 0000000..268f1a1 --- /dev/null +++ b/scripts/experiment.py @@ -0,0 +1,163 @@ +"""Трек 2: повторяемые реальные crashes, дубли, reorder, версии и восстановление.""" +import argparse +import json +import os +from pathlib import Path +import statistics +import sys +import time + +ROOT=Path(__file__).resolve().parents[1] +sys.path.insert(0,str(ROOT)) +from scripts.stack import command,containers,wait,save + + +class Runner: + def __init__(self): + self.env=dict(os.environ,ALLOW_FAULT_INJECTION='1',WORKER_CONCURRENCY='1') + self.base=os.getenv('BASE_URL','http://localhost:8080') + + def call(self,mode,ctx=None,**options): + arguments=['docker','compose','run','--rm','--no-deps','-T','-e','BASE_URL=http://lb:8080', + 'dispatcher','python','student-tests/pipeline_scenario.py',mode] + for key,value in options.items():arguments.extend(['--'+key.replace('_','-'),str(value)]) + # Контекст с Bearer остаётся в памяти клиента и stdin, не в argv/evidence. + return json.loads(command(arguments,env=self.env,input=json.dumps(ctx or {}),timeout=150)) + + def service(self,action,name): + if action=='stop':command(['docker','compose','stop',name],env=self.env) + elif action=='restart': + command(['docker','compose','stop',name],env=self.env) + command(['docker','compose','up','-d','--no-deps','--wait',name],env=self.env) + else: + args=['docker','compose','up','-d','--no-deps'] + if action=='recreate':args.append('--force-recreate') + command([*args,name],env=self.env) + if name in {'api','s3'} and action!='stop':wait(2,self.base) + + def infrastructure(self):return containers() + + def finish(self): + normal=dict(os.environ,ALLOW_FAULT_INJECTION='0') + command(['docker','compose','up','-d','--no-deps','--force-recreate','worker','dispatcher'],env=normal) + command(['docker','compose','up','-d','--no-deps','reconciler'],env=normal) + wait(2,self.base) + + +def same_effect(before,after): + assert before['attachment']==after['attachment'],'Duplicate altered public metadata' + assert before['current_keys']==after['current_keys'],'Duplicate multiplied variants' + assert before['variants_sha256']==after['variants_sha256'],'Duplicate changed bytes' + assert before['original_sha256']==after['original_sha256'] + + +def run_suite(runner,repeats,on_result): + results=[] + def ready(ctx): + runner.call('wait',ctx) + return runner.call('snapshot',ctx) + def record(name,repeat,started,**values): + row=dict(case=name,repetition=repeat,status='PASS',elapsed_seconds=round(time.monotonic()-started,3),**values) + results.append(row);on_result(results) + print(f'PASS: {name}, repeat {repeat}/{repeats}',flush=True) + runner.service('stop','reconciler') + for repeat in range(1,repeats+1): + started=time.monotonic();runner.service('stop','worker');runner.service('start','dispatcher') + ctx=runner.call('create');queued=runner.call('queued',ctx) + published=runner.call('published',ctx) + runner.service('stop','dispatcher');runner.service('recreate','api');runner.service('restart','broker') + restored=runner.call('published',ctx);assert restored['stream_ids']==published['stream_ids'] + runner.service('start','dispatcher');runner.service('recreate','worker') + record('accepted_restart_broker_api',repeat,started,queued=queued,broker_preserved=restored,result=ready(ctx),infrastructure=runner.infrastructure()) + for phase in ['before_publish','after_publish']: + started=time.monotonic();runner.service('stop','worker');runner.service('stop','dispatcher') + ctx=runner.call('create');runner.call('arm',ctx,phase=phase) + runner.service('recreate','dispatcher');fired=runner.call('fault-fired',ctx,phase=phase) + runner.service('recreate','worker');result=ready(ctx) + record(phase,repeat,started,fault=fired,result=result,infrastructure=runner.infrastructure()) + for phase in ['before_effect','after_original','after_effects','after_commit']: + started=time.monotonic();runner.service('stop','worker') + ctx=runner.call('create');runner.call('arm',ctx,phase=phase) + runner.service('recreate','worker');fired=runner.call('fault-fired',ctx,phase=phase) + result=ready(ctx) + if phase=='after_commit':assert result['attempts']==1,'Committed result was processed again' + else:assert result['attempts']>=2,'Abandoned lease was not recovered' + record(phase,repeat,started,fault=fired,result=result,infrastructure=runner.infrastructure()) + started=time.monotonic();ctx=runner.call('create');before=ready(ctx) + copies=runner.call('duplicate',dict(ctx,copies=16)) + acked=runner.call('drained',dict(ctx,stream_ids=copies['stream_ids'])) + after=runner.call('snapshot',ctx);same_effect(before,after) + rejected=runner.call('invalid-job',ctx) + assert len([r for r in after['events'] if r['event']=='duplicate_ready'])>=16 + record('duplicates_and_invalid_carrier',repeat,started,duplicates=acked,invalid_carrier=rejected,result=after) + # Новая job приходит первой, старая после неё: контролируемый reorder. + started=time.monotonic();runner.service('stop','worker');runner.service('stop','dispatcher') + old=runner.call('create');new=runner.call('version',old) + first=runner.call('duplicate',new);second=runner.call('duplicate',old) + runner.service('recreate','worker') + runner.call('drained',dict(new,stream_ids=first['stream_ids']+second['stream_ids'])) + result=ready(new);old_audit=runner.call('audit',old) + assert any(r['event']=='stale_ignored' for r in old_audit['events']) + assert result['pipeline_version']==2 + record('reorder_new_before_old',repeat,started,result=result,old_job=old_audit) + runner.service('start','dispatcher') + # Теперь старая версия уже имела ready; её поздний дубль не меняет v2. + started=time.monotonic();old=runner.call('create');v1=ready(old) + new=runner.call('version',old);before=ready(new) + assert before['variants_sha256']!=v1['variants_sha256'],'Pipeline version did not change actual output' + copies=runner.call('duplicate',dict(old,copies=3));runner.call('drained',dict(old,stream_ids=copies['stream_ids'])) + after=runner.call('snapshot',new);same_effect(before,after) + record('stale_after_new_ready',repeat,started,result=after,old_job=runner.call('audit',old)) + started=time.monotonic();runner.service('stop','worker');ctx=runner.call('create') + runner.call('missing-stage',ctx);runner.service('recreate','worker');runner.call('wait',ctx,state='failed') + failed=runner.call('failed',ctx);assert failed['error_code']=='staging_missing' + runner.call('restore-stage',ctx);runner.call('replay',ctx);result=ready(ctx) + noop=runner.call('replay',ctx);assert noop['status']=='noop' + record('permanent_failure_replay',repeat,started,failed=failed,ready_replay=noop,result=result) + # Физический stop S3, а не подмена ответа или бесконечная retry-петля. + started=time.monotonic();runner.service('stop','worker');ctx=runner.call('create') + runner.service('stop','s3') + try: + time.sleep(4);unready=runner.call('unready',ctx) + runner.service('recreate','worker');runner.call('wait',ctx,state='failed',timeout=120) + finally:runner.service('start','s3') + failed=runner.call('failed',ctx);assert failed['error_code']=='retry_exhausted' + assert failed['attempts']==5 + runner.call('replay',ctx);result=ready(ctx) + record('bounded_retry_and_replay',repeat,started,unready=unready,failed=failed,result=result) + started=time.monotonic();runner.service('stop','worker');ctx=runner.call('create') + cleaned=runner.call('cleanup',ctx);runner.service('recreate','worker');result=ready(ctx) + privacy=runner.call('privacy',ctx) + record('staging_retention_and_privacy',repeat,started,cleanup=cleaned,privacy=privacy,result=result) + return results + + +def main(): + p=argparse.ArgumentParser();p.add_argument('--repeats',type=int,default=3);args=p.parse_args() + if not 1<=args.repeats<=5:p.error('repeats must be 1..5') + runner=Runner() + save('pipeline_environment.json',dict(docker=command(['docker','version','--format','{{.Server.Version}}']), + compose=command(['docker','compose','version','--short']),containers=containers(),client_cpus=os.cpu_count(), + pipeline=runner.call('config'))) + def persist(rows):save('pipeline_raw.json',dict(status='RUNNING',track=2,repeats=args.repeats,cases=rows)) + persist([]);save('pipeline_summary.json',dict(status='RUNNING',expected_checks=13*args.repeats)) + try: + try:rows=run_suite(runner,args.repeats,persist) + finally:runner.finish() + except Exception as exc: + save('pipeline_summary.json',dict(status='FAILED',reason=type(exc).__name__)) + raise + save('pipeline_raw.json',dict(status='PASS',track=2,repeats=args.repeats,cases=rows)) + summary=[] + for case in dict.fromkeys(r['case'] for r in rows): + subset=[r for r in rows if r['case']==case] + summary.append(dict(case=case,repetitions=len(subset),status='PASS', + median_seconds=statistics.median(r['elapsed_seconds'] for r in subset))) + save('pipeline_summary.json',dict(status='PASS',track=2,cases=summary,checks=len(rows), + invariants=['accepted work preserved','one ready commit per job','exactly three named variants', + 'original checksum preserved','stale version cannot replace current metadata/bytes', + 'bounded retries and explicit replay','staging cleanup protects active jobs'])) + print('Experiment completed; results saved in evidence/',flush=True) + + +if __name__=='__main__':main() diff --git a/scripts/healthcheck.py b/scripts/healthcheck.py new file mode 100644 index 0000000..45a6b77 --- /dev/null +++ b/scripts/healthcheck.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python3 +import json +import os +import urllib.request + + +host = "127.0.0.1" +port = os.getenv("APP_PORT", "8080") +with urllib.request.urlopen(f"http://{host}:{port}/health/ready", timeout=2) as response: + payload = json.load(response) + if response.status != 200 or payload != {"status": "ok"}: + raise SystemExit(1) diff --git a/scripts/restart.sh b/scripts/restart.sh new file mode 100755 index 0000000..4735e25 --- /dev/null +++ b/scripts/restart.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +set -euo pipefail +cd "$(dirname "$0")/.." +docker compose stop worker dispatcher reconciler lb api cache db s3 broker +docker compose up -d --wait db cache s3 broker +docker compose run --rm --no-deps migrate +docker compose run --rm --no-deps s3-bootstrap +docker compose up -d --no-deps --wait api +docker compose up -d --no-deps lb dispatcher worker reconciler +python3 scripts/stack.py wait --count 2 diff --git a/scripts/restore-api.sh b/scripts/restore-api.sh new file mode 100755 index 0000000..74e6dc1 --- /dev/null +++ b/scripts/restore-api.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +set -euo pipefail +cd "$(dirname "$0")/.." +docker compose start api +python3 scripts/stack.py wait --count 2 diff --git a/scripts/setup.sh b/scripts/setup.sh new file mode 100755 index 0000000..195d42d --- /dev/null +++ b/scripts/setup.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash +set -euo pipefail +cd "$(dirname "$0")/.." +mkdir -p .secrets +chmod 700 .secrets +python3 - <<'PY' +from pathlib import Path +import secrets +password_file = Path('.secrets/db_password') +if not password_file.exists(): + password_file.write_text(secrets.token_hex(24)) +password = password_file.read_text().strip() +Path('.secrets/database_url').write_text(f'postgresql://messenger:{password}@db:5432/messenger') +for name in ['s3_root_user', 's3_root_password', 's3_access_key_id', 's3_secret_access_key']: + file = Path('.secrets') / name + if not file.exists(): + file.write_text(secrets.token_hex(16 if name.endswith(('user', 'id')) else 32)) +broker_password=Path('.secrets/broker_password') +if not broker_password.exists(): broker_password.write_text(secrets.token_hex(24)) +Path('.secrets/broker_url').write_text('redis://:'+broker_password.read_text().strip()+'@broker:6379/0') +for file in Path('.secrets').iterdir(): + file.chmod(0o644 if file.name in {'database_url', 's3_access_key_id', 's3_secret_access_key', 'broker_url'} else 0o600) +if not Path('.env').exists(): + Path('.env').write_text('APP_PORT=8080\nSESSION_TTL_SECONDS=3600\nDB_POOL_MAX=8\nAPI_CPU=1.0\nAPI_MEMORY=512m\nWORKER_CONCURRENCY=1\nJOB_MAX_ATTEMPTS=5\nJOB_TIMEOUT_SECONDS=30\nJOB_LEASE_SECONDS=15\nSTAGING_RETENTION_SECONDS=86400\nMAX_PENDING_JOBS=1000\nALLOW_FAULT_INJECTION=0\n') +print('Локальные настройки подготовлены; секреты не выводятся.') +PY diff --git a/scripts/stack.py b/scripts/stack.py new file mode 100644 index 0000000..9f8aeda --- /dev/null +++ b/scripts/stack.py @@ -0,0 +1,129 @@ +"""Небольшие операции со стендом: состояние, ожидание, масштабирование и замена.""" +import argparse +import json +import os +from pathlib import Path +import subprocess +import time +import urllib.request + +ROOT = Path(__file__).resolve().parents[1] + + +def command(args, env=None, timeout=120, input=None): + result = subprocess.run(args, cwd=ROOT, env=env, text=True, capture_output=True, timeout=timeout, input=input) + if result.returncode: + raise RuntimeError(result.stderr[-2000:]) + return result.stdout.strip() + + +def containers(service=None): + args = ['docker', 'compose', 'ps', '-a', '-q'] + if service: + args.append(service) + ids = command(args).split() + if not ids: + return [] + # Сохраняем только нужные поля, без environment с возможными секретами. + rows = json.loads(command(['docker', 'inspect', *ids])) + return [dict(id=r['Id'], name=r['Name'].lstrip('/'), hostname=r['Config']['Hostname'], + service=r['Config']['Labels']['com.docker.compose.service'], + running=r['State']['Running'], started_at=r['State']['StartedAt'], restart_count=r.get('RestartCount',0), + cpu_limit=r['HostConfig']['NanoCpus'] / 1e9, + memory_limit_bytes=r['HostConfig']['Memory'], + published_ports=r['NetworkSettings']['Ports']) for r in rows] + + +def save(name, data): + path = ROOT / 'evidence' / name + path.parent.mkdir(exist_ok=True) + path.write_text(json.dumps(data, ensure_ascii=False, indent=2) + '\n') + + +def wait(count, base=None): + base = base or os.getenv('BASE_URL', 'http://localhost:8080') + deadline = time.monotonic() + 75 + while time.monotonic() < deadline: + observed = set() + for _ in range(max(12, count * 8)): + try: + with urllib.request.urlopen(base + '/health/ready', timeout=3) as response: + observed.add(response.headers['X-Instance-Id']) + except (OSError, ValueError): + break + if len(observed) == count and None not in observed: + return sorted(observed) + time.sleep(.5) + raise RuntimeError(f'Не дождались {count} готовых API через LB') + + +def stop(instance): + hostname = instance.split(':')[0] + found = [r for r in containers('api') if r['hostname'] == hostname and r['running']] + if len(found) != 1: + raise RuntimeError('Instance alias не соответствует одной работающей API-реплике') + before = containers() + command(['docker', 'stop', '--time', '3', found[0]['id']]) + result = dict(target=instance, stopped_container=found[0]['id'], before=before, after=containers()) + save('last_stop.json', result) + return result + + +def scale(count, cpu, memory, pool): + env = dict(os.environ, API_CPU=str(cpu), API_MEMORY=memory, DB_POOL_MAX=str(pool)) + command(['docker', 'compose', 'up', '-d', '--no-deps', '--force-recreate', + '--scale', f'api={count}', 'api'], env) + instances = wait(count) + rows = containers('api') + if len(rows) != count or not all(r['running'] for r in rows): + raise RuntimeError('Фактическое число контейнеров отличается от запрошенного') + for row in rows: + if abs(row['cpu_limit'] - cpu) > .001: + raise RuntimeError('Docker не применил CPU limit') + if row['memory_limit_bytes'] != int(memory.rstrip('m')) * 1024 * 1024: + raise RuntimeError('Docker не применил RAM limit') + return dict(instances=instances, containers=rows) + + +def rolling(): + old = [r['id'] for r in containers('api') if r['running']] + if len(old) != 2: + raise RuntimeError('Rolling проверяется на двух репликах обычного стенда') + before = containers() + command(['docker', 'compose', 'build', 'api']) + steps = [] + for container in old: + # Не пересоздаём одновременно старые контейнеры при изменении image. + command(['docker', 'compose', 'up', '-d', '--no-deps', '--no-recreate', '--scale', 'api=3', 'api']) + wait(3) + command(['docker', 'stop', '--time', '10', container]) + command(['docker', 'rm', container]) + wait(2) + steps.append(containers('api')) + save('rolling_containers.json', dict(before=before, steps=steps, after=containers())) + + +def main(): + p = argparse.ArgumentParser() + p.add_argument('action', choices=['wait', 'snapshot', 'stop', 'rolling']) + p.add_argument('--count', type=int, default=2) + p.add_argument('--instance') + p.add_argument('--output', default='containers.json') + args = p.parse_args() + if args.action == 'wait': + print('API ready:', ', '.join(wait(args.count))) + elif args.action == 'snapshot': + save(args.output, containers()) + print('Container identities and limits saved') + elif args.action == 'stop': + if not args.instance: + p.error('--instance required') + stop(args.instance) + print('Selected API stopped') + else: + rolling() + print('API replaced one at a time') + + +if __name__ == '__main__': + main() diff --git a/scripts/start.sh b/scripts/start.sh new file mode 100755 index 0000000..1e3e396 --- /dev/null +++ b/scripts/start.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +set -euo pipefail +cd "$(dirname "$0")/.." +docker compose up -d --build +python3 scripts/stack.py wait --count 2 diff --git a/scripts/stop-one.sh b/scripts/stop-one.sh new file mode 100755 index 0000000..78b4242 --- /dev/null +++ b/scripts/stop-one.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +set -euo pipefail +cd "$(dirname "$0")/.." +: "${TARGET_INSTANCE_ID:?TARGET_INSTANCE_ID is required}" +python3 scripts/stack.py stop --instance "$TARGET_INSTANCE_ID" diff --git a/scripts/test_expiry.sh b/scripts/test_expiry.sh new file mode 100755 index 0000000..7298b20 --- /dev/null +++ b/scripts/test_expiry.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +set -euo pipefail +cd "$(dirname "$0")/.." +restore() { + docker compose up -d --no-deps --force-recreate --scale api=2 api + python3 scripts/stack.py wait --count 2 +} +trap restore EXIT +SESSION_TTL_SECONDS=2 docker compose up -d --no-deps --force-recreate --scale api=2 api +python3 scripts/stack.py wait --count 2 +python3 student-tests/checks.py --expiry diff --git a/scripts/wait_ready.py b/scripts/wait_ready.py new file mode 100644 index 0000000..529a483 --- /dev/null +++ b/scripts/wait_ready.py @@ -0,0 +1,17 @@ +"""Ожидание готовности API без сторонних библиотек.""" +import os +import time +import urllib.request + +url = os.getenv('BASE_URL', 'http://localhost:8080') + '/health/ready' +for attempt in range(90): + try: + with urllib.request.urlopen(url, timeout=2) as response: + if response.status == 200: + print('API ready') + break + except OSError: + pass + time.sleep(1) +else: + raise SystemExit('API не стал готов за 90 попыток') diff --git a/src/__init__.py b/src/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/attachments.py b/src/attachments.py new file mode 100644 index 0000000..406d44f --- /dev/null +++ b/src/attachments.py @@ -0,0 +1,175 @@ +"""Ограниченный upload в staging; обработка и публикация выполняются worker.""" +import asyncio +import base64 +from datetime import datetime +import hashlib +import os +import tempfile +import threading +import unicodedata +import uuid +import warnings + +from fastapi import Request +from fastapi.responses import StreamingResponse +from PIL import Image, ImageFile, PngImagePlugin, UnidentifiedImageError +from pydantic import BaseModel, ConfigDict, Field +from starlette.concurrency import run_in_threadpool +from starlette.requests import ClientDisconnect + +from src.config import MAX_UPLOAD_BYTES, MAX_IMAGE_PIXELS, UPLOAD_TIMEOUT, MAX_PENDING_JOBS +from src.errors import ApiProblem +from src.storage import ObjectStore, unlock_attachment +from src.jobs import enqueue, event + +Image.MAX_IMAGE_PIXELS = MAX_IMAGE_PIXELS +ImageFile.LOAD_TRUNCATED_IMAGES = False +PngImagePlugin.MAX_TEXT_CHUNK = 1024 * 1024 +PngImagePlugin.MAX_TEXT_MEMORY = 2 * 1024 * 1024 +storage = ObjectStore() +upload_slots = asyncio.Semaphore(4) +validation_slots = threading.Semaphore(1) + + +class Attachment(BaseModel): + model_config = ConfigDict(extra='ignore') + id: uuid.UUID + chat_id: uuid.UUID + owner_id: uuid.UUID + filename: str + content_type: str + size_bytes: int + sha256: str + status: str + variants: list = Field(default_factory=list) + error_code: str | None = None + created_at: datetime + updated_at: datetime + + +def public_attachment(row): + return Attachment(**row).model_dump(mode='json') + + +def filename_valid(name): + if (not 1 <= len(name) <= 255 or not name.strip() or name in {'.', '..'} or + any(c in '/\\' or unicodedata.category(c) == 'Cc' for c in name)): + raise ApiProblem(400, 'invalid_request', 'Некорректное отображаемое имя файла') + + +def validate_image(file, declared_type): + # В API только ограниченная проверка структуры; полное декодирование — в worker. + with validation_slots, warnings.catch_warnings(): + warnings.simplefilter('error', Image.DecompressionBombWarning) + try: + file.seek(0) + # Pillow может закрыть свой file object. Дубликат FD сохраняет исходный spool. + with os.fdopen(os.dup(file.fileno()), 'rb') as probe, Image.open(probe, formats=['PNG', 'JPEG']) as image: + if image.width * image.height > MAX_IMAGE_PIXELS: + raise ApiProblem(413, 'payload_too_large', 'Слишком много пикселей') + detected = {'PNG': 'image/png', 'JPEG': 'image/jpeg'}[image.format] + if detected != declared_type: + raise ApiProblem(415, 'unsupported_media_type', 'MIME не совпадает с содержимым') + image.verify() + if declared_type == 'image/jpeg': + # Обрыв JPEG с отсутствующим EOI заметен без декодирования всех пикселей. + file.seek(0); previous=b''; ended=False + while chunk:=file.read(64*1024): + if b'\xff\xd9' in previous+chunk: ended=True + previous=chunk[-1:] + if not ended:raise OSError('truncated JPEG') + except (Image.DecompressionBombError, Image.DecompressionBombWarning): + raise ApiProblem(413, 'payload_too_large', 'Слишком много пикселей') from None + except (UnidentifiedImageError, OSError, ValueError, SyntaxError): + raise ApiProblem(415, 'unsupported_media_type', 'Повреждённое или неподдерживаемое изображение') from None + file.seek(0) + + +def persist(file, pool, chat_id, owner_id, filename, mime, size, sha256, md5): + attachment_id,job_id=uuid.uuid4(),uuid.uuid4() + stage=f'staging/{attachment_id}/{job_id}' + final=f'originals/{attachment_id}/v1/original' + with pool.connection() as db: + db.execute('SELECT pg_advisory_lock(hashtextextended(%s,0))',('attachment:'+str(attachment_id),));db.commit() + try: + storage.put(file,stage,size,mime,sha256,md5) + # Общая точка admission предотвращает переполнение при двух API. + db.execute("SELECT pg_advisory_xact_lock(hashtextextended('pipeline-admission',0))") + pending=db.execute("SELECT count(*) AS count FROM jobs WHERE status IN ('queued','processing')").fetchone()['count'] + if pending>=MAX_PENDING_JOBS: + raise ApiProblem(503,'unavailable','Очередь заполнена, повторите позже') + db.execute("INSERT INTO attachments(id,chat_id,owner_id,filename,content_type,size_bytes,sha256,object_key," + "status,lease_until) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,'queued',clock_timestamp())", + (attachment_id,chat_id,owner_id,filename,mime,size,sha256,final)) + job=db.execute("INSERT INTO jobs(id,attachment_id,pipeline_version,status,staging_key) " + "VALUES (%s,%s,1,'queued',%s) RETURNING *",(job_id,attachment_id,stage)).fetchone() + row=db.execute('UPDATE attachments SET current_job_id=%s WHERE id=%s RETURNING *', + (job_id,attachment_id)).fetchone() + enqueue(db,job);event(db,job_id,'accepted') + db.commit() # Staging уже устойчив, attachment/job/outbox фиксируются вместе. + return public_attachment(row) # Снимок queued, даже если worker очень быстрый. + finally: + # При неопределённом COMMIT ничего немедленно не удаляем. + db.rollback();unlock_attachment(db,attachment_id);db.commit() + + +def check_capacity(pool): + with pool.connection() as db: + count=db.execute("SELECT count(*) AS count FROM jobs WHERE status IN ('queued','processing')").fetchone()['count'] + if count>=MAX_PENDING_JOBS:raise ApiProblem(503,'unavailable','Очередь заполнена, повторите позже') + + +async def receive(request: Request, pool, chat_id, owner_id, filename): + await run_in_threadpool(check_capacity,pool) + filename_valid(filename) + mime = request.headers.get('content-type', '').split(';', 1)[0].strip().lower() + if mime not in {'image/png', 'image/jpeg'}: + raise ApiProblem(415, 'unsupported_media_type', 'Нужен PNG или JPEG') + length = request.headers.get('content-length') + if length is not None: + if not length.isdecimal(): + raise ApiProblem(400, 'invalid_request', 'Некорректный Content-Length') + if int(length) > MAX_UPLOAD_BYTES: + raise ApiProblem(413, 'payload_too_large', 'Лимит файла 10 MiB') + try: + async with asyncio.timeout(UPLOAD_TIMEOUT), upload_slots: + # На диске только временный bounded spool, не оригинал для будущего download. + with tempfile.TemporaryFile() as file: + size, sha, md5 = 0, hashlib.sha256(), hashlib.md5() + async for chunk in request.stream(): + size += len(chunk) + if size > MAX_UPLOAD_BYTES: + raise ApiProblem(413, 'payload_too_large', 'Лимит файла 10 MiB') + await run_in_threadpool(file.write, chunk) + sha.update(chunk); md5.update(chunk) + if not size: + raise ApiProblem(415, 'unsupported_media_type', 'Пустой файл') + await run_in_threadpool(validate_image, file, mime) + return await run_in_threadpool(persist, file, pool, chat_id, owner_id, filename, + mime, size, sha.hexdigest(), base64.b64encode(md5.digest()).decode()) + except TimeoutError: + raise ApiProblem(503, 'unavailable', 'Время загрузки истекло') from None + except ClientDisconnect: + raise ApiProblem(400, 'invalid_request', 'Передача файла прервана') from None + + +def download(row, variant='original'): + if variant=='original':key,mime,size=row['object_key'],row['content_type'],row['size_bytes'] + else: + info=next((v for v in row['variants'] if v['name']==variant),None) + if info is None:raise ApiProblem(404,'not_found','Вариант отсутствует') + key,mime,size=row['variant_keys'][variant],info['content_type'],info['size_bytes'] + result = storage.get(key) + body = result['Body'] + if result['ContentLength'] != size: + body.close() + raise ApiProblem(503, 'unavailable', 'Оригинал временно недоступен') + + def chunks(): + try: + while data := body.read(64 * 1024): + yield data + finally: + body.close() + return StreamingResponse(chunks(), media_type=mime, + headers={'Content-Length': str(size)}) diff --git a/src/broker.py b/src/broker.py new file mode 100644 index 0000000..72a4dfe --- /dev/null +++ b/src/broker.py @@ -0,0 +1,37 @@ +"""Redis Streams: отдельный persistent broker, consumer group и явный ack.""" +import json +import redis +from src.config import BROKER_URL, JOB_LEASE + +STREAM = 'attachments.jobs' +GROUP = 'image-workers' + + +def connect(): + return redis.Redis.from_url(BROKER_URL, decode_responses=True, socket_connect_timeout=2, + socket_timeout=3, health_check_interval=10) + + +def ensure_group(client): + try: + client.xgroup_create(STREAM, GROUP, id='0-0', mkstream=True) + except redis.ResponseError as exc: + if 'BUSYGROUP' not in str(exc): + raise + + +def publish(client, payload): + return client.xadd(STREAM, {'job': json.dumps(payload, separators=(',', ':'))}) + + +def receive(client, consumer): + # Сначала забираем брошенные pending, затем новую работу; prefetch ровно 1. + claimed = client.xautoclaim(STREAM, GROUP, consumer, JOB_LEASE*1000, '0-0', count=1) + if claimed[1]: + return claimed[1][0] + rows = client.xreadgroup(GROUP, consumer, {STREAM: '>'}, count=1, block=500) + return rows[0][1][0] if rows else None + + +def acknowledge(client, identifier): + client.xack(STREAM, GROUP, identifier) diff --git a/src/cleanup.py b/src/cleanup.py new file mode 100644 index 0000000..58301a9 --- /dev/null +++ b/src/cleanup.py @@ -0,0 +1,59 @@ +"""Удаляет только безопасно завершённый staging или старые бесхозные исходники.""" +import argparse +from datetime import datetime,timezone +import json +import time +import uuid +from src.config import STAGING_RETENTION +from src.jobs import connection,event +from src.storage import ObjectStore,lock_attachment,unlock_attachment + + +def run(retention=STAGING_RETENTION,apply=False): + storage=ObjectStore();actions=[];now=datetime.now(timezone.utc) + try: + objects=list(storage.objects('staging/')) + with connection() as db: + for obj in objects: + parts=obj['Key'].split('/') + try:attachment_id=uuid.UUID(parts[1]);job_id=uuid.UUID(parts[2]) + except (ValueError,IndexError):continue + if len(parts)!=3:continue + if not lock_attachment(db,attachment_id,wait=False):db.commit();continue + db.commit() + try: + job=db.execute('SELECT * FROM jobs WHERE id=%s',(job_id,)).fetchone() + current=storage.head(obj['Key']) + if current is None:continue + object_old=(now-current['LastModified']).total_seconds()>=retention + safe=False + if not job:safe=object_old + elif job['status']=='ready':safe=True + elif job['status'] in {'failed','superseded'}: + safe=object_old and (now-job['updated_at']).total_seconds()>=retention + if not safe:continue + actions.append(dict(key=obj['Key'],reason='committed_ready' if job and job['status']=='ready' else 'retention',applied=apply)) + if apply: + storage.delete(obj['Key']) + if job: + db.execute('UPDATE jobs SET staged_deleted_at=clock_timestamp() WHERE id=%s',(job_id,)) + event(db,job_id,'staging_cleaned');db.commit() + finally:db.rollback();unlock_attachment(db,attachment_id);db.commit() + finally:storage.client.close() + return dict(mode='apply' if apply else 'dry-run',retention_seconds=retention,objects_scanned=len(objects),actions=actions) + + +def main(): + p=argparse.ArgumentParser();p.add_argument('--apply',action='store_true');p.add_argument('--loop',action='store_true') + p.add_argument('--retention',type=int,default=STAGING_RETENTION);args=p.parse_args() + if args.retention<1:p.error('Positive retention required') + while True: + try:print(json.dumps(run(args.retention,args.apply)),flush=True) + except Exception as exc: + print(json.dumps(dict(status='FAILED',reason=type(exc).__name__)),flush=True) + if not args.loop:raise SystemExit(1) + if not args.loop:break + time.sleep(60) + + +if __name__=='__main__':main() diff --git a/src/config.py b/src/config.py new file mode 100644 index 0000000..acec8f6 --- /dev/null +++ b/src/config.py @@ -0,0 +1,32 @@ +"""Настройки из окружения или Docker secrets; секреты не печатаем.""" +import os +from pathlib import Path + + +def setting(name, default=None): + file = os.getenv(name + '_FILE') + return Path(file).read_text().strip() if file else os.getenv(name, default) + + +DATABASE_URL = setting('DATABASE_URL') +CACHE_URL = setting('CACHE_URL', 'redis://localhost:6379/0') +SESSION_TTL = int(os.getenv('SESSION_TTL_SECONDS', '3600')) +POOL_MAX = int(os.getenv('DB_POOL_MAX', '8')) +S3_ENDPOINT = setting('S3_ENDPOINT', 'http://s3:9000') +S3_REGION = setting('S3_REGION', 'us-east-1') +S3_BUCKET = setting('S3_BUCKET', 'messenger-attachments') +S3_ACCESS_KEY = setting('S3_ACCESS_KEY_ID') +S3_SECRET_KEY = setting('S3_SECRET_ACCESS_KEY') +MAX_UPLOAD_BYTES = min(int(os.getenv('MAX_UPLOAD_BYTES', '10485760')), 10485760) +MAX_IMAGE_PIXELS = min(int(os.getenv('MAX_IMAGE_PIXELS', '40000000')), 40000000) +UPLOAD_TIMEOUT = int(os.getenv('UPLOAD_TIMEOUT_SECONDS', '45')) + +BROKER_URL = setting('BROKER_URL', 'redis://localhost:6380/0') +WORKER_CONCURRENCY = int(os.getenv('WORKER_CONCURRENCY', '1')) +JOB_MAX_ATTEMPTS = int(os.getenv('JOB_MAX_ATTEMPTS', '5')) +JOB_TIMEOUT = int(os.getenv('JOB_TIMEOUT_SECONDS', '30')) +JOB_LEASE = int(os.getenv('JOB_LEASE_SECONDS', '15')) +STAGING_RETENTION = int(os.getenv('STAGING_RETENTION_SECONDS', '86400')) +MAX_PENDING_JOBS = int(os.getenv('MAX_PENDING_JOBS', '1000')) +ALLOW_FAULTS = os.getenv('ALLOW_FAULT_INJECTION', '0') == '1' +WORKER_MEMORY_BYTES = int(os.getenv('WORKER_IMAGE_MEMORY_MIB', '512')) * 1024 * 1024 diff --git a/src/dispatcher.py b/src/dispatcher.py new file mode 100644 index 0000000..6c9d8fc --- /dev/null +++ b/src/dispatcher.py @@ -0,0 +1,39 @@ +"""Публикует transactional outbox и возвращает брошенные processing в очередь.""" +import json +import time +from src.broker import connect, ensure_group, publish +from src.jobs import connection, event, payload, recover_leases +from src.faults import checkpoint + + +def dispatch_once(client): + with connection() as db: + row = db.execute("SELECT o.id AS outbox_id,o.attempt,j.* FROM job_outbox o JOIN jobs j ON j.id=o.job_id " + 'JOIN attachments a ON a.current_job_id=j.id ' + "WHERE o.published_at IS NULL AND j.status='queued' AND j.available_at<=clock_timestamp() " + 'AND o.attempt=j.attempts+1 ORDER BY o.id FOR UPDATE OF o SKIP LOCKED LIMIT 1').fetchone() + if not row:return False + checkpoint(row['id'],'before_publish') + stream_id=publish(client,payload(row,row['attempt'])) + checkpoint(row['id'],'after_publish') + db.execute('UPDATE job_outbox SET published_at=clock_timestamp(),stream_id=%s WHERE id=%s', + (stream_id,row['outbox_id'])) + event(db,row['id'],'published',attempt=row['attempt'],stream_id=stream_id) + # XADD ответил до фиксации published_at. Crash даёт повтор, а не потерю. + return True + + +def main(): + client=connect();last_recovery=0 + while True: + try: + ensure_group(client) + if time.monotonic()-last_recovery>=1: + recover_leases();last_recovery=time.monotonic() + if not dispatch_once(client):time.sleep(.2) + except Exception as exc: + print(json.dumps(dict(role='dispatcher',status='retry',reason=type(exc).__name__)),flush=True) + time.sleep(1) + + +if __name__=='__main__':main() diff --git a/src/errors.py b/src/errors.py new file mode 100644 index 0000000..45c46cd --- /dev/null +++ b/src/errors.py @@ -0,0 +1,6 @@ +class ApiProblem(Exception): + def __init__(self, status, code, message, challenge=None): + self.status = status + self.code = code + self.message = message + self.challenge = challenge diff --git a/src/faults.py b/src/faults.py new file mode 100644 index 0000000..ddb8b44 --- /dev/null +++ b/src/faults.py @@ -0,0 +1,19 @@ +"""Одноразовый crash в заданном окне; выключен в обычном стенде.""" +import os +import psycopg +from src.config import ALLOW_FAULTS, DATABASE_URL + +PHASES = {'before_publish', 'after_publish', 'before_effect', 'after_original', + 'after_effects', 'after_commit'} + + +def checkpoint(job_id, phase): + if not ALLOW_FAULTS: + return + with psycopg.connect(DATABASE_URL, connect_timeout=2) as db: + row = db.execute('UPDATE pipeline_faults SET fired_at=clock_timestamp() ' + 'WHERE job_id=%s AND phase=%s AND fired_at IS NULL RETURNING job_id', + (job_id, phase)).fetchone() + if row: + # Имитирует внезапную смерть процесса: finally/ack намеренно не выполняются. + os._exit(91) diff --git a/src/image_pipeline.py b/src/image_pipeline.py new file mode 100644 index 0000000..e1f4273 --- /dev/null +++ b/src/image_pipeline.py @@ -0,0 +1,72 @@ +"""Изолированная обработка: stdin/сеть не нужны, только файлы одного задания.""" +import argparse +import hashlib +import json +from pathlib import Path +import resource +import warnings + +from PIL import Image, ImageFile, ImageOps, PngImagePlugin +from src.config import MAX_IMAGE_PIXELS, WORKER_MEMORY_BYTES + +Image.MAX_IMAGE_PIXELS=MAX_IMAGE_PIXELS +ImageFile.LOAD_TRUNCATED_IMAGES=False +PngImagePlugin.MAX_TEXT_CHUNK=1024*1024 +PngImagePlugin.MAX_TEXT_MEMORY=2*1024*1024 + + +def fit_size(width,height,limit): + if max(width,height)<=limit:return width,height + if width>=height:return limit,max(1,height*limit//width) + return max(1,width*limit//height),limit + + +def transform(source,destination,version): + destination=Path(destination) + with warnings.catch_warnings(): + warnings.simplefilter('error',Image.DecompressionBombWarning) + image=Image.open(source,formats=['PNG','JPEG']) + if image.width*image.height>MAX_IMAGE_PIXELS: + image.close();raise ValueError('pixel limit') + image.load() + ImageOps.exif_transpose(image,in_place=True) + if image.mode=='RGBA' or 'transparency' in image.info or image.mode in {'LA','P'}: + rgba=image if image.mode=='RGBA' else image.convert('RGBA') + if rgba is not image:image.close() + background=Image.new('RGB',rgba.size,'white');alpha=rgba.getchannel('A') + background.paste(rgba,mask=alpha);alpha.close();rgba.close();image=background + elif image.mode!='RGB': + converted=image.convert('RGB');image.close();image=converted + # Новый RGB объект не переносит EXIF/ICC/XMP в варианты. + image.info.clear() + quality=82 if version==1 else 86 + outputs=[] + for name,limit,fmt,mime in [('thumbnail',256,'JPEG','image/jpeg'),('crop',128,'JPEG','image/jpeg'), + ('optimized',1280,'WEBP','image/webp')]: + if name=='crop': + side=min(image.size);left=(image.width-side)//2;top=(image.height-side)//2 + square=image.crop((left,top,left+side,top+side)) + result=square.resize((128,128),Image.Resampling.LANCZOS);square.close() + else:result=image.resize(fit_size(*image.size,limit),Image.Resampling.LANCZOS) + file=destination/(name+('.jpg' if fmt=='JPEG' else '.webp')) + result.save(file,format=fmt,quality=quality,**({'method':4} if fmt=='WEBP' else {'optimize':True})) + data=file.read_bytes() + outputs.append(dict(name=name,content_type=mime,size_bytes=len(data),width=result.width,height=result.height, + sha256=hashlib.sha256(data).hexdigest(),file=file.name)) + result.close() + image.close() + return outputs + + +def main(): + p=argparse.ArgumentParser();p.add_argument('source');p.add_argument('destination');p.add_argument('version',type=int) + args=p.parse_args() + resource.setrlimit(resource.RLIMIT_AS,(WORKER_MEMORY_BYTES,WORKER_MEMORY_BYTES)) + try: + values=transform(args.source,args.destination,args.version) + Path(args.destination,'variants.json').write_text(json.dumps(values)) + except MemoryError:raise SystemExit(12) + except Exception:raise SystemExit(10) + + +if __name__=='__main__':main() diff --git a/src/jobs.py b/src/jobs.py new file mode 100644 index 0000000..fddffbf --- /dev/null +++ b/src/jobs.py @@ -0,0 +1,186 @@ +"""Состояния задания, outbox и явные команды оператора. Без публичного admin API.""" +import argparse +from contextlib import contextmanager +import json +import random +import uuid + +import psycopg +from psycopg.rows import dict_row +from psycopg.types.json import Jsonb +from src.config import DATABASE_URL, JOB_MAX_ATTEMPTS +from src.storage import lock_attachment, unlock_attachment + + +@contextmanager +def connection(): + with psycopg.connect(DATABASE_URL, row_factory=dict_row, connect_timeout=2, + options='-c statement_timeout=10000 -c lock_timeout=2000') as db: + yield db + + +def event(db, job_id, name, **details): + db.execute('INSERT INTO job_events(job_id,event,details) VALUES (%s,%s,%s)', + (job_id, name, Jsonb(details))) + + +def enqueue(db, job): + db.execute('INSERT INTO job_outbox(job_id,attempt) VALUES (%s,%s) ON CONFLICT DO NOTHING', + (job['id'], job['attempts']+1)) + + +def payload(job, attempt): + return dict(schema_version=1, job_id=str(job['id']), type='attachment.process.v1', + attachment_id=str(job['attachment_id']), pipeline_version=job['pipeline_version'], + attempt=attempt, created_at=job['created_at'].isoformat().replace('+00:00', 'Z')) + + +def retry_or_fail(db, job, code, permanent=False): + exhausted = job['attempts']-job['budget_start'] >= JOB_MAX_ATTEMPTS + if permanent or exhausted: + final_code = code if permanent else 'retry_exhausted' + db.execute("UPDATE jobs SET status='failed',error_code=%s,lease_token=NULL,lease_until=NULL," + "updated_at=clock_timestamp() WHERE id=%s", (final_code, job['id'])) + db.execute("UPDATE attachments SET status='failed',error_code=%s,updated_at=clock_timestamp() " + 'WHERE current_job_id=%s', (final_code, job['id'])) + event(db, job['id'], 'failed', code=final_code, attempt=job['attempts']) + else: + # Ограниченный exponential backoff + jitter, максимум 10 секунд. + delay = min(10, 2**min(job['attempts']-1, 4)) + random.uniform(0, .5) + db.execute("UPDATE jobs SET status='queued',error_code=%s,lease_token=NULL,lease_until=NULL," + "available_at=clock_timestamp()+%s*interval '1 second',updated_at=clock_timestamp() WHERE id=%s", + (code, delay, job['id'])) + db.execute("UPDATE attachments SET status='queued',error_code=NULL,updated_at=clock_timestamp() " + 'WHERE current_job_id=%s', (job['id'],)) + enqueue(db, job) + event(db, job['id'], 'retry_scheduled', code=code, attempt=job['attempts'], delay_seconds=round(delay, 3)) + + +def recover_leases(): + recovered = [] + with connection() as db: + rows = db.execute("SELECT id,attachment_id FROM jobs WHERE status='processing' AND lease_until datetime: + return datetime.now(timezone.utc) + + +def as_json(value: BaseModel) -> dict: + return value.model_dump(mode="json") + + +class StrictModel(BaseModel): + model_config = ConfigDict(extra="forbid") + + +class User(StrictModel): + id: uuid.UUID + username: str + display_name: str + created_at: datetime + + +class CreateUser(StrictModel): + username: str = Field(pattern=r"^[a-z0-9_]{3,32}$") + display_name: str = Field(min_length=1, max_length=100) + password: str = Field(min_length=12, max_length=128) + + @field_validator("password") + @classmethod + def password_has_visible_characters(cls, value: str) -> str: + if not value.strip(): + raise ValueError("password must not contain only whitespace") + return value + + @field_validator("display_name") + @classmethod + def display_name_has_visible_characters(cls, value: str) -> str: + if not value.strip(): + raise ValueError("display_name must not contain only whitespace") + return value + + +class Chat(StrictModel): + id: uuid.UUID + title: str + member_ids: list[uuid.UUID] + created_at: datetime + + +class CreateChat(StrictModel): + title: str = Field(min_length=1, max_length=100) + member_ids: list[uuid.UUID] = Field(min_length=1, max_length=100) + + @field_validator("title") + @classmethod + def title_has_visible_characters(cls, value: str) -> str: + if not value.strip(): + raise ValueError("title must not contain only whitespace") + return value + + @field_validator("member_ids") + @classmethod + def member_ids_are_unique(cls, value: list[uuid.UUID]) -> list[uuid.UUID]: + if len(value) != len(set(value)): + raise ValueError("member_ids must be unique") + return value + + +class Message(StrictModel): + id: uuid.UUID + chat_id: uuid.UUID + sender_id: uuid.UUID + text: str + created_at: datetime + attachment_ids: list[uuid.UUID] = Field(default_factory=list) + + +class CreateMessage(StrictModel): + text: str = Field(max_length=4000) + attachment_ids: list[uuid.UUID] = Field(default_factory=list, max_length=10) + + @model_validator(mode='after') + def valid_message(self): + if not self.text.strip() and not self.attachment_ids: + raise ValueError('Нужен текст или вложение') + if len(self.attachment_ids) != len(set(self.attachment_ids)): + raise ValueError('Повторяющиеся attachment_ids') + return self + + +class Store: + """Сессии и метаданные в PostgreSQL; Redis — только кеш профилей.""" + + def __init__(self) -> None: + self.pool = ConnectionPool( + DATABASE_URL, min_size=1, max_size=POOL_MAX, timeout=2, open=False, + kwargs={"row_factory": dict_row, "connect_timeout": 2, + "options": "-c statement_timeout=3000 -c lock_timeout=2000 -c timezone=UTC"}, + ) + self.cache = redis.Redis.from_url( + CACHE_URL, decode_responses=True, socket_connect_timeout=0.25, socket_timeout=0.25, + ) + + def start(self) -> None: + self.pool.open() + self.pool.wait(timeout=10) + + def close(self) -> None: + self.pool.close() + self.cache.close() + + def chat(self, db, chat_id: uuid.UUID) -> Chat | None: + row = db.execute("SELECT * FROM chats WHERE id=%s", (chat_id,)).fetchone() + if row is None: + return None + members = db.execute("SELECT user_id FROM chat_members WHERE chat_id=%s ORDER BY user_id", + (chat_id,)).fetchall() + return Chat(**row, member_ids=[member["user_id"] for member in members]) + + def chat_messages(self, db, chat_id: uuid.UUID, limit: int, after) -> list[Message]: + # В lab1 здесь были общий список/список чата и bisect_right. + # Теперь границу ищет B-tree PostgreSQL (chat_id, created_at, id). + query = ("SELECT m.*, COALESCE((SELECT array_agg(a.attachment_id ORDER BY a.position) " + "FROM message_attachments a WHERE a.message_id=m.id),'{}'::uuid[]) AS attachment_ids " + "FROM messages m WHERE chat_id=%s") + params = [chat_id] + if after is not None: + query += " AND (created_at,id)>(%s,%s)" + params.extend(after) + rows = db.execute(query + " ORDER BY created_at,id LIMIT %s", params + [limit + 1]).fetchall() + return [Message(**row) for row in rows] + + +INSTANCE_ID = os.getenv("INSTANCE_ID") or f"{socket.gethostname()}:{uuid.uuid4().hex[:8]}" +store = Store() +passwords = PasswordHasher(time_cost=2, memory_cost=19456, parallelism=1) +dummy_hash = passwords.hash(secrets.token_urlsafe(32)) + + +@asynccontextmanager +async def lifespan(app): + store.start() + yield + store.close() + + +app = FastAPI(title="MTUCI PostgreSQL messenger", version="5.0.0", lifespan=lifespan, + docs_url=None, redoc_url=None, openapi_url=None) + + +def request_id(request: Request) -> str: + return request.state.request_id + + +def error_response(request: Request, status: int, code: str, message: str, challenge: str | None = None) -> JSONResponse: + rid = getattr(request.state, "request_id", str(uuid.uuid4())) + headers = {"X-Request-Id": rid, "X-Instance-Id": INSTANCE_ID} + if challenge: + headers["WWW-Authenticate"] = challenge + return JSONResponse( + status_code=status, + content={"error": {"code": code, "message": message, "request_id": rid}}, + headers=headers, + ) + + +@app.middleware("http") +async def request_context(request: Request, call_next): + request.state.request_id = str(uuid.uuid4()) + started = time.perf_counter() + status = 500 + try: + # Без токена отказываем ДО обращения к БД и проверки JSON. + if request.url.path.startswith("/api/v1/") and request.url.path not in { + "/api/v1/users", "/api/v1/auth/sessions" + }: + scheme, _, token = request.headers.get("authorization", "").partition(" ") + if scheme.lower() != "bearer" or not token or len(token) > 256: + status = 401 + return error_response(request, 401, "unauthorized", "Требуется Bearer", + 'Bearer realm="messenger"') + json_endpoints = { + "/api/v1/users", + "/api/v1/chats", + } + requires_json = request.method == "POST" and ( + request.url.path in json_endpoints + or re.fullmatch(r"/api/v1/chats/[^/]+/messages", request.url.path) is not None + ) + media_type = request.headers.get("content-type", "").split(";", 1)[0].strip().lower() + if requires_json and media_type != "application/json": + status = 415 + return error_response( + request, + 415, + "unsupported_media_type", + "Требуется Content-Type: application/json", + ) + if requires_json: + # Ограниченный JSON; после body() Starlette повторно отдаёт его маршруту. + raw = await request.body() + if len(raw) > 65536: + status = 413 + return error_response(request, 413, "payload_too_large", "Запрос слишком большой") + response = await call_next(request) + status = response.status_code + response.headers["X-Request-Id"] = request.state.request_id + response.headers["X-Instance-Id"] = INSTANCE_ID + return response + finally: + logger.info( + "request method=%s path=%s status=%s duration_ms=%.3f request_id=%s", + request.method, + request.url.path, + status, + (time.perf_counter() - started) * 1000, + request.state.request_id, + ) + + +@app.exception_handler(ApiProblem) +async def api_problem_handler(request: Request, exc: ApiProblem): + return error_response(request, exc.status, exc.code, exc.message, exc.challenge) + + +@app.exception_handler(RequestValidationError) +async def validation_handler(request: Request, exc: RequestValidationError): + return error_response(request, 400, "invalid_request", "Запрос не соответствует контракту") + + +@app.exception_handler(Exception) +async def unexpected_error_handler(request: Request, exc: Exception): + logger.error("unexpected_error request_id=%s", request_id(request)) + return error_response(request, 500, "internal_error", "Внутренняя ошибка сервера") + + +@app.exception_handler(psycopg.Error) +@app.exception_handler(PoolTimeout) +async def database_error_handler(request: Request, exc: Exception): + return error_response(request, 503, "unavailable", "Хранилище временно недоступно") + + +@app.exception_handler(BotoCoreError) +@app.exception_handler(ClientError) +async def object_store_error_handler(request: Request, exc: Exception): + return error_response(request, 503, 'unavailable', 'Объектное хранилище временно недоступно') + + +@app.exception_handler(HTTPException) +async def http_error_handler(request: Request, exc: HTTPException): + code = "not_found" if exc.status_code == 404 else "invalid_request" + return error_response(request, exc.status_code, code, "Неверный маршрут или метод") + + +def unauthorized(basic=False): + challenge = 'Basic realm="messenger", charset="UTF-8"' if basic else 'Bearer realm="messenger"' + raise ApiProblem(401, "unauthorized", "Нужна действительная идентификация", challenge) + + +def token_hash(token: str) -> str: + return hashlib.sha256(token.encode()).hexdigest() + + +def current_user(authorization: Annotated[str | None, Header()] = None) -> User: + scheme, _, token = (authorization or "").partition(" ") + if scheme.lower() != "bearer" or not token or len(token) > 256: + unauthorized() + with store.pool.connection() as db: + session = db.execute("SELECT user_id FROM sessions WHERE token_hash=%s AND expires_at>now()", + (token_hash(token),)).fetchone() + if session is None: + unauthorized() + key = "user:" + str(session["user_id"]) + cache_available = True + try: + cached = store.cache.get(key) + if cached: + user = User.model_validate_json(cached) + if user.id == session["user_id"]: + return user + except (redis.RedisError, ValueError): + cache_available = False + row = db.execute("SELECT id,username,display_name,created_at FROM users WHERE id=%s", + (session["user_id"],)).fetchone() + user = User(**row) + if cache_available: + try: + store.cache.setex(key, 60, user.model_dump_json()) + except redis.RedisError: + pass + return user + + +def decode_cursor(cursor: str, expected_scope: str) -> tuple[datetime, uuid.UUID]: + try: + if not cursor or len(cursor) > 1024: + raise ValueError + padded = cursor + "=" * (-len(cursor) % 4) + payload = json.loads(base64.b64decode(padded.encode(), altchars=b"-_", validate=True).decode()) + if not isinstance(payload, dict) or set(payload) != {"scope", "created_at", "id"}: + raise ValueError + if payload["scope"] != expected_scope: + raise ValueError + if not isinstance(payload["created_at"], str) or not isinstance(payload["id"], str): + raise ValueError + created_at = datetime.fromisoformat(payload["created_at"].replace("Z", "+00:00")) + item_id = uuid.UUID(payload["id"]) + if created_at.tzinfo is None: + raise ValueError + return created_at, item_id + except (ValueError, TypeError, KeyError, json.JSONDecodeError, UnicodeError): + raise ApiProblem(400, "invalid_request", "Некорректный cursor") from None + + +def encode_cursor(scope: str, created_at: datetime, item_id: uuid.UUID) -> str: + payload = { + "scope": scope, + "created_at": created_at.isoformat().replace("+00:00", "Z"), + "id": str(item_id), + } + return base64.urlsafe_b64encode(json.dumps(payload, separators=(",", ":")).encode()).decode().rstrip("=") + + +def page(items: list, limit: int, scope: str) -> dict: + # SQL уже выбрал limit+1 строк после курсора; весь список не загружаем. + selected = items[:limit] + next_cursor = None + if len(items) > limit and selected: + last = selected[-1] + next_cursor = encode_cursor(scope, last.created_at, last.id) + return {"items": [as_json(item) for item in selected], "next_cursor": next_cursor} + + +def visible_chat(chat_id: uuid.UUID, user: User) -> Chat: + with store.pool.connection() as db: + member = db.execute("SELECT 1 FROM chat_members WHERE chat_id=%s AND user_id=%s", + (chat_id, user.id)).fetchone() + if member is None: + raise ApiProblem(404, "not_found", "Объект не найден") + return store.chat(db, chat_id) + + +def page_parameters(request: Request, scope: str, limit: int, cursor: str | None): + # Query(ge/le) сохранён из lab1, добавлена проверка дублей и формы limit. + if set(request.query_params) - {"limit", "cursor"} or any( + len(request.query_params.getlist(k)) > 1 for k in request.query_params + ): + raise ApiProblem(400, "invalid_request", "Некорректные параметры страницы") + if not re.fullmatch(r"[0-9]{1,3}", request.query_params.get("limit", "50")): + raise ApiProblem(400, "invalid_request", "Некорректный limit") + return decode_cursor(cursor, scope) if cursor is not None else None + + +@app.get("/health/live") +def liveness(): + return {"status": "ok"} + + +@app.get("/health/ready") +def readiness(): + with store.pool.connection() as db: + db.execute("SELECT 1") + attachments.storage.ready() + return {"status": "ok"} + + +@app.get("/internal/pool") +def pool_statistics(): + # Диагностика доступна только внутри Docker network: LB закрывает этот путь. + return store.pool.get_stats() + + +@app.get('/internal/memory') +def memory_statistics(): + result = {'process_peak_rss_bytes': resource.getrusage(resource.RUSAGE_SELF).ru_maxrss * 1024} + from pathlib import Path + for name in ['/sys/fs/cgroup/memory.peak', '/sys/fs/cgroup/memory/memory.max_usage_in_bytes']: + path = Path(name) + if path.is_file(): + result['container_peak_bytes'] = int(path.read_text().strip()) + result['container_peak_source'] = name + break + return result + + +@app.post("/api/v1/users", status_code=201) +def register_user(body: CreateUser): + # Синхронные маршруты FastAPI исполняет в worker thread, не в event loop. + hashed = passwords.hash(body.password) + try: + with store.pool.connection() as db: + row = db.execute( + "INSERT INTO users(id,username,display_name,password_hash) VALUES (%s,%s,%s,%s) " + "RETURNING id,username,display_name,created_at", + (uuid.uuid4(), body.username, body.display_name, hashed), + ).fetchone() + except psycopg.errors.UniqueViolation: + raise ApiProblem(409, "conflict", "Username уже занят") from None + return as_json(User(**row)) + + +@app.post("/api/v1/auth/sessions", status_code=201) +def create_session(request: Request, authorization: Annotated[str | None, Header()] = None): + if request.headers.get("content-length", "0") != "0" or "transfer-encoding" in request.headers: + raise ApiProblem(400, "invalid_request", "Вход не принимает тело запроса") + scheme, _, encoded = (authorization or "").partition(" ") + try: + if scheme.lower() != "basic" or len(encoded) > 2048: + raise ValueError + username, password = base64.b64decode(encoded, validate=True).decode("utf-8").split(":", 1) + if not re.fullmatch(r"[a-z0-9_]{3,32}", username) or not 12 <= len(password) <= 128: + raise ValueError + except (ValueError, UnicodeError): + unauthorized(basic=True) + with store.pool.connection() as db: + row = db.execute("SELECT * FROM users WHERE username=%s", (username,)).fetchone() + try: + passwords.verify(row["password_hash"] if row else dummy_hash, password) + except (VerificationError, InvalidHashError): + unauthorized(basic=True) + if row is None: + unauthorized(basic=True) + token = secrets.token_urlsafe(32) + expires_at = utc_now() + timedelta(seconds=SESSION_TTL) + with store.pool.connection() as db: + db.execute("INSERT INTO sessions(token_hash,user_id,expires_at) VALUES (%s,%s,%s)", + (token_hash(token), row["id"], expires_at)) + user = User(**{k: row[k] for k in ("id", "username", "display_name", "created_at")}) + return {"token": token, "token_type": "Bearer", "user": as_json(user), + "expires_at": expires_at.isoformat().replace("+00:00", "Z")} + + +@app.delete("/api/v1/auth/sessions/current", status_code=204) +def delete_session(user: Annotated[User, Depends(current_user)], + authorization: Annotated[str, Header()]): + token = authorization.partition(" ")[2] + with store.pool.connection() as db: + db.execute("DELETE FROM sessions WHERE token_hash=%s", (token_hash(token),)) + return Response(status_code=204) + + +@app.get("/api/v1/users/me") +def get_current_user(user: Annotated[User, Depends(current_user)]): + return as_json(user) + + +@app.post("/api/v1/chats", status_code=201) +def create_chat(body: CreateChat, user: Annotated[User, Depends(current_user)]): + if user.id not in body.member_ids: + raise ApiProblem(400, "invalid_request", "Текущий пользователь должен быть участником") + with store.pool.connection() as db: + found = db.execute("SELECT id FROM users WHERE id=ANY(%s)", (body.member_ids,)).fetchall() + if len(found) != len(body.member_ids): + raise ApiProblem(400, "invalid_request", "Указан неизвестный участник") + row = db.execute("INSERT INTO chats(id,title) VALUES (%s,%s) RETURNING *", + (uuid.uuid4(), body.title)).fetchone() + with db.cursor() as cur: + cur.executemany("INSERT INTO chat_members(chat_id,user_id) VALUES (%s,%s)", + [(row["id"], member) for member in body.member_ids]) + chat = store.chat(db, row["id"]) + return as_json(chat) # COMMIT уже выполнен для чата и всех участников. + + +@app.get("/api/v1/chats") +def list_chats( + request: Request, + user: Annotated[User, Depends(current_user)], + limit: Annotated[int, Query(ge=1, le=100)] = 50, + cursor: Annotated[str | None, Query(min_length=1)] = None, +): + scope = f"chats:{user.id}" + after = page_parameters(request, scope, limit, cursor) + query = "SELECT c.* FROM chats c JOIN chat_members m ON m.chat_id=c.id WHERE m.user_id=%s" + params = [user.id] + if after is not None: + query += " AND (c.created_at,c.id)>(%s,%s)" + params.extend(after) + with store.pool.connection() as db: + rows = db.execute(query + " ORDER BY c.created_at,c.id LIMIT %s", params + [limit + 1]).fetchall() + chats = [store.chat(db, row["id"]) for row in rows] + return page(chats, limit, scope) + + +@app.get("/api/v1/chats/{chat_id}") +def get_chat(chat_id: uuid.UUID, user: Annotated[User, Depends(current_user)]): + return as_json(visible_chat(chat_id, user)) + + +@app.post("/api/v1/chats/{chat_id}/messages", status_code=201) +def create_message( + request: Request, + chat_id: uuid.UUID, + body: CreateMessage, + user: Annotated[User, Depends(current_user)], + idempotency_key: Annotated[str | None, Header()] = None, +): + if (not idempotency_key or + not re.fullmatch(r"[A-Za-z0-9._:-]{1,128}", idempotency_key) or + len(request.headers.getlist("idempotency-key")) != 1): + raise ApiProblem(400, "invalid_request", "Нужен корректный Idempotency-Key") + visible_chat(chat_id, user) # Повтор тоже проверяет сессию и участие. + canonical = {'text': body.text} + if body.attachment_ids: + canonical['attachment_ids'] = [str(value) for value in body.attachment_ids] + payload = json.dumps(canonical, ensure_ascii=False, sort_keys=True, + separators=(",", ":")) + digest = hashlib.sha256(payload.encode()).hexdigest() + lock_scope = f"{user.id}:POST:{chat_id}:{idempotency_key}" + with store.pool.connection() as db: + # Общая блокировка в PostgreSQL, а не локальный Lock одной реплики. + # Коллизия хеша только сериализует независимые запросы; ключи сравниваются полностью. + db.execute("SELECT pg_advisory_xact_lock(hashtextextended(%s,0))", (lock_scope,)) + previous = db.execute( + "SELECT * FROM message_requests WHERE user_id=%s AND chat_id=%s AND request_key=%s", + (user.id, chat_id, idempotency_key), + ).fetchone() + if previous and previous["expires_at"] > utc_now(): + if previous["body_hash"] != digest: + raise ApiProblem(409, "conflict", "Ключ уже использован с другим сообщением") + result = previous["response"] + else: + for attachment_id in body.attachment_ids: + found = db.execute('SELECT chat_id,status FROM attachments WHERE id=%s FOR KEY SHARE', + (attachment_id,)).fetchone() + if not found or found['chat_id'] != chat_id: + raise ApiProblem(404, 'not_found', 'Вложение недоступно') + if found['status'] not in {'queued','processing','ready'}: + raise ApiProblem(409, 'conflict', 'Вложение ещё недоступно') + if previous: + db.execute("DELETE FROM message_requests WHERE user_id=%s AND chat_id=%s AND request_key=%s", + (user.id, chat_id, idempotency_key)) + row = db.execute( + "INSERT INTO messages(id,chat_id,sender_id,text) VALUES (%s,%s,%s,%s) RETURNING *", + (uuid.uuid4(), chat_id, user.id, body.text), + ).fetchone() + for position, attachment_id in enumerate(body.attachment_ids): + db.execute('INSERT INTO message_attachments(message_id,attachment_id,position) VALUES (%s,%s,%s)', + (row['id'], attachment_id, position)) + result = as_json(Message(**row, attachment_ids=body.attachment_ids)) + db.execute( + "INSERT INTO message_requests(user_id,chat_id,request_key,body_hash,response,expires_at) " + "VALUES (%s,%s,%s,%s,%s,clock_timestamp()+interval '24 hours')", + (user.id, chat_id, idempotency_key, digest, Jsonb(result)), + ) + # Сообщение и результат повтора зафиксированы одной транзакцией до ответа. + return result + + +@app.get("/api/v1/chats/{chat_id}/messages") +def list_messages( + request: Request, + chat_id: uuid.UUID, + user: Annotated[User, Depends(current_user)], + limit: Annotated[int, Query(ge=1, le=100)] = 50, + cursor: Annotated[str | None, Query(min_length=1)] = None, +): + visible_chat(chat_id, user) + scope = f"messages:{chat_id}" + after = page_parameters(request, scope, limit, cursor) + with store.pool.connection() as db: + messages = store.chat_messages(db, chat_id, limit, after) + return page(messages, limit, scope) + + +@app.post('/api/v1/chats/{chat_id}/attachments', status_code=202) +async def upload_attachment(request: Request, chat_id: uuid.UUID, + user: Annotated[User, Depends(current_user)], filename: str = Query()): + await run_in_threadpool(visible_chat, chat_id, user) + return await attachments.receive(request, store.pool, chat_id, user.id, filename) + + +def accessible_attachment(attachment_id, user): + with store.pool.connection() as db: + row = db.execute('SELECT a.* FROM attachments a JOIN chat_members m ON m.chat_id=a.chat_id ' + 'WHERE a.id=%s AND m.user_id=%s', (attachment_id, user.id)).fetchone() + if not row: + raise ApiProblem(404, 'not_found', 'Вложение недоступно') + return row + + +@app.get('/api/v1/attachments/{attachment_id}') +def attachment_metadata(attachment_id: uuid.UUID, user: Annotated[User, Depends(current_user)]): + row = accessible_attachment(attachment_id, user) + return attachments.public_attachment(row) + + +@app.get('/api/v1/attachments/{attachment_id}/content') +def attachment_content(attachment_id: uuid.UUID, user: Annotated[User, Depends(current_user)], + variant: str = Query('original')): + row = accessible_attachment(attachment_id, user) + if row['status'] != 'ready': + raise ApiProblem(409, 'conflict', 'Вложение ещё не готово или обработка завершилась ошибкой') + return attachments.download(row,variant) diff --git a/src/migrate.py b/src/migrate.py new file mode 100644 index 0000000..6543523 --- /dev/null +++ b/src/migrate.py @@ -0,0 +1,26 @@ +"""Версионируемые миграции: один файл = одна атомарная транзакция.""" +from pathlib import Path +import psycopg +from src.config import DATABASE_URL + + +def migrate(): + with psycopg.connect(DATABASE_URL) as db: + # Миграции запускает отдельный сервис. Lock защищает от второго запуска оператором. + db.execute('SELECT pg_advisory_lock(20260002)') + db.execute('CREATE TABLE IF NOT EXISTS schema_migrations ' + '(version text PRIMARY KEY, applied_at timestamptz DEFAULT now())') + db.commit() + for file in sorted(Path('migrations').glob('*.sql')): + with db.transaction(): + applied = db.execute('SELECT 1 FROM schema_migrations WHERE version=%s', + (file.name,)).fetchone() + if not applied: + db.execute(file.read_text()) + db.execute('INSERT INTO schema_migrations(version) VALUES (%s)', (file.name,)) + print('Applied', file.name) + db.execute('SELECT pg_advisory_unlock(20260002)') + + +if __name__ == '__main__': + migrate() diff --git a/src/storage.py b/src/storage.py new file mode 100644 index 0000000..fe0f36b --- /dev/null +++ b/src/storage.py @@ -0,0 +1,60 @@ +"""S3-клиент с ограниченными credentials; ключи назначаются приложением.""" +import boto3 +from botocore.config import Config +from botocore.exceptions import ClientError +from src.config import S3_ENDPOINT, S3_REGION, S3_BUCKET, S3_ACCESS_KEY, S3_SECRET_KEY + +PREFIX = 'originals/' + + +class ObjectStore: + def __init__(self): + self.client = boto3.client( + 's3', endpoint_url=S3_ENDPOINT, region_name=S3_REGION, + aws_access_key_id=S3_ACCESS_KEY, aws_secret_access_key=S3_SECRET_KEY, + config=Config(connect_timeout=2, read_timeout=5, retries={'total_max_attempts': 1}, + s3={'addressing_style': 'path'}, request_checksum_calculation='when_required', + response_checksum_validation='when_required')) + + def ready(self): + self.client.list_objects_v2(Bucket=S3_BUCKET, Prefix=PREFIX, MaxKeys=1) + + def put(self, file, key, size, mime, sha256, content_md5): + file.seek(0) + self.client.put_object(Bucket=S3_BUCKET, Key=key, Body=file, ContentLength=size, + ContentType=mime, Metadata={'sha256': sha256}, ContentMD5=content_md5) + + def copy(self, source, target): + self.client.copy_object(Bucket=S3_BUCKET,Key=target,CopySource={'Bucket':S3_BUCKET,'Key':source}) + + def head(self, key): + try: + return self.client.head_object(Bucket=S3_BUCKET, Key=key) + except ClientError as exc: + if exc.response['Error']['Code'] in {'404', 'NoSuchKey', 'NotFound'}: + return None + raise + + def get(self, key): + return self.client.get_object(Bucket=S3_BUCKET, Key=key) + + def delete(self, key): + self.client.delete_object(Bucket=S3_BUCKET, Key=key) + + def objects(self, prefix=PREFIX, counters=None): + pages = self.client.get_paginator('list_objects_v2') + for page in pages.paginate(Bucket=S3_BUCKET, Prefix=prefix): + if counters is not None: + counters['list_requests'] += 1 + yield from page.get('Contents', []) + + +def lock_attachment(db, attachment_id, wait=True): + function = 'pg_advisory_lock' if wait else 'pg_try_advisory_lock' + return db.execute(f'SELECT {function}(hashtextextended(%s,0)) AS locked', + ('attachment:' + str(attachment_id),)).fetchone()['locked'] + + +def unlock_attachment(db, attachment_id): + db.execute('SELECT pg_advisory_unlock(hashtextextended(%s,0))', + ('attachment:' + str(attachment_id),)) diff --git a/src/worker.py b/src/worker.py new file mode 100644 index 0000000..28d72c5 --- /dev/null +++ b/src/worker.py @@ -0,0 +1,213 @@ +"""Отдельный consumer: обработка с lease, fencing и ack после устойчивого результата.""" +from concurrent.futures import ThreadPoolExecutor +import base64 +import hashlib +import json +import os +from pathlib import Path +import socket +import subprocess +import sys +import tempfile +import time +from typing import Literal +import uuid + +from botocore.exceptions import ClientError +from pydantic import AwareDatetime,BaseModel,ConfigDict,Field,field_validator +from src import broker +from src.config import WORKER_CONCURRENCY,JOB_TIMEOUT,JOB_LEASE,MAX_UPLOAD_BYTES +from src.jobs import connection,event,retry_or_fail +from src.storage import ObjectStore,lock_attachment,unlock_attachment +from src.faults import checkpoint + + +class JobMessage(BaseModel): + model_config=ConfigDict(extra='forbid',strict=True) + schema_version:Literal[1] + job_id:uuid.UUID + type:Literal['attachment.process.v1'] + attachment_id:uuid.UUID + pipeline_version:int=Field(ge=1) + attempt:int=Field(ge=1) + created_at:AwareDatetime + traceparent:str|None=Field(default=None,pattern=r'^00-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$') + tracestate:str|None=Field(default=None,max_length=512) + + @field_validator('schema_version',mode='before') + @classmethod + def integer_schema_version(cls,value): + if type(value) is not int:raise ValueError('schema_version must be an integer') + return value + + @field_validator('traceparent','tracestate',mode='before') + @classmethod + def trace_is_string_when_present(cls,value): + if not isinstance(value,str):raise ValueError('trace field must be a string') + return value + + +class PermanentError(Exception):pass +class JobTimeout(TimeoutError):pass + + +def check_deadline(deadline): + if time.monotonic()>=deadline:raise JobTimeout() + + +def reject(db,stream_id,raw,code): + db.execute('INSERT INTO broker_rejections(stream_id,sha256,error_code) VALUES (%s,%s,%s) ON CONFLICT DO NOTHING', + (stream_id,hashlib.sha256(raw.encode()).hexdigest(),code));db.commit() + + +def read_source(storage,job,attachment,file,deadline): + response=storage.get(job['staging_key']);body=response['Body'];size=0;digest=hashlib.sha256() + try: + if response['ContentLength']>MAX_UPLOAD_BYTES:raise PermanentError('source_mismatch') + while chunk:=body.read(64*1024): + check_deadline(deadline) + size+=len(chunk) + if size>MAX_UPLOAD_BYTES:raise PermanentError('source_mismatch') + file.write(chunk);digest.update(chunk) + finally:body.close() + if size!=attachment['size_bytes'] or digest.hexdigest()!=attachment['sha256']: + raise PermanentError('source_mismatch') + file.seek(0) + + +def put_file(storage,file,key,mime): + with Path(file).open('rb') as stream: + sha=hashlib.sha256();md5=hashlib.md5();size=0 + while chunk:=stream.read(64*1024):sha.update(chunk);md5.update(chunk);size+=len(chunk) + storage.put(stream,key,size,mime,sha.hexdigest(),base64.b64encode(md5.digest()).decode()) + + +def effects_exist(storage,attachment): + values=[(attachment['object_key'],attachment['size_bytes'],attachment['sha256'])] + for variant in attachment['variants']: + values.append((attachment['variant_keys'][variant['name']],variant['size_bytes'],variant['sha256'])) + if len(values)!=4:return False + for key,size,sha in values: + head=storage.head(key) + if head is None or head['ContentLength']!=size or head.get('Metadata',{}).get('sha256')!=sha:return False + return True + + +def clean_ready_staging(db,storage,job): + if job['staged_deleted_at'] is not None:return + storage.delete(job['staging_key']) + db.execute('UPDATE jobs SET staged_deleted_at=clock_timestamp() WHERE id=%s',(job['id'],));db.commit() + + +def process(client,identifier,fields,alias): + raw=fields.get('job','') + try:message=JobMessage.model_validate_json(raw) + except ValueError: + with connection() as db:reject(db,identifier,raw,'invalid_job') + return True + with connection() as db: + job=db.execute('SELECT * FROM jobs WHERE id=%s',(message.job_id,)).fetchone();db.commit() + if not job: + reject(db,identifier,raw,'unknown_job');return True + if job['attachment_id']!=message.attachment_id or job['pipeline_version']!=message.pipeline_version: + reject(db,identifier,raw,'job_mismatch');return True + if not lock_attachment(db,job['attachment_id'],wait=False): + db.commit();return False + db.commit();storage=ObjectStore();token=None + try: + job=db.execute('SELECT * FROM jobs WHERE id=%s FOR UPDATE',(message.job_id,)).fetchone() + att=db.execute('SELECT * FROM attachments WHERE id=%s FOR UPDATE',(job['attachment_id'],)).fetchone() + if att['current_job_id']!=job['id'] or att['pipeline_version']!=job['pipeline_version']: + event(db,job['id'],'stale_ignored',current_version=att['pipeline_version'],stream_id=identifier) + db.commit();return True + if job['status']=='ready': + db.commit() + if not effects_exist(storage,att):return False + event(db,job['id'],'duplicate_ready',stream_id=identifier) + db.commit();clean_ready_staging(db,storage,job);return True + if job['status'] in {'failed','superseded'}: + event(db,job['id'],'terminal_ignored',stream_id=identifier);db.commit();return True + if job['status']=='processing':return False + if message.attempt!=job['attempts']+1: + event(db,job['id'],'old_attempt_ignored',attempt=message.attempt);db.commit();return True + if db.execute('SELECT available_at>clock_timestamp() AS waiting FROM jobs WHERE id=%s',(job['id'],)).fetchone()['waiting']: + return False + token=uuid.uuid4() + job=db.execute("UPDATE jobs SET status='processing',attempts=attempts+1,lease_token=%s," + "lease_until=clock_timestamp()+%s*interval '1 second',updated_at=clock_timestamp() " + 'WHERE id=%s RETURNING *',(token,JOB_LEASE,job['id'])).fetchone() + db.execute("UPDATE attachments SET status='processing',updated_at=clock_timestamp() WHERE id=%s",(att['id'],)) + event(db,job['id'],'processing',attempt=job['attempts'],worker=alias,stream_id=identifier) + db.commit();checkpoint(job['id'],'before_effect') + if job['pipeline_version'] not in {1,2}:raise PermanentError('unsupported_pipeline') + deadline=time.monotonic()+JOB_TIMEOUT + with tempfile.TemporaryDirectory(prefix='image-job-') as directory: + source=Path(directory)/'original' + with source.open('w+b') as file:read_source(storage,job,att,file,deadline) + check_deadline(deadline) + result=subprocess.run([sys.executable,'-m','src.image_pipeline',str(source),directory, + str(job['pipeline_version'])],timeout=max(.1,deadline-time.monotonic()),capture_output=True) + if result.returncode==12:raise PermanentError('image_memory_limit') + if result.returncode:raise PermanentError('invalid_image') + variants=json.loads(Path(directory,'variants.json').read_text()) + check_deadline(deadline) + put_file(storage,source,att['object_key'],att['content_type']) + checkpoint(job['id'],'after_original') + keys={} + for variant in variants: + file=variant.pop('file');key=f"variants/{att['id']}/v{job['pipeline_version']}/{file}" + check_deadline(deadline) + put_file(storage,Path(directory)/file,key,variant['content_type']);keys[variant['name']]=key + checkpoint(job['id'],'after_effects') + check_deadline(deadline) + # Fencing: опубликован может быть только результат текущей версии и lease-token. + fresh=db.execute("SELECT id FROM jobs WHERE id=%s AND status='processing' AND lease_token=%s FOR UPDATE", + (job['id'],token)).fetchone() + from psycopg.types.json import Jsonb + if not fresh:raise RuntimeError('Lease superseded') + updated=db.execute("UPDATE attachments SET status='ready',error_code=NULL,variants=%s,variant_keys=%s," + 'updated_at=clock_timestamp() WHERE id=%s AND current_job_id=%s AND pipeline_version=%s', + (Jsonb(variants),Jsonb(keys),att['id'],job['id'],job['pipeline_version'])) + if updated.rowcount!=1:raise RuntimeError('Version superseded') + db.execute("UPDATE jobs SET status='ready',lease_token=NULL,lease_until=NULL,error_code=NULL," + 'updated_at=clock_timestamp() WHERE id=%s',(job['id'],)) + event(db,job['id'],'ready',attempt=job['attempts'],pipeline_version=job['pipeline_version']) + db.commit();checkpoint(job['id'],'after_commit') + clean_ready_staging(db,storage,job) + return True + except Exception as exc: + db.rollback() + fresh=db.execute("SELECT * FROM jobs WHERE id=%s AND status='processing' AND lease_token=%s FOR UPDATE", + (job['id'],token)).fetchone() if token else None + if fresh: + code='processing_timeout' if isinstance(exc,(subprocess.TimeoutExpired,JobTimeout)) else 'storage_unavailable' + if isinstance(exc,PermanentError):code=str(exc) + if isinstance(exc,ClientError) and exc.response['Error']['Code'] in {'NoSuchKey','404'}: + code='staging_missing';exc=PermanentError(code) + if isinstance(exc,ClientError) and exc.response['Error']['Code'] in {'AccessDenied','InvalidAccessKeyId','SignatureDoesNotMatch'}: + code='storage_forbidden';exc=PermanentError(code) + retry_or_fail(db,fresh,code,permanent=isinstance(exc,PermanentError));db.commit() + return True # Следующая попытка уже устойчиво записана в outbox либо failed. + raise + finally: + storage.client.close();db.rollback();unlock_attachment(db,job['attachment_id']);db.commit() + + +def consume(index): + alias=f'{socket.gethostname()}:{uuid.uuid4().hex[:8]}:{index}';client=broker.connect() + while True: + try: + broker.ensure_group(client);delivery=broker.receive(client,alias) + if delivery and process(client,*delivery,alias):broker.acknowledge(client,delivery[0]) + except Exception as exc: + print(json.dumps(dict(role='worker',worker=alias,status='retry',reason=type(exc).__name__)),flush=True) + time.sleep(1) + + +def main(): + if not 1<=WORKER_CONCURRENCY<=4:raise SystemExit('WORKER_CONCURRENCY must be 1..4') + with ThreadPoolExecutor(max_workers=WORKER_CONCURRENCY) as pool: + list(pool.map(consume,range(WORKER_CONCURRENCY))) + + +if __name__=='__main__':main() diff --git a/student-tests/attachments.py b/student-tests/attachments.py new file mode 100644 index 0000000..72bd9ef --- /dev/null +++ b/student-tests/attachments.py @@ -0,0 +1,89 @@ +"""Контракт файлов: реальные изображения, лимиты, ACL и ключи сообщений.""" +from concurrent.futures import ThreadPoolExecutor +import hashlib +import http.client +import io +from pathlib import Path +import struct +import sys +from urllib.parse import quote, urlsplit +import uuid +import zlib + +from PIL import Image +sys.path.insert(0, str(Path(__file__).resolve().parents[1] / 'tests')) +from client import Client, arguments, check, run + + +def main(): + args = arguments('Attachment negative and concurrent checks') + c = Client(args.base_url, args.ca_file) + alice, bob, eve, chat = c.bootstrap() + path = '/api/v1/chats/'+chat['id']+'/attachments?filename=' + png = (Path(__file__).resolve().parents[1] / 'tests/fixtures/sample.png').read_bytes() + headers = {'Content-Type': 'image/png'} + att = c.call('POST', path+'sample.png', 202, actor=alice, raw=png, headers=headers, schema='Attachment')['json'] + check('object_key' not in att and 'url' not in att, 'private storage details leaked') + for filename in ['../a.png', 'a\\b.png', 'x\x00.png', 'x\n.png', '..', ' ']: + c.call('POST', path+quote(filename, safe=''), 400, actor=alice, raw=png, headers=headers) + for data, mime in [(b'not an image', 'image/png'), (png[:30], 'image/png'), + (png[:-12], 'image/png'), (png, 'image/jpeg'), (png, 'application/octet-stream')]: + c.call('POST', path+'invalid.png', 415, actor=alice, raw=data, headers={'Content-Type': mime}) + jpeg = io.BytesIO() + Image.new('RGB', (64, 64), 'red').save(jpeg, format='JPEG') + data = jpeg.getvalue() + j = c.call('POST', path+'real.jpg', 202, actor=alice, raw=data, + headers={'Content-Type': 'image/jpeg'}, schema='Attachment')['json'] + j = c.wait_ready(alice,j) + downloaded = c.call('GET', '/api/v1/attachments/'+j['id']+'/content', actor=bob) + check(downloaded['bytes'] == data, 'JPEG bytes changed') + c.call('POST', path+'broken.jpg', 415, actor=alice, raw=data[:-20], headers={'Content-Type': 'image/jpeg'}) + # Валидный IHDR заявляет >40M пикселей. Отклонение происходит до декодирования. + ihdr = struct.pack('>IIBBBBB', 9000, 5000, 8, 2, 0, 0, 0) + header = b'\x89PNG\r\n\x1a\n' + struct.pack('>I', len(ihdr)) + b'IHDR' + ihdr + header += struct.pack('>I', zlib.crc32(b'IHDR'+ihdr)) + header += png[33:] + c.call('POST', path+'huge-pixels.png', 413, actor=alice, raw=header, headers=headers) + # Отправляем только headers заведомо большого файла: доказываем ранний byte limit. + base = urlsplit(c.base) + connection = http.client.HTTPConnection(base.hostname, base.port or 80, timeout=10) + connection.putrequest('POST', path+'too-big.png') + connection.putheader('Authorization', 'Bearer '+alice['token']) + connection.putheader('Content-Type', 'image/png') + connection.putheader('Content-Length', str(10485761)) + connection.endheaders() + response = connection.getresponse() + check(response.status == 413, 'oversized body was not rejected before reading') + response.read(); connection.close() + c.call('POST', path+'outsider.png', 404, actor=eve, raw=png, headers=headers) + for suffix in ['', '/content']: + c.call('GET', '/api/v1/attachments/'+att['id']+suffix, 404, actor=eve) + ready = c.wait_ready(alice,att) + c.call('GET', '/api/v1/attachments/'+att['id']+'/content?variant=unknown', 404, actor=bob) + other_chat = c.call('POST', '/api/v1/chats', 201, actor=alice, + body={'title': 'Другой чат', 'member_ids': [alice['id']]}, schema='Chat')['json'] + message_path = '/api/v1/chats/'+other_chat['id']+'/messages' + c.call('POST', message_path, 404, actor=alice, body={'text': '', 'attachment_ids': [att['id']]}, + headers={'Idempotency-Key': uuid.uuid4().hex}) + message_path = '/api/v1/chats/'+chat['id']+'/messages' + for ids, code in [([str(uuid.uuid4())], 404), ([att['id'], att['id']], 400), ([att['id']]*11, 400)]: + c.call('POST', message_path, code, actor=alice, body={'text': '', 'attachment_ids': ids}, + headers={'Idempotency-Key': uuid.uuid4().hex}) + key = uuid.uuid4().hex + def send(_): + return Client(args.base_url).message(bob, chat, '', key=key, attachments=[att['id']]) + with ThreadPoolExecutor(max_workers=8) as pool: + replies = list(pool.map(send, range(16))) + check(all(r['json'] == replies[0]['json'] for r in replies), 'attachment replay created different messages') + check(len({r['headers']['X-Instance-Id'] for r in replies}) >= 2, 'attachment race did not cross replicas') + # Отсутствие attachment_ids и [] одинаковы и для хеша повтора. + text_key = uuid.uuid4().hex + text_message = c.message(alice, chat, 'Только текст', key=text_key)['json'] + check(c.message(alice, chat, 'Только текст', key=text_key, attachments=[])['json'] == text_message, + 'default [] changes key semantics') + check(att['sha256'] == hashlib.sha256(png).hexdigest(), 'wrong original checksum') + print('PASS: PNG/JPEG, bytes/pixels limits, filename/MIME, ACL, attachment message replay') + + +if __name__ == '__main__': + run(main) diff --git a/student-tests/checks.py b/student-tests/checks.py new file mode 100644 index 0000000..57c5347 --- /dev/null +++ b/student-tests/checks.py @@ -0,0 +1,90 @@ +"""Дополнения к публичному smoke. Не печатает и не сохраняет tokens.""" +import base64 +import concurrent.futures +import json +import sys +import time +from pathlib import Path +from uuid import uuid4 +from urllib.parse import quote + +sys.path.insert(0, str(Path(__file__).resolve().parents[1] / 'tests')) +from client import Client, arguments, check, run + + +def check_cursor_types(c, actor, path, cursor, schema): + check(bool(cursor), 'test requires a real pagination cursor') + payload = json.loads(base64.urlsafe_b64decode(cursor + '=' * (-len(cursor) % 4))) + c.call('GET', path + '?cursor=' + quote(cursor, safe=''), actor=actor, schema=schema) + invalid = [] + for field in ['created_at', 'id']: + for value in [1, 1.5, None, True, [], {}, '', 'invalid']: + invalid.append({**payload, field: value}) + invalid.extend([None, 1, True, [], 'cursor']) + for value in invalid: + encoded = base64.urlsafe_b64encode(json.dumps(value).encode()).decode().rstrip('=') + instances = set() + # Проверяем один и тот же cursor на обеих API за round-robin LB. + for _ in range(8): + response = c.call('GET', path + '?cursor=' + quote(encoded, safe=''), 400, actor=actor) + check(response['json']['error']['code'] == 'invalid_request', 'incorrect cursor error code') + instances.add(response['headers']['X-Instance-Id']) + if len(instances) >= 2: + break + check(len(instances) >= 2, 'invalid cursor was not checked on two API instances') + + +def main(): + def configure(p): + p.add_argument('--expiry', action='store_true', help='API must run with TTL=2') + args = arguments('Student API checks', configure) + c = Client(args.base_url) + alice, bob, eve, chat = c.bootstrap() + if args.expiry: + time.sleep(2.2) + c.call('GET', '/api/v1/users/me', 401, actor=alice) + print('PASS: short TTL expiry') + return + registration = {'username': 'race_' + uuid4().hex[:12], 'display_name': 'Гонка', + 'password': 'Synthetic-password-42'} + # Для гонки регистрируем оба допустимых исхода через urllib. + import urllib.request + import urllib.error + def register(_): + req = urllib.request.Request(c.base + '/api/v1/users', + data=json.dumps(registration).encode(), + headers={'Content-Type': 'application/json'}) + try: + with urllib.request.urlopen(req, timeout=10) as response: + return response.status + except urllib.error.HTTPError as error: + return error.code + with concurrent.futures.ThreadPoolExecutor(max_workers=8) as executor: + codes = list(executor.map(register, range(8))) + check(codes.count(201) == 1 and codes.count(409) == 7, 'username race failed') + path = '/api/v1/chats/' + chat['id'] + c.call('POST', '/api/v1/chats', 400, actor=alice, + body={'title': 'unknown member', 'member_ids': [alice['id'], str(uuid4())]}) + for body in [{'text': 'x', 'sender_id': eve['id']}, {'text': 4}, {'text': ' '}]: + c.call('POST', path + '/messages', 400, actor=alice, body=body) + c.call('GET', path + '/messages?limit=true', 400, actor=alice) + c.call('GET', path + '/messages?cursor=not-a-cursor', 400, actor=alice) + for n in range(3): + c.message(alice, chat, 'read-after-write ' + str(n)) + page = c.call('GET', path + '/messages?limit=1', actor=alice, schema='MessagePage')['json'] + other = c.call('POST', '/api/v1/chats', 201, actor=alice, + body={'title': 'other', 'member_ids': [alice['id']]}, schema='Chat')['json'] + c.call('GET', '/api/v1/chats/' + other['id'] + '/messages?cursor=' + + quote(page['next_cursor'], safe=''), 400, actor=alice) + check_cursor_types(c, alice, path + '/messages', page['next_cursor'], 'MessagePage') + chats = c.call('GET', '/api/v1/chats?limit=1', actor=alice, schema='ChatPage')['json'] + check_cursor_types(c, alice, '/api/v1/chats', chats['next_cursor'], 'ChatPage') + history = c.call('GET', path + '/messages', actor=bob, schema='MessagePage')['json']['items'] + check(len(history) == 3 and history[-1]['text'] == 'read-after-write 2', 'read-after-write failed') + c.call('DELETE', '/api/v1/auth/sessions/current', 204, actor=alice) + c.call('GET', '/api/v1/users/me', 401, actor=alice) + print('PASS: registration race, invalid input, cursor scope/types on two API, read-after-write, logout') + + +if __name__ == '__main__': + run(main) diff --git a/student-tests/database.py b/student-tests/database.py new file mode 100644 index 0000000..bdc9b03 --- /dev/null +++ b/student-tests/database.py @@ -0,0 +1,61 @@ +"""Проверка реального rollback после вставки чата и первого участника.""" +import sys +from pathlib import Path +sys.path.insert(0, str(Path(__file__).resolve().parents[1])) +from uuid import uuid4 +import psycopg +import os +sys.path.insert(0, str(Path(__file__).resolve().parents[1] / 'tests')) +from client import Client +from src.config import DATABASE_URL +from src.migrate import migrate + +migrate() +migrate() # Повтор миграции не создаёт дубликаты. +with psycopg.connect(DATABASE_URL) as db: + user = db.execute('SELECT id FROM users LIMIT 1').fetchone() + assert user, 'Сначала выполните smoke, чтобы создать синтетического пользователя' + chat = uuid4() + try: + with db.transaction(): + db.execute('INSERT INTO chats(id,title) VALUES (%s,%s)', (chat, 'rollback test')) + db.execute('INSERT INTO chat_members VALUES (%s,%s)', (chat, user[0])) + # FK прерывает составную операцию ПОСЛЕ двух успешных INSERT. + db.execute('INSERT INTO chat_members VALUES (%s,%s)', (chat, uuid4())) + except psycopg.errors.ForeignKeyViolation: + pass + else: + raise AssertionError('Expected foreign-key failure') + assert db.execute('SELECT count(*) FROM chats WHERE id=%s', (chat,)).fetchone()[0] == 0 + assert db.execute('SELECT count(*) FROM chat_members WHERE chat_id=%s', (chat,)).fetchone()[0] == 0 + assert db.execute('SELECT count(*) FROM schema_migrations').fetchone()[0] == 4 +print('PASS: rollback of chat + members; migration reapplied twice') + +c = Client(os.getenv('BASE_URL', 'http://localhost:8080')) +alice, bob, _, chat = c.bootstrap() +key = uuid4().hex +original = c.message(alice, chat, 'До истечения ключа', key=key)['json'] +with psycopg.connect(DATABASE_URL) as db: + # Без ожидания суток: сдвигаем именно persisted expiry, а не clock приложения. + db.execute("UPDATE message_requests SET expires_at=now()-interval '1 second' " + "WHERE chat_id=%s AND request_key=%s", (chat['id'], key)) +renewed = c.message(alice, chat, 'После истечения ключа', key=key)['json'] +assert renewed['id'] != original['id'] +with psycopg.connect(DATABASE_URL) as db: + assert db.execute('SELECT count(*) FROM message_requests WHERE chat_id=%s AND request_key=%s', + (chat['id'], key)).fetchone()[0] == 1 +with psycopg.connect(DATABASE_URL) as db: + message = uuid4() + try: + with db.transaction(): + db.execute('INSERT INTO messages(id,chat_id,sender_id,text) VALUES (%s,%s,%s,%s)', + (message, chat['id'], bob['id'], 'atomic rollback')) + # Ошибка сохранения результата должна откатить и сообщение. + db.execute("INSERT INTO message_requests VALUES (%s,%s,%s,%s,%s,now())", + (uuid4(), chat['id'], 'rollback', '0'*64, psycopg.types.json.Jsonb({}))) + except psycopg.errors.ForeignKeyViolation: + pass + else: + raise AssertionError('Expected result-store failure') + assert db.execute('SELECT count(*) FROM messages WHERE id=%s', (message,)).fetchone()[0] == 0 +print('PASS: persisted key expiry, atomic message/result rollback') diff --git a/student-tests/dependencies.py b/student-tests/dependencies.py new file mode 100644 index 0000000..4b2e427 --- /dev/null +++ b/student-tests/dependencies.py @@ -0,0 +1,38 @@ +"""Отказы Redis и PostgreSQL; старые токены и подтверждения после восстановления.""" +import os +from pathlib import Path +import sys +import time +import urllib.request +import urllib.error +sys.path.insert(0,str(Path(__file__).resolve().parents[1])) +sys.path.insert(0,str(Path(__file__).resolve().parents[1]/'tests')) +from client import Client +from scripts.stack import command,wait,save + +base=os.getenv('BASE_URL','http://localhost:8080');c=Client(base,timeout=15) +alice,bob,_,chat=c.bootstrap();message=c.message(alice,chat,'До отказов')['json'] +att,data=c.attachment(alice,chat);att=c.wait_ready(alice,att) +results={} +try: + command(['docker','compose','stop','cache']) + for _ in range(6):c.call('GET','/api/v1/users/me',actor=alice,schema='User') + c.message(alice,chat,'Без кеша');results['redis']='PASS' +finally:command(['docker','compose','up','-d','--wait','cache']) +try: + command(['docker','compose','stop','db']);time.sleep(4) + codes=[] + for path in ['/health/ready','/api/v1/users/me']: + request=urllib.request.Request(base+path,headers={'Authorization':'Bearer '+alice['token']}) + try: + with urllib.request.urlopen(request,timeout=10) as response:codes.append(response.status) + except urllib.error.HTTPError as exc:codes.append(exc.code) + assert codes==[503,503];results['postgres']=codes +finally: + command(['docker','compose','up','-d','--wait','db']);wait(2,base) +page=c.call('GET','/api/v1/chats/'+chat['id']+'/messages',actor=bob,schema='MessagePage')['json'] +assert message in page['items'] +assert c.call('GET','/api/v1/attachments/'+att['id']+'/content',actor=bob)['bytes']==data +results['old_token_message_original_preserved']=True +save('dependencies.json',results) +print('PASS: Redis fallback, PostgreSQL 503 and recovery, old token/message/original preserved') diff --git a/student-tests/file_failover.py b/student-tests/file_failover.py new file mode 100644 index 0000000..9bf7db4 --- /dev/null +++ b/student-tests/file_failover.py @@ -0,0 +1,43 @@ +"""Останавливаем именно API, принявшую upload, и скачиваем оригинал другой репликой.""" +import hashlib +import os +from pathlib import Path +import sys +import time +sys.path.insert(0, str(Path(__file__).resolve().parents[1])) +sys.path.insert(0, str(Path(__file__).resolve().parents[1] / 'tests')) +from client import Client, Failure +from scripts.stack import stop, wait, save, command + +base = os.getenv('BASE_URL', 'http://localhost:8080') +c = Client(base, timeout=3) +alice, bob, _, chat = c.bootstrap() +data = (Path(__file__).resolve().parents[1] / 'tests/fixtures/sample.png').read_bytes() +response = c.call('POST', '/api/v1/chats/'+chat['id']+'/attachments?filename=failover.png', + 202, actor=alice, raw=data, headers={'Content-Type': 'image/png'}, schema='Attachment') +target = response['headers']['X-Instance-Id'] +att = c.wait_ready(alice,response['json']) +c.message(alice, chat, '', attachments=[att['id']]) +started = time.monotonic() +errors = 0 +try: + stopped = stop(target) + while True: + try: + downloaded = c.call('GET', '/api/v1/attachments/'+att['id']+'/content', actor=bob) + alias = downloaded['headers']['X-Instance-Id'] + assert alias != target and downloaded['bytes'] == data + assert hashlib.sha256(downloaded['bytes']).hexdigest() == att['sha256'] + break + except Failure: + errors += 1 + if time.monotonic()-started > 10: + raise + time.sleep(.2) + save('attachment_failover.json', dict(status='PASS', uploader=target, downloader=alias, + recovery_seconds=time.monotonic()-started, failed_attempts=errors, + original_size=len(data), checksum_verified=True, stop=stopped)) + print('PASS: upload API stopped, original downloaded by other API with existing token') +finally: + command(['docker', 'compose', 'start', 'api']) + wait(2, base) diff --git a/student-tests/idempotency.py b/student-tests/idempotency.py new file mode 100644 index 0000000..bd99106 --- /dev/null +++ b/student-tests/idempotency.py @@ -0,0 +1,58 @@ +"""Проверки общего результата повтора через LB и несколько API.""" +from concurrent.futures import ThreadPoolExecutor +import json +from pathlib import Path +import sys +import uuid + +sys.path.insert(0, str(Path(__file__).resolve().parents[1] / 'tests')) +from client import Client, arguments, check, run + + +def main(): + args = arguments('Shared idempotency through LB') + c = Client(args.base_url, args.ca_file) + alice, bob, eve, chat = c.bootstrap() + key = uuid.uuid4().hex + text = 'Один результат для конкурентных повторов' + + def send(_): + return Client(args.base_url, args.ca_file).message(alice, chat, text, key=key) + + with ThreadPoolExecutor(max_workers=16) as pool: + responses = list(pool.map(send, range(32))) + first = responses[0]['json'] + check(all(r['json'] == first and r['status'] == 201 for r in responses), 'replay differs') + instances = {r['headers']['X-Instance-Id'] for r in responses} + check(len(instances) >= 2, 'race did not cross API replicas') + path = '/api/v1/chats/' + chat['id'] + '/messages' + history = c.call('GET', path, actor=bob, schema='MessagePage')['json']['items'] + check(len(history) == 1 and history[0] == first, 'concurrent replay created duplicates') + c.call('POST', path, 409, body={'text': 'Другой текст'}, actor=alice, + headers={'Idempotency-Key': key}) + for invalid in ['', 'bad key', 'a' * 129]: + c.call('POST', path, 400, body={'text': text}, actor=alice, + headers={'Idempotency-Key': invalid}) + c.call('POST', path, 400, body={'text': text}, actor=alice) + # Тот же ключ независим для другого пользователя и другого чата. + other = c.message(bob, chat, text, key=key)['json'] + check(other['id'] != first['id'], 'key scope must include user') + chat2 = c.call('POST', '/api/v1/chats', 201, actor=alice, + body={'title': 'Second', 'member_ids': [alice['id']]}, schema='Chat')['json'] + check(c.message(alice, chat2, text, key=key)['json']['id'] != first['id'], 'key scope must include chat') + # Пробелы JSON не изменяют смысл текста и не должны менять результат. + replay = c.call('POST', path, 201, actor=alice, raw=json.dumps({'text': text}, indent=2).encode(), + headers={'Content-Type': 'application/json', 'Idempotency-Key': key}, schema='Message') + check(replay['json'] == first, 'JSON formatting changed idempotency') + c.call('POST', path, 404, actor=eve, body={'text': text}, headers={'Idempotency-Key': key}) + c.call('DELETE', '/api/v1/auth/sessions/current', 204, actor=alice) + c.call('POST', path, 401, actor=alice, body={'text': text}, headers={'Idempotency-Key': key}) + result = dict(status='PASS', concurrent_requests=32, observed_instances=len(instances), + messages_after_race=len(history), conflict=409, invalid_key=400, logout=401) + Path('evidence').mkdir(exist_ok=True) + Path('evidence/idempotency.json').write_text(json.dumps(result, indent=2)) + print('PASS: shared idempotency, scope, conflict and auth on replay') + + +if __name__ == '__main__': + run(main) diff --git a/student-tests/pipeline_scenario.py b/student-tests/pipeline_scenario.py new file mode 100644 index 0000000..27dc03d --- /dev/null +++ b/student-tests/pipeline_scenario.py @@ -0,0 +1,183 @@ +"""Сценарии pipeline внутри сети стенда. Приватный контекст только в stdin/stdout оператора.""" +import argparse +import base64 +from datetime import datetime +import hashlib +import io +import json +import os +from pathlib import Path +import sys +import time +import uuid + +sys.path.insert(0,str(Path(__file__).resolve().parents[1])) +sys.path.insert(0,str(Path(__file__).resolve().parents[1]/'tests')) +from client import Client,check +from src.jobs import connection,inspect,payload,event,replay,new_version +from src.broker import connect,publish,STREAM,GROUP +from src.storage import ObjectStore +from src.cleanup import run as cleanup + + +def main(): + p=argparse.ArgumentParser();p.add_argument('mode',choices=['config','create','queued','wait','snapshot','duplicate','arm', + 'fault-fired','unready','published','drained','audit','missing-stage','restore-stage','replay','version','failed','cleanup','privacy','invalid-job']) + p.add_argument('--phase');p.add_argument('--state',default='ready');p.add_argument('--timeout',type=int,default=100) + args=p.parse_args();ctx=json.load(sys.stdin) + if args.mode=='config': + from src.config import JOB_MAX_ATTEMPTS,JOB_TIMEOUT,JOB_LEASE,STAGING_RETENTION,MAX_PENDING_JOBS,WORKER_CONCURRENCY + return dict(job_max_attempts=JOB_MAX_ATTEMPTS,job_timeout_seconds=JOB_TIMEOUT,job_lease_seconds=JOB_LEASE, + staging_retention_seconds=STAGING_RETENTION,max_pending_jobs=MAX_PENDING_JOBS, + worker_concurrency=WORKER_CONCURRENCY,prefetch_per_consumer=1) + c=Client(os.getenv('BASE_URL','http://localhost:8080'),timeout=15) + fixture=(Path(__file__).resolve().parents[1]/'tests/fixtures/sample.png').read_bytes() + storage=ObjectStore() + if args.mode=='create': + alice,bob,_,chat=c.bootstrap() + response=c.call('POST','/api/v1/chats/'+chat['id']+'/attachments?filename=pipeline.png',202,actor=alice, + raw=fixture,headers={'Content-Type':'image/png'},schema='Attachment') + att=response['json'];assert att['status']=='queued' + with connection() as db: + job=db.execute('SELECT * FROM jobs WHERE attachment_id=%s',(att['id'],)).fetchone() + assert storage.head(job['staging_key']) and job['status']=='queued' + return dict(actor=alice,reader=bob,chat=chat,attachment=att,job_id=str(job['id']),uploader=response['headers']['X-Instance-Id']) + info=inspect(ctx['job_id']);job=info['job'];att=info['attachment'] + path='/api/v1/attachments/'+str(job['attachment_id']) + if args.mode=='queued': + result=c.call('GET',path,actor=ctx['actor'],schema='Attachment')['json'];assert result['status']=='queued' + c.call('GET',path+'/content',409,actor=ctx['reader']) + c.message(ctx['actor'],ctx['chat'],'',attachments=[str(job['attachment_id'])]) + c.message(ctx['actor'],ctx['chat'],'Worker выключен, сообщения работают') + return dict(status='PASS',attachment_id=str(job['attachment_id']),job_id=ctx['job_id'],accepted_status=202,content_status=409) + if args.mode in {'wait','fault-fired'}: + deadline=time.monotonic()+args.timeout + while time.monotonic()=last and not pending.intersection(ids):return dict(status='PASS',acked=len(ids)) + time.sleep(.2) + finally:client.close() + raise AssertionError('Broker state deadline exceeded') + if args.mode=='arm': + with connection() as db: + db.execute('INSERT INTO pipeline_faults(job_id,phase) VALUES (%s,%s) ON CONFLICT (job_id,phase) DO UPDATE SET fired_at=NULL', + (ctx['job_id'],args.phase)) + return dict(armed=True,phase=args.phase) + if args.mode=='snapshot': + current=c.call('GET',path,actor=ctx['reader'],schema='Attachment')['json'] + assert current['status']=='ready' and current['error_code'] is None + content=c.call('GET',path+'/content',actor=ctx['reader'])['bytes'] + assert content==fixture + variants={v['name']:v for v in current['variants']};assert set(variants)=={'thumbnail','crop','optimized'} + digests={} + for name,meta in variants.items(): + data=c.call('GET',path+'/content?variant='+name,actor=ctx['reader'])['bytes'] + assert len(data)==meta['size_bytes'] and hashlib.sha256(data).hexdigest()==meta['sha256'] + digests[name]=meta['sha256'] + keys=[] + for prefix in ['originals/','variants/']: + keys.extend(r['Key'] for r in storage.objects(prefix+str(job['attachment_id'])+'/')) + expected=1+3 + # После новой версии прежние объекты остаются для аудита; текущий набор ровно 4. + current_keys=[k for k in keys if '/v'+str(att['pipeline_version'])+'/' in k] + assert len(current_keys)==expected and len(set(current_keys))==expected + info=inspect(ctx['job_id']) + assert info['job']['status']=='ready' and info['attachment']['current_job_id']==job['id'] + assert len([r for r in info['events'] if r['event']=='ready'])==1 + deadline=time.monotonic()+5 + while storage.head(info['job']['staging_key']) is not None and time.monotonic()=245 for v in result.convert('RGB').getpixel((0,0))),'alpha not composited on white') + c.call('GET','/api/v1/attachments/'+att['id']+'/content?variant='+name,404,actor=eve) + print('PASS: thumbnail/crop/WebP bytes, sizes, EXIF orientation, white alpha, no upscaling, ACL') + + +if __name__=='__main__':run(main)