forked from mtusi2026/mtusi2026lab2
Фиксы подтверждённых проблем
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
{
|
||||
"base_url": "http://127.0.0.1:8080",
|
||||
"timings": {
|
||||
"redis_down_first_request_s": 0.0,
|
||||
"redis_down_max_write_s": 0.031,
|
||||
"postgres_down_write_s": 3.0,
|
||||
"postgres_recovery_s": 0.02
|
||||
"redis_down_first_request_s": 0.015,
|
||||
"redis_down_max_write_s": 0.047,
|
||||
"postgres_down_write_s": 3.015,
|
||||
"postgres_recovery_s": -1
|
||||
},
|
||||
"checks": [
|
||||
{
|
||||
"check": "redis down: existing token still valid via PostgreSQL",
|
||||
"ok": true,
|
||||
"detail": "0.000s"
|
||||
"detail": "0.015s"
|
||||
},
|
||||
{
|
||||
"check": "redis down: writes succeed",
|
||||
@@ -20,7 +20,7 @@
|
||||
{
|
||||
"check": "redis down: bounded latency",
|
||||
"ok": true,
|
||||
"detail": "max 0.031s over 10 requests"
|
||||
"detail": "max 0.047s over 10 requests"
|
||||
},
|
||||
{
|
||||
"check": "redis down: readiness stays 200 (cache is not critical)",
|
||||
@@ -57,6 +57,26 @@
|
||||
"ok": true,
|
||||
"detail": ""
|
||||
},
|
||||
{
|
||||
"check": "redis partition: logout -> 204",
|
||||
"ok": true,
|
||||
"detail": "status 204, 0.000s"
|
||||
},
|
||||
{
|
||||
"check": "redis partition: revoked token -> 401",
|
||||
"ok": true,
|
||||
"detail": ""
|
||||
},
|
||||
{
|
||||
"check": "redis healed (same data): revoked token stays 401 for 8 s",
|
||||
"ok": true,
|
||||
"detail": "[401]"
|
||||
},
|
||||
{
|
||||
"check": "redis healed: valid token works",
|
||||
"ok": true,
|
||||
"detail": ""
|
||||
},
|
||||
{
|
||||
"check": "postgres down: liveness 200",
|
||||
"ok": true,
|
||||
@@ -75,12 +95,12 @@
|
||||
{
|
||||
"check": "postgres down: unknown token is not accepted (503)",
|
||||
"ok": true,
|
||||
"detail": "status 503, 3.000s"
|
||||
"detail": "status 503, 3.016s"
|
||||
},
|
||||
{
|
||||
"check": "postgres down: write -> 503 within bound",
|
||||
"ok": true,
|
||||
"detail": "status 503, 3.000s"
|
||||
"detail": "status 503, 3.015s"
|
||||
},
|
||||
{
|
||||
"check": "postgres down: history read -> 503",
|
||||
|
||||
Binary file not shown.
+6
-6
@@ -2,16 +2,16 @@
|
||||
"lab": 2,
|
||||
"workload": "closed-loop POST messages; no automatic retries",
|
||||
"requested_duration_seconds": 30.0,
|
||||
"elapsed_seconds": 30.096,
|
||||
"elapsed_seconds": 30.122,
|
||||
"concurrency": 4,
|
||||
"successful_requests": 9842,
|
||||
"successful_requests": 8655,
|
||||
"failed_requests": 0,
|
||||
"error_ratio": 0.0,
|
||||
"successful_rps": 327.024,
|
||||
"successful_rps": 287.333,
|
||||
"successful_latency_ms": {
|
||||
"p50": 11.831,
|
||||
"p95": 17.414,
|
||||
"p99": 20.949
|
||||
"p50": 13.173,
|
||||
"p95": 20.194,
|
||||
"p99": 24.284
|
||||
},
|
||||
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# Регрессия замечания ревью №1: прогрев кэша -> разрыв API<->Redis (iptables REJECT tcp-reset, Redis НЕ перезапускается)
|
||||
# -> logout -> восстановление связи -> опрос старого токена 8 с (дольше circuit breaker 5 с).
|
||||
# Скрипт: student-tests/revocation_partition.py --partition/--heal "iptables ... tcp-reset" (тот же сценарий входит в student-tests/dependency_failure.py)
|
||||
--- до исправления (первая сдача)
|
||||
logout during partition: 204
|
||||
revoked token statuses over 8 s after heal: [200, 401]
|
||||
--- после исправления
|
||||
logout during partition: 204
|
||||
revoked token statuses over 8 s after heal: [401]
|
||||
@@ -14,6 +14,8 @@ test_registration_without_password_returns_400 (test_api.ApiBehaviorTests.test_r
|
||||
test_sender_id_in_body_rejected (test_api.ApiBehaviorTests.test_sender_id_in_body_rejected) ... ok
|
||||
test_short_password_returns_400 (test_api.ApiBehaviorTests.test_short_password_returns_400) ... ok
|
||||
test_basic_on_business_endpoint_rejected (test_auth.AuthTests.test_basic_on_business_endpoint_rejected) ... ok
|
||||
test_login_with_body_rejected (test_auth.AuthTests.test_login_with_body_rejected)
|
||||
Контракт: вход — только заголовок Basic, без тела. Лишний ввод -> 400, сессии нет. ... ok
|
||||
test_logout_revokes_only_current_session (test_auth.AuthTests.test_logout_revokes_only_current_session) ... ok
|
||||
test_malformed_basic_headers (test_auth.AuthTests.test_malformed_basic_headers) ... ok
|
||||
test_password_with_colon_and_unicode (test_auth.AuthTests.test_password_with_colon_and_unicode) ... ok
|
||||
@@ -26,13 +28,19 @@ test_unknown_member_rolls_back_whole_chat (test_concurrency.ChatRollbackTests.te
|
||||
Чат вставляется первым, затем участники по порядку (сначала сам владелец). ... ok
|
||||
test_same_username_parallel_registration (test_concurrency.RegistrationRaceTests.test_same_username_parallel_registration) ... ok
|
||||
test_session_expires_even_when_cached (test_expiry.ExpiryTests.test_session_expires_even_when_cached) ... ok
|
||||
test_debt_survives_api_restart (test_session_cache.SessionRevocationCacheTests.test_debt_survives_api_restart)
|
||||
Процесс, выполнивший logout, умер до восстановления связи — новый процесс не доверяет кэшу. ... logout: cache invalidation deferred; positive cache disabled
|
||||
ok
|
||||
test_normal_logout_leaves_no_debt (test_session_cache.SessionRevocationCacheTests.test_normal_logout_leaves_no_debt) ... ok
|
||||
test_revoked_token_rejected_after_partition_heals (test_session_cache.SessionRevocationCacheTests.test_revoked_token_rejected_after_partition_heals) ... logout: cache invalidation deferred; positive cache disabled
|
||||
ok
|
||||
test_failure_after_inserts_leaves_nothing (test_storage_rollback.StorageRollbackTests.test_failure_after_inserts_leaves_nothing) ... ok
|
||||
test_migrations_are_idempotent (test_storage_rollback.StorageRollbackTests.test_migrations_are_idempotent) ... ok
|
||||
test_no_orphan_chats_in_database (test_storage_rollback.StorageRollbackTests.test_no_orphan_chats_in_database) ... ok
|
||||
test_passwords_stored_as_argon2id (test_storage_rollback.StorageRollbackTests.test_passwords_stored_as_argon2id) ... ok
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 28 tests in 6.224s
|
||||
Ran 32 tests in 7.657s
|
||||
|
||||
OK
|
||||
|
||||
|
||||
Reference in New Issue
Block a user