docs: record pipeline-reliability verify evidence on 399da05

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-31 19:51:32 +03:00
co-authored by Claude Opus 5.5
parent 399da054f2
commit d6bd0a5fec
9 changed files with 152 additions and 81 deletions
+25 -25
View File
@@ -1,8 +1,8 @@
# Шаг 4 сценария защиты: окна отказа
- Команда: `python3 .claude/skills/run-mtusi-messenger/driver.py --port 8080 defense-faults`
- Дата: 2026-10-31, 13:20:45–13:22:52 UTC; итог `PASS`
- Commit: `e2a6427` (ветка `feat/pipeline-reliability`), рабочее дерево без правок кода (добавлены только файлы `evidence/`)
- Дата: 2026-10-31, 16:01:59–16:04:03 UTC; код выхода 0, итог `PASS`
- Commit: `399da05` (ветка `feat/pipeline-reliability`), рабочее дерево без правок кода (добавлены только файлы `evidence/`)
- Стенд: проект compose `mtusi-lab5`, собран `make run_docker` из `HEAD`: HAProxy, две реплики API, relay, worker, cleaner, PostgreSQL, Valkey, S3, RabbitMQ
- Спек: `student-tests`, «Шаг 4 на рабочем стенде»; решения 1, 3, 5, 14, 17 design change `pipeline-reliability`. Тем же порядком на стенде отказов — `test_defense_faults` (`evidence/tests/failure-checks.md`)
- Точек сбоя в коде нет: окна держат триггеры `driver_df_*` только на уникальный `filename` прогона, `docker kill` снаружи. Токенов и секретов в выводе нет, пользователи и чат синтетические
@@ -11,12 +11,12 @@
```text
window: after writing objects, before COMMIT
upload: 202
attachment id 9dbedb7b-9884-4122-bbc8-3ee3b3adb278
attachment id 2cccff8d-6ce9-448f-9d58-7506b6e39aa1
COMMIT of ready waits in the trigger: yes
action: docker kill worker
job state after kill: processing
attempt after kill: 1
job id 89767628-2179-40d8-9d08-5a882db756e4
job id 181f8092-211d-482d-981b-c15e6e74e70a
thumbnail sha256 before the crash b8e59b0cad429b1c49c27c4a1c79e52bfc23e2fab7c7238d18d5addd4df4b546
crop sha256 before the crash fae35500205a78065cf7d589f121cc909b017e2a4cde882177e24f5608fb4c1f
optimized sha256 before the crash 1090d84ed8411226010ae498b08e1b9e6d81c8eee02ee77143a0dc327b894beb
@@ -35,18 +35,18 @@ window: after writing objects, before COMMIT
window: after COMMIT, before ack
upload: 202
attachment id 5acffd71-f175-4c78-a2ed-58f90a2c27ad
attachment id 63163c48-95f9-4e41-ae36-4746f241bad5
COMMIT waits in the deferred trigger: yes
action: docker kill -s STOP worker
job state while frozen: succeeded
job id 23c4e081-66af-43a8-b9df-3b42508ea890
job id c14b31e6-2e3c-4453-8a55-76c8d4881b7c
action: docker kill worker
message returned to the queue (no ack): 1
action: start worker
redelivered: 'Skipped job message', finished: yes
new attempts: 0
queue empty: 0
same updated_at: 2026-10-31T13:22:01.910196+00:00
same updated_at: 2026-10-31T16:03:16.515863+00:00
attempt: 1
metadata unchanged: yes
downloads: thumbnail image/jpeg (256, 160); crop image/jpeg (128, 128); optimized image/webp (320, 200)
@@ -55,8 +55,8 @@ window: after COMMIT queued, before publish
action: docker kill relay
relay stays down: no
upload: 202
attachment id 092f2122-d3de-4034-a8d9-071c070a0f4b
job id 40467883-90e0-4e8a-905a-45ffe36cf2b6
attachment id 2776eb1b-9c3e-429e-9acc-bd2d010eee9c
job id a50fc32c-e511-4789-8973-29073584414d
job state: queued
published_at: None
messages in the queue: 0
@@ -68,11 +68,11 @@ window: after COMMIT queued, before publish
window: after broker confirm, before the mark
action: docker compose stop worker
upload: 202
attachment id ea2e1492-1e1f-4dc3-b2fb-70a87c3c0986
attachment id ef8d3438-e3bd-4849-8375-79cccd92f29e
the mark waits in the trigger: yes
action: docker kill relay
message in the queue: 1
job id f81f91fa-6d41-470d-9b27-a4086dc263f2
job id 61c712cf-5a6e-4f5c-b9b7-c042bc7e9202
published_at: None
action: start relay
two messages with the worker stopped: 2
@@ -85,50 +85,50 @@ window: after broker confirm, before the mark
window: replay of a failed job
action: docker compose stop worker
upload: 202
attachment id f3b0e3cb-fec6-4604-a43f-32a35468ea3a
attachment id 899a3ef4-f0d9-4d0c-8b75-49e0fe7ccf7d
action: staging object replaced with other bytes of the same size
action: start worker
attachment status: failed
error_code: processing_failed
job id 13665040-1e95-4ad3-b1fc-759bb69322d0
job id 0ef49bb7-fda7-4555-a82a-9693e265820a
reason: source_corrupted
action: replay --error-code processing_failed (registry, dry-run)
registry: exit 0
registry names the job: yes
registry changes nothing: state failed, attempt 1, attempt_base 0, last_error_code source_corrupted
action: original bytes returned to staging
action: replay --attachment-id f3b0e3cb-fec6-4604-a43f-32a35468ea3a --apply
action: replay --attachment-id 899a3ef4-f0d9-4d0c-8b75-49e0fe7ccf7d --apply
replay exit code: 0
'Replayed job' record: yes
attachment status: ready
downloads: thumbnail image/jpeg (256, 160); crop image/jpeg (128, 128); optimized image/webp (320, 200)
download original: 200
original sha256 = uploaded: 99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75
same job: 13665040-1e95-4ad3-b1fc-759bb69322d0
same job: 0ef49bb7-fda7-4555-a82a-9693e265820a
attempt: 2
attempt_base: 1
audit: [{'operator': 'driver-defense-faults', 'error_code': 'processing_failed', 'reason': 'source_corrupted', 'attempt': 1}]
window: replay of a ready job
upload: 202
attachment id 1ac6c769-2b55-4449-ac01-96575e6c6502
attachment id 5158f6e9-c59a-46f1-bfb9-d16cf502aa7c
attachment status: ready
job id c5a99e2b-2a3e-4ee8-8b53-f557190b1980
action: replay --attachment-id 1ac6c769-2b55-4449-ac01-96575e6c6502 --apply
job id f6eeaf22-4374-4880-99d1-c2b54ecb2bd3
action: replay --attachment-id 5158f6e9-c59a-46f1-bfb9-d16cf502aa7c --apply
replay exit code: 3
refusal: already_ready
metadata unchanged: yes
job unchanged: 2026-10-31T13:22:43.535575+00:00
job unchanged: 2026-10-31T16:03:55.015651+00:00
audit records: 0
driver triggers left: 0
window -> action -> job id -> attempts started -> result
after writing objects, before COMMIT -> kill worker, wait for the lease -> 89767628-2179-40d8-9d08-5a882db756e4 -> 2 -> ready
after COMMIT, before ack -> freeze and kill worker after COMMIT -> 23c4e081-66af-43a8-b9df-3b42508ea890 -> 1 -> ready, no-op
after COMMIT queued, before publish -> kill relay, upload, start relay -> 40467883-90e0-4e8a-905a-45ffe36cf2b6 -> 1 -> ready
after broker confirm, before the mark -> kill relay after confirm, duplicate -> f81f91fa-6d41-470d-9b27-a4086dc263f2 -> 1 -> ready
replay of a failed job -> failed, registry, replay -> 13665040-1e95-4ad3-b1fc-759bb69322d0 -> 2 -> ready
replay of a ready job -> replay ready -> c5a99e2b-2a3e-4ee8-8b53-f557190b1980 -> 1 -> refused, exit 3
after writing objects, before COMMIT -> kill worker, wait for the lease -> 181f8092-211d-482d-981b-c15e6e74e70a -> 2 -> ready
after COMMIT, before ack -> freeze and kill worker after COMMIT -> c14b31e6-2e3c-4453-8a55-76c8d4881b7c -> 1 -> ready, no-op
after COMMIT queued, before publish -> kill relay, upload, start relay -> a50fc32c-e511-4789-8973-29073584414d -> 1 -> ready
after broker confirm, before the mark -> kill relay after confirm, duplicate -> 61c712cf-5a6e-4f5c-b9b7-c042bc7e9202 -> 1 -> ready
replay of a failed job -> failed, registry, replay -> 0ef49bb7-fda7-4555-a82a-9693e265820a -> 2 -> ready
replay of a ready job -> replay ready -> f6eeaf22-4374-4880-99d1-c2b54ecb2bd3 -> 1 -> refused, exit 3
all rows of the check table: expected = got
PASS: every window finished with the same result, no duplicate effect
+17 -6
View File
@@ -1,10 +1,11 @@
# Процесс relay
- Команда: `python3 .claude/skills/run-mtusi-messenger/driver.py --port 8080 relay-process`
- Дата: 2026-10-31, 13:24:07–13:24:58 UTC; код выхода 0
- Commit: `e2a6427` (ветка `feat/pipeline-reliability`), рабочее дерево без правок кода (добавлены только файлы `evidence/`)
- Дата: 2026-10-31, 16:01:07–16:01:59 UTC; код выхода 0
- Commit: `399da05` (ветка `feat/pipeline-reliability`), рабочее дерево без правок кода (добавлены только файлы `evidence/`)
- Стенд: проект compose `mtusi-lab5`, собран `make run_docker` из `HEAD`
- Спеки: `container-run`, `graceful-shutdown`, `service-configuration`, `job-outbox`
- Что нового с `e2a6427`: `docker stop relay` при замороженном брокере с намерением в работе — 1,81 с, код 0, после запуска relay вложение `ready`
- Значений секретов в выводе нет, окружение проверяется только по именам
```text
@@ -27,8 +28,9 @@ RELAY__MAX_PUBLISHED_BACKLOG=-1: exit 2, errors [{'loc': 'relay.max_published_ba
RELAY__POLL_INTERVAL_SECONDS=abc: exit 2, errors [{'loc': 'relay.poll_interval_seconds', 'msg': 'Input should be a valid number, unable to parse string as a number'}]
docker compose stop relay: 0.2 s
docker stop after 0.3 s: 0.12 s, exit 0, records ['Stopped relay before startup']
docker stop after 0.2 s: 0.06 s, exit 0, records ['Stopped relay before startup']
docker stop after 0.4 s: 0.10 s, exit 0, records ['Stopped relay before startup']
docker stop after 0.2 s: 0.08 s, exit 0, records ['Stopped relay before startup']
docker stop after 0.4 s: 0.12 s, exit 0, records ['Stopped relay before startup']
stop frozen broker: docker stop relay took 1.81 s
PID 1 of the relay expected python -m src.relay got python -m src.relay
healthcheck expected NONE got NONE
limit NanoCpus expected 250000000 got 250000000
@@ -37,8 +39,8 @@ S3__* in the environment expected no got no
S3_* in the environment expected no got no
CACHE__* in the environment expected no got no
VALKEY* in the environment expected no got no
_imaging in mtusi-lab5-api-10 expected no got no
_imaging in mtusi-lab5-api-9 expected no got no
_imaging in mtusi-lab5-api-15 expected no got no
_imaging in mtusi-lab5-api-16 expected no got no
API replicas checked expected yes got yes
_imaging in PID 1 of the relay expected no got no
'Started relay' record expected yes got yes
@@ -90,6 +92,15 @@ relay StartedAt unchanged expected yes got yes
relay RestartCount expected 0 got 0
new upload after restart expected 202 got 202
new upload becomes ready expected yes got yes
stop frozen broker: broker paused expected 0 got 0
stop frozen broker: upload expected 202 got 202
stop frozen broker: command exit code expected 0 got 0
stop frozen broker: under 10 s expected yes got yes
stop frozen broker: container exit code expected 0 got 0
stop frozen broker: OOM killed expected false got false
stop frozen broker: last record expected Stopped relay got Stopped relay
stop frozen broker: relay back expected 0 got 0
stop frozen broker: upload after start expected ready got ready
PASS: the relay process matches the spec
worker and relay running at the end: yes
```
+9 -10
View File
@@ -1,11 +1,11 @@
# Проверки отказов
- Команда: `make failure_checks`
- Дата: 2026-10-31, 12:40:09–13:20:12 UTC; код выхода 0
- Commit: `e2a6427` (ветка `feat/pipeline-reliability`), рабочее дерево без правок кода (на момент прогона добавлена только метка `evidence/rollout/pipeline-reliability/`)
- Дата: 2026-10-31, 16:05:22–16:44:08 UTC; код выхода 0
- Commit: `399da05` (ветка `feat/pipeline-reliability`), рабочее дерево без правок кода (на момент прогона добавлены только файлы `evidence/`)
- Стенд: проект `mtusi-lab5-failures` со своими PostgreSQL, Valkey, S3, RabbitMQ, уборщиком, relay, worker и четырьмя API; рабочий стенд `mtusi-lab5` на время прогона остановлен (хост свободен); стенд отказов и его volumes удалены в конце
- Итог: **140 passed, 219 deselected, pytest 2372,74 с (39:32); вся команда 40:03**; журнал PostgreSQL стенда без признаков аварии (`crash markers 0`). «too many clients» 45 и «administrator command» 192 — следы самих проверок (заполнение слотов, остановки PostgreSQL)
- Тесты с прошлого полного прогона (139 из 140) не правились в этом прогоне; `test_staging_cleanup_survives_outage` с прежней правкой прошёл в полном наборе. Временных красных нет
- Итог: **141 passed, 224 deselected, pytest 2302,16 с (38:22); вся команда 38:45**; журнал PostgreSQL стенда без признаков аварии (`crash markers 0`). «too many clients» 40 и «administrator command» 192 — следы самих проверок (заполнение слотов, остановки PostgreSQL)
- С прогона на `e2a6427` (140 проверок) усилен `test_hung_worker_lease_fencing`, прежний его поток стал `test_hung_worker_thawed_after_ready`. Тесты в этом прогоне не правились, временных красных нет
- Параметры: уборщик — grace 20 с, интервал 1 с, плановая сверка выключена; worker — 4 попытки, пауза 4–16 с, срок 10 с, запас аренды 2 с, рендер 8 с / 3 с CPU, graceful 2 с; relay — опрос 0,2 с, повторная публикация через 5 с
- Вывод сокращён: убраны лог сборки и шаги compose, адреса API временные, строки `PASSED` свёрнуты в список имён
@@ -15,11 +15,10 @@
[failure_checks] start worker: attempts 4, retry 4–16 s, job timeout 10 s, lease margin 2 s, render 8 s / 3 s CPU, graceful 2 s
[failure_checks] start relay: poll 0.2 s, republish after 5 s
[failure_checks] pytest -m fault
collecting ... collected 359 items / 219 deselected / 140 selected
=============== 140 passed, 219 deselected in 2372.74s (0:39:32) ===============
[failure_checks] postgres log: 587 lines, crash markers 0; "too many clients" 45, "administrator command" 192
=============== 141 passed, 224 deselected in 2302.16s (0:38:22) ===============
[failure_checks] postgres log: 578 lines, crash markers 0; "too many clients" 40, "administrator command" 192
[failure_checks] results: {'fault': 0, 'postgres': 0}
make failure_checks 211,06s user 85,99s system 12% cpu 40:03,44 total
make failure_checks 219,83s user 85,52s system 13% cpu 38:45,66 total
```
## Прошедшие проверки по порядку
@@ -53,7 +52,7 @@ test_relay_killed_before_publish test_relay_killed_after_confirm test_relay_surv
test_relay_respects_next_attempt test_lost_message_republished test_no_copies_while_queue_has_messages test_published_backlog_limit test_broker_memory_alarm
test_crash_after_objects_before_commit test_crash_after_commit_before_ack test_retry_backoff_with_jitter test_retry_waits_outside_worker
test_limit_pixels test_limit_oversized_staging test_limit_cpu_scan_bomb test_limit_memory test_limit_render_timeout test_render_killed
test_hung_worker_lease_fencing test_long_attempt_keeps_lease test_last_attempt_lost
test_hung_worker_lease_fencing test_hung_worker_thawed_after_ready test_long_attempt_keeps_lease test_last_attempt_lost
test_replay_registry_dry_run test_replay_returns_work test_replay_ready_refused test_replay_in_progress_refused test_replay_without_source_refused test_replay_new_budget test_replay_by_code
test_prefetch_bounded test_missing_variant test_cancelled_upload_of_previous_version
test_staging_removed_after_ready test_staging_retention test_staging_keeps_current_work test_staging_cleanup_survives_outage test_staging_foreign_key_kept
@@ -62,7 +61,7 @@ test_reconcile_orphan_staging test_defense_faults
## Красные прогоны задачи 10.9: тесты ловят нарушение
Сняты до commit на рабочем дереве (design change `pipeline-reliability`, «Уточнения apply», п. 14): каждая регрессия применена, откачена, хэши `src` совпали со снимком до них, в commit не вошла.
Сняты до commit на рабочем дереве (design change `pipeline-reliability`, «Уточнения apply», п. 14): каждая регрессия применена, откачена, хэши `src` совпали со снимком до них, в commit не вошла. Строка «фиксация без номера попытки» снята перед `399da05` (замечание W2), остальные — перед `e2a6427`.
| Регрессия | Какой тест красный | Причина в выводе |
|---|---|---|
+26
View File
@@ -0,0 +1,26 @@
# Память контейнера worker
- Команда: разовая проба на рабочем стенде через LB (`student-tests/images.py`, `api_client.py`): для каждого случая `docker stop` worker, две одинаковые загрузки, `docker start` (новая cgroup: `memory.peak` с нуля), ожидание `ready` обоих, затем `/proc/1/status`, `memory.peak`, `memory.events` контейнера, `docker inspect`, журнал worker
- Дата: 2026-10-31, 15:57:24–15:57:52 UTC; проба дошла до конца без исключения (код выхода не записан), разовый скрипт в репозиторий не входит. Перед этим прогоном были ещё два: первый — без файлов на обеих границах, те же числа в пределах 2 МиБ у `render_peak` и `VmHWM`, `memory.peak` до 857 МиБ; второй остановился на 413: файл пробы вышел больше 10 MiB, ошибка самой пробы
- Commit: `399da05` (ветка `feat/pipeline-reliability`), рабочее дерево чистое
- Стенд: проект compose `mtusi-lab5`, собран `make run_docker` из `HEAD`; worker 1 CPU / 1 ГБ без swap, конкуренция 2, `render_memory_limit_mib` 450
- Спеки: `attachment-processing` «Изображение в лимите пикселей», design change `pipeline-reliability`, решение 7, «Уточнения apply», п. 13 и 19
- Столбцы: `render_peak_kib` записи «Attachment became ready» по двум заданиям; «пересеклись» — оба задания начаты раньше, чем первое стало `ready`; `VmHWM` и `VmRSS` — процесс 1 worker; `memory.peak` — вся cgroup контейнера с процессами обработки. Файлы «40 Мпкс и ~10 MiB»: начало строк — шум, остальное — нули, поэтому обе границы контракта достигнуты разом
| Два файла разом | Файл, МиБ | `render_peak`, МиБ | `render_ms` | Пересеклись | `VmHWM`, МиБ | `VmRSS`, МиБ | `memory.peak`, МиБ | `oom` / `oom_kill` | `OOMKilled` | Рестарты |
|---|---|---|---|---|---|---|---|---|---|---|
| PNG из шума 10 MiB, 1868 × 1868 | 9,99 | 84 / 84 | 840 / 856 | да | 159 | 110 | 261 | 0 / 0 | false | 0 |
| PNG RGBA 8 бит, 40 Мпкс | 0,15 | 357 / 357 | 872 / 885 | да | 111 | 110 | 794 | 0 / 0 | false | 0 |
| PNG серый с альфой 8 бит, 40 Мпкс | 0,07 | 357 / 357 | 723 / 775 | да | 110 | 110 | 795 | 0 / 0 | false | 0 |
| PNG RGB 8 бит с tRNS, 40 Мпкс | 0,11 | 357 / 357 | 908 / 929 | да | 110 | 110 | 791 | 0 / 0 | false | 0 |
| PNG RGB 16 бит с tRNS, 40 Мпкс | 0,22 | 357 / 357 | 1036 / 1037 | да | 111 | 110 | 795 | 0 / 0 | false | 0 |
| PNG палитра с tRNS, 40 Мпкс | 0,04 | 357 / 357 | 740 / 750 | да | 110 | 110 | 794 | 0 / 0 | false | 0 |
| PNG серый 16 бит, 40 Мпкс | 0,07 | 404 / 404 | 706 / 712 | да | 110 | 110 | 888 | 0 / 0 | false | 0 |
| PNG RGBA 8 бит, 40 Мпкс и ~10 MiB | 9,85 | 366 / 367 | 1226 / 1288 | да | 157 | 111 | 832 | 0 / 0 | false | 0 |
| PNG серый 16 бит, 40 Мпкс и ~10 MiB | 9,79 | 414 / 414 | 723 / 730 | да | 154 | 115 | 905 | 0 / 0 | false | 0 |
Итог:
- все задания `ready`; ни одного `oom` и `oom_kill`, `OOMKilled` false, рестартов нет;
- самый дорогой файл в пределах контракта — серый 16 бит на обеих границах: `render_peak` 414 МиБ при лимите 450, `memory.peak` контейнера 905 МиБ при лимите 1024;
- верхняя оценка суммой пиков, которые на деле не совпадают по времени: 159 + 2 × 414 = 987 МиБ < 1 ГБ.
+63 -28
View File
@@ -1,12 +1,12 @@
# Процесс worker
- Команда: `python3 .claude/skills/run-mtusi-messenger/driver.py --port 8080 worker-process`
- Дата: 2026-10-31, 13:25:24–13:26:05 UTC; код выхода 0
- Commit: `e2a6427` (ветка `feat/pipeline-reliability`), рабочее дерево без правок кода (добавлены только файлы `evidence/`)
- Дата: 2026-10-31, 15:58:11–16:01:07 UTC; код выхода 0
- Commit: `399da05` (ветка `feat/pipeline-reliability`), рабочее дерево без правок кода (добавлены только файлы `evidence/`)
- Стенд: проект compose `mtusi-lab5`, собран `make run_docker` из `HEAD`
- Спеки: `container-run`, `container-image`, `graceful-shutdown`, `service-configuration`
- Что показано: PID 1, нет healthcheck, лимиты 1 CPU / 1 ГБ; `_imaging` нет ни в репликах API, ни в процессе 1 worker: декодер только в процессе обработки; неверные `WORKER__*` — код 2, запись называет поле без значения; значения по умолчанию и подмена окружением; остановка простаивающего и на старте; «Worker переживает рестарт хранилищ»
- Вывод сокращён: однотипные строки таблицы «record names …», «names the field», «hides the value» и «early stop» свёрнуты, все совпали с ожидаемым
- Что показано: PID 1, нет healthcheck, лимиты 1 CPU / 1 ГБ; `_imaging` нет ни в репликах API, ни в процессе 1 worker: декодер только в процессе обработки; неверные `WORKER__*` — код 2, запись называет поле без значения; значения по умолчанию и подмена окружением; остановка простаивающего и на старте; «Worker переживает рестарт хранилищ»; остановка на двух дорогих JPEG: 8,15 с, при замороженных PostgreSQL и брокере 9,18 с, граница 9,5 с (design, решение 19), код 0, задания после этого дошли по аренде до `failed`, `limit_cpu`
- Вывод сокращён: однотипные строки таблицы «record names …», «default …», «names the field», «hides the value» и «early stop» свёрнуты, все совпали с ожидаемым
```text
Started worker:
@@ -39,34 +39,69 @@ WORKER__GRACEFUL_SHUTDOWN_SECONDS=9: exit 2, errors [{'loc': 'worker.graceful_sh
WORKER__RENDER_MEMORY_LIMIT_MIB=0: exit 2, errors [{'loc': 'worker.render_memory_limit_mib', 'msg': 'Input should be greater than or equal to 1'}]
WORKER__RENDER_TIMEOUT_SECONDS=120: exit 2, errors [{'loc': 'worker.render_timeout_seconds', 'msg': 'Value error, must be less than job_timeout_seconds'}]
docker compose stop worker: 0.2 s
docker stop after 0.3 s: 0.07 s, exit 0, records ['Stopped worker before startup']
docker stop after 0.2 s: 0.06 s, exit 0, records ['Stopped worker before startup']
docker stop after 0.3 s: 0.06 s, exit 0, records ['Stopped worker before startup']
docker stop after 0.2 s: 0.05 s, exit 0, records ['Stopped worker before startup']
docker stop after 0.4 s: 0.07 s, exit 0, records ['Stopped worker before startup']
PID 1 of the worker expected python -m src.worker got python -m src.worker
healthcheck expected NONE got NONE
limit NanoCpus expected 1000000000 got 1000000000
limit Memory expected 1073741824 got 1073741824
_imaging in mtusi-lab5-api-10 expected no got no
_imaging in mtusi-lab5-api-9 expected no got no
_imaging in PID 1 of the worker expected no got no
Pillow in the image = uv.lock expected 13.0.0 got 13.0.0
stop under load: docker stop worker took 8.15 s
stop frozen storage: docker stop worker took 9.18 s
PID 1 of the worker expected python -m src.worker got python -m src.worker
healthcheck expected NONE got NONE
limit NanoCpus expected 1000000000 got 1000000000
limit Memory expected 1073741824 got 1073741824
_imaging in mtusi-lab5-api-15 expected no got no
_imaging in mtusi-lab5-api-16 expected no got no
API replicas checked expected yes got yes
_imaging in PID 1 of the worker expected no got no
Pillow in the image = uv.lock expected 13.0.0 got 13.0.0
'Started worker' record, every field named, defaults as above: expected = got
six invalid WORKER__* : exit code 2, names the field, hides the value: expected = got
env override concurrency expected 3 got 3
env override reconnect_seconds expected 1.0 got 1.0
stop idle: command exit code expected 0 got 0
stop idle: container exit code expected 0 got 0
stop idle: under 10 s expected yes got yes
stop idle: last record expected Stopped worker got Stopped worker
stop idle: record exit_code expected 0 got 0
env override container started expected 0 got 0
env override concurrency expected 3 got 3
env override reconnect_seconds expected 1.0 got 1.0
stop idle: command exit code expected 0 got 0
stop idle: container exit code expected 0 got 0
stop idle: under 10 s expected yes got yes
stop idle: last record expected Stopped worker got Stopped worker
stop idle: record exit_code expected 0 got 0
docker compose start worker expected 0 got 0
early stop 0.2, 0.3, 0.4 s: docker stop 0, exit code 0, within 1 s: expected = got
'Stopped worker before startup' seen expected yes got yes
scripts/restart.sh expected 0 got 0
LB ready after restart expected yes got yes
worker StartedAt unchanged expected yes got yes
worker RestartCount expected 0 got 0
new upload after restart expected 202 got 202
new upload becomes ready expected yes got yes
'Stopped worker before startup' seen expected yes got yes
worker running before restart expected yes got yes
scripts/restart.sh expected 0 got 0
LB ready after restart expected yes got yes
worker StartedAt unchanged expected yes got yes
worker RestartCount expected 0 got 0
new upload after restart expected 202 got 202
new upload becomes ready expected yes got yes
expensive JPEG generated expected yes got yes
stop under load: worker stopped before uploads expected 0 got 0
stop under load: upload 0 expected 202 got 202
stop under load: upload 1 expected 202 got 202
stop under load: worker started expected 0 got 0
stop under load: both files in processing expected processing got processing
stop under load: command exit code expected 0 got 0
stop under load: under 9.5 s expected yes got yes
stop under load: container exit code expected 0 got 0
stop under load: OOM killed expected false got false
stop under load: last record expected Stopped worker got Stopped worker
stop under load: worker back expected 0 got 0
stop frozen storage: worker stopped before uploads expected 0 got 0
stop frozen storage: upload 0 expected 202 got 202
stop frozen storage: upload 1 expected 202 got 202
stop frozen storage: worker started expected 0 got 0
stop frozen storage: both files in processing expected processing got processing
stop frozen storage: storage paused expected 0 got 0
stop frozen storage: command exit code expected 0 got 0
stop frozen storage: under 9.5 s expected yes got yes
stop frozen storage: container exit code expected 0 got 0
stop frozen storage: OOM killed expected false got false
stop frozen storage: last record expected Stopped worker got Stopped worker
stop frozen storage: worker back expected 0 got 0
LB ready after unpause expected yes got yes
stopped work finished: 4f53824c-a065-4875-8ddf-d7a507e505a0 expected failed limit_cpu got failed limit_cpu
stopped work finished: 6845c972-0f91-4401-91dc-d84dc2229b10 expected failed limit_cpu got failed limit_cpu
stopped work finished: fc9cc3a5-dbeb-4e3c-9b63-d2ce6180b584 expected failed limit_cpu got failed limit_cpu
stopped work finished: 7811470c-95fd-492d-95f1-ff4d4dde4a23 expected failed limit_cpu got failed limit_cpu
PASS: the worker process matches the spec
worker and relay running at the end: yes
```