This commit is contained in:
Боцоев Арсен
2026-11-20 03:54:07 +03:00
parent 276dbdad8a
commit 040e50e84f
75 changed files with 5267 additions and 63 deletions
-5
View File
@@ -1,5 +0,0 @@
# Доказательства
Храните небольшие обезличенные результаты: команды и stdout проверок, JSON/CSV агрегатов нагрузки, EXPLAIN, dashboard JSON, текст разбора отказа. Укажите дату, commit, аппаратные лимиты и профиль нагрузки.
Не добавляйте .env, session tokens, cookies, приватные ключи, credentials, реальные сообщения, raw dumps и signed URLs. Для скриншотов скрывайте секреты. Большие логи/бинарные traces сохраняйте отдельно по правилам преподавателя; одного скриншота без методики недостаточно.
+638
View File
@@ -0,0 +1,638 @@
{
"utc": "2026-11-20T00:21:26.509728+00:00",
"command": "./scripts/check-docker.sh",
"project": "lab5-check-bd0805a78f",
"host": "Linux x86_64",
"configuration": {
"concurrency": 2,
"prefetch": 1,
"attempts": 5,
"timeout_seconds": 5,
"lease_seconds": 15,
"backoff_base_seconds": 0.15
},
"checks": {
"topology_and_limits": {
"passed": true,
"api_replicas": 2,
"broker": "Valkey Streams with AOF fsync always",
"worker_processes": 2
},
"public_smoke_and_schema": {
"passed": true
},
"student_api_regressions": {
"passed": true
},
"worker_offline_api_broker_restart": {
"passed": true,
"attachment_id": "4c51cf44-6898-4240-9c22-a0f15352e869",
"job_id": "5719824c-a84e-4db3-937a-d2cbe8274cf2",
"message_id": "7e5b29ce-7c46-4321-a8d9-e09ae2cee87f",
"variants": {
"thumbnail": {
"size": [
256,
160
],
"bytes": 5813
},
"crop": {
"size": [
128,
128
],
"bytes": 2462
},
"optimized": {
"size": [
320,
200
],
"bytes": 2462
}
}
},
"outbox_crash_before_publish": {
"passed": true,
"job_id": "30d9ab52-afa8-4956-aec5-2e5d140120f5",
"automatic_recovery": true
},
"outbox_crash_after_publish": {
"passed": true,
"job_id": "5f3b1b2e-79aa-40b7-a8e4-9c020b007ecf",
"automatic_recovery": true
},
"worker_crash_after_objects": {
"passed": true,
"job_id": "8b75ec40-a4e6-4e74-a3e6-a9e4fd0e518e",
"attempt": 2,
"canonical_objects": 4,
"duplicate_noop": true
},
"worker_crash_before_ack": {
"passed": true,
"job_id": "86b7214f-3c97-4128-bc01-912156c85826",
"attempt": 1,
"canonical_objects": 4,
"duplicate_noop": true
},
"bounded_retry_failed_registry_replay": {
"passed": true,
"job_id": "ed73f78e-e6c3-45b9-b4da-128ac04dca6e",
"max_automatic_attempts": 5,
"audit": [
{
"event": "processing",
"attempt": 1,
"error_code": null,
"at": "2026-11-20T00:24:23.042915+00:00"
},
{
"event": "retry",
"attempt": 1,
"error_code": "storage_unavailable",
"at": "2026-11-20T00:24:23.049649+00:00"
},
{
"event": "processing",
"attempt": 2,
"error_code": null,
"at": "2026-11-20T00:24:23.312109+00:00"
},
{
"event": "retry",
"attempt": 2,
"error_code": "storage_unavailable",
"at": "2026-11-20T00:24:23.316742+00:00"
},
{
"event": "processing",
"attempt": 3,
"error_code": null,
"at": "2026-11-20T00:24:23.578774+00:00"
},
{
"event": "retry",
"attempt": 3,
"error_code": "storage_unavailable",
"at": "2026-11-20T00:24:23.583937+00:00"
},
{
"event": "processing",
"attempt": 4,
"error_code": null,
"at": "2026-11-20T00:24:24.095429+00:00"
},
{
"event": "retry",
"attempt": 4,
"error_code": "storage_unavailable",
"at": "2026-11-20T00:24:24.100589+00:00"
},
{
"event": "processing",
"attempt": 5,
"error_code": null,
"at": "2026-11-20T00:24:25.629341+00:00"
},
{
"event": "failed",
"attempt": 5,
"error_code": "retry_exhausted",
"at": "2026-11-20T00:24:25.63416+00:00"
},
{
"event": "operator_replay",
"attempt": 5,
"error_code": null,
"at": "2026-11-20T00:24:27.953278+00:00"
},
{
"event": "processing",
"attempt": 6,
"error_code": null,
"at": "2026-11-20T00:24:28.171185+00:00"
},
{
"event": "ready",
"attempt": 6,
"error_code": null,
"at": "2026-11-20T00:24:29.059902+00:00"
}
],
"ready_replay_rejected": true
},
"permanent_error": {
"passed": true,
"job_id": "f9736cf9-4d14-43f0-85a6-881fbb10fb9d",
"attempt": 1,
"error_code": "invalid_image"
},
"image_subprocess_timeout": {
"passed": true,
"job_id": "b17706d1-e8df-4ef9-a96a-2c6be51dd411",
"timeout_seconds": 5,
"task_memory_mb": 640,
"recovered": true
},
"image_subprocess_memory": {
"passed": true,
"job_id": "1e17f7c2-c00f-410a-84d4-1313cf3e1bf0",
"timeout_seconds": 5,
"task_memory_mb": 640,
"recovered": true
},
"image_semantics": {
"passed": true,
"cases": [
{
"case": "small_alpha_on_white",
"variants": {
"thumbnail": {
"size": [
17,
9
],
"bytes": 635
},
"crop": {
"size": [
128,
128
],
"bytes": 883
},
"optimized": {
"size": [
17,
9
],
"bytes": 56
}
}
},
{
"case": "exif_orientation_6_and_floor",
"variants": {
"thumbnail": {
"size": [
160,
256
],
"bytes": 1270
},
"crop": {
"size": [
128,
128
],
"bytes": 886
},
"optimized": {
"size": [
201,
321
],
"bytes": 210
}
}
}
]
},
"staging_cleanup": {
"passed": true,
"active_preserved": true,
"orphan_removed": true,
"ready_removed": true,
"expired_failed_removed": true,
"expired_replay_rejected": true
},
"broker_offline_outbox": {
"passed": true,
"attachment_id": "ee6d44f4-b97e-4e44-abe8-b1f9c3e8dbb0",
"recovered": true
},
"public_persistence": {
"passed": true,
"restart_proof": {
"passed": true,
"before": {
"b2f0aa3f5609d54ba25dd86e41e94b3396949b085fe119cad4e1e656e767f659": {
"service": "api",
"started_at": "2026-11-20T00:22:33.628310694Z",
"volumes": []
},
"b37c72870c1b4aeb37ce44947a0c8f11d69b387d850fe447d9f0c884d04e93fb": {
"service": "api",
"started_at": "2026-11-20T00:22:33.577007301Z",
"volumes": []
},
"0e148dc6d006ebfcc2331923da7808285925e7befba956f8f0ae570ce456cf82": {
"service": "broker",
"started_at": "2026-11-20T00:25:41.495493111Z",
"volumes": [
"lab5-check-bd0805a78f_broker_data"
]
},
"981ee5e5bfeb7b384ebd5c5cf4c60698436c2775a469089e42da7687f7ee6a84": {
"service": "cleanup",
"started_at": "2026-11-20T00:21:52.360111834Z",
"volumes": []
},
"5313ce57eb20a60d10f3fba41f6c5efcf8694a7af9d1f64bea67ae73bad2af2c": {
"service": "lb",
"started_at": "2026-11-20T00:21:58.544867993Z",
"volumes": []
},
"aa66f664069f42f7b04b4836d2ebe0e28b5de628c444c7a6e2b0bb373fa0ffbf": {
"service": "postgres",
"started_at": "2026-11-20T00:21:30.435939794Z",
"volumes": [
"lab5-check-bd0805a78f_postgres_data"
]
},
"bee2cce77bd237c4b85d2425628ff9cebab07da7a80d431006801abae76d8410": {
"service": "publisher",
"started_at": "2026-11-20T00:25:02.552679256Z",
"volumes": []
},
"ec8fb5aa7f2c60d36b5481e3629cc6f7636f45ea2e79746b53ea98084fa81ee1": {
"service": "s3",
"started_at": "2026-11-20T00:21:47.692751395Z",
"volumes": [
"b093ad7481ba5341b0ff7ba889b83214cbcde32c2e0d26489b409be7d7692b74"
]
},
"05a16d6b0da331ce0e0ef05f3211bd2f1c3291ef64861867dfb69265dde52249": {
"service": "s3-storage",
"started_at": "2026-11-20T00:21:30.420376162Z",
"volumes": [
"lab5-check-bd0805a78f_s3_data"
]
},
"083d15686b5e97157cddde48c5e3bcf8a4bfee1bb5b56c6e5bd5775fa87c3445": {
"service": "valkey",
"started_at": "2026-11-20T00:21:30.441035599Z",
"volumes": [
"lab5-check-bd0805a78f_valkey_data"
]
},
"4b917c98e8eae832c463a5ef0dbf27146fd002c9971197a042d5a5acc7e542bc": {
"service": "worker",
"started_at": "2026-11-20T00:25:34.559868585Z",
"volumes": []
}
},
"after": {
"b2f0aa3f5609d54ba25dd86e41e94b3396949b085fe119cad4e1e656e767f659": {
"service": "api",
"started_at": "2026-11-20T00:25:48.976159307Z",
"volumes": []
},
"b37c72870c1b4aeb37ce44947a0c8f11d69b387d850fe447d9f0c884d04e93fb": {
"service": "api",
"started_at": "2026-11-20T00:25:49.162188375Z",
"volumes": []
},
"0e148dc6d006ebfcc2331923da7808285925e7befba956f8f0ae570ce456cf82": {
"service": "broker",
"started_at": "2026-11-20T00:25:48.521992953Z",
"volumes": [
"lab5-check-bd0805a78f_broker_data"
]
},
"981ee5e5bfeb7b384ebd5c5cf4c60698436c2775a469089e42da7687f7ee6a84": {
"service": "cleanup",
"started_at": "2026-11-20T00:25:56.178707789Z",
"volumes": []
},
"5313ce57eb20a60d10f3fba41f6c5efcf8694a7af9d1f64bea67ae73bad2af2c": {
"service": "lb",
"started_at": "2026-11-20T00:25:48.39855531Z",
"volumes": []
},
"aa66f664069f42f7b04b4836d2ebe0e28b5de628c444c7a6e2b0bb373fa0ffbf": {
"service": "postgres",
"started_at": "2026-11-20T00:25:48.905887512Z",
"volumes": [
"lab5-check-bd0805a78f_postgres_data"
]
},
"bee2cce77bd237c4b85d2425628ff9cebab07da7a80d431006801abae76d8410": {
"service": "publisher",
"started_at": "2026-11-20T00:25:56.263065951Z",
"volumes": []
},
"ec8fb5aa7f2c60d36b5481e3629cc6f7636f45ea2e79746b53ea98084fa81ee1": {
"service": "s3",
"started_at": "2026-11-20T00:25:48.840024888Z",
"volumes": [
"b093ad7481ba5341b0ff7ba889b83214cbcde32c2e0d26489b409be7d7692b74"
]
},
"05a16d6b0da331ce0e0ef05f3211bd2f1c3291ef64861867dfb69265dde52249": {
"service": "s3-storage",
"started_at": "2026-11-20T00:25:48.653173569Z",
"volumes": [
"lab5-check-bd0805a78f_s3_data"
]
},
"083d15686b5e97157cddde48c5e3bcf8a4bfee1bb5b56c6e5bd5775fa87c3445": {
"service": "valkey",
"started_at": "2026-11-20T00:25:48.786838737Z",
"volumes": [
"lab5-check-bd0805a78f_valkey_data"
]
},
"4b917c98e8eae832c463a5ef0dbf27146fd002c9971197a042d5a5acc7e542bc": {
"service": "worker",
"started_at": "2026-11-20T00:25:49.047638975Z",
"volumes": []
}
},
"same_containers_and_volumes": true
}
},
"public_api_failover": {
"passed": true
}
},
"docker": "29.4.2 x86_64 CPUs=16 RAM=8019410944",
"containers": [
{
"id": "b2f0aa3f5609d54ba25dd86e41e94b3396949b085fe119cad4e1e656e767f659",
"service": "api",
"image": "mtusi-messenger:lab5",
"memory_bytes": 402653184,
"nano_cpus": 1000000000,
"mounts": [
{
"destination": "/run/secrets/s3_access_key_id",
"name": null
},
{
"destination": "/run/secrets/s3_secret_access_key",
"name": null
},
{
"destination": "/run/secrets/database_url",
"name": null
},
{
"destination": "/run/secrets/cache_url",
"name": null
}
]
},
{
"id": "b37c72870c1b4aeb37ce44947a0c8f11d69b387d850fe447d9f0c884d04e93fb",
"service": "api",
"image": "mtusi-messenger:lab5",
"memory_bytes": 402653184,
"nano_cpus": 1000000000,
"mounts": [
{
"destination": "/run/secrets/s3_access_key_id",
"name": null
},
{
"destination": "/run/secrets/s3_secret_access_key",
"name": null
},
{
"destination": "/run/secrets/database_url",
"name": null
},
{
"destination": "/run/secrets/cache_url",
"name": null
}
]
},
{
"id": "0e148dc6d006ebfcc2331923da7808285925e7befba956f8f0ae570ce456cf82",
"service": "broker",
"image": "valkey/valkey:8.1.3",
"memory_bytes": 268435456,
"nano_cpus": 500000000,
"mounts": [
{
"destination": "/data",
"name": "lab5-check-bd0805a78f_broker_data"
},
{
"destination": "/run/secrets/broker_password",
"name": null
}
]
},
{
"id": "981ee5e5bfeb7b384ebd5c5cf4c60698436c2775a469089e42da7687f7ee6a84",
"service": "cleanup",
"image": "mtusi-messenger:lab5",
"memory_bytes": 402653184,
"nano_cpus": 1000000000,
"mounts": [
{
"destination": "/run/secrets/database_url",
"name": null
},
{
"destination": "/run/secrets/s3_access_key_id",
"name": null
},
{
"destination": "/run/secrets/s3_secret_access_key",
"name": null
}
]
},
{
"id": "5313ce57eb20a60d10f3fba41f6c5efcf8694a7af9d1f64bea67ae73bad2af2c",
"service": "lb",
"image": "haproxy:3.2.6-alpine",
"memory_bytes": 67108864,
"nano_cpus": 500000000,
"mounts": [
{
"destination": "/usr/local/etc/haproxy/haproxy.cfg",
"name": null
}
]
},
{
"id": "80393c41588911f5f3e50652a3c8016d647f0f4adbae1513662951c00de86f87",
"service": "migrate",
"image": "mtusi-messenger:lab5",
"memory_bytes": 402653184,
"nano_cpus": 1000000000,
"mounts": [
{
"destination": "/run/secrets/database_url",
"name": null
}
]
},
{
"id": "aa66f664069f42f7b04b4836d2ebe0e28b5de628c444c7a6e2b0bb373fa0ffbf",
"service": "postgres",
"image": "postgres:17.6-bookworm",
"memory_bytes": 536870912,
"nano_cpus": 1000000000,
"mounts": [
{
"destination": "/var/lib/postgresql/data",
"name": "lab5-check-bd0805a78f_postgres_data"
},
{
"destination": "/run/secrets/postgres_password",
"name": null
}
]
},
{
"id": "bee2cce77bd237c4b85d2425628ff9cebab07da7a80d431006801abae76d8410",
"service": "publisher",
"image": "mtusi-messenger:lab5",
"memory_bytes": 402653184,
"nano_cpus": 1000000000,
"mounts": [
{
"destination": "/run/secrets/database_url",
"name": null
},
{
"destination": "/run/secrets/broker_url",
"name": null
}
]
},
{
"id": "ec8fb5aa7f2c60d36b5481e3629cc6f7636f45ea2e79746b53ea98084fa81ee1",
"service": "s3",
"image": "chrislusf/seaweedfs:3.85@sha256:49312939c00c01e5ee6afbd7d728b18027821d3764c35a797a72acd4fdf3296a",
"memory_bytes": 268435456,
"nano_cpus": 500000000,
"mounts": [
{
"destination": "/run/secrets/s3_config",
"name": null
},
{
"destination": "/data",
"name": "b093ad7481ba5341b0ff7ba889b83214cbcde32c2e0d26489b409be7d7692b74"
}
]
},
{
"id": "8f8c52e12d7df584330bcc67ffe2726a914cd8d0ec2fb7c2fda7483d505e9357",
"service": "s3-bootstrap",
"image": "mtusi-messenger:lab5",
"memory_bytes": 134217728,
"nano_cpus": 500000000,
"mounts": [
{
"destination": "/run/secrets/s3_root_user",
"name": null
},
{
"destination": "/run/secrets/s3_root_password",
"name": null
}
]
},
{
"id": "05a16d6b0da331ce0e0ef05f3211bd2f1c3291ef64861867dfb69265dde52249",
"service": "s3-storage",
"image": "chrislusf/seaweedfs:3.85@sha256:49312939c00c01e5ee6afbd7d728b18027821d3764c35a797a72acd4fdf3296a",
"memory_bytes": 536870912,
"nano_cpus": 1000000000,
"mounts": [
{
"destination": "/data",
"name": "lab5-check-bd0805a78f_s3_data"
}
]
},
{
"id": "083d15686b5e97157cddde48c5e3bcf8a4bfee1bb5b56c6e5bd5775fa87c3445",
"service": "valkey",
"image": "valkey/valkey:8.1.3",
"memory_bytes": 134217728,
"nano_cpus": 500000000,
"mounts": [
{
"destination": "/data",
"name": "lab5-check-bd0805a78f_valkey_data"
}
]
},
{
"id": "4b917c98e8eae832c463a5ef0dbf27146fd002c9971197a042d5a5acc7e542bc",
"service": "worker",
"image": "mtusi-messenger:lab5",
"memory_bytes": 1610612736,
"nano_cpus": 2000000000,
"mounts": [
{
"destination": "/run/secrets/s3_secret_access_key",
"name": null
},
{
"destination": "/run/secrets/database_url",
"name": null
},
{
"destination": "/run/secrets/broker_url",
"name": null
},
{
"destination": "/run/secrets/s3_access_key_id",
"name": null
}
]
}
],
"passed": true
}
+72
View File
@@ -0,0 +1,72 @@
PASS: topology_and_limits {"api_replicas": 2, "broker": "Valkey Streams with AOF fsync always", "worker_processes": 2}
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested.
PASS: lab5 public API scenario; infrastructure and grading evidence remain separate.
PASS: public_smoke_and_schema {}
PASS: 10 clients sent 100 messages; history contains exactly 100 unique messages.
test_chat_access (test_api.ApiTests.test_chat_access) ... ok
test_chat_pagination_and_cursor_owner (test_api.ApiTests.test_chat_pagination_and_cursor_owner) ... ok
test_cursor_cannot_be_used_for_another_chat_or_changed (test_api.ApiTests.test_cursor_cannot_be_used_for_another_chat_or_changed) ... ok
test_default_page_size (test_api.ApiTests.test_default_page_size) ... ok
test_duplicate_username (test_api.ApiTests.test_duplicate_username) ... ok
test_framework_errors_and_request_ids (test_api.ApiTests.test_framework_errors_and_request_ids) ... ok
test_identification_and_authentication_order (test_api.ApiTests.test_identification_and_authentication_order) ... ok
test_invalid_chat_members (test_api.ApiTests.test_invalid_chat_members) ... ok
test_invalid_chat_title (test_api.ApiTests.test_invalid_chat_title) ... ok
test_invalid_limits_and_cursors (test_api.ApiTests.test_invalid_limits_and_cursors) ... ok
test_invalid_message_fields (test_api.ApiTests.test_invalid_message_fields) ... ok
test_invalid_user_fields (test_api.ApiTests.test_invalid_user_fields) ... ok
test_malformed_json_and_encoding (test_api.ApiTests.test_malformed_json_and_encoding) ... ok
test_message_pagination_and_changing_limit (test_api.ApiTests.test_message_pagination_and_changing_limit) ... ok
test_unicode_and_text_preservation (test_api.ApiTests.test_unicode_and_text_preservation) ... ok
test_wrong_content_type (test_api.ApiTests.test_wrong_content_type) ... ok
test_access_and_authentication (test_attachments.AttachmentTests.test_access_and_authentication) ... ok
test_attachment_only_message_and_other_member (test_attachments.AttachmentTests.test_attachment_only_message_and_other_member) ... ok
test_chunked_limit_without_content_length (test_attachments.AttachmentTests.test_chunked_limit_without_content_length) ... ok
test_content_length_limit_before_body (test_attachments.AttachmentTests.test_content_length_limit_before_body) ... ok
test_corruption_and_mime_spoof (test_attachments.AttachmentTests.test_corruption_and_mime_spoof) ... ok
test_filename_rejected_before_storage (test_attachments.AttachmentTests.test_filename_rejected_before_storage) ... ok
test_foreign_and_unknown_attachment_ids (test_attachments.AttachmentTests.test_foreign_and_unknown_attachment_ids) ... ok
test_idempotency_includes_ordered_attachment_ids (test_attachments.AttachmentTests.test_idempotency_includes_ordered_attachment_ids) ... ok
test_invalid_attachment_lists (test_attachments.AttachmentTests.test_invalid_attachment_lists) ... ok
test_pixel_limit_before_decode (test_attachments.AttachmentTests.test_pixel_limit_before_decode) ... ok
test_png_and_jpeg_originals (test_attachments.AttachmentTests.test_png_and_jpeg_originals) ... ok
test_simultaneous_registration_of_one_username (test_concurrency.ConcurrencyTests.test_simultaneous_registration_of_one_username) ... ok
test_ten_clients_send_one_hundred_messages (test_concurrency.ConcurrencyTests.test_ten_clients_send_one_hundred_messages) ... ok
test_conflict_and_semantic_json_replay (test_idempotency.IdempotencyTests.test_conflict_and_semantic_json_replay) ... ok
test_key_format_and_missing_key (test_idempotency.IdempotencyTests.test_key_format_and_missing_key) ... ok
test_parallel_replay_across_replicas (test_idempotency.IdempotencyTests.test_parallel_replay_across_replicas) ... ok
test_replay_rechecks_session_and_access (test_idempotency.IdempotencyTests.test_replay_rechecks_session_and_access) ... ok
test_scope_is_user_and_chat (test_idempotency.IdempotencyTests.test_scope_is_user_and_chat) ... ok
test_logout_revokes_only_one_session (test_sessions.SessionTests.test_logout_revokes_only_one_session) ... ok
test_password_validation (test_sessions.SessionTests.test_password_validation) ... ok
test_sql_like_message_is_plain_text (test_sessions.SessionTests.test_sql_like_message_is_plain_text) ... ok
test_unicode_password_with_colon_and_private_response (test_sessions.SessionTests.test_unicode_password_with_colon_and_private_response) ... ok
test_wrong_password_and_basic_only_for_login (test_sessions.SessionTests.test_wrong_password_and_basic_only_for_login) ... ok
----------------------------------------------------------------------
Ran 39 tests in 18.829s
OK
PASS: student_api_regressions {}
PASS: worker_offline_api_broker_restart {"attachment_id": "4c51cf44-6898-4240-9c22-a0f15352e869", "job_id": "5719824c-a84e-4db3-937a-d2cbe8274cf2", "message_id": "7e5b29ce-7c46-4321-a8d9-e09ae2cee87f", "variants": {"thumbnail": {"size": [256, 160], "bytes": 5813}, "crop": {"size": [128, 128], "bytes": 2462}, "optimized": {"size": [320, 200], "bytes": 2462}}}
PASS: outbox_crash_before_publish {"job_id": "30d9ab52-afa8-4956-aec5-2e5d140120f5", "automatic_recovery": true}
PASS: outbox_crash_after_publish {"job_id": "5f3b1b2e-79aa-40b7-a8e4-9c020b007ecf", "automatic_recovery": true}
PASS: worker_crash_after_objects {"job_id": "8b75ec40-a4e6-4e74-a3e6-a9e4fd0e518e", "attempt": 2, "canonical_objects": 4, "duplicate_noop": true}
PASS: worker_crash_before_ack {"job_id": "86b7214f-3c97-4128-bc01-912156c85826", "attempt": 1, "canonical_objects": 4, "duplicate_noop": true}
PASS: bounded_retry_failed_registry_replay {"job_id": "ed73f78e-e6c3-45b9-b4da-128ac04dca6e", "max_automatic_attempts": 5, "audit": [{"event": "processing", "attempt": 1, "error_code": null, "at": "2026-11-20T00:24:23.042915+00:00"}, {"event": "retry", "attempt": 1, "error_code": "storage_unavailable", "at": "2026-11-20T00:24:23.049649+00:00"}, {"event": "processing", "attempt": 2, "error_code": null, "at": "2026-11-20T00:24:23.312109+00:00"}, {"event": "retry", "attempt": 2, "error_code": "storage_unavailable", "at": "2026-11-20T00:24:23.316742+00:00"}, {"event": "processing", "attempt": 3, "error_code": null, "at": "2026-11-20T00:24:23.578774+00:00"}, {"event": "retry", "attempt": 3, "error_code": "storage_unavailable", "at": "2026-11-20T00:24:23.583937+00:00"}, {"event": "processing", "attempt": 4, "error_code": null, "at": "2026-11-20T00:24:24.095429+00:00"}, {"event": "retry", "attempt": 4, "error_code": "storage_unavailable", "at": "2026-11-20T00:24:24.100589+00:00"}, {"event": "processing", "attempt": 5, "error_code": null, "at": "2026-11-20T00:24:25.629341+00:00"}, {"event": "failed", "attempt": 5, "error_code": "retry_exhausted", "at": "2026-11-20T00:24:25.63416+00:00"}, {"event": "operator_replay", "attempt": 5, "error_code": null, "at": "2026-11-20T00:24:27.953278+00:00"}, {"event": "processing", "attempt": 6, "error_code": null, "at": "2026-11-20T00:24:28.171185+00:00"}, {"event": "ready", "attempt": 6, "error_code": null, "at": "2026-11-20T00:24:29.059902+00:00"}], "ready_replay_rejected": true}
PASS: permanent_error {"job_id": "f9736cf9-4d14-43f0-85a6-881fbb10fb9d", "attempt": 1, "error_code": "invalid_image"}
PASS: image_subprocess_timeout {"job_id": "b17706d1-e8df-4ef9-a96a-2c6be51dd411", "timeout_seconds": 5, "task_memory_mb": 640, "recovered": true}
PASS: image_subprocess_memory {"job_id": "1e17f7c2-c00f-410a-84d4-1313cf3e1bf0", "timeout_seconds": 5, "task_memory_mb": 640, "recovered": true}
PASS: image_semantics {"cases": [{"case": "small_alpha_on_white", "variants": {"thumbnail": {"size": [17, 9], "bytes": 635}, "crop": {"size": [128, 128], "bytes": 883}, "optimized": {"size": [17, 9], "bytes": 56}}}, {"case": "exif_orientation_6_and_floor", "variants": {"thumbnail": {"size": [160, 256], "bytes": 1270}, "crop": {"size": [128, 128], "bytes": 886}, "optimized": {"size": [201, 321], "bytes": 210}}}]}
PASS: staging_cleanup {"active_preserved": true, "orphan_removed": true, "ready_removed": true, "expired_failed_removed": true, "expired_replay_rejected": true}
PASS: broker_offline_outbox {"attachment_id": "ee6d44f4-b97e-4e44-abe8-b1f9c3e8dbb0", "recovered": true}
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
PASS: public_persistence {"restart_proof": {"passed": true, "before": {"b2f0aa3f5609d54ba25dd86e41e94b3396949b085fe119cad4e1e656e767f659": {"service": "api", "started_at": "2026-11-20T00:22:33.628310694Z", "volumes": []}, "b37c72870c1b4aeb37ce44947a0c8f11d69b387d850fe447d9f0c884d04e93fb": {"service": "api", "started_at": "2026-11-20T00:22:33.577007301Z", "volumes": []}, "0e148dc6d006ebfcc2331923da7808285925e7befba956f8f0ae570ce456cf82": {"service": "broker", "started_at": "2026-11-20T00:25:41.495493111Z", "volumes": ["lab5-check-bd0805a78f_broker_data"]}, "981ee5e5bfeb7b384ebd5c5cf4c60698436c2775a469089e42da7687f7ee6a84": {"service": "cleanup", "started_at": "2026-11-20T00:21:52.360111834Z", "volumes": []}, "5313ce57eb20a60d10f3fba41f6c5efcf8694a7af9d1f64bea67ae73bad2af2c": {"service": "lb", "started_at": "2026-11-20T00:21:58.544867993Z", "volumes": []}, "aa66f664069f42f7b04b4836d2ebe0e28b5de628c444c7a6e2b0bb373fa0ffbf": {"service": "postgres", "started_at": "2026-11-20T00:21:30.435939794Z", "volumes": ["lab5-check-bd0805a78f_postgres_data"]}, "bee2cce77bd237c4b85d2425628ff9cebab07da7a80d431006801abae76d8410": {"service": "publisher", "started_at": "2026-11-20T00:25:02.552679256Z", "volumes": []}, "ec8fb5aa7f2c60d36b5481e3629cc6f7636f45ea2e79746b53ea98084fa81ee1": {"service": "s3", "started_at": "2026-11-20T00:21:47.692751395Z", "volumes": ["b093ad7481ba5341b0ff7ba889b83214cbcde32c2e0d26489b409be7d7692b74"]}, "05a16d6b0da331ce0e0ef05f3211bd2f1c3291ef64861867dfb69265dde52249": {"service": "s3-storage", "started_at": "2026-11-20T00:21:30.420376162Z", "volumes": ["lab5-check-bd0805a78f_s3_data"]}, "083d15686b5e97157cddde48c5e3bcf8a4bfee1bb5b56c6e5bd5775fa87c3445": {"service": "valkey", "started_at": "2026-11-20T00:21:30.441035599Z", "volumes": ["lab5-check-bd0805a78f_valkey_data"]}, "4b917c98e8eae832c463a5ef0dbf27146fd002c9971197a042d5a5acc7e542bc": {"service": "worker", "started_at": "2026-11-20T00:25:34.559868585Z", "volumes": []}}, "after": {"b2f0aa3f5609d54ba25dd86e41e94b3396949b085fe119cad4e1e656e767f659": {"service": "api", "started_at": "2026-11-20T00:25:48.976159307Z", "volumes": []}, "b37c72870c1b4aeb37ce44947a0c8f11d69b387d850fe447d9f0c884d04e93fb": {"service": "api", "started_at": "2026-11-20T00:25:49.162188375Z", "volumes": []}, "0e148dc6d006ebfcc2331923da7808285925e7befba956f8f0ae570ce456cf82": {"service": "broker", "started_at": "2026-11-20T00:25:48.521992953Z", "volumes": ["lab5-check-bd0805a78f_broker_data"]}, "981ee5e5bfeb7b384ebd5c5cf4c60698436c2775a469089e42da7687f7ee6a84": {"service": "cleanup", "started_at": "2026-11-20T00:25:56.178707789Z", "volumes": []}, "5313ce57eb20a60d10f3fba41f6c5efcf8694a7af9d1f64bea67ae73bad2af2c": {"service": "lb", "started_at": "2026-11-20T00:25:48.39855531Z", "volumes": []}, "aa66f664069f42f7b04b4836d2ebe0e28b5de628c444c7a6e2b0bb373fa0ffbf": {"service": "postgres", "started_at": "2026-11-20T00:25:48.905887512Z", "volumes": ["lab5-check-bd0805a78f_postgres_data"]}, "bee2cce77bd237c4b85d2425628ff9cebab07da7a80d431006801abae76d8410": {"service": "publisher", "started_at": "2026-11-20T00:25:56.263065951Z", "volumes": []}, "ec8fb5aa7f2c60d36b5481e3629cc6f7636f45ea2e79746b53ea98084fa81ee1": {"service": "s3", "started_at": "2026-11-20T00:25:48.840024888Z", "volumes": ["b093ad7481ba5341b0ff7ba889b83214cbcde32c2e0d26489b409be7d7692b74"]}, "05a16d6b0da331ce0e0ef05f3211bd2f1c3291ef64861867dfb69265dde52249": {"service": "s3-storage", "started_at": "2026-11-20T00:25:48.653173569Z", "volumes": ["lab5-check-bd0805a78f_s3_data"]}, "083d15686b5e97157cddde48c5e3bcf8a4bfee1bb5b56c6e5bd5775fa87c3445": {"service": "valkey", "started_at": "2026-11-20T00:25:48.786838737Z", "volumes": ["lab5-check-bd0805a78f_valkey_data"]}, "4b917c98e8eae832c463a5ef0dbf27146fd002c9971197a042d5a5acc7e542bc": {"service": "worker", "started_at": "2026-11-20T00:25:49.047638975Z", "volumes": []}}, "same_containers_and_volumes": true}}
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 93, "failed_attempts": 1, "first_recovery_seconds": 3.057}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
PASS: public_api_failover {}
PASS: all lab5 grade-4 criteria completed
Removed isolated test stack: lab5-check-bd0805a78f
+140
View File
@@ -0,0 +1,140 @@
{
"utc": "2026-11-20T00:30:20.786033+00:00",
"command": ".venv/bin/python student-tests/verify_restart.py",
"passed": true,
"before": {
"c1a47f7c242fba76cd8575a69f056cc9eec69cc3bb37a43cbc39fdbdc8ae2bd0": {
"service": "api",
"started_at": "2026-11-20T00:30:13.754052816Z",
"volumes": []
},
"f5f4d40f1825f1cbc0ab85ceabe3fa49e57281f5ccad8de1aa1d27a2e99be5d0": {
"service": "api",
"started_at": "2026-11-20T00:30:13.469967795Z",
"volumes": []
},
"397ec69f32a21c4b5c311e97265e5dbe1853cbbc1f56a69c25aefdc91d23f6ea": {
"service": "broker",
"started_at": "2026-11-20T00:29:45.702568194Z",
"volumes": [
"mtusi-lab5_broker_data"
]
},
"2f5c6e59acb63f4a68691ac85ea3408870d46f77057344a69d494d87d07c6dd5": {
"service": "cleanup",
"started_at": "2026-11-20T00:30:13.474659181Z",
"volumes": []
},
"7eb7ecaa385d21b0eddf0d5d1f23d538ae5d096b246a706756b0e29ede24d234": {
"service": "lb",
"started_at": "2026-11-20T00:30:19.543902267Z",
"volumes": []
},
"ad6aeb4c4cbe70b98b3107155dcfac142e97c28261d7f54cd274d0d2a15b21d1": {
"service": "postgres",
"started_at": "2026-11-20T00:29:45.693920871Z",
"volumes": [
"mtusi-lab5_postgres_data"
]
},
"2c516dd4f42c9e377fea4228cbc41b8c85755c538642a7bf713240dade50cff2": {
"service": "publisher",
"started_at": "2026-11-20T00:29:49.771537387Z",
"volumes": []
},
"e7bf24976e31f738a983f432ad6b9f0abefe58304ad41cb160993fd97cf7d775": {
"service": "s3",
"started_at": "2026-11-20T00:30:08.986441156Z",
"volumes": [
"a6752faadf632c8bb89d3a9570596e668e6ee1c354c25580f05135bcbc20d7f8"
]
},
"4fb895108b76650d6388f3cb9049bef57b6df157dfa896316afcfe3b17283b07": {
"service": "s3-storage",
"started_at": "2026-11-20T00:29:45.705445868Z",
"volumes": [
"mtusi-lab5_s3_data"
]
},
"211f7a3f1582672348c727715263476303c142a840689c9abf4bfdeab53bb1db": {
"service": "valkey",
"started_at": "2026-11-20T00:29:45.689991334Z",
"volumes": [
"mtusi-lab5_valkey_data"
]
},
"40993aae81a431229de4bd71ed6e6f81f280be71a6b767a1c390b99358b8cbb3": {
"service": "worker",
"started_at": "2026-11-20T00:30:13.468182286Z",
"volumes": []
}
},
"after": {
"c1a47f7c242fba76cd8575a69f056cc9eec69cc3bb37a43cbc39fdbdc8ae2bd0": {
"service": "api",
"started_at": "2026-11-20T00:30:24.742088532Z",
"volumes": []
},
"f5f4d40f1825f1cbc0ab85ceabe3fa49e57281f5ccad8de1aa1d27a2e99be5d0": {
"service": "api",
"started_at": "2026-11-20T00:30:24.921707575Z",
"volumes": []
},
"397ec69f32a21c4b5c311e97265e5dbe1853cbbc1f56a69c25aefdc91d23f6ea": {
"service": "broker",
"started_at": "2026-11-20T00:30:24.402206738Z",
"volumes": [
"mtusi-lab5_broker_data"
]
},
"2f5c6e59acb63f4a68691ac85ea3408870d46f77057344a69d494d87d07c6dd5": {
"service": "cleanup",
"started_at": "2026-11-20T00:30:31.731986363Z",
"volumes": []
},
"7eb7ecaa385d21b0eddf0d5d1f23d538ae5d096b246a706756b0e29ede24d234": {
"service": "lb",
"started_at": "2026-11-20T00:30:23.935196727Z",
"volumes": []
},
"ad6aeb4c4cbe70b98b3107155dcfac142e97c28261d7f54cd274d0d2a15b21d1": {
"service": "postgres",
"started_at": "2026-11-20T00:30:24.483058708Z",
"volumes": [
"mtusi-lab5_postgres_data"
]
},
"2c516dd4f42c9e377fea4228cbc41b8c85755c538642a7bf713240dade50cff2": {
"service": "publisher",
"started_at": "2026-11-20T00:30:31.781060597Z",
"volumes": []
},
"e7bf24976e31f738a983f432ad6b9f0abefe58304ad41cb160993fd97cf7d775": {
"service": "s3",
"started_at": "2026-11-20T00:30:24.831295416Z",
"volumes": [
"a6752faadf632c8bb89d3a9570596e668e6ee1c354c25580f05135bcbc20d7f8"
]
},
"4fb895108b76650d6388f3cb9049bef57b6df157dfa896316afcfe3b17283b07": {
"service": "s3-storage",
"started_at": "2026-11-20T00:30:24.576257538Z",
"volumes": [
"mtusi-lab5_s3_data"
]
},
"211f7a3f1582672348c727715263476303c142a840689c9abf4bfdeab53bb1db": {
"service": "valkey",
"started_at": "2026-11-20T00:30:24.244251427Z",
"volumes": [
"mtusi-lab5_valkey_data"
]
},
"40993aae81a431229de4bd71ed6e6f81f280be71a6b767a1c390b99358b8cbb3": {
"service": "worker",
"started_at": "2026-11-20T00:30:24.63713668Z",
"volumes": []
}
},
"same_containers_and_volumes": true
}
+3
View File
@@ -0,0 +1,3 @@
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
PASS: all persistent services actually restarted; container IDs and volumes preserved