Перепроверка из чистого clone: evidence, исправление теста окон D/E, отчёт

This commit is contained in:
2026-11-13 17:02:32 +03:00
parent 3ebd674062
commit 98aca383b8
30 changed files with 502 additions and 416 deletions
+31 -31
View File
@@ -1,69 +1,69 @@
{
"replicas": [
"7aa798b287f4",
"9e76aae00a09"
"4b806eff0091",
"d0e0e47e2041"
],
"rounds": [
{
"uploaded_by": "7aa798b287f4",
"stopped": "7aa798b287f4",
"uploaded_by": "4b806eff0091",
"stopped": "4b806eff0091",
"downloads": [
{
"instance": "9e76aae00a09",
"instance": "d0e0e47e2041",
"sha256_ok": true,
"ms": 8.5
"ms": 6.9
},
{
"instance": "9e76aae00a09",
"instance": "d0e0e47e2041",
"sha256_ok": true,
"ms": 18.4
"ms": 26.3
},
{
"instance": "9e76aae00a09",
"instance": "d0e0e47e2041",
"sha256_ok": true,
"ms": 6.5
"ms": 11.5
},
{
"instance": "9e76aae00a09",
"instance": "d0e0e47e2041",
"sha256_ok": true,
"ms": 6.8
"ms": 6.4
},
{
"instance": "9e76aae00a09",
"instance": "d0e0e47e2041",
"sha256_ok": true,
"ms": 5.7
"ms": 7.8
}
],
"pass": true
},
{
"uploaded_by": "9e76aae00a09",
"stopped": "9e76aae00a09",
"uploaded_by": "d0e0e47e2041",
"stopped": "d0e0e47e2041",
"downloads": [
{
"instance": "7aa798b287f4",
"instance": "4b806eff0091",
"sha256_ok": true,
"ms": 7.6
"ms": 9.0
},
{
"instance": "7aa798b287f4",
"instance": "4b806eff0091",
"sha256_ok": true,
"ms": 7.4
"ms": 7.8
},
{
"instance": "7aa798b287f4",
"sha256_ok": true,
"ms": 7.4
},
{
"instance": "7aa798b287f4",
"sha256_ok": true,
"ms": 17.8
},
{
"instance": "7aa798b287f4",
"instance": "4b806eff0091",
"sha256_ok": true,
"ms": 7.5
},
{
"instance": "4b806eff0091",
"sha256_ok": true,
"ms": 7.5
},
{
"instance": "4b806eff0091",
"sha256_ok": true,
"ms": 23.8
}
],
"pass": true
+3 -3
View File
@@ -1,5 +1,5 @@
# 2026-11-13T13:25:43Z python3 student-tests/attachment_failover.py --output evidence/attachment-failover.json
{"uploaded_by": "7aa798b287f4", "stopped": "7aa798b287f4", "downloads": [{"instance": "9e76aae00a09", "sha256_ok": true, "ms": 8.5}, {"instance": "9e76aae00a09", "sha256_ok": true, "ms": 18.4}, {"instance": "9e76aae00a09", "sha256_ok": true, "ms": 6.5}, {"instance": "9e76aae00a09", "sha256_ok": true, "ms": 6.8}, {"instance": "9e76aae00a09", "sha256_ok": true, "ms": 5.7}], "pass": true}
{"uploaded_by": "9e76aae00a09", "stopped": "9e76aae00a09", "downloads": [{"instance": "7aa798b287f4", "sha256_ok": true, "ms": 7.6}, {"instance": "7aa798b287f4", "sha256_ok": true, "ms": 7.4}, {"instance": "7aa798b287f4", "sha256_ok": true, "ms": 7.4}, {"instance": "7aa798b287f4", "sha256_ok": true, "ms": 17.8}, {"instance": "7aa798b287f4", "sha256_ok": true, "ms": 7.5}], "pass": true}
# 2026-11-13T13:59:55Z python3 student-tests/attachment_failover.py --output evidence/attachment-failover.json
{"uploaded_by": "4b806eff0091", "stopped": "4b806eff0091", "downloads": [{"instance": "d0e0e47e2041", "sha256_ok": true, "ms": 6.9}, {"instance": "d0e0e47e2041", "sha256_ok": true, "ms": 26.3}, {"instance": "d0e0e47e2041", "sha256_ok": true, "ms": 11.5}, {"instance": "d0e0e47e2041", "sha256_ok": true, "ms": 6.4}, {"instance": "d0e0e47e2041", "sha256_ok": true, "ms": 7.8}], "pass": true}
{"uploaded_by": "d0e0e47e2041", "stopped": "d0e0e47e2041", "downloads": [{"instance": "4b806eff0091", "sha256_ok": true, "ms": 9.0}, {"instance": "4b806eff0091", "sha256_ok": true, "ms": 7.8}, {"instance": "4b806eff0091", "sha256_ok": true, "ms": 7.5}, {"instance": "4b806eff0091", "sha256_ok": true, "ms": 7.5}, {"instance": "4b806eff0091", "sha256_ok": true, "ms": 23.8}], "pass": true}
{"pass": true, "rounds": 2}
exit=0
+1 -1
View File
@@ -1,4 +1,4 @@
# 2026-11-13T13:25:41Z python3 student-tests/attachments_negative.py --output evidence/attachments-negative.json
# 2026-11-13T13:59:53Z python3 student-tests/attachments_negative.py --output evidence/attachments-negative.json
PASS valid PNG fixture -> 202
PASS valid JPEG -> 202
PASS unicode filename -> 202
+1 -1
View File
@@ -1,4 +1,4 @@
# 2026-11-13T13:25:36Z python3 student-tests/broker_permissions.py --output evidence/broker-permissions.json
# 2026-11-13T13:59:48Z python3 student-tests/broker_permissions.py --output evidence/broker-permissions.json
PASS relay {'publish': True, 'get_work_queue': False, 'get_dlq': False, 'declare_queue': False}
PASS worker {'publish': False, 'get_work_queue': True, 'get_dlq': False, 'declare_queue': False}
PASS ops {'publish': True, 'get_work_queue': False, 'get_dlq': True, 'declare_queue': False}
+38 -38
View File
@@ -1,10 +1,10 @@
{
"scenario": "burst of uploads: bounded worker concurrency",
"date_utc": "2026-11-13T13:25:36+00:00",
"date_utc": "2026-11-13T13:59:48+00:00",
"steps": [
{
"t": 1.1,
"utc": "13:25:25.872",
"t": 1.07,
"utc": "13:59:38.283",
"step": "consumers",
"count": 4,
"prefetch": [
@@ -12,8 +12,8 @@
]
},
{
"t": 1.64,
"utc": "13:25:26.409",
"t": 1.61,
"utc": "13:59:38.821",
"step": "generated images",
"bytes": [
6753618,
@@ -23,11 +23,11 @@
]
},
{
"t": 4.75,
"utc": "13:25:29.527",
"t": 4.28,
"utc": "13:59:41.494",
"step": "all uploads accepted (202)",
"count": 24,
"seconds": 2.31,
"seconds": 2.09,
"queue_right_after": {
"messages": 0,
"messages_ready": 0,
@@ -36,37 +36,37 @@
}
},
{
"t": 11.68,
"utc": "13:25:36.456",
"t": 11.66,
"utc": "13:59:48.873",
"step": "result",
"count": 24,
"image_bytes": 6753618,
"upload_seconds": 2.31,
"total_seconds_to_all_ready": 7.23,
"throughput_jobs_per_s": 3.32,
"upload_seconds": 2.09,
"total_seconds_to_all_ready": 9.82,
"throughput_jobs_per_s": 2.44,
"consumers": 4,
"prefetch_per_consumer": [
1
],
"max_concurrent_processing": 4,
"queue_lag_s": {
"p50": 2.401,
"p95": 4.069,
"max": 4.353
"p50": 4.282,
"p95": 6.409,
"max": 6.756
},
"enqueued_to_ready_s": {
"p50": 2.895,
"p95": 4.889,
"max": 4.895
"p50": 5.112,
"p95": 7.197,
"max": 7.202
},
"processing_s": {
"p50": 0.765,
"max": 1.649,
"mean": 0.834
"p50": 0.847,
"max": 2.514,
"mean": 1.2
},
"worker_peak_mem_mib": {
"mtusi-lab5-worker-1": 42.2,
"mtusi-lab5-worker-2": 100.4
"mtusi-lab5-fresh-worker-1": 69.1,
"mtusi-lab5-fresh-worker-2": 73.9
},
"worker_mem_limit": "1GiB",
"staging_left": 0
@@ -75,32 +75,32 @@
"result": {
"count": 24,
"image_bytes": 6753618,
"upload_seconds": 2.31,
"total_seconds_to_all_ready": 7.23,
"throughput_jobs_per_s": 3.32,
"upload_seconds": 2.09,
"total_seconds_to_all_ready": 9.82,
"throughput_jobs_per_s": 2.44,
"consumers": 4,
"prefetch_per_consumer": [
1
],
"max_concurrent_processing": 4,
"queue_lag_s": {
"p50": 2.401,
"p95": 4.069,
"max": 4.353
"p50": 4.282,
"p95": 6.409,
"max": 6.756
},
"enqueued_to_ready_s": {
"p50": 2.895,
"p95": 4.889,
"max": 4.895
"p50": 5.112,
"p95": 7.197,
"max": 7.202
},
"processing_s": {
"p50": 0.765,
"max": 1.649,
"mean": 0.834
"p50": 0.847,
"max": 2.514,
"mean": 1.2
},
"worker_peak_mem_mib": {
"mtusi-lab5-worker-1": 42.2,
"mtusi-lab5-worker-2": 100.4
"mtusi-lab5-fresh-worker-1": 69.1,
"mtusi-lab5-fresh-worker-2": 73.9
},
"worker_mem_limit": "1GiB",
"staging_left": 0
+5 -5
View File
@@ -1,7 +1,7 @@
# 2026-11-13T13:25:24Z python3 student-tests/burst.py --count 24 --output evidence/burst.json
[ 1.10s] consumers {"count": 4, "prefetch": [1]}
[ 1.64s] generated images {"bytes": [6753618, 6753618, 6753618, 6753618]}
[ 4.75s] all uploads accepted (202) {"count": 24, "seconds": 2.31, "queue_right_after": {"messages": 0, "messages_ready": 0, "messages_unacknowledged": 0, "consumers": 4}}
[ 11.68s] result {"count": 24, "image_bytes": 6753618, "upload_seconds": 2.31, "total_seconds_to_all_ready": 7.23, "throughput_jobs_per_s": 3.32, "consumers": 4, "prefetch_per_consumer": [1], "max_concurrent_processing": 4, "queue_lag_s": {"p50": 2.401, "p95": 4.069, "max": 4.353}, "enqueued_to_ready_s": {"p50": 2.895, "p95": 4.889, "max": 4.895}, "processing_s": {"p50": 0.765, "max": 1.649, "mean": 0.834}, "worker_peak_mem_mib": {"mtusi-lab5-worker-1": 42.2, "mtusi-lab5-worker-2": 100.4}, "worker_mem_limit": "1GiB", "staging_left": 0}
# 2026-11-13T13:59:37Z python3 student-tests/burst.py --count 24 --output evidence/burst.json
[ 1.07s] consumers {"count": 4, "prefetch": [1]}
[ 1.61s] generated images {"bytes": [6753618, 6753618, 6753618, 6753618]}
[ 4.28s] all uploads accepted (202) {"count": 24, "seconds": 2.09, "queue_right_after": {"messages": 0, "messages_ready": 0, "messages_unacknowledged": 0, "consumers": 4}}
[ 11.66s] result {"count": 24, "image_bytes": 6753618, "upload_seconds": 2.09, "total_seconds_to_all_ready": 9.82, "throughput_jobs_per_s": 2.44, "consumers": 4, "prefetch_per_consumer": [1], "max_concurrent_processing": 4, "queue_lag_s": {"p50": 4.282, "p95": 6.409, "max": 6.756}, "enqueued_to_ready_s": {"p50": 5.112, "p95": 7.197, "max": 7.202}, "processing_s": {"p50": 0.847, "max": 2.514, "mean": 1.2}, "worker_peak_mem_mib": {"mtusi-lab5-fresh-worker-1": 69.1, "mtusi-lab5-fresh-worker-2": 73.9}, "worker_mem_limit": "1GiB", "staging_left": 0}
PASS: 24 jobs, max concurrent 4 <= 4 consumers
exit=0
+1 -1
View File
@@ -1,4 +1,4 @@
# 2026-11-13T13:19:14Z make check
# 2026-11-13T13:53:07Z make check
python3 scripts/check_contract.py
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
exit=0
+20 -20
View File
@@ -1,21 +1,21 @@
# containers after persistence hook
mtusi-lab5-api-1 running
mtusi-lab5-api-2 running
mtusi-lab5-broker-1 running
mtusi-lab5-db-1 running
mtusi-lab5-janitor-1 running
mtusi-lab5-lb-1 running
mtusi-lab5-relay-1 running
mtusi-lab5-s3-1 running
mtusi-lab5-worker-1 running
mtusi-lab5-worker-2 running
/mtusi-lab5-api-1 StartedAt=2026-11-13T13:19:57.047261594Z
/mtusi-lab5-api-2 StartedAt=2026-11-13T13:19:57.066645345Z
/mtusi-lab5-broker-1 StartedAt=2026-11-13T13:19:18.587341132Z
/mtusi-lab5-db-1 StartedAt=2026-11-13T13:19:17.540371965Z
/mtusi-lab5-janitor-1 StartedAt=2026-11-13T13:20:03.852909333Z
/mtusi-lab5-lb-1 StartedAt=2026-11-13T13:19:53.963829093Z
/mtusi-lab5-relay-1 StartedAt=2026-11-13T13:19:54.774267885Z
/mtusi-lab5-s3-1 StartedAt=2026-11-13T13:19:34.799779792Z
/mtusi-lab5-worker-1 StartedAt=2026-11-13T13:19:54.68599976Z
/mtusi-lab5-worker-2 StartedAt=2026-11-13T13:19:54.204608051Z
mtusi-lab5-fresh-api-1 running
mtusi-lab5-fresh-api-2 running
mtusi-lab5-fresh-broker-1 running
mtusi-lab5-fresh-db-1 running
mtusi-lab5-fresh-janitor-1 running
mtusi-lab5-fresh-lb-1 running
mtusi-lab5-fresh-relay-1 running
mtusi-lab5-fresh-s3-1 running
mtusi-lab5-fresh-worker-1 running
mtusi-lab5-fresh-worker-2 running
/mtusi-lab5-fresh-api-1 StartedAt=2026-11-13T13:53:51.652721633Z
/mtusi-lab5-fresh-api-2 StartedAt=2026-11-13T13:53:51.6158283Z
/mtusi-lab5-fresh-broker-1 StartedAt=2026-11-13T13:53:11.853846545Z
/mtusi-lab5-fresh-db-1 StartedAt=2026-11-13T13:53:10.808589212Z
/mtusi-lab5-fresh-janitor-1 StartedAt=2026-11-13T13:53:58.302793803Z
/mtusi-lab5-fresh-lb-1 StartedAt=2026-11-13T13:53:48.400688507Z
/mtusi-lab5-fresh-relay-1 StartedAt=2026-11-13T13:53:49.111619382Z
/mtusi-lab5-fresh-s3-1 StartedAt=2026-11-13T13:53:28.254448345Z
/mtusi-lab5-fresh-worker-1 StartedAt=2026-11-13T13:53:49.098521882Z
/mtusi-lab5-fresh-worker-2 StartedAt=2026-11-13T13:53:49.078510174Z
+20 -20
View File
@@ -1,21 +1,21 @@
# containers before persistence hook
mtusi-lab5-api-1 running
mtusi-lab5-api-2 running
mtusi-lab5-broker-1 running
mtusi-lab5-db-1 running
mtusi-lab5-janitor-1 running
mtusi-lab5-lb-1 running
mtusi-lab5-relay-1 running
mtusi-lab5-s3-1 running
mtusi-lab5-worker-1 running
mtusi-lab5-worker-2 running
/mtusi-lab5-api-1 StartedAt=2026-11-13T13:18:58.823119012Z
/mtusi-lab5-api-2 StartedAt=2026-11-13T13:18:58.721958845Z
/mtusi-lab5-broker-1 StartedAt=2026-11-13T13:16:34.919270459Z
/mtusi-lab5-db-1 StartedAt=2026-11-13T13:16:34.884065126Z
/mtusi-lab5-janitor-1 StartedAt=2026-11-13T13:18:58.727139929Z
/mtusi-lab5-lb-1 StartedAt=2026-11-13T13:18:58.963141679Z
/mtusi-lab5-relay-1 StartedAt=2026-11-13T13:18:58.71470797Z
/mtusi-lab5-s3-1 StartedAt=2026-11-13T13:16:34.886978376Z
/mtusi-lab5-worker-1 StartedAt=2026-11-13T13:18:58.841973137Z
/mtusi-lab5-worker-2 StartedAt=2026-11-13T13:18:58.721509054Z
mtusi-lab5-fresh-api-1 running
mtusi-lab5-fresh-api-2 running
mtusi-lab5-fresh-broker-1 running
mtusi-lab5-fresh-db-1 running
mtusi-lab5-fresh-janitor-1 running
mtusi-lab5-fresh-lb-1 running
mtusi-lab5-fresh-relay-1 running
mtusi-lab5-fresh-s3-1 running
mtusi-lab5-fresh-worker-1 running
mtusi-lab5-fresh-worker-2 running
/mtusi-lab5-fresh-api-1 StartedAt=2026-11-13T13:52:53.283472676Z
/mtusi-lab5-fresh-api-2 StartedAt=2026-11-13T13:52:53.175935134Z
/mtusi-lab5-fresh-broker-1 StartedAt=2026-11-13T13:45:34.32942825Z
/mtusi-lab5-fresh-db-1 StartedAt=2026-11-13T13:44:07.792332544Z
/mtusi-lab5-fresh-janitor-1 StartedAt=2026-11-13T13:44:55.289415927Z
/mtusi-lab5-fresh-lb-1 StartedAt=2026-11-13T13:44:45.427555506Z
/mtusi-lab5-fresh-relay-1 StartedAt=2026-11-13T13:52:43.742274296Z
/mtusi-lab5-fresh-s3-1 StartedAt=2026-11-13T13:44:25.218194885Z
/mtusi-lab5-fresh-worker-1 StartedAt=2026-11-13T13:50:06.087501501Z
/mtusi-lab5-fresh-worker-2 StartedAt=2026-11-13T13:50:06.164766459Z
+8 -19
View File
@@ -1,40 +1,29 @@
# 2026-11-13T13:26:15Z docker compose --profile tools run --rm -T ops failed --limit 10
# 2026-11-13T14:00:28Z docker compose --profile tools run --rm -T ops failed --limit 10
{
"failed": [
{
"attachment_id": "dddc059c-a98e-4150-b866-dbdbfeb875f2",
"job_id": "7c4b6bfa-565d-4399-8d9e-57f58210b657",
"attachment_id": "d098c501-ff73-4036-a5c7-60302e9e450b",
"job_id": "801d942b-dbe6-425c-9f56-c35f8a8a178c",
"error_code": "staging_corrupted",
"attempt": 1,
"max_attempts": 5,
"replay_count": 0,
"last_error": "size/sha256 differ from accepted upload",
"updated_at": "2026-11-13T13:22:53.830976Z",
"updated_at": "2026-11-13T13:56:53.643818Z",
"replayable": true
},
{
"attachment_id": "ed395364-f044-42c0-aa9c-d61649968951",
"job_id": "b82c635b-27b0-4d6f-9413-689c659bbb89",
"attachment_id": "49c0404f-8f5c-480f-81de-09bb689a859f",
"job_id": "cdd3d4c8-1abd-47eb-aa22-02caf516406d",
"error_code": "staging_corrupted",
"attempt": 1,
"max_attempts": 5,
"replay_count": 0,
"last_error": "size/sha256 differ from accepted upload",
"updated_at": "2026-11-13T12:41:52.426094Z",
"replayable": true
},
{
"attachment_id": "4f03beaa-a713-46c4-88e8-3551f98be852",
"job_id": "937971a7-ac66-4c49-94e7-3c0d9188afdf",
"error_code": "staging_corrupted",
"attempt": 1,
"max_attempts": 5,
"replay_count": 0,
"last_error": "size/sha256 differ from accepted upload",
"updated_at": "2026-11-13T12:39:23.836327Z",
"updated_at": "2026-11-13T13:47:53.168892Z",
"replayable": true
}
],
"count": 3
"count": 2
}
exit=0
+2 -2
View File
@@ -1,6 +1,6 @@
# 2026-11-13T13:20:04Z make test-failover ACTION_SCRIPT=scripts/stop-one.sh
# 2026-11-13T13:53:58Z make test-failover ACTION_SCRIPT=scripts/stop-one.sh
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": 131, "failed_attempts": 0, "first_recovery_seconds": 3.725}
{"observed_instances_before": 2, "successful_writes": 130, "failed_attempts": 0, "first_recovery_seconds": 3.718}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
exit=0
+2 -2
View File
@@ -1,3 +1,3 @@
# 2026-11-13T13:26:12Z docker compose exec -T janitor python /app/src/janitor.py --once --dry-run
{"dry_run": true, "grace_seconds": 3600, "staging_retention_seconds": 86400, "abandoned_pending": 0, "staging_ready_cleaned": 0, "staging_failed_expired": 0, "orphan_objects": 0, "missing_objects": 0, "deleted_objects": 0, "deleted_rows": 0, "errors": 0, "rows_by_status": {"ready": 109, "failed": 3}, "jobs_by_status": {"ready": 109, "failed": 3}, "outbox_unpublished": 0, "abandoned_ids": [], "objects_total": 439, "objects_by_prefix": {"staging/": 3, "originals/": 0, "attachments/": 436}, "orphan_keys_sample": [], "missing_ids_sample": [], "duration_ms": 94.9}
# 2026-11-13T14:00:24Z docker compose exec -T janitor python /app/src/janitor.py --once --dry-run
{"dry_run": true, "grace_seconds": 3600, "staging_retention_seconds": 86400, "abandoned_pending": 0, "staging_ready_cleaned": 0, "staging_failed_expired": 0, "orphan_objects": 0, "missing_objects": 0, "deleted_objects": 0, "deleted_rows": 0, "errors": 0, "rows_by_status": {"ready": 110, "failed": 2}, "jobs_by_status": {"ready": 110, "failed": 2}, "outbox_unpublished": 0, "abandoned_ids": [], "objects_total": 442, "objects_by_prefix": {"staging/": 2, "originals/": 0, "attachments/": 440}, "orphan_keys_sample": [], "missing_ids_sample": [], "duration_ms": 39.2}
exit=0
+56 -56
View File
@@ -1,10 +1,10 @@
{
"scenario": "lease expiry of a frozen worker and fencing of its late result",
"date_utc": "2026-11-13T13:25:17+00:00",
"date_utc": "2026-11-13T13:59:30+00:00",
"steps": [
{
"t": 7.61,
"utc": "13:24:41.036",
"t": 7.38,
"utc": "13:58:53.350",
"step": "workers recreated",
"env": {
"WORKER_FAULT_INJECTION": "1",
@@ -12,37 +12,37 @@
"FAULT_SLOW_SECONDS": "25"
},
"workers": [
"5b3a6ceb1830",
"526f1f18e42d"
"3c4ac216bda3",
"39a586ee07d0"
]
},
{
"t": 8.41,
"utc": "13:24:41.840",
"t": 8.17,
"utc": "13:58:54.136",
"step": "claimed",
"attachment_id": "a7ea720b-3a62-4aba-89bb-7ee47cc4ff77",
"lease_owner": "526f1f18e42d:5a6bf2a7",
"lease_until": "2026-11-13T13:24:51.070995Z"
"attachment_id": "853b9368-075d-433e-aaf5-1c018dd46b6c",
"lease_owner": "39a586ee07d0:84ac209d",
"lease_until": "2026-11-13T13:59:03.380939Z"
},
{
"t": 17.22,
"utc": "13:24:50.653",
"t": 17.01,
"utc": "13:59:02.977",
"step": "long-running job keeps its lease (heartbeat)",
"lease_until": "2026-11-13T13:24:57.769248Z",
"lease_until": "2026-11-13T13:59:10.077947Z",
"status": "processing"
},
{
"t": 17.37,
"utc": "13:24:50.797",
"t": 17.17,
"utc": "13:59:03.142",
"step": "owner container paused (frozen, no heartbeat)",
"container": "526f1f18e42d"
"container": "39a586ee07d0"
},
{
"t": 43.29,
"utc": "13:25:16.719",
"t": 43.13,
"utc": "13:59:29.103",
"step": "lease expired -> requeued -> other worker finished",
"seconds_after_pause": 25.1,
"new_owner": "5b3a6ceb1830:80c565a7",
"new_owner": "3c4ac216bda3:3f11a69c",
"events": [
"enqueued",
"claimed",
@@ -55,13 +55,13 @@
]
},
{
"t": 43.32,
"utc": "13:25:16.748",
"t": 43.18,
"utc": "13:59:29.152",
"step": "owner container unpaused"
},
{
"t": 44.17,
"utc": "13:25:17.600",
"t": 44.04,
"utc": "13:59:30.005",
"step": "late worker fenced, result unchanged",
"events": [
"enqueued",
@@ -89,75 +89,75 @@
}
}
],
"attachment_id": "a7ea720b-3a62-4aba-89bb-7ee47cc4ff77",
"paused_container": "526f1f18e42d",
"attachment_id": "853b9368-075d-433e-aaf5-1c018dd46b6c",
"paused_container": "39a586ee07d0",
"events": [
{
"job_id": "2d2c94ac-bf98-435b-b5c0-5c0d95613cbb",
"at": "2026-11-13T13:24:41.056799Z",
"job_id": "a8e26f22-aedd-4404-b4bd-74cbda19a2d7",
"at": "2026-11-13T13:58:53.369257Z",
"event": "enqueued",
"attempt": 1,
"actor": "api",
"detail": null
},
{
"job_id": "2d2c94ac-bf98-435b-b5c0-5c0d95613cbb",
"at": "2026-11-13T13:24:41.074354Z",
"job_id": "a8e26f22-aedd-4404-b4bd-74cbda19a2d7",
"at": "2026-11-13T13:58:53.384267Z",
"event": "claimed",
"attempt": 1,
"actor": "526f1f18e42d:5a6bf2a7",
"actor": "39a586ee07d0:84ac209d",
"detail": {
"redelivered_message_attempt": 1
}
},
{
"job_id": "2d2c94ac-bf98-435b-b5c0-5c0d95613cbb",
"at": "2026-11-13T13:25:00.154971Z",
"job_id": "a8e26f22-aedd-4404-b4bd-74cbda19a2d7",
"at": "2026-11-13T13:59:13.472919Z",
"event": "lease_expired",
"attempt": 1,
"actor": "reaper:6e17e167ffa4:c0758d5b",
"actor": "reaper:e3d84e7b1100:1b42ad54",
"detail": {
"lease_owner": "526f1f18e42d:5a6bf2a7"
"lease_owner": "39a586ee07d0:84ac209d"
}
},
{
"job_id": "2d2c94ac-bf98-435b-b5c0-5c0d95613cbb",
"at": "2026-11-13T13:25:00.160740Z",
"job_id": "a8e26f22-aedd-4404-b4bd-74cbda19a2d7",
"at": "2026-11-13T13:59:13.479987Z",
"event": "requeued_after_lease",
"attempt": 1,
"actor": "reaper:6e17e167ffa4:c0758d5b",
"actor": "reaper:e3d84e7b1100:1b42ad54",
"detail": {
"error_code": "lease_expired",
"next_attempt": 2,
"delay_seconds": 1.243
"delay_seconds": 1.87
}
},
{
"job_id": "2d2c94ac-bf98-435b-b5c0-5c0d95613cbb",
"at": "2026-11-13T13:25:15.712439Z",
"job_id": "a8e26f22-aedd-4404-b4bd-74cbda19a2d7",
"at": "2026-11-13T13:59:28.041721Z",
"event": "claimed",
"attempt": 2,
"actor": "5b3a6ceb1830:80c565a7",
"actor": "3c4ac216bda3:3f11a69c",
"detail": {
"redelivered_message_attempt": 2
"redelivered_message_attempt": 1
}
},
{
"job_id": "2d2c94ac-bf98-435b-b5c0-5c0d95613cbb",
"at": "2026-11-13T13:25:15.713469Z",
"job_id": "a8e26f22-aedd-4404-b4bd-74cbda19a2d7",
"at": "2026-11-13T13:59:28.042827Z",
"event": "busy_ignored",
"attempt": 1,
"actor": "5b3a6ceb1830:80c565a7",
"attempt": 2,
"actor": "3c4ac216bda3:3f11a69c",
"detail": {
"lease_owner": "5b3a6ceb1830:80c565a7"
"lease_owner": "3c4ac216bda3:3f11a69c"
}
},
{
"job_id": "2d2c94ac-bf98-435b-b5c0-5c0d95613cbb",
"at": "2026-11-13T13:25:15.860857Z",
"job_id": "a8e26f22-aedd-4404-b4bd-74cbda19a2d7",
"at": "2026-11-13T13:59:28.181171Z",
"event": "ready",
"attempt": 2,
"actor": "5b3a6ceb1830:80c565a7",
"actor": "3c4ac216bda3:3f11a69c",
"detail": {
"variants": {
"crop": [
@@ -176,19 +176,19 @@
}
},
{
"job_id": "2d2c94ac-bf98-435b-b5c0-5c0d95613cbb",
"at": "2026-11-13T13:25:15.862651Z",
"job_id": "a8e26f22-aedd-4404-b4bd-74cbda19a2d7",
"at": "2026-11-13T13:59:28.182433Z",
"event": "staging_deleted",
"attempt": 2,
"actor": "5b3a6ceb1830:80c565a7",
"actor": "3c4ac216bda3:3f11a69c",
"detail": null
},
{
"job_id": "2d2c94ac-bf98-435b-b5c0-5c0d95613cbb",
"at": "2026-11-13T13:25:16.745294Z",
"job_id": "a8e26f22-aedd-4404-b4bd-74cbda19a2d7",
"at": "2026-11-13T13:59:29.145023Z",
"event": "aborted_lease_lost",
"attempt": 1,
"actor": "526f1f18e42d:5a6bf2a7",
"actor": "39a586ee07d0:84ac209d",
"detail": null
}
],
+8 -8
View File
@@ -1,10 +1,10 @@
# 2026-11-13T13:24:33Z python3 student-tests/lease_takeover.py --output evidence/lease-takeover.json
[ 7.61s] workers recreated {"env": {"WORKER_FAULT_INJECTION": "1", "JOB_LEASE_SECONDS": "10", "FAULT_SLOW_SECONDS": "25"}, "workers": ["5b3a6ceb1830", "526f1f18e42d"]}
[ 8.41s] claimed {"attachment_id": "a7ea720b-3a62-4aba-89bb-7ee47cc4ff77", "lease_owner": "526f1f18e42d:5a6bf2a7", "lease_until": "2026-11-13T13:24:51.070995Z"}
[ 17.22s] long-running job keeps its lease (heartbeat) {"lease_until": "2026-11-13T13:24:57.769248Z", "status": "processing"}
[ 17.37s] owner container paused (frozen, no heartbeat) {"container": "526f1f18e42d"}
[ 43.29s] lease expired -> requeued -> other worker finished {"seconds_after_pause": 25.1, "new_owner": "5b3a6ceb1830:80c565a7", "events": ["enqueued", "claimed", "lease_expired", "requeued_after_lease", "claimed", "busy_ignored", "ready", "staging_deleted"]}
[ 43.32s] owner container unpaused
[ 44.17s] late worker fenced, result unchanged {"events": ["enqueued", "claimed", "lease_expired", "requeued_after_lease", "claimed", "busy_ignored", "ready", "staging_deleted", "aborted_lease_lost"], "invariants": {"variants": ["crop", "optimized", "thumbnail"], "variants_ok": true, "final_objects": 4, "final_objects_ok": true, "staging_left": false, "job_status": "ready", "attempt": 2}}
# 2026-11-13T13:58:45Z python3 student-tests/lease_takeover.py --output evidence/lease-takeover.json
[ 7.38s] workers recreated {"env": {"WORKER_FAULT_INJECTION": "1", "JOB_LEASE_SECONDS": "10", "FAULT_SLOW_SECONDS": "25"}, "workers": ["3c4ac216bda3", "39a586ee07d0"]}
[ 8.17s] claimed {"attachment_id": "853b9368-075d-433e-aaf5-1c018dd46b6c", "lease_owner": "39a586ee07d0:84ac209d", "lease_until": "2026-11-13T13:59:03.380939Z"}
[ 17.01s] long-running job keeps its lease (heartbeat) {"lease_until": "2026-11-13T13:59:10.077947Z", "status": "processing"}
[ 17.17s] owner container paused (frozen, no heartbeat) {"container": "39a586ee07d0"}
[ 43.13s] lease expired -> requeued -> other worker finished {"seconds_after_pause": 25.1, "new_owner": "3c4ac216bda3:3f11a69c", "events": ["enqueued", "claimed", "lease_expired", "requeued_after_lease", "claimed", "busy_ignored", "ready", "staging_deleted"]}
[ 43.18s] owner container unpaused
[ 44.04s] late worker fenced, result unchanged {"events": ["enqueued", "claimed", "lease_expired", "requeued_after_lease", "claimed", "busy_ignored", "ready", "staging_deleted", "aborted_lease_lost"], "invariants": {"variants": ["crop", "optimized", "thumbnail"], "variants_ok": true, "final_objects": 4, "final_objects_ok": true, "staging_left": false, "job_status": "ready", "attempt": 2}}
PASS: frozen worker loses lease, job recovered, late result fenced
exit=0
+71 -59
View File
@@ -1,18 +1,18 @@
{
"scenario": "outbox: COMMIT/publish gap and API crash windows",
"date_utc": "2026-11-13T13:24:33+00:00",
"date_utc": "2026-11-13T13:58:45+00:00",
"steps": [
{
"t": 6.31,
"utc": "13:23:24.684",
"t": 5.47,
"utc": "13:57:20.717",
"step": "A: relay stopped, upload 202",
"attachment_id": "41a53cd8-7e57-44b8-9c9f-12320b323750",
"attachment_id": "8695d9c8-cdc5-4f28-a17e-b2222d6ee5f4",
"outbox": [
{
"id": 105,
"id": 98,
"attempt": "1",
"available_at": "2026-11-13T13:23:19.956776Z",
"created_at": "2026-11-13T13:23:19.956776Z",
"available_at": "2026-11-13T13:57:16.395116Z",
"created_at": "2026-11-13T13:57:16.395116Z",
"published_at": null,
"publish_count": 0
}
@@ -25,10 +25,10 @@
}
},
{
"t": 12.77,
"utc": "13:23:31.150",
"t": 12.08,
"utc": "13:57:27.326",
"step": "A: relay started -> ready, same single job",
"attachment_id": "41a53cd8-7e57-44b8-9c9f-12320b323750",
"attachment_id": "8695d9c8-cdc5-4f28-a17e-b2222d6ee5f4",
"events": [
"enqueued",
"claimed",
@@ -37,11 +37,11 @@
],
"outbox": [
{
"id": 105,
"id": 98,
"attempt": "1",
"available_at": "2026-11-13T13:23:19.956776Z",
"created_at": "2026-11-13T13:23:19.956776Z",
"published_at": "2026-11-13T13:23:26.328881Z",
"available_at": "2026-11-13T13:57:16.395116Z",
"created_at": "2026-11-13T13:57:16.395116Z",
"published_at": "2026-11-13T13:57:22.711861Z",
"publish_count": 1
}
],
@@ -61,10 +61,10 @@
}
},
{
"t": 23.48,
"utc": "13:23:41.861",
"t": 21.46,
"utc": "13:57:36.707",
"step": "B: relay crashed between COMMIT and publish -> restarted -> ready",
"attachment_id": "a2401b04-a5db-4026-adc4-01d5040fdd2c",
"attachment_id": "73a95268-17ba-4a02-b38b-b4b28ceda56f",
"relay_restart_count": [
[
0
@@ -81,11 +81,11 @@
],
"outbox": [
{
"id": 106,
"id": 99,
"attempt": "1",
"available_at": "2026-11-13T13:23:38.382769Z",
"created_at": "2026-11-13T13:23:38.382769Z",
"published_at": "2026-11-13T13:23:40.445416Z",
"available_at": "2026-11-13T13:57:33.691351Z",
"created_at": "2026-11-13T13:57:33.691351Z",
"published_at": "2026-11-13T13:57:35.220697Z",
"publish_count": 1
}
],
@@ -104,10 +104,10 @@
}
},
{
"t": 32.98,
"utc": "13:23:51.354",
"t": 31.05,
"utc": "13:57:46.295",
"step": "C: published twice (crash before marking) -> duplicate is a no-op",
"attachment_id": "85b3ce6d-b06a-49ab-bc80-07be18cfd5d9",
"attachment_id": "b418c3c7-74cf-492a-ab07-8e94202f47e5",
"relay_restart_count": [
1
],
@@ -120,11 +120,11 @@
],
"outbox": [
{
"id": 107,
"id": 100,
"attempt": "1",
"available_at": "2026-11-13T13:23:48.361567Z",
"created_at": "2026-11-13T13:23:48.361567Z",
"published_at": "2026-11-13T13:23:49.734047Z",
"available_at": "2026-11-13T13:57:43.223035Z",
"created_at": "2026-11-13T13:57:43.223035Z",
"published_at": "2026-11-13T13:57:44.693510Z",
"publish_count": 1
}
],
@@ -143,11 +143,15 @@
}
},
{
"t": 49.85,
"utc": "13:24:08.230",
"t": 56.68,
"utc": "13:58:11.927",
"step": "D: API died after COMMIT before 202 -> work still completed",
"attachment_id": "5778567a-0d6c-4322-b0e0-31a17a40994f",
"client_saw": "missing X-Instance-Id",
"attachment_id": "76c1ed67-220e-4fdd-bb63-7930dbad69be",
"client_saw": {
"http": 502,
"x_instance_id": null,
"error_code": "unavailable"
},
"events": [
"enqueued",
"claimed",
@@ -169,20 +173,24 @@
}
},
{
"t": 50.15,
"utc": "13:24:08.530",
"t": 65.79,
"utc": "13:58:21.034",
"step": "E: API died after staging before COMMIT",
"attachment_id": "5b7070f4-ece0-49d9-bef4-1d704222955f",
"client_saw": "missing X-Instance-Id",
"attachment_id": "e42703f7-bf99-461f-910c-e03b66ba2b73",
"client_saw": {
"http": 502,
"x_instance_id": null,
"error_code": "unavailable"
},
"status": "pending",
"jobs": 0,
"api_get": 404
},
{
"t": 58.86,
"utc": "13:24:17.232",
"t": 74.22,
"utc": "13:58:29.474",
"step": "E: janitor removed pending row and staging object",
"attachment_id": "5b7070f4-ece0-49d9-bef4-1d704222955f",
"attachment_id": "e42703f7-bf99-461f-910c-e03b66ba2b73",
"janitor_dry_run": {
"abandoned_pending": 1,
"orphan_objects": 0,
@@ -199,14 +207,14 @@
"row_gone": true
},
{
"t": 74.96,
"utc": "13:24:33.332",
"t": 90.61,
"utc": "13:58:45.855",
"step": "relay and api restored to .env configuration"
}
],
"results": {
"A": {
"attachment_id": "41a53cd8-7e57-44b8-9c9f-12320b323750",
"attachment_id": "8695d9c8-cdc5-4f28-a17e-b2222d6ee5f4",
"events": [
"enqueued",
"claimed",
@@ -215,11 +223,11 @@
],
"outbox": [
{
"id": 105,
"id": 98,
"attempt": "1",
"available_at": "2026-11-13T13:23:19.956776Z",
"created_at": "2026-11-13T13:23:19.956776Z",
"published_at": "2026-11-13T13:23:26.328881Z",
"available_at": "2026-11-13T13:57:16.395116Z",
"created_at": "2026-11-13T13:57:16.395116Z",
"published_at": "2026-11-13T13:57:22.711861Z",
"publish_count": 1
}
],
@@ -239,7 +247,7 @@
}
},
"B": {
"attachment_id": "a2401b04-a5db-4026-adc4-01d5040fdd2c",
"attachment_id": "73a95268-17ba-4a02-b38b-b4b28ceda56f",
"relay_restart_count": [
[
0
@@ -256,11 +264,11 @@
],
"outbox": [
{
"id": 106,
"id": 99,
"attempt": "1",
"available_at": "2026-11-13T13:23:38.382769Z",
"created_at": "2026-11-13T13:23:38.382769Z",
"published_at": "2026-11-13T13:23:40.445416Z",
"available_at": "2026-11-13T13:57:33.691351Z",
"created_at": "2026-11-13T13:57:33.691351Z",
"published_at": "2026-11-13T13:57:35.220697Z",
"publish_count": 1
}
],
@@ -279,7 +287,7 @@
}
},
"C": {
"attachment_id": "85b3ce6d-b06a-49ab-bc80-07be18cfd5d9",
"attachment_id": "b418c3c7-74cf-492a-ab07-8e94202f47e5",
"relay_restart_count": [
1
],
@@ -292,11 +300,11 @@
],
"outbox": [
{
"id": 107,
"id": 100,
"attempt": "1",
"available_at": "2026-11-13T13:23:48.361567Z",
"created_at": "2026-11-13T13:23:48.361567Z",
"published_at": "2026-11-13T13:23:49.734047Z",
"available_at": "2026-11-13T13:57:43.223035Z",
"created_at": "2026-11-13T13:57:43.223035Z",
"published_at": "2026-11-13T13:57:44.693510Z",
"publish_count": 1
}
],
@@ -315,8 +323,12 @@
}
},
"D": {
"attachment_id": "5778567a-0d6c-4322-b0e0-31a17a40994f",
"client_saw": "missing X-Instance-Id",
"attachment_id": "76c1ed67-220e-4fdd-bb63-7930dbad69be",
"client_saw": {
"http": 502,
"x_instance_id": null,
"error_code": "unavailable"
},
"events": [
"enqueued",
"claimed",
@@ -338,7 +350,7 @@
}
},
"E": {
"attachment_id": "5b7070f4-ece0-49d9-bef4-1d704222955f",
"attachment_id": "e42703f7-bf99-461f-910c-e03b66ba2b73",
"janitor_dry_run": {
"abandoned_pending": 1,
"orphan_objects": 0,
+9 -9
View File
@@ -1,11 +1,11 @@
# 2026-11-13T13:23:18Z python3 student-tests/outbox_gap.py --output evidence/outbox-gap.json
[ 6.31s] A: relay stopped, upload 202 {"attachment_id": "41a53cd8-7e57-44b8-9c9f-12320b323750", "outbox": [{"id": 105, "attempt": "1", "available_at": "2026-11-13T13:23:19.956776Z", "created_at": "2026-11-13T13:23:19.956776Z", "published_at": null, "publish_count": 0}], "queue": {"messages": 0, "messages_ready": 0, "messages_unacknowledged": 0, "consumers": 4}}
[ 12.77s] A: relay started -> ready, same single job {"attachment_id": "41a53cd8-7e57-44b8-9c9f-12320b323750", "events": ["enqueued", "claimed", "ready", "staging_deleted"], "outbox": [{"id": 105, "attempt": "1", "available_at": "2026-11-13T13:23:19.956776Z", "created_at": "2026-11-13T13:23:19.956776Z", "published_at": "2026-11-13T13:23:26.328881Z", "publish_count": 1}], "jobs": 1, "invariants": {"variants": ["crop", "optimized", "thumbnail"], "variants_ok": true, "final_objects": 4, "final_objects_ok": true, "staging_left": false, "job_status": "ready", "attempt": 1}}
[ 23.48s] B: relay crashed between COMMIT and publish -> restarted -> ready {"attachment_id": "a2401b04-a5db-4026-adc4-01d5040fdd2c", "relay_restart_count": [[0], [1]], "events": ["enqueued", "claimed", "ready", "staging_deleted"], "outbox": [{"id": 106, "attempt": "1", "available_at": "2026-11-13T13:23:38.382769Z", "created_at": "2026-11-13T13:23:38.382769Z", "published_at": "2026-11-13T13:23:40.445416Z", "publish_count": 1}], "invariants": {"variants": ["crop", "optimized", "thumbnail"], "variants_ok": true, "final_objects": 4, "final_objects_ok": true, "staging_left": false, "job_status": "ready", "attempt": 1}}
[ 32.98s] C: published twice (crash before marking) -> duplicate is a no-op {"attachment_id": "85b3ce6d-b06a-49ab-bc80-07be18cfd5d9", "relay_restart_count": [1], "events": ["enqueued", "claimed", "ready", "staging_deleted", "duplicate_ignored"], "outbox": [{"id": 107, "attempt": "1", "available_at": "2026-11-13T13:23:48.361567Z", "created_at": "2026-11-13T13:23:48.361567Z", "published_at": "2026-11-13T13:23:49.734047Z", "publish_count": 1}], "invariants": {"variants": ["crop", "optimized", "thumbnail"], "variants_ok": true, "final_objects": 4, "final_objects_ok": true, "staging_left": false, "job_status": "ready", "attempt": 1}}
[ 49.85s] D: API died after COMMIT before 202 -> work still completed {"attachment_id": "5778567a-0d6c-4322-b0e0-31a17a40994f", "client_saw": "missing X-Instance-Id", "events": ["enqueued", "claimed", "ready", "staging_deleted"], "invariants": {"variants": ["crop", "optimized", "thumbnail"], "variants_ok": true, "final_objects": 4, "final_objects_ok": true, "staging_left": false, "job_status": "ready", "attempt": 1}}
[ 50.15s] E: API died after staging before COMMIT {"attachment_id": "5b7070f4-ece0-49d9-bef4-1d704222955f", "client_saw": "missing X-Instance-Id", "status": "pending", "jobs": 0, "api_get": 404}
[ 58.86s] E: janitor removed pending row and staging object {"attachment_id": "5b7070f4-ece0-49d9-bef4-1d704222955f", "janitor_dry_run": {"abandoned_pending": 1, "orphan_objects": 0, "deleted_objects": 0, "deleted_rows": 0}, "janitor": {"abandoned_pending": 1, "orphan_objects": 0, "deleted_objects": 1, "deleted_rows": 1, "missing_objects": 0}, "row_gone": true}
[ 74.96s] relay and api restored to .env configuration
# 2026-11-13T13:57:15Z python3 student-tests/outbox_gap.py --output evidence/outbox-gap.json
[ 5.47s] A: relay stopped, upload 202 {"attachment_id": "8695d9c8-cdc5-4f28-a17e-b2222d6ee5f4", "outbox": [{"id": 98, "attempt": "1", "available_at": "2026-11-13T13:57:16.395116Z", "created_at": "2026-11-13T13:57:16.395116Z", "published_at": null, "publish_count": 0}], "queue": {"messages": 0, "messages_ready": 0, "messages_unacknowledged": 0, "consumers": 4}}
[ 12.08s] A: relay started -> ready, same single job {"attachment_id": "8695d9c8-cdc5-4f28-a17e-b2222d6ee5f4", "events": ["enqueued", "claimed", "ready", "staging_deleted"], "outbox": [{"id": 98, "attempt": "1", "available_at": "2026-11-13T13:57:16.395116Z", "created_at": "2026-11-13T13:57:16.395116Z", "published_at": "2026-11-13T13:57:22.711861Z", "publish_count": 1}], "jobs": 1, "invariants": {"variants": ["crop", "optimized", "thumbnail"], "variants_ok": true, "final_objects": 4, "final_objects_ok": true, "staging_left": false, "job_status": "ready", "attempt": 1}}
[ 21.46s] B: relay crashed between COMMIT and publish -> restarted -> ready {"attachment_id": "73a95268-17ba-4a02-b38b-b4b28ceda56f", "relay_restart_count": [[0], [1]], "events": ["enqueued", "claimed", "ready", "staging_deleted"], "outbox": [{"id": 99, "attempt": "1", "available_at": "2026-11-13T13:57:33.691351Z", "created_at": "2026-11-13T13:57:33.691351Z", "published_at": "2026-11-13T13:57:35.220697Z", "publish_count": 1}], "invariants": {"variants": ["crop", "optimized", "thumbnail"], "variants_ok": true, "final_objects": 4, "final_objects_ok": true, "staging_left": false, "job_status": "ready", "attempt": 1}}
[ 31.05s] C: published twice (crash before marking) -> duplicate is a no-op {"attachment_id": "b418c3c7-74cf-492a-ab07-8e94202f47e5", "relay_restart_count": [1], "events": ["enqueued", "claimed", "ready", "staging_deleted", "duplicate_ignored"], "outbox": [{"id": 100, "attempt": "1", "available_at": "2026-11-13T13:57:43.223035Z", "created_at": "2026-11-13T13:57:43.223035Z", "published_at": "2026-11-13T13:57:44.693510Z", "publish_count": 1}], "invariants": {"variants": ["crop", "optimized", "thumbnail"], "variants_ok": true, "final_objects": 4, "final_objects_ok": true, "staging_left": false, "job_status": "ready", "attempt": 1}}
[ 56.68s] D: API died after COMMIT before 202 -> work still completed {"attachment_id": "76c1ed67-220e-4fdd-bb63-7930dbad69be", "client_saw": {"http": 502, "x_instance_id": null, "error_code": "unavailable"}, "events": ["enqueued", "claimed", "ready", "staging_deleted"], "invariants": {"variants": ["crop", "optimized", "thumbnail"], "variants_ok": true, "final_objects": 4, "final_objects_ok": true, "staging_left": false, "job_status": "ready", "attempt": 1}}
[ 65.79s] E: API died after staging before COMMIT {"attachment_id": "e42703f7-bf99-461f-910c-e03b66ba2b73", "client_saw": {"http": 502, "x_instance_id": null, "error_code": "unavailable"}, "status": "pending", "jobs": 0, "api_get": 404}
[ 74.22s] E: janitor removed pending row and staging object {"attachment_id": "e42703f7-bf99-461f-910c-e03b66ba2b73", "janitor_dry_run": {"abandoned_pending": 1, "orphan_objects": 0, "deleted_objects": 0, "deleted_rows": 0}, "janitor": {"abandoned_pending": 1, "orphan_objects": 0, "deleted_objects": 1, "deleted_rows": 1, "missing_objects": 0}, "row_gone": true}
[ 90.61s] relay and api restored to .env configuration
PASS: outbox closes COMMIT/publish gap; API crash windows handled
exit=0
+1 -1
View File
@@ -1,4 +1,4 @@
# 2026-11-13T13:19:16Z make test-persistence ACTION_SCRIPT=scripts/restart.sh
# 2026-11-13T13:53:09Z make test-persistence ACTION_SCRIPT=scripts/restart.sh
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.
+1 -1
View File
@@ -1,4 +1,4 @@
# 2026-11-13T13:26:14Z docker compose exec -T broker rabbitmqctl -q -p messenger list_queues name type durable messages consumers
# 2026-11-13T14:00:26Z docker compose exec -T broker rabbitmqctl -q -p messenger list_queues name type durable messages consumers
name type durable messages consumers
attachments.dlq quorum true 0 0
attachments.process.v1 quorum true 0 4
+1 -1
View File
@@ -1,4 +1,4 @@
# 2026-11-13T13:25:40Z docker compose --profile tools run --rm -T checks /app/student-tests/s3_private_check.py
# 2026-11-13T13:59:52Z docker compose --profile tools run --rm -T checks /app/student-tests/s3_private_check.py
PASS api: PutObject в свой bucket expected=allowed got=allowed
PASS anonymous GET object expected=403 got=403
PASS anonymous ListBucket expected=403 got=403
+1 -1
View File
@@ -1,4 +1,4 @@
# 2026-11-13T13:19:14Z make test
# 2026-11-13T13:53:08Z make test
python3 tests/smoke.py --base-url "http://localhost:8080"
PASS: lab5 public API scenario; infrastructure and grading evidence remain separate.
exit=0
+3 -3
View File
@@ -23,7 +23,7 @@
{
"exit": 0,
"class": "ok",
"seconds": 0.67,
"seconds": 0.69,
"case": "36 Mpx PNG, normal limits",
"expected": "ok",
"input_bytes": 119592,
@@ -33,7 +33,7 @@
{
"exit": 5,
"class": "resource_limit",
"seconds": 0.11,
"seconds": 0.13,
"case": "36 Mpx PNG, memory limit 160 MiB",
"expected": "resource_limit",
"input_bytes": 119592,
@@ -87,7 +87,7 @@
{
"exit": 3,
"class": "invalid_image",
"seconds": 0.11,
"seconds": 0.1,
"case": "PNG declared as JPEG",
"expected": "invalid_image",
"input_bytes": 1949,
+4 -4
View File
@@ -1,12 +1,12 @@
# 2026-11-13T13:20:56Z docker compose --profile tools run --rm -T checks /app/student-tests/transform_limits.py --output /app/evidence/transform-limits.json
# 2026-11-13T13:54:49Z docker compose --profile tools run --rm -T checks /app/student-tests/transform_limits.py --output /app/evidence/transform-limits.json
PASS valid 640x480 -> ok (0.13s)
PASS 49 Mpx PNG (> MAX_IMAGE_PIXELS) -> image_too_large (0.10s)
PASS 36 Mpx PNG, normal limits -> ok (0.67s)
PASS 36 Mpx PNG, memory limit 160 MiB -> resource_limit (0.11s)
PASS 36 Mpx PNG, normal limits -> ok (0.69s)
PASS 36 Mpx PNG, memory limit 160 MiB -> resource_limit (0.13s)
PASS 40 Mpx RGBA noise PNG, CPU limit 1 s -> killed_by_signal_24 (1.00s)
PASS 40 Mpx RGBA noise PNG, wall timeout 0.5 s -> processing_timeout (0.51s)
PASS truncated PNG -> invalid_image (0.10s)
PASS garbage declared as JPEG -> invalid_image (0.10s)
PASS PNG declared as JPEG -> invalid_image (0.11s)
PASS PNG declared as JPEG -> invalid_image (0.10s)
PASS 9/9
exit=0
+1 -1
View File
@@ -1,4 +1,4 @@
# 2026-11-13T13:20:54Z docker compose --profile tools run --rm -T checks /app/student-tests/variants_check.py --base-url http://lb:8080 --output /app/evidence/variants-check.json
# 2026-11-13T13:54:46Z docker compose --profile tools run --rm -T checks /app/student-tests/variants_check.py --base-url http://lb:8080 --output /app/evidence/variants-check.json
PASS fixture 320x200 PNG {'thumbnail': (256, 160), 'crop': (128, 128), 'optimized': (320, 200)}
PASS RGBA 300x300 half transparent {'thumbnail': (256, 256), 'crop': (128, 128), 'optimized': (300, 300)}
PASS JPEG 400x200 EXIF orientation=6 {'thumbnail': (128, 256), 'crop': (128, 128), 'optimized': (200, 400)}
+102 -43
View File
@@ -1,10 +1,10 @@
{
"scenario": "worker faults, retries, failed registry, replay, DLQ",
"date_utc": "2026-11-13T13:23:18+00:00",
"date_utc": "2026-11-13T13:57:15+00:00",
"steps": [
{
"t": 7.26,
"utc": "13:21:13.790",
"t": 7.43,
"utc": "13:55:06.128",
"step": "workers recreated with fault injection",
"env": {
"WORKER_FAULT_INJECTION": "1",
@@ -13,8 +13,8 @@
}
},
{
"t": 40.75,
"utc": "13:21:47.283",
"t": 43.87,
"utc": "13:55:42.572",
"step": "crash-after-claim",
"events": [
"enqueued",
@@ -42,8 +42,8 @@
}
},
{
"t": 76.1,
"utc": "13:22:22.637",
"t": 79.44,
"utc": "13:56:18.141",
"step": "crash-after-s3-put",
"events": [
"enqueued",
@@ -71,8 +71,8 @@
}
},
{
"t": 80.78,
"utc": "13:22:27.315",
"t": 84.1,
"utc": "13:56:22.802",
"step": "crash-after-commit",
"events": [
"enqueued",
@@ -97,21 +97,21 @@
}
},
{
"t": 80.92,
"utc": "13:22:27.454",
"t": 84.24,
"utc": "13:56:22.943",
"step": "worker containers after crashes (restart: unless-stopped)",
"containers": [
"/mtusi-lab5-worker-1 1 running",
"/mtusi-lab5-worker-2 2 running"
"/mtusi-lab5-fresh-worker-1 2 running",
"/mtusi-lab5-fresh-worker-2 1 running"
]
},
{
"t": 85.17,
"utc": "13:22:31.709",
"t": 88.58,
"utc": "13:56:27.276",
"step": "transient-2: retried with backoff",
"delays": [
0.952,
1.513
0.941,
1.489
],
"bounds": [
[
@@ -138,30 +138,61 @@
}
},
{
"t": 101.04,
"utc": "13:22:47.577",
"t": 90.68,
"utc": "13:56:29.384",
"step": "unexpected exception -> processing_failed -> retry -> ready",
"attachment_id": "8fbaeec2-25eb-40a3-9a33-308326d803c2",
"retry_error_codes": [
"processing_failed"
],
"seconds_to_ready": 1.24,
"events": [
"enqueued",
"claimed",
"retry_scheduled",
"claimed",
"ready",
"staging_deleted"
],
"invariants": {
"variants": [
"crop",
"optimized",
"thumbnail"
],
"variants_ok": true,
"final_objects": 4,
"final_objects_ok": true,
"staging_left": false,
"job_status": "ready",
"attempt": 2
}
},
{
"t": 107.92,
"utc": "13:56:46.618",
"step": "transient-always: failed after max attempts",
"error_code": "retry_exhausted",
"attempts": 5,
"content": 409,
"attach": 409,
"registry_entry": {
"attachment_id": "8a6dc0d1-e4eb-4187-9618-09148e913ebc",
"job_id": "1a212af1-07fd-4afe-a5bd-4342839a3e8e",
"attachment_id": "8120ba5a-baa5-40d6-bb68-4f6913dacbb7",
"job_id": "ecb422b5-b84b-43eb-9d5d-5d064612970d",
"error_code": "retry_exhausted",
"attempt": 5,
"max_attempts": 5,
"replay_count": 0,
"last_error": "last error: storage_unavailable injected transient error",
"updated_at": "2026-11-13T13:22:45.859850Z",
"updated_at": "2026-11-13T13:56:44.554290Z",
"replayable": true
}
},
{
"t": 104.53,
"utc": "13:22:51.067",
"t": 111.66,
"utc": "13:56:50.361",
"step": "replay -> ready; replay of ready refused",
"attachment_id": "8a6dc0d1-e4eb-4187-9618-09148e913ebc",
"attachment_id": "8120ba5a-baa5-40d6-bb68-4f6913dacbb7",
"dry_run": "would_replay",
"replay": "replayed",
"second_replay": "refused_status_ready",
@@ -198,10 +229,10 @@
}
},
{
"t": 113.33,
"utc": "13:22:59.866",
"t": 121.03,
"utc": "13:56:59.727",
"step": "tampered staging -> failed without retries",
"attachment_id": "dddc059c-a98e-4150-b866-dbdbfeb875f2",
"attachment_id": "d098c501-ff73-4036-a5c7-60302e9e450b",
"error_code": "staging_corrupted",
"attempts": 1,
"events": [
@@ -211,8 +242,8 @@
]
},
{
"t": 125.06,
"utc": "13:23:11.590",
"t": 129.39,
"utc": "13:57:08.092",
"step": "poison message dead-lettered and purged",
"dlq_before": 0,
"dlq_after_publish": 1,
@@ -230,14 +261,14 @@
"dlq_after_purge": 0
},
{
"t": 131.72,
"utc": "13:23:18.259",
"t": 136.41,
"utc": "13:57:15.109",
"step": "workers restored to .env configuration"
}
],
"results": {
"crash-after-claim": {
"attachment_id": "93dccce9-b04b-4317-a72e-68f43e719634",
"attachment_id": "033b0e03-a599-4110-937e-6a37c45c41e7",
"events": [
"enqueued",
"claimed",
@@ -264,7 +295,7 @@
}
},
"crash-after-s3-put": {
"attachment_id": "da8e1461-70e0-431d-81da-d993cca01288",
"attachment_id": "69421764-cfd2-48ef-8dc1-097399edb0b8",
"events": [
"enqueued",
"claimed",
@@ -291,7 +322,7 @@
}
},
"crash-after-commit": {
"attachment_id": "1379cce6-0c65-40cf-a575-61a7f643ea07",
"attachment_id": "3a9afd6b-4e6d-46bd-8d25-bfd3b7e225a0",
"events": [
"enqueued",
"claimed",
@@ -315,10 +346,10 @@
}
},
"transient-2": {
"attachment_id": "58756a3d-8bb3-4aad-bb47-f1b4c4b0696e",
"attachment_id": "d4e7f4b2-faeb-449c-94a1-edd75e1b0bd3",
"delays": [
0.952,
1.513
0.941,
1.489
],
"bounds": [
[
@@ -331,9 +362,9 @@
]
],
"claims_at": [
"2026-11-13T13:22:27.471179Z",
"2026-11-13T13:22:28.490332Z",
"2026-11-13T13:22:30.531633Z"
"2026-11-13T13:56:22.965351Z",
"2026-11-13T13:56:23.984778Z",
"2026-11-13T13:56:26.030551Z"
],
"invariants": {
"variants": [
@@ -349,8 +380,36 @@
"attempt": 3
}
},
"bug": {
"attachment_id": "8fbaeec2-25eb-40a3-9a33-308326d803c2",
"retry_error_codes": [
"processing_failed"
],
"seconds_to_ready": 1.24,
"events": [
"enqueued",
"claimed",
"retry_scheduled",
"claimed",
"ready",
"staging_deleted"
],
"invariants": {
"variants": [
"crop",
"optimized",
"thumbnail"
],
"variants_ok": true,
"final_objects": 4,
"final_objects_ok": true,
"staging_left": false,
"job_status": "ready",
"attempt": 2
}
},
"transient-always+replay": {
"attachment_id": "8a6dc0d1-e4eb-4187-9618-09148e913ebc",
"attachment_id": "8120ba5a-baa5-40d6-bb68-4f6913dacbb7",
"dry_run": "would_replay",
"replay": "replayed",
"second_replay": "refused_status_ready",
@@ -387,7 +446,7 @@
}
},
"staging-tamper": {
"attachment_id": "dddc059c-a98e-4150-b866-dbdbfeb875f2",
"attachment_id": "d098c501-ff73-4036-a5c7-60302e9e450b",
"error_code": "staging_corrupted",
"attempts": 1,
"events": [
+13 -12
View File
@@ -1,14 +1,15 @@
# 2026-11-13T13:21:06Z python3 student-tests/worker_faults.py --output evidence/worker-faults.json
[ 7.26s] workers recreated with fault injection {"env": {"WORKER_FAULT_INJECTION": "1", "JOB_RETRY_BASE_SECONDS": "1", "JOB_RETRY_MAX_SECONDS": "8"}}
[ 40.75s] crash-after-claim {"events": ["enqueued", "claimed", "fault_injected", "busy_ignored", "lease_expired", "requeued_after_lease", "claimed", "ready", "staging_deleted"], "invariants": {"variants": ["crop", "optimized", "thumbnail"], "variants_ok": true, "final_objects": 4, "final_objects_ok": true, "staging_left": false, "job_status": "ready", "attempt": 2}}
[ 76.10s] crash-after-s3-put {"events": ["enqueued", "claimed", "fault_injected", "busy_ignored", "lease_expired", "requeued_after_lease", "claimed", "ready", "staging_deleted"], "invariants": {"variants": ["crop", "optimized", "thumbnail"], "variants_ok": true, "final_objects": 4, "final_objects_ok": true, "staging_left": false, "job_status": "ready", "attempt": 2}}
[ 80.78s] crash-after-commit {"events": ["enqueued", "claimed", "ready", "fault_injected", "duplicate_ignored", "staging_deleted"], "invariants": {"variants": ["crop", "optimized", "thumbnail"], "variants_ok": true, "final_objects": 4, "final_objects_ok": true, "staging_left": false, "job_status": "ready", "attempt": 1}}
[ 80.92s] worker containers after crashes (restart: unless-stopped) {"containers": ["/mtusi-lab5-worker-1 1 running", "/mtusi-lab5-worker-2 2 running"]}
[ 85.17s] transient-2: retried with backoff {"delays": [0.952, 1.513], "bounds": [[0.5, 1], [1.0, 2]], "invariants": {"variants": ["crop", "optimized", "thumbnail"], "variants_ok": true, "final_objects": 4, "final_objects_ok": true, "staging_left": false, "job_status": "ready", "attempt": 3}}
[ 101.04s] transient-always: failed after max attempts {"error_code": "retry_exhausted", "attempts": 5, "content": 409, "attach": 409, "registry_entry": {"attachment_id": "8a6dc0d1-e4eb-4187-9618-09148e913ebc", "job_id": "1a212af1-07fd-4afe-a5bd-4342839a3e8e", "error_code": "retry_exhausted", "attempt": 5, "max_attempts": 5, "replay_count": 0, "last_error": "last error: storage_unavailable injected transient error", "updated_at": "2026-11-13T13:22:45.859850Z", "replayable": true}}
[ 104.53s] replay -> ready; replay of ready refused {"attachment_id": "8a6dc0d1-e4eb-4187-9618-09148e913ebc", "dry_run": "would_replay", "replay": "replayed", "second_replay": "refused_status_ready", "replay_count": 1, "events": ["enqueued", "claimed", "retry_scheduled", "claimed", "retry_scheduled", "claimed", "retry_scheduled", "claimed", "retry_scheduled", "claimed", "failed", "replayed", "claimed", "ready", "staging_deleted"], "invariants": {"variants": ["crop", "optimized", "thumbnail"], "variants_ok": true, "final_objects": 4, "final_objects_ok": true, "staging_left": false, "job_status": "ready", "attempt": 6}}
[ 113.33s] tampered staging -> failed without retries {"attachment_id": "dddc059c-a98e-4150-b866-dbdbfeb875f2", "error_code": "staging_corrupted", "attempts": 1, "events": ["enqueued", "claimed", "failed"]}
[ 125.06s] poison message dead-lettered and purged {"dlq_before": 0, "dlq_after_publish": 1, "listed": [{"reason": "rejected", "delivery_count": 1, "action": "kept", "invalid": "extra fields"}], "purged": ["purged_invalid"], "dlq_after_purge": 0}
[ 131.72s] workers restored to .env configuration
# 2026-11-13T13:54:58Z python3 student-tests/worker_faults.py --output evidence/worker-faults.json
[ 7.43s] workers recreated with fault injection {"env": {"WORKER_FAULT_INJECTION": "1", "JOB_RETRY_BASE_SECONDS": "1", "JOB_RETRY_MAX_SECONDS": "8"}}
[ 43.87s] crash-after-claim {"events": ["enqueued", "claimed", "fault_injected", "busy_ignored", "lease_expired", "requeued_after_lease", "claimed", "ready", "staging_deleted"], "invariants": {"variants": ["crop", "optimized", "thumbnail"], "variants_ok": true, "final_objects": 4, "final_objects_ok": true, "staging_left": false, "job_status": "ready", "attempt": 2}}
[ 79.44s] crash-after-s3-put {"events": ["enqueued", "claimed", "fault_injected", "busy_ignored", "lease_expired", "requeued_after_lease", "claimed", "ready", "staging_deleted"], "invariants": {"variants": ["crop", "optimized", "thumbnail"], "variants_ok": true, "final_objects": 4, "final_objects_ok": true, "staging_left": false, "job_status": "ready", "attempt": 2}}
[ 84.10s] crash-after-commit {"events": ["enqueued", "claimed", "ready", "fault_injected", "duplicate_ignored", "staging_deleted"], "invariants": {"variants": ["crop", "optimized", "thumbnail"], "variants_ok": true, "final_objects": 4, "final_objects_ok": true, "staging_left": false, "job_status": "ready", "attempt": 1}}
[ 84.24s] worker containers after crashes (restart: unless-stopped) {"containers": ["/mtusi-lab5-fresh-worker-1 2 running", "/mtusi-lab5-fresh-worker-2 1 running"]}
[ 88.58s] transient-2: retried with backoff {"delays": [0.941, 1.489], "bounds": [[0.5, 1], [1.0, 2]], "invariants": {"variants": ["crop", "optimized", "thumbnail"], "variants_ok": true, "final_objects": 4, "final_objects_ok": true, "staging_left": false, "job_status": "ready", "attempt": 3}}
[ 90.68s] unexpected exception -> processing_failed -> retry -> ready {"attachment_id": "8fbaeec2-25eb-40a3-9a33-308326d803c2", "retry_error_codes": ["processing_failed"], "seconds_to_ready": 1.24, "events": ["enqueued", "claimed", "retry_scheduled", "claimed", "ready", "staging_deleted"], "invariants": {"variants": ["crop", "optimized", "thumbnail"], "variants_ok": true, "final_objects": 4, "final_objects_ok": true, "staging_left": false, "job_status": "ready", "attempt": 2}}
[ 107.92s] transient-always: failed after max attempts {"error_code": "retry_exhausted", "attempts": 5, "content": 409, "attach": 409, "registry_entry": {"attachment_id": "8120ba5a-baa5-40d6-bb68-4f6913dacbb7", "job_id": "ecb422b5-b84b-43eb-9d5d-5d064612970d", "error_code": "retry_exhausted", "attempt": 5, "max_attempts": 5, "replay_count": 0, "last_error": "last error: storage_unavailable injected transient error", "updated_at": "2026-11-13T13:56:44.554290Z", "replayable": true}}
[ 111.66s] replay -> ready; replay of ready refused {"attachment_id": "8120ba5a-baa5-40d6-bb68-4f6913dacbb7", "dry_run": "would_replay", "replay": "replayed", "second_replay": "refused_status_ready", "replay_count": 1, "events": ["enqueued", "claimed", "retry_scheduled", "claimed", "retry_scheduled", "claimed", "retry_scheduled", "claimed", "retry_scheduled", "claimed", "failed", "replayed", "claimed", "ready", "staging_deleted"], "invariants": {"variants": ["crop", "optimized", "thumbnail"], "variants_ok": true, "final_objects": 4, "final_objects_ok": true, "staging_left": false, "job_status": "ready", "attempt": 6}}
[ 121.03s] tampered staging -> failed without retries {"attachment_id": "d098c501-ff73-4036-a5c7-60302e9e450b", "error_code": "staging_corrupted", "attempts": 1, "events": ["enqueued", "claimed", "failed"]}
[ 129.39s] poison message dead-lettered and purged {"dlq_before": 0, "dlq_after_publish": 1, "listed": [{"reason": "rejected", "delivery_count": 1, "action": "kept", "invalid": "extra fields"}], "purged": ["purged_invalid"], "dlq_after_purge": 0}
[ 136.41s] workers restored to .env configuration
PASS: worker crashes, backoff, retry_exhausted -> replay, staging tamper, DLQ
exit=0
+40 -40
View File
@@ -1,24 +1,24 @@
{
"scenario": "worker outage -> restart api+broker -> worker start -> ready -> redelivery",
"date_utc": "2026-11-13T13:20:54+00:00",
"date_utc": "2026-11-13T13:54:46+00:00",
"steps": [
{
"t": 1.69,
"utc": "13:20:27.997",
"t": 1.33,
"utc": "13:54:22.424",
"step": "worker stopped",
"running": []
},
{
"t": 2.72,
"utc": "13:20:29.021",
"t": 1.78,
"utc": "13:54:22.879",
"step": "upload while worker is down",
"http": 202,
"attachment_id": "d5d38cb6-d3e7-424b-8dc6-33270c9df865",
"attachment_id": "e6ed01be-52e1-4460-8858-b9eef348be70",
"status": "queued"
},
{
"t": 2.72,
"utc": "13:20:29.031",
"t": 1.79,
"utc": "13:54:22.887",
"step": "metadata and content while queued",
"status": "queued",
"content": 409,
@@ -26,15 +26,15 @@
"error_code": "conflict"
},
{
"t": 2.73,
"utc": "13:20:29.041",
"t": 1.8,
"utc": "13:54:22.894",
"step": "messages while worker is down",
"with_queued_attachment": true,
"plain_message_id": "10afa020-6afb-4516-853f-2254f37ed7c7"
"plain_message_id": "f3001283-548f-4489-83de-615141cd549a"
},
{
"t": 6.56,
"utc": "13:20:32.862",
"t": 4.18,
"utc": "13:54:25.271",
"step": "job is durable in broker",
"queue": {
"messages": 1,
@@ -43,18 +43,18 @@
"consumers": 0
},
"outbox_published": true,
"job_id": "41ad5bea-d05d-42b4-a450-d47690ef998c",
"job_id": "819863af-2d27-4892-9716-57aab92180c6",
"job_status": "queued"
},
{
"t": 16.02,
"utc": "13:20:42.330",
"t": 13.09,
"utc": "13:54:34.184",
"step": "api restarted",
"status": "queued"
},
{
"t": 21.07,
"utc": "13:20:47.381",
"t": 18.16,
"utc": "13:54:39.258",
"step": "broker restarted with volume",
"queue": {
"messages": 1,
@@ -65,13 +65,13 @@
"status": "queued"
},
{
"t": 26.86,
"utc": "13:20:53.167",
"t": 23.99,
"utc": "13:54:45.086",
"step": "worker started"
},
{
"t": 26.89,
"utc": "13:20:53.196",
"t": 24.02,
"utc": "13:54:45.115",
"step": "ready after worker start",
"variants": [
[
@@ -94,8 +94,8 @@
"thumbnail_bytes": 4679
},
{
"t": 28.47,
"utc": "13:20:54.779",
"t": 25.72,
"utc": "13:54:46.813",
"step": "redelivery of the same job is a no-op",
"events": [
"enqueued",
@@ -119,33 +119,33 @@
}
}
],
"attachment_id": "d5d38cb6-d3e7-424b-8dc6-33270c9df865",
"job_id": "41ad5bea-d05d-42b4-a450-d47690ef998c",
"attachment_id": "e6ed01be-52e1-4460-8858-b9eef348be70",
"job_id": "819863af-2d27-4892-9716-57aab92180c6",
"events": [
{
"job_id": "41ad5bea-d05d-42b4-a450-d47690ef998c",
"at": "2026-11-13T13:20:29.018662Z",
"job_id": "819863af-2d27-4892-9716-57aab92180c6",
"at": "2026-11-13T13:54:22.876280Z",
"event": "enqueued",
"attempt": 1,
"actor": "api",
"detail": null
},
{
"job_id": "41ad5bea-d05d-42b4-a450-d47690ef998c",
"at": "2026-11-13T13:20:47.938036Z",
"job_id": "819863af-2d27-4892-9716-57aab92180c6",
"at": "2026-11-13T13:54:39.862578Z",
"event": "claimed",
"attempt": 1,
"actor": "c2f424ff165b:fa6a01e0",
"actor": "3ecc0795d2da:873f888f",
"detail": {
"redelivered_message_attempt": 1
}
},
{
"job_id": "41ad5bea-d05d-42b4-a450-d47690ef998c",
"at": "2026-11-13T13:20:48.074885Z",
"job_id": "819863af-2d27-4892-9716-57aab92180c6",
"at": "2026-11-13T13:54:40.000589Z",
"event": "ready",
"attempt": 1,
"actor": "c2f424ff165b:fa6a01e0",
"actor": "3ecc0795d2da:873f888f",
"detail": {
"variants": {
"crop": [
@@ -164,19 +164,19 @@
}
},
{
"job_id": "41ad5bea-d05d-42b4-a450-d47690ef998c",
"at": "2026-11-13T13:20:48.076077Z",
"job_id": "819863af-2d27-4892-9716-57aab92180c6",
"at": "2026-11-13T13:54:40.001908Z",
"event": "staging_deleted",
"attempt": 1,
"actor": "c2f424ff165b:fa6a01e0",
"actor": "3ecc0795d2da:873f888f",
"detail": null
},
{
"job_id": "41ad5bea-d05d-42b4-a450-d47690ef998c",
"at": "2026-11-13T13:20:53.879984Z",
"job_id": "819863af-2d27-4892-9716-57aab92180c6",
"at": "2026-11-13T13:54:45.844562Z",
"event": "duplicate_ignored",
"attempt": 1,
"actor": "c2f424ff165b:fa6a01e0",
"actor": "3ecc0795d2da:873f888f",
"detail": {
"status": "ready"
}
+11 -11
View File
@@ -1,13 +1,13 @@
# 2026-11-13T13:20:26Z python3 student-tests/worker_outage.py --output evidence/worker-outage.json
[ 1.69s] worker stopped {"running": []}
[ 2.72s] upload while worker is down {"http": 202, "attachment_id": "d5d38cb6-d3e7-424b-8dc6-33270c9df865", "status": "queued"}
[ 2.72s] metadata and content while queued {"status": "queued", "content": 409, "thumbnail": 409, "error_code": "conflict"}
[ 2.73s] messages while worker is down {"with_queued_attachment": true, "plain_message_id": "10afa020-6afb-4516-853f-2254f37ed7c7"}
[ 6.56s] job is durable in broker {"queue": {"messages": 1, "messages_ready": 1, "messages_unacknowledged": 0, "consumers": 0}, "outbox_published": true, "job_id": "41ad5bea-d05d-42b4-a450-d47690ef998c", "job_status": "queued"}
[ 16.02s] api restarted {"status": "queued"}
[ 21.07s] broker restarted with volume {"queue": {"messages": 1, "messages_ready": 1, "messages_unacknowledged": 0, "consumers": 0}, "status": "queued"}
[ 26.86s] worker started
[ 26.89s] ready after worker start {"variants": [["thumbnail", 256, 160], ["crop", 128, 128], ["optimized", 320, 200]], "original_sha256_ok": true, "thumbnail_bytes": 4679}
[ 28.47s] redelivery of the same job is a no-op {"events": ["enqueued", "claimed", "ready", "staging_deleted", "duplicate_ignored"], "invariants": {"variants": ["crop", "optimized", "thumbnail"], "variants_ok": true, "final_objects": 4, "final_objects_ok": true, "staging_left": false, "job_status": "ready", "attempt": 1}}
# 2026-11-13T13:54:21Z python3 student-tests/worker_outage.py --output evidence/worker-outage.json
[ 1.33s] worker stopped {"running": []}
[ 1.78s] upload while worker is down {"http": 202, "attachment_id": "e6ed01be-52e1-4460-8858-b9eef348be70", "status": "queued"}
[ 1.79s] metadata and content while queued {"status": "queued", "content": 409, "thumbnail": 409, "error_code": "conflict"}
[ 1.80s] messages while worker is down {"with_queued_attachment": true, "plain_message_id": "f3001283-548f-4489-83de-615141cd549a"}
[ 4.18s] job is durable in broker {"queue": {"messages": 1, "messages_ready": 1, "messages_unacknowledged": 0, "consumers": 0}, "outbox_published": true, "job_id": "819863af-2d27-4892-9716-57aab92180c6", "job_status": "queued"}
[ 13.09s] api restarted {"status": "queued"}
[ 18.16s] broker restarted with volume {"queue": {"messages": 1, "messages_ready": 1, "messages_unacknowledged": 0, "consumers": 0}, "status": "queued"}
[ 23.99s] worker started
[ 24.02s] ready after worker start {"variants": [["thumbnail", 256, 160], ["crop", 128, 128], ["optimized", 320, 200]], "original_sha256_ok": true, "thumbnail_bytes": 4679}
[ 25.72s] redelivery of the same job is a no-op {"events": ["enqueued", "claimed", "ready", "staging_deleted", "duplicate_ignored"], "invariants": {"variants": ["crop", "optimized", "thumbnail"], "variants_ok": true, "final_objects": 4, "final_objects_ok": true, "staging_left": false, "job_status": "ready", "attempt": 1}}
PASS: worker outage, api+broker restart, ready, duplicate delivery no-op
exit=0