Grade 4 checks. No tokens or passwords. python scripts/check_grade4.py PASS: one 201 and seven 409 for the same username PASS: unknown member rolls back chat and membership PASS: wrong password and unknown user share the same 401 challenge PASS: logout returns 204, then 401, and drops the cache key PASS: Redis outage falls back to PostgreSQL and still rejects anonymous requests PASS: PostgreSQL outage is 503 for a bearer and 401 without one PASS: SESSION_TTL_SECONDS=2 rejects the same token after 3 seconds PASS: grade 4 checks After that script the API environment was SESSION_TTL_SECONDS=3600. python scripts/explain_history.py PASS: history index used at 10000 messages Plan: Index Scan using messages_history_idx, LIMIT 51, Buffers shared hit=4, no Seq Scan. Saved as evidence/explain.txt. The seed chat was deleted afterwards. Smoke on the rebuilt image: PASS: lab2 public API scenario Persistence, hook scripts/restart.sh restarts api, postgres and redis. Ran inside docker:28-cli because Windows CreateProcess cannot execute the shell script. PASS: persistence preserved confirmed data and existing session. Container IDs unchanged: api 87a78974fbc8 postgres cbe7139645a5 redis e271b1f6ea0e Volume still present: mtusi2026lab2-fork_pgdata Redis has no volume; the session row in PostgreSQL is what survived.