forked from mtusi2026/mtusi2026lab3
Lab 3 now stands on the finished lab 2. The deltas are synced to openspec/specs: the zones meet only in the schema and Valkey is needed only to confirm a logout; an outsider does not wait for a chat lock; an empty cursor is 400 on history and on the chat list; a stuck request at SIGTERM gets 500 from the server itself within the 6 s budget, which still leaves 3 s after the drain window for the database timeouts; a chunked body is limited by the bytes received; a logout rejected by PostgreSQL withdraws its revocation mark. The event publication purpose follows lab 2. On a stand rebuilt from empty volumes: make test passes, failover recovers the first write in 3.1 s with 0 failed attempts, persistence passes, test-faults 12 passed including the full restart with logout and the shortened session after an API restart, detection passes all four scenarios with SIGTERM detected in 0.82 s and the stop done in 2.44 s, and the cache evidence finds a tombstone and a key that does not outlive its session. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27