Verify lab 5 grade 4 recovery and worker limits
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
# Уровень 4: данные для отдельного REPORT
|
||||
|
||||
2026-11-06 UTC, проверенный SHA e9ce6d0afacadc16f1666f4bb7d54d3d7377a269. Код приложения тот же, что в grade3; изменена диагностика отказов.
|
||||
Команда: `python3 scripts/pipeline_suite.py --level 4 --output evidence/sqlalchemy-2026-11-06/grade4/level4-retry.json` с окружением из level4-retry.txt. 247.888 s, exit 0: 17 сценариев и 8 инвариантов PASS, 33 принятых задания, 28 ready с проверенными байтами и 5 ожидаемых failed.
|
||||
|
||||
| Критерий README | Сценарий/команда | Наблюдение | Доказательство |
|
||||
| --- | --- | --- | --- |
|
||||
| Crop/optimized и ограничения | image_matrix, worker_limits | JPEG crop 128×128, WebP optimized; PNG/JPEG, EXIF, alpha, малые размеры и отказы. 40 Мп: timeout 0.5 s и RAM 200 MiB → processing_failed на первой попытке, worker жив. Штатные лимиты → ready, peak cgroup 423 MiB < 1024 MiB | level4-retry.json |
|
||||
| COMMIT→publish | crash_commit_publish, crash_publish_confirm | Relay exited 137; outbox не помечен опубликованным; после восстановления ready без ручной job; повторная публикация даёт duplicate_noop | level4-retry.json, after_crash.containers |
|
||||
| Retry/DLQ/replay | retry_exhausted, retry_backoff_jitter, malformed_message_dead_lettered, replay_failed | Максимум 5 попыток; equal jitter в [ceiling/2, ceiling]; invalid schema → DLQ +1; failed registry и явный replay; replay ready — noop | level4-retry.json |
|
||||
| S3→COMMIT→ack, аренда | crash_after_s3_before_commit, crash_after_commit_before_ack, lease_expiry_fencing | После S3 до COMMIT строк вариантов 0; после COMMIT до ack они уже есть и redelivery их не меняет; зависший держатель получает fenced | level4-retry.json |
|
||||
| Concurrency и уборка staging | rabbitmqctl list_consumers, failed_retention, инварианты suite; S3 object list | Prefetch=2 (grade3/consumers.txt), pool=2; после ready и после retention ключи обнулены, реальные S3 prefixes пусты; replay после retention = expired | level4-retry.json, crash_after_commit_before_ack-staging.txt, failed_retention-staging.txt |
|
||||
|
||||
Recipe v1: JPEG quality=85/optimize=True, WebP quality=80/method=4. EXIF orientation применяется до resize, alpha компонуется на белом, metadata encoder не получает. Thumbnail вписан в 256 без увеличения, crop 128×128, optimized вписан в 1280 без увеличения. Эти параметры находятся в infrastructure/images.py и domain/variants.py; unit renderer tests входят в grade3/student-test.txt.
|
||||
|
||||
Production defaults: JOB_MAX_ATTEMPTS=5, lease=60 s, backoff base=2/cap=60 s, sweep=5 s, retention=86400 s, render=30 s/448 MiB, worker cgroup=1024 MiB. Для fault suite lease=5 s, backoff base=1 s, relay sweep=1 s; это проверка восстановления, не измерение production latency.
|
||||
|
||||
## Исправление и ограничения
|
||||
|
||||
Первый прогон level4.txt был намеренно прерван SIGINT (exit -2), до failed_retention. Обнаруженный major: сценарий снижал глобальный retention до 1 s и мог удалить чужой staging. В e9ce6d0 исправлен только этот критичный риск: состаривается одна созданная suite строка по id+chat_id на действующий retention+1, глобальный retention не меняется. Исправленный сценарий прошёл; подробности findings.json. Прерванный прогон не считается успехом.
|
||||
|
||||
Minor из grade3/findings.json остаются: ошибочное сравнение порядка secrets в limits.py и legacy reconciler demo. Полный глобальный inventory S3 в suite отмечен SKIP; наличие удаления staging подтверждено отдельно для ready и expired failed. Сохранённая DLQ начиналась с 2 записей и выросла до 3 ровно от malformed message; данные не очищались. Итоговый REPORT выполняется отдельным агентом.
|
||||
@@ -0,0 +1,8 @@
|
||||
date: 2026-11-06T06:36:38Z commit: e9ce6d0afacadc16f1666f4bb7d54d3d7377a269
|
||||
environment: {"COMPOSE_PROJECT_NAME": "mtusi2026lab5", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18085", "LB_STATS_PORT": "25085", "BASE_URL": "http://127.0.0.1:18085", "NO_PROXY": "localhost,127.0.0.1,::1", "API_IMAGE": "mtusi-messenger:lab5-sqlalchemy"}
|
||||
$ docker compose run --rm --no-deps -T s3-cli object list --recursive --json root/messenger-attachments/staging/01a1af90-6ce1-71d3-bbcf-9f22d40268ea
|
||||
{
|
||||
"items": [],
|
||||
"truncated": false
|
||||
}
|
||||
exit_code: 0 elapsed_seconds: 0.370
|
||||
@@ -0,0 +1,8 @@
|
||||
date: 2026-11-06T06:36:39Z commit: e9ce6d0afacadc16f1666f4bb7d54d3d7377a269
|
||||
environment: {"COMPOSE_PROJECT_NAME": "mtusi2026lab5", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18085", "LB_STATS_PORT": "25085", "BASE_URL": "http://127.0.0.1:18085", "NO_PROXY": "localhost,127.0.0.1,::1", "API_IMAGE": "mtusi-messenger:lab5-sqlalchemy"}
|
||||
$ docker compose run --rm --no-deps -T s3-cli object list --recursive --json root/messenger-attachments/staging/01a1af92-1887-72c6-9c2d-4f0e41975501
|
||||
{
|
||||
"items": [],
|
||||
"truncated": false
|
||||
}
|
||||
exit_code: 0 elapsed_seconds: 0.359
|
||||
@@ -0,0 +1,8 @@
|
||||
[
|
||||
{
|
||||
"severity": "major",
|
||||
"file": "scripts/pipeline_suite.py:failed_retention",
|
||||
"problem": "Исходный сценарий снижал глобальный retention до 1 s и мог удалить staging посторонних failed-вложений на сохранённых volumes. Прогон level4.txt остановлен SIGINT на replay_failed, до опасного шага.",
|
||||
"resolution": "Исправлено в e9ce6d0afacadc16f1666f4bb7d54d3d7377a269: состаривается только синтетическая строка по id+chat_id, действующий retention не меняется. Проверка исправления — level4-retry.json."
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,941 @@
|
||||
{
|
||||
"suite": "lab5-pipeline-idempotency",
|
||||
"started_at": "2026-11-06T06:32:05.201079Z",
|
||||
"source_sha": "e9ce6d0afacadc16f1666f4bb7d54d3d7377a269",
|
||||
"config": {
|
||||
"base_url": "http://127.0.0.1:18085",
|
||||
"level": 4,
|
||||
"only": "",
|
||||
"expect_variants": "thumbnail,crop,optimized",
|
||||
"max_attempts": 5,
|
||||
"stall_seconds": 15.0,
|
||||
"compose": "docker compose",
|
||||
"compose_faults": "docker compose -f compose.yaml -f infra/compose.faults.yaml"
|
||||
},
|
||||
"invariants": [
|
||||
{
|
||||
"id": "terminal",
|
||||
"statement": "every 202 reaches its expected terminal state",
|
||||
"result": "PASS",
|
||||
"details": {
|
||||
"accepted": 33
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "single_effect",
|
||||
"statement": "one variant set per (attachment_id, pipeline_version, variant)",
|
||||
"result": "PASS",
|
||||
"details": {
|
||||
"rows": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "no_ready_rollback",
|
||||
"statement": "ready never returns to queued or processing",
|
||||
"result": "PASS",
|
||||
"details": {
|
||||
"traced": 33
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "monotonic_publication",
|
||||
"statement": "published_version only moves forward",
|
||||
"result": "PASS",
|
||||
"details": {
|
||||
"sampled": 8
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bytes_match_metadata",
|
||||
"statement": "sha256, size and real dimensions match served bytes",
|
||||
"result": "PASS",
|
||||
"details": {
|
||||
"verified": 28
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bounded_attempts",
|
||||
"statement": "attempt <= JOB_MAX_ATTEMPTS",
|
||||
"result": "PASS",
|
||||
"details": {
|
||||
"rows": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "no_orphans",
|
||||
"statement": "no pending outbox, messages, dead letters, staging, objects",
|
||||
"result": "PASS",
|
||||
"details": {
|
||||
"queues": {
|
||||
"attachments.process": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"attachments.process.dlq": [
|
||||
3,
|
||||
0
|
||||
]
|
||||
},
|
||||
"s3": "SKIP: --s3-list is not set"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "no_lost_202",
|
||||
"statement": "every 202 is present in PostgreSQL and the API",
|
||||
"result": "PASS",
|
||||
"details": {
|
||||
"accepted": 33
|
||||
}
|
||||
}
|
||||
],
|
||||
"scenarios": [
|
||||
{
|
||||
"name": "smoke_pipeline",
|
||||
"level": 3,
|
||||
"window": "upload, ready, variants match metadata",
|
||||
"seconds": 1.3,
|
||||
"result": "PASS",
|
||||
"observed": {
|
||||
"attachment_id": "01a1af8e-c731-7496-9b9c-3ba203dc2044",
|
||||
"variants": [
|
||||
"crop",
|
||||
"optimized",
|
||||
"thumbnail"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "worker_down_broker_restart",
|
||||
"level": 3,
|
||||
"window": "worker down, API and broker restart",
|
||||
"seconds": 17.9,
|
||||
"result": "PASS",
|
||||
"observed": {
|
||||
"attachment_id": "01a1af8e-ce96-717e-ae7a-3697c35584a1",
|
||||
"timeline": [
|
||||
{
|
||||
"at": "2026-11-06T06:32:14.222987Z",
|
||||
"step": "worker stopped",
|
||||
"containers": [
|
||||
"mtusi2026lab5-worker-1 ae030b9f2a03 exited Exited (0) Less than a second ago"
|
||||
]
|
||||
},
|
||||
{
|
||||
"at": "2026-11-06T06:32:14.242129Z",
|
||||
"step": "upload 202 queued",
|
||||
"attachment_id": "01a1af8e-ce96-717e-ae7a-3697c35584a1"
|
||||
},
|
||||
{
|
||||
"at": "2026-11-06T06:32:14.250444Z",
|
||||
"step": "content 409 while queued"
|
||||
},
|
||||
{
|
||||
"at": "2026-11-06T06:32:14.267670Z",
|
||||
"step": "message with attachment 201, other messages work",
|
||||
"message_id": "01a1af8e-ceab-72eb-a93d-814d75f8e89c"
|
||||
},
|
||||
{
|
||||
"at": "2026-11-06T06:32:17.729590Z",
|
||||
"step": "job is in the broker queue",
|
||||
"queues": {
|
||||
"attachments.process": [
|
||||
1,
|
||||
0
|
||||
],
|
||||
"attachments.process.dlq": [
|
||||
2,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"at": "2026-11-06T06:32:23.261545Z",
|
||||
"step": "API replicas and relay restarted"
|
||||
},
|
||||
{
|
||||
"at": "2026-11-06T06:32:28.594571Z",
|
||||
"step": "broker restarted with its volume, job survived",
|
||||
"queues": {
|
||||
"attachments.process": [
|
||||
1,
|
||||
0
|
||||
],
|
||||
"attachments.process.dlq": [
|
||||
2,
|
||||
0
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"at": "2026-11-06T06:32:31.363642Z",
|
||||
"step": "worker started"
|
||||
},
|
||||
{
|
||||
"at": "2026-11-06T06:32:31.561755Z",
|
||||
"step": "ready",
|
||||
"variants": [
|
||||
"crop",
|
||||
"optimized",
|
||||
"thumbnail"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "duplicate_after_ready",
|
||||
"level": 3,
|
||||
"window": "redelivery of a finished job",
|
||||
"seconds": 9.6,
|
||||
"result": "PASS",
|
||||
"observed": {
|
||||
"attachment_id": "01a1af8f-124f-73f5-b597-712b6fa2a653",
|
||||
"events": [
|
||||
{
|
||||
"kind": "enqueued",
|
||||
"attempt": 1
|
||||
},
|
||||
{
|
||||
"kind": "claimed",
|
||||
"attempt": 1
|
||||
},
|
||||
{
|
||||
"kind": "done",
|
||||
"attempt": 1
|
||||
},
|
||||
{
|
||||
"kind": "duplicate_noop",
|
||||
"attempt": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "poison_image",
|
||||
"level": 3,
|
||||
"window": "permanent error without retries",
|
||||
"seconds": 0.0,
|
||||
"result": "PASS",
|
||||
"observed": {
|
||||
"rejected_by_api": 415
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "s3_outage_recovers",
|
||||
"level": 3,
|
||||
"window": "transient error with retry",
|
||||
"seconds": 11.7,
|
||||
"result": "PASS",
|
||||
"observed": {
|
||||
"attachment_id": "01a1af8f-398b-75d1-b01d-bc3c2181c62f",
|
||||
"jobs": [
|
||||
{
|
||||
"job_id": "01a1af8f-3991-7162-9a1d-af82b69fc7a6",
|
||||
"pipeline_version": 1,
|
||||
"status": "done",
|
||||
"attempt": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "retry_exhausted",
|
||||
"level": 3,
|
||||
"window": "transient error until JOB_MAX_ATTEMPTS",
|
||||
"seconds": 21.6,
|
||||
"result": "PASS",
|
||||
"observed": {
|
||||
"attachment_id": "01a1af8f-740f-706e-9bff-9299abc71639",
|
||||
"jobs": [
|
||||
{
|
||||
"job_id": "01a1af8f-7420-7585-afcc-2c1145abf968",
|
||||
"pipeline_version": 1,
|
||||
"status": "failed",
|
||||
"attempt": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "image_matrix",
|
||||
"level": 4,
|
||||
"window": "limits and variants",
|
||||
"seconds": 11.6,
|
||||
"result": "PASS",
|
||||
"observed": {
|
||||
"images": [
|
||||
{
|
||||
"file": "png-rgb-320x200.png",
|
||||
"http": 202,
|
||||
"status": "ready",
|
||||
"error_code": null,
|
||||
"variants": [
|
||||
"crop",
|
||||
"optimized",
|
||||
"thumbnail"
|
||||
]
|
||||
},
|
||||
{
|
||||
"file": "png-rgba-300x300.png",
|
||||
"http": 202,
|
||||
"status": "ready",
|
||||
"error_code": null,
|
||||
"variants": [
|
||||
"crop",
|
||||
"optimized",
|
||||
"thumbnail"
|
||||
]
|
||||
},
|
||||
{
|
||||
"file": "png-palette-trns-200x100.png",
|
||||
"http": 202,
|
||||
"status": "ready",
|
||||
"error_code": null,
|
||||
"variants": [
|
||||
"crop",
|
||||
"optimized",
|
||||
"thumbnail"
|
||||
]
|
||||
},
|
||||
{
|
||||
"file": "png-gray-17x1000.png",
|
||||
"http": 202,
|
||||
"status": "ready",
|
||||
"error_code": null,
|
||||
"variants": [
|
||||
"crop",
|
||||
"optimized",
|
||||
"thumbnail"
|
||||
]
|
||||
},
|
||||
{
|
||||
"file": "png-gray-alpha-640x480.png",
|
||||
"http": 202,
|
||||
"status": "ready",
|
||||
"error_code": null,
|
||||
"variants": [
|
||||
"crop",
|
||||
"optimized",
|
||||
"thumbnail"
|
||||
]
|
||||
},
|
||||
{
|
||||
"file": "png-gray16-300x200.png",
|
||||
"http": 202,
|
||||
"status": "ready",
|
||||
"error_code": null,
|
||||
"variants": [
|
||||
"crop",
|
||||
"optimized",
|
||||
"thumbnail"
|
||||
]
|
||||
},
|
||||
{
|
||||
"file": "png-rgba16-64x64.png",
|
||||
"http": 202,
|
||||
"status": "ready",
|
||||
"error_code": null,
|
||||
"variants": [
|
||||
"crop",
|
||||
"optimized",
|
||||
"thumbnail"
|
||||
]
|
||||
},
|
||||
{
|
||||
"file": "png-1x1.png",
|
||||
"http": 202,
|
||||
"status": "ready",
|
||||
"error_code": null,
|
||||
"variants": [
|
||||
"crop",
|
||||
"optimized",
|
||||
"thumbnail"
|
||||
]
|
||||
},
|
||||
{
|
||||
"file": "png-wide-3000x2.png",
|
||||
"http": 202,
|
||||
"status": "ready",
|
||||
"error_code": null,
|
||||
"variants": [
|
||||
"crop",
|
||||
"optimized",
|
||||
"thumbnail"
|
||||
]
|
||||
},
|
||||
{
|
||||
"file": "png-small-50x30.png",
|
||||
"http": 202,
|
||||
"status": "ready",
|
||||
"error_code": null,
|
||||
"variants": [
|
||||
"crop",
|
||||
"optimized",
|
||||
"thumbnail"
|
||||
]
|
||||
},
|
||||
{
|
||||
"file": "jpeg-rgb-1000x750.jpg",
|
||||
"http": 202,
|
||||
"status": "ready",
|
||||
"error_code": null,
|
||||
"variants": [
|
||||
"crop",
|
||||
"optimized",
|
||||
"thumbnail"
|
||||
]
|
||||
},
|
||||
{
|
||||
"file": "jpeg-gray-801x601.jpg",
|
||||
"http": 202,
|
||||
"status": "ready",
|
||||
"error_code": null,
|
||||
"variants": [
|
||||
"crop",
|
||||
"optimized",
|
||||
"thumbnail"
|
||||
]
|
||||
},
|
||||
{
|
||||
"file": "jpeg-cmyk-400x300.jpg",
|
||||
"http": 202,
|
||||
"status": "ready",
|
||||
"error_code": null,
|
||||
"variants": [
|
||||
"crop",
|
||||
"optimized",
|
||||
"thumbnail"
|
||||
]
|
||||
},
|
||||
{
|
||||
"file": "jpeg-exif6-400x200.jpg",
|
||||
"http": 202,
|
||||
"status": "ready",
|
||||
"error_code": null,
|
||||
"variants": [
|
||||
"crop",
|
||||
"optimized",
|
||||
"thumbnail"
|
||||
]
|
||||
},
|
||||
{
|
||||
"file": "jpeg-exif3-300x200.jpg",
|
||||
"http": 202,
|
||||
"status": "ready",
|
||||
"error_code": null,
|
||||
"variants": [
|
||||
"crop",
|
||||
"optimized",
|
||||
"thumbnail"
|
||||
]
|
||||
},
|
||||
{
|
||||
"file": "jpeg-rgb-4000x3000.jpg",
|
||||
"http": 202,
|
||||
"status": "ready",
|
||||
"error_code": null,
|
||||
"variants": [
|
||||
"crop",
|
||||
"optimized",
|
||||
"thumbnail"
|
||||
]
|
||||
},
|
||||
{
|
||||
"file": "png-exactly-10mib.png",
|
||||
"http": 202,
|
||||
"status": "ready",
|
||||
"error_code": null,
|
||||
"variants": [
|
||||
"crop",
|
||||
"optimized",
|
||||
"thumbnail"
|
||||
]
|
||||
},
|
||||
{
|
||||
"file": "png-over-10mib.png",
|
||||
"http": "rejected"
|
||||
},
|
||||
{
|
||||
"file": "png-over-pixels-8001x5000.png",
|
||||
"http": "rejected"
|
||||
},
|
||||
{
|
||||
"file": "jpeg-over-pixels-10000x5000.jpg",
|
||||
"http": "rejected"
|
||||
},
|
||||
{
|
||||
"file": "png-truncated.png",
|
||||
"http": "rejected"
|
||||
},
|
||||
{
|
||||
"file": "png-corrupt-idat.png",
|
||||
"http": "rejected"
|
||||
},
|
||||
{
|
||||
"file": "jpeg-truncated.jpg",
|
||||
"http": "rejected"
|
||||
},
|
||||
{
|
||||
"file": "png-zero-width.png",
|
||||
"http": "rejected"
|
||||
},
|
||||
{
|
||||
"file": "not-an-image.png",
|
||||
"http": "rejected"
|
||||
},
|
||||
{
|
||||
"file": "gif-declared-as-png.png",
|
||||
"http": "rejected"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "crash_commit_publish",
|
||||
"level": 4,
|
||||
"window": "after COMMIT, before publish",
|
||||
"seconds": 9.6,
|
||||
"result": "PASS",
|
||||
"observed": {
|
||||
"attachment_id": "01a1af8f-f5a0-77a3-b9de-5f042375ee62",
|
||||
"exit_code": 137,
|
||||
"after_crash": {
|
||||
"outbox_published": false,
|
||||
"status": "queued",
|
||||
"containers": [
|
||||
"mtusi2026lab5-relay-1 9e463d46fefb exited Exited (137) 1 second ago"
|
||||
]
|
||||
},
|
||||
"variants": [
|
||||
{
|
||||
"pipeline_version": 1,
|
||||
"name": "crop",
|
||||
"sha256": "97bf1400b30a28c19420a30161c944f57b5e7d613533b76afe6ab2531cba0143",
|
||||
"size_bytes": 1820,
|
||||
"object_key": "variants/01a1af8f-f5a0-77a3-b9de-5f042375ee62/1/crop-97bf1400b30a28c1.jpg"
|
||||
},
|
||||
{
|
||||
"pipeline_version": 1,
|
||||
"name": "optimized",
|
||||
"sha256": "1090d84ed8411226010ae498b08e1b9e6d81c8eee02ee77143a0dc327b894beb",
|
||||
"size_bytes": 2462,
|
||||
"object_key": "variants/01a1af8f-f5a0-77a3-b9de-5f042375ee62/1/optimized-1090d84ed8411226.webp"
|
||||
},
|
||||
{
|
||||
"pipeline_version": 1,
|
||||
"name": "thumbnail",
|
||||
"sha256": "7bc40bf315c8e18e907889b23514d978be213a44223d64b737290188ee808594",
|
||||
"size_bytes": 4679,
|
||||
"object_key": "variants/01a1af8f-f5a0-77a3-b9de-5f042375ee62/1/thumbnail-7bc40bf315c8e18e.jpg"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "crash_publish_confirm",
|
||||
"level": 4,
|
||||
"window": "after publish, before confirm",
|
||||
"seconds": 9.4,
|
||||
"result": "PASS",
|
||||
"observed": {
|
||||
"attachment_id": "01a1af90-1b12-778c-95ca-51919e8527eb",
|
||||
"exit_code": 137,
|
||||
"after_crash": {
|
||||
"outbox_published": [
|
||||
false
|
||||
],
|
||||
"queues": {
|
||||
"attachments.process": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"attachments.process.dlq": [
|
||||
2,
|
||||
0
|
||||
]
|
||||
},
|
||||
"containers": [
|
||||
"mtusi2026lab5-relay-1 d356228ef442 exited Exited (137) 1 second ago"
|
||||
]
|
||||
},
|
||||
"variants": [
|
||||
{
|
||||
"pipeline_version": 1,
|
||||
"name": "crop",
|
||||
"sha256": "97bf1400b30a28c19420a30161c944f57b5e7d613533b76afe6ab2531cba0143",
|
||||
"size_bytes": 1820,
|
||||
"object_key": "variants/01a1af90-1b12-778c-95ca-51919e8527eb/1/crop-97bf1400b30a28c1.jpg"
|
||||
},
|
||||
{
|
||||
"pipeline_version": 1,
|
||||
"name": "optimized",
|
||||
"sha256": "1090d84ed8411226010ae498b08e1b9e6d81c8eee02ee77143a0dc327b894beb",
|
||||
"size_bytes": 2462,
|
||||
"object_key": "variants/01a1af90-1b12-778c-95ca-51919e8527eb/1/optimized-1090d84ed8411226.webp"
|
||||
},
|
||||
{
|
||||
"pipeline_version": 1,
|
||||
"name": "thumbnail",
|
||||
"sha256": "7bc40bf315c8e18e907889b23514d978be213a44223d64b737290188ee808594",
|
||||
"size_bytes": 4679,
|
||||
"object_key": "variants/01a1af90-1b12-778c-95ca-51919e8527eb/1/thumbnail-7bc40bf315c8e18e.jpg"
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
"enqueued",
|
||||
"claimed",
|
||||
"done",
|
||||
"duplicate_noop"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "crash_after_s3_before_commit",
|
||||
"level": 4,
|
||||
"window": "after S3 write, before COMMIT",
|
||||
"seconds": 11.6,
|
||||
"result": "PASS",
|
||||
"observed": {
|
||||
"attachment_id": "01a1af90-3f75-7321-8fcc-dcfcb79fe63f",
|
||||
"exit_code": 137,
|
||||
"after_crash": {
|
||||
"status": "processing",
|
||||
"variant_rows": 0,
|
||||
"containers": [
|
||||
"mtusi2026lab5-worker-1 6ab14be0b64a exited Exited (137) Less than a second ago"
|
||||
]
|
||||
},
|
||||
"variants": [
|
||||
{
|
||||
"pipeline_version": 1,
|
||||
"name": "crop",
|
||||
"sha256": "97bf1400b30a28c19420a30161c944f57b5e7d613533b76afe6ab2531cba0143",
|
||||
"size_bytes": 1820,
|
||||
"object_key": "variants/01a1af90-3f75-7321-8fcc-dcfcb79fe63f/1/crop-97bf1400b30a28c1.jpg"
|
||||
},
|
||||
{
|
||||
"pipeline_version": 1,
|
||||
"name": "optimized",
|
||||
"sha256": "1090d84ed8411226010ae498b08e1b9e6d81c8eee02ee77143a0dc327b894beb",
|
||||
"size_bytes": 2462,
|
||||
"object_key": "variants/01a1af90-3f75-7321-8fcc-dcfcb79fe63f/1/optimized-1090d84ed8411226.webp"
|
||||
},
|
||||
{
|
||||
"pipeline_version": 1,
|
||||
"name": "thumbnail",
|
||||
"sha256": "7bc40bf315c8e18e907889b23514d978be213a44223d64b737290188ee808594",
|
||||
"size_bytes": 4679,
|
||||
"object_key": "variants/01a1af90-3f75-7321-8fcc-dcfcb79fe63f/1/thumbnail-7bc40bf315c8e18e.jpg"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "crash_after_commit_before_ack",
|
||||
"level": 4,
|
||||
"window": "after COMMIT, before ack",
|
||||
"seconds": 10.7,
|
||||
"result": "PASS",
|
||||
"observed": {
|
||||
"attachment_id": "01a1af90-6ce1-71d3-bbcf-9f22d40268ea",
|
||||
"exit_code": 137,
|
||||
"after_crash": {
|
||||
"status": "ready",
|
||||
"variants": [
|
||||
{
|
||||
"pipeline_version": 1,
|
||||
"name": "crop",
|
||||
"sha256": "97bf1400b30a28c19420a30161c944f57b5e7d613533b76afe6ab2531cba0143",
|
||||
"size_bytes": 1820,
|
||||
"object_key": "variants/01a1af90-6ce1-71d3-bbcf-9f22d40268ea/1/crop-97bf1400b30a28c1.jpg"
|
||||
},
|
||||
{
|
||||
"pipeline_version": 1,
|
||||
"name": "optimized",
|
||||
"sha256": "1090d84ed8411226010ae498b08e1b9e6d81c8eee02ee77143a0dc327b894beb",
|
||||
"size_bytes": 2462,
|
||||
"object_key": "variants/01a1af90-6ce1-71d3-bbcf-9f22d40268ea/1/optimized-1090d84ed8411226.webp"
|
||||
},
|
||||
{
|
||||
"pipeline_version": 1,
|
||||
"name": "thumbnail",
|
||||
"sha256": "7bc40bf315c8e18e907889b23514d978be213a44223d64b737290188ee808594",
|
||||
"size_bytes": 4679,
|
||||
"object_key": "variants/01a1af90-6ce1-71d3-bbcf-9f22d40268ea/1/thumbnail-7bc40bf315c8e18e.jpg"
|
||||
}
|
||||
],
|
||||
"queues": {
|
||||
"attachments.process": [
|
||||
1,
|
||||
0
|
||||
],
|
||||
"attachments.process.dlq": [
|
||||
2,
|
||||
0
|
||||
]
|
||||
},
|
||||
"containers": [
|
||||
"mtusi2026lab5-worker-1 e200bf97bb1a exited Exited (137) 2 seconds ago"
|
||||
]
|
||||
},
|
||||
"variants": [
|
||||
{
|
||||
"pipeline_version": 1,
|
||||
"name": "crop",
|
||||
"sha256": "97bf1400b30a28c19420a30161c944f57b5e7d613533b76afe6ab2531cba0143",
|
||||
"size_bytes": 1820,
|
||||
"object_key": "variants/01a1af90-6ce1-71d3-bbcf-9f22d40268ea/1/crop-97bf1400b30a28c1.jpg"
|
||||
},
|
||||
{
|
||||
"pipeline_version": 1,
|
||||
"name": "optimized",
|
||||
"sha256": "1090d84ed8411226010ae498b08e1b9e6d81c8eee02ee77143a0dc327b894beb",
|
||||
"size_bytes": 2462,
|
||||
"object_key": "variants/01a1af90-6ce1-71d3-bbcf-9f22d40268ea/1/optimized-1090d84ed8411226.webp"
|
||||
},
|
||||
{
|
||||
"pipeline_version": 1,
|
||||
"name": "thumbnail",
|
||||
"sha256": "7bc40bf315c8e18e907889b23514d978be213a44223d64b737290188ee808594",
|
||||
"size_bytes": 4679,
|
||||
"object_key": "variants/01a1af90-6ce1-71d3-bbcf-9f22d40268ea/1/thumbnail-7bc40bf315c8e18e.jpg"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "lease_expiry_fencing",
|
||||
"level": 4,
|
||||
"window": "stalled worker, lease expiry",
|
||||
"seconds": 32.9,
|
||||
"result": "PASS",
|
||||
"observed": {
|
||||
"attachment_id": "01a1af90-96cc-70cf-981a-6fa959f4ba60",
|
||||
"jobs": [
|
||||
{
|
||||
"job_id": "01a1af90-96d1-7586-935a-e6432c5b8d8f",
|
||||
"pipeline_version": 1,
|
||||
"status": "done",
|
||||
"attempt": 2
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"kind": "enqueued",
|
||||
"attempt": 1
|
||||
},
|
||||
{
|
||||
"kind": "claimed",
|
||||
"attempt": 1
|
||||
},
|
||||
{
|
||||
"kind": "lease_expired",
|
||||
"attempt": 2
|
||||
},
|
||||
{
|
||||
"kind": "claimed",
|
||||
"attempt": 2
|
||||
},
|
||||
{
|
||||
"kind": "done",
|
||||
"attempt": 2
|
||||
},
|
||||
{
|
||||
"kind": "fenced",
|
||||
"attempt": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "replay_failed",
|
||||
"level": 4,
|
||||
"window": "operator replay",
|
||||
"seconds": 22.9,
|
||||
"result": "PASS",
|
||||
"observed": {
|
||||
"attachment_id": "01a1af91-1737-725c-97b2-5ee24b21e583",
|
||||
"replay": {
|
||||
"result": "replayed",
|
||||
"attachment_id": "01a1af91-1737-725c-97b2-5ee24b21e583",
|
||||
"operator": "cli"
|
||||
},
|
||||
"replay_of_ready": {
|
||||
"result": "noop",
|
||||
"attachment_id": "01a1af91-1737-725c-97b2-5ee24b21e583",
|
||||
"operator": "cli"
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"kind": "enqueued",
|
||||
"attempt": 1
|
||||
},
|
||||
{
|
||||
"kind": "claimed",
|
||||
"attempt": 1
|
||||
},
|
||||
{
|
||||
"kind": "retry_scheduled",
|
||||
"attempt": 2
|
||||
},
|
||||
{
|
||||
"kind": "claimed",
|
||||
"attempt": 2
|
||||
},
|
||||
{
|
||||
"kind": "retry_scheduled",
|
||||
"attempt": 3
|
||||
},
|
||||
{
|
||||
"kind": "claimed",
|
||||
"attempt": 3
|
||||
},
|
||||
{
|
||||
"kind": "retry_scheduled",
|
||||
"attempt": 4
|
||||
},
|
||||
{
|
||||
"kind": "claimed",
|
||||
"attempt": 4
|
||||
},
|
||||
{
|
||||
"kind": "retry_scheduled",
|
||||
"attempt": 5
|
||||
},
|
||||
{
|
||||
"kind": "claimed",
|
||||
"attempt": 5
|
||||
},
|
||||
{
|
||||
"kind": "failed",
|
||||
"attempt": 5
|
||||
},
|
||||
{
|
||||
"kind": "replayed",
|
||||
"attempt": 1
|
||||
},
|
||||
{
|
||||
"kind": "claimed",
|
||||
"attempt": 1
|
||||
},
|
||||
{
|
||||
"kind": "done",
|
||||
"attempt": 1
|
||||
},
|
||||
{
|
||||
"kind": "replay_noop",
|
||||
"attempt": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "malformed_message_dead_lettered",
|
||||
"level": 4,
|
||||
"window": "message that is not a job goes to the DLQ",
|
||||
"seconds": 4.5,
|
||||
"result": "PASS",
|
||||
"observed": {
|
||||
"dead_letters": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "worker_limits",
|
||||
"level": 4,
|
||||
"window": "render time and memory limits, 40 Mpx in the worker limit",
|
||||
"seconds": 15.2,
|
||||
"result": "PASS",
|
||||
"observed": {
|
||||
"image": {
|
||||
"file": "png-at-pixel-limit-8000x5000.png",
|
||||
"bytes": 116714,
|
||||
"pixels": 40000000
|
||||
},
|
||||
"render_timeout": {
|
||||
"seconds": 0.5,
|
||||
"attachment_id": "01a1af91-8333-7076-a13d-2c2554675dec",
|
||||
"error_code": "processing_failed",
|
||||
"worker": "running"
|
||||
},
|
||||
"render_memory": {
|
||||
"mib": 200,
|
||||
"attachment_id": "01a1af91-959f-74b5-a91f-8faeb29ff5cb",
|
||||
"error_code": "processing_failed",
|
||||
"worker": "running"
|
||||
},
|
||||
"default_limits": {
|
||||
"attachment_id": "01a1af91-a7b5-75b5-9c9a-d9bd93471cbd",
|
||||
"variants": [
|
||||
"crop",
|
||||
"optimized",
|
||||
"thumbnail"
|
||||
],
|
||||
"memory_peak_mib": 423.0,
|
||||
"memory_max_mib": 1024.0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "retry_backoff_jitter",
|
||||
"level": 4,
|
||||
"window": "backoff with equal jitter between attempts",
|
||||
"seconds": 23.3,
|
||||
"result": "PASS",
|
||||
"observed": {
|
||||
"attachment_id": "01a1af91-d0a0-729b-bde2-9297b7a08432",
|
||||
"delays": [
|
||||
{
|
||||
"attempt": 2,
|
||||
"delay": 0.504226
|
||||
},
|
||||
{
|
||||
"attempt": 3,
|
||||
"delay": 1.141266
|
||||
},
|
||||
{
|
||||
"attempt": 4,
|
||||
"delay": 2.690642
|
||||
},
|
||||
{
|
||||
"attempt": 5,
|
||||
"delay": 4.626198
|
||||
}
|
||||
],
|
||||
"share_of_ceiling": [
|
||||
0.504,
|
||||
0.571,
|
||||
0.673,
|
||||
0.578
|
||||
],
|
||||
"jobs": [
|
||||
{
|
||||
"job_id": "01a1af91-d0a8-7541-acac-547a45ac3ab3",
|
||||
"pipeline_version": 1,
|
||||
"status": "failed",
|
||||
"attempt": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "failed_retention",
|
||||
"level": 4,
|
||||
"window": "failed staging kept until retention, then replay expires",
|
||||
"seconds": 20.8,
|
||||
"result": "PASS",
|
||||
"observed": {
|
||||
"attachment_id": "01a1af92-1887-72c6-9c2d-4f0e41975501",
|
||||
"staging_before": "kept",
|
||||
"retention_seconds": 86400,
|
||||
"aged_only": "01a1af92-1887-72c6-9c2d-4f0e41975501",
|
||||
"replay": {
|
||||
"result": "expired",
|
||||
"attachment_id": "01a1af92-1887-72c6-9c2d-4f0e41975501",
|
||||
"operator": "cli"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"result": "PASS",
|
||||
"finished_at": "2026-11-06T06:36:13.028956Z"
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
date: 2026-11-06T06:32:05Z commit: e9ce6d0afacadc16f1666f4bb7d54d3d7377a269
|
||||
environment: {"COMPOSE_PROJECT_NAME": "mtusi2026lab5", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18085", "LB_STATS_PORT": "25085", "BASE_URL": "http://127.0.0.1:18085", "NO_PROXY": "localhost,127.0.0.1,::1", "API_IMAGE": "mtusi-messenger:lab5-sqlalchemy"}
|
||||
$ python3 scripts/pipeline_suite.py --level 4 --output evidence/sqlalchemy-2026-11-06/grade4/level4-retry.json
|
||||
RUN smoke_pipeline
|
||||
PASS smoke_pipeline
|
||||
RUN worker_down_broker_restart
|
||||
PASS worker_down_broker_restart
|
||||
RUN duplicate_after_ready
|
||||
PASS duplicate_after_ready
|
||||
RUN poison_image
|
||||
PASS poison_image
|
||||
RUN s3_outage_recovers
|
||||
PASS s3_outage_recovers
|
||||
RUN retry_exhausted
|
||||
PASS retry_exhausted
|
||||
RUN image_matrix
|
||||
PASS image_matrix
|
||||
RUN crash_commit_publish
|
||||
PASS crash_commit_publish
|
||||
RUN crash_publish_confirm
|
||||
PASS crash_publish_confirm
|
||||
RUN crash_after_s3_before_commit
|
||||
PASS crash_after_s3_before_commit
|
||||
RUN crash_after_commit_before_ack
|
||||
PASS crash_after_commit_before_ack
|
||||
RUN lease_expiry_fencing
|
||||
PASS lease_expiry_fencing
|
||||
RUN replay_failed
|
||||
PASS replay_failed
|
||||
RUN malformed_message_dead_lettered
|
||||
PASS malformed_message_dead_lettered
|
||||
RUN worker_limits
|
||||
PASS worker_limits
|
||||
RUN retry_backoff_jitter
|
||||
PASS retry_backoff_jitter
|
||||
RUN failed_retention
|
||||
PASS failed_retention
|
||||
PASS: lab5 pipeline suite, report evidence/sqlalchemy-2026-11-06/grade4/level4-retry.json
|
||||
exit_code: 0 elapsed_seconds: 247.888
|
||||
@@ -0,0 +1,52 @@
|
||||
date: 2026-11-06T06:28:08Z commit: b159899d73a29b6dfdd929abed3aedbfebd4c536
|
||||
environment: {"COMPOSE_PROJECT_NAME": "mtusi2026lab5", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18085", "LB_STATS_PORT": "25085", "BASE_URL": "http://127.0.0.1:18085", "NO_PROXY": "localhost,127.0.0.1,::1", "API_IMAGE": "mtusi-messenger:lab5-sqlalchemy"}
|
||||
$ python3 scripts/pipeline_suite.py --level 4 --output evidence/sqlalchemy-2026-11-06/grade4/level4.json
|
||||
RUN smoke_pipeline
|
||||
PASS smoke_pipeline
|
||||
RUN worker_down_broker_restart
|
||||
PASS worker_down_broker_restart
|
||||
RUN duplicate_after_ready
|
||||
PASS duplicate_after_ready
|
||||
RUN poison_image
|
||||
PASS poison_image
|
||||
RUN s3_outage_recovers
|
||||
PASS s3_outage_recovers
|
||||
RUN retry_exhausted
|
||||
PASS retry_exhausted
|
||||
RUN image_matrix
|
||||
PASS image_matrix
|
||||
RUN crash_commit_publish
|
||||
PASS crash_commit_publish
|
||||
RUN crash_publish_confirm
|
||||
PASS crash_publish_confirm
|
||||
RUN crash_after_s3_before_commit
|
||||
PASS crash_after_s3_before_commit
|
||||
RUN crash_after_commit_before_ack
|
||||
PASS crash_after_commit_before_ack
|
||||
RUN lease_expiry_fencing
|
||||
PASS lease_expiry_fencing
|
||||
RUN replay_failed
|
||||
Traceback (most recent call last):
|
||||
File "<repo>/scripts/pipeline_suite.py", line 1042, in <module>
|
||||
sys.exit(main())
|
||||
~~~~^^
|
||||
File "<repo>/scripts/pipeline_suite.py", line 1038, in main
|
||||
return suite.main()
|
||||
~~~~~~~~~~^^
|
||||
File "<repo>/scripts/pipeline_suite.py", line 930, in main
|
||||
results.append(self.attempt(name, level, window, scenario))
|
||||
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "<repo>/scripts/pipeline_suite.py", line 944, in attempt
|
||||
outcome = {"result": "PASS", "observed": scenario()}
|
||||
~~~~~~~~^^
|
||||
File "<repo>/scripts/pipeline_suite.py", line 527, in replay_failed
|
||||
self.drained()
|
||||
~~~~~~~~~~~~^^
|
||||
File "<repo>/scripts/pipeline_suite.py", line 336, in drained
|
||||
poll(lambda: self.stack.queues()[QUEUE] == (0, 0), timeout, "main queue drained")
|
||||
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "<repo>/scripts/pipeline_suite.py", line 152, in poll
|
||||
time.sleep(interval)
|
||||
~~~~~~~~~~^^^^^^^^^^
|
||||
KeyboardInterrupt
|
||||
exit_code: -2 elapsed_seconds: 184.110
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
schema: spec-driven
|
||||
created: 2026-11-06
|
||||
skip_specs: true
|
||||
archived: 2026-11-06
|
||||
lab: 5
|
||||
@@ -0,0 +1,8 @@
|
||||
## 1. Квалификация уровня 4
|
||||
|
||||
- [x] 1.1 Сохранить фактическое состояние упавшего контейнера в suite; make check/lint.
|
||||
- [x] 1.2 Выполнить suite level4 на Docker с Linux time/memory limits и всеми окнами отказа.
|
||||
- [x] 1.3 Сверить каждый критерий и оформить evidence/ограничения для REPORT.
|
||||
- [x] 1.4 Закрыть задачи, архивировать завершённый цикл, коммит после make lint.
|
||||
|
||||
Результаты: evidence/sqlalchemy-2026-11-06/grade4/NOTES.md, level4-retry.json. Критичный дефект retention сценария исправлен и проверен.
|
||||
@@ -1,6 +0,0 @@
|
||||
## 1. Квалификация уровня 4
|
||||
|
||||
- [ ] 1.1 Сохранить фактическое состояние упавшего контейнера в suite; make check/lint.
|
||||
- [ ] 1.2 Выполнить suite level4 на Docker с Linux time/memory limits и всеми окнами отказа.
|
||||
- [ ] 1.3 Сверить каждый критерий и оформить evidence/ограничения для REPORT.
|
||||
- [ ] 1.4 Закрыть задачи, архивировать завершённый цикл, коммит после make lint.
|
||||
Reference in New Issue
Block a user