2.1 KiB
2.1 KiB
Матрица требований (до реализации, 2026-10-23)
| Критерий преподавателя | Решение / файлы | Проверка | Evidence |
|---|---|---|---|
| 3: API ЛР1, Bearer, права, cursor | src/models.py, pagination.py из собственной ЛР1; main.py, store.py | make test + student-tests | smoke.txt, student.txt |
| 3: PostgreSQL, PK/FK/UNIQUE, атомарный чат | migrations/001_initial.sql, src/db.py, store.py | с нуля; повтор миграций; ошибка FK после INSERT чата | migrations.txt, student.txt |
| 3: password KDF, Basic только login, expiry/logout | Argon2id, SHA-256 случайного 256-bit token, PG sessions | негативные, expiry=2, logout | student.txt, expiry.txt |
| 3: данные и сессии переживают все рестарты | PG named volume, restart.sh: api/postgres/valkey | make test-persistence, timestamps до/после | persistence.txt |
| 3: check/test, секреты вне Git | Docker tools, .gitignore/.dockerignore | make check/validate/test, git diff | checks.txt, audit.txt |
| 4: реальный Valkey с TTL | cache.py: immutable user profiles, PG truth, TTL 60; fail-open только кэш | cached key + TTL + hit; outage fallback | student.txt, failures.txt |
| 4: параметры, bounded pool/timeouts, гонка/rollback | psycopg, pool max8/wait2, SQL timeout2s | concurrent username + FK rollback | student.txt |
| 4: индекс истории, EXPLAIN >=10000 | (chat_id,created_at,id), keyset LIMIT n+1 | 10000 синтетических записей, ANALYZE, реальный EXPLAIN | explain.txt |
| 4: expiry/logout/wrong password/Redis/DB outage | student-tests, scripts | короткий TTL; stop/start только сервисов проекта | expiry.txt, failures.txt |
Не изменять README.md, COURSE.md, CONTRIBUTING.md, contracts/, tests/. ЛР1: переносятся только собственные models/pagination/errors; in-memory store заменяется PostgreSQL; X-User-Id заменяется сессиями.