4: исправление по ревью — проверка смысла чанков PNG (палитра, tRNS, порядок, текст), регрессионные тесты, evidence

This commit is contained in:
kalibr456
2026-10-22 14:30:53 +03:00
parent 5c3a31db2e
commit 4d4b914676
26 changed files with 587 additions and 279 deletions
+4 -4
View File
@@ -1,9 +1,9 @@
# db: PostgreSQL: rollback, FK, Argon2id, unique keys, migrations
# date: 2026-10-21 21:09:10, commit: 2dbed80 + uncommitted changes
# date: 2026-10-22 14:22:40, commit: c942c61 + uncommitted changes
# command: python.exe student-tests/test_db.py
# exit code: 0, 14.2 s
# exit code: 0, 6.2 s
chat with unknown member -> 400; rows with this title: 0; chats without members: 0; chats insert counter: 57 -> 58
chat with unknown member -> 400; rows with this title: 0; chats without members: 0; chats insert counter: 335 -> 336
PASS: chat row was inserted and then rolled back together with members
direct INSERT of a message from a non-member -> exit code 1: ERROR: insert or update on table "messages" violates foreign key constraint "messages_chat_id_sender_id_fkey"
PASS: the database itself rejects a message from a non-member
@@ -14,7 +14,7 @@ PASS: username is unique in the database
applied migrations: 001_init.sql,002_text_as_bytes.sql,003_idempotency.sql,004_attachments.sql; running the migrate service once more
after the second run: 001_init.sql,002_text_as_bytes.sql,003_idempotency.sql,004_attachments.sql; log: Migrations applied: none (schema is up to date)
PASS: migrations are applied once, a repeated run does nothing
api replicas that checked the schema at start: 8; api log lines 'Migrations applied': 0; migrate service: Exited (0) 6 minutes ago
api replicas that checked the schema at start: 14; api log lines 'Migrations applied': 0; migrate service: Exited (0) 4 minutes ago
PASS: only the migrate service applies migrations, replicas wait for the schema
unique constraint for Idempotency-Key: UNIQUE (chat_id, sender_id, idempotency_key)
PASS: one message per (chat, sender, Idempotency-Key) is enforced by the database