Уточнить доказательства финальных проверок

This commit is contained in:
2026-10-27 21:54:52 +03:00
parent a74e32e2e7
commit 9531c3e635
8 changed files with 26 additions and 20 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
Command: make check (GNU Make 4.3, Linux test runner)
Date: 2026-10-27
Command: make check (Ubuntu WSL)
Output:
python3 scripts/check_contract.py
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
+3 -2
View File
@@ -1,4 +1,5 @@
Command: make test-idempotency BASE_URL=http://lb:8080
Date: 2026-10-27
Command: make test-idempotency BASE_URL=http://127.0.0.1:8081 (Ubuntu WSL)
Output:
python3 tests/idempotency.py --base-url "http://lb:8080"
python3 tests/idempotency.py --base-url "http://127.0.0.1:8081"
PASS: 16 concurrent requests across 2 API replicas returned one Message; changed body returned 409.
+3 -2
View File
@@ -1,4 +1,5 @@
Command: make test BASE_URL=http://lb:8080 (Linux runner attached to Compose network)
Date: 2026-10-27
Command: make test BASE_URL=http://127.0.0.1:8081 (Ubuntu WSL; port 8081 is the local override while Lab 2 is already running on 8080)
Output:
python3 tests/smoke.py --base-url "http://lb:8080"
python3 tests/smoke.py --base-url "http://127.0.0.1:8081"
PASS: lab3 public API scenario; infrastructure and grading evidence remain separate.
+3 -2
View File
@@ -1,4 +1,5 @@
Command: make validate
Date: 2026-10-27
Command: make validate PYTHON=/home/lenovo/lab2/.venv/bin/python (Ubuntu WSL)
Output:
python3 scripts/validate_openapi.py
/home/lenovo/lab2/.venv/bin/python scripts/validate_openapi.py
PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested.
+7 -7
View File
@@ -1,9 +1,9 @@
Date: 2026-10-27
Code under test: d942679
Scenario: public tests/resilience.py failover mode. The selected X-Instance-Id was mapped to one API container and stopped; the 15-second test loop then sent writes through the LB using the same session.
Aggregate stdout:
observed_instances_before=2
successful_writes=108
failed_attempts=1
first_recovery_seconds=3.312
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
Command: make test-failover ACTION_SCRIPT=scripts/stop-one.sh BASE_URL=http://127.0.0.1:8081 (Ubuntu WSL; tracked POSIX hook)
Output:
python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://127.0.0.1:8081"
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 140, "failed_attempts": 0, "first_recovery_seconds": 0.673}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
The test stopped the selected API container; the stopped replica was restored after the check.
+4 -2
View File
@@ -1,6 +1,8 @@
Date: 2026-10-27
Code under test: d942679
Scenario: public tests/resilience.py persistence mode. A temporary Windows-compatible action wrapper ran docker compose restart postgres redis api lb; named volumes were retained.
Command: make test-persistence ACTION_SCRIPT=scripts/restart.sh BASE_URL=http://127.0.0.1:8081 (Ubuntu WSL; tracked POSIX hook)
Output:
python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://127.0.0.1:8081"
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: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
The hook restarted PostgreSQL, Redis, both API replicas and Nginx. Named volumes were retained.
+1 -1
View File
@@ -2,5 +2,5 @@
Коммит реализации под проверкой: d942679
Docker Desktop Linux: 32 vCPU; 16 598 642 688 bytes RAM доступно Docker.
Лимит API: 1 CPU и 536 870 912 bytes памяти на реплику; запущено две реплики.
Профили: публичный smoke на синтетических данных; идемпотентность — 16 одновременных запросов с одним ключом; persistence — restart API/PostgreSQL/Redis/LB с сохранёнными volumes; failover — 15-секундный поток POST, 108 успешных ответов, 1 переходная ошибка, первая успешная запись через 3.312 секунды.
Профили: публичный smoke на синтетических данных; идемпотентность — 16 одновременных запросов с одним ключом; persistence — restart API/PostgreSQL/Redis/LB с сохранёнными volumes; failover — 15-секундный поток POST, 140 успешных ответов, 0 переходных ошибок, первая успешная запись через 0.673 секунды.
Failover — проверка критерия уровня 3, не нагрузочный benchmark; throughput и p95/p99 не заявляются.