Исправление по замечанию PR #99: текст с U+0000 вместо 500

PostgreSQL text не хранит 0x00. Expand-миграция 0004 добавляет *_raw bytea для
messages.text, users.display_name, chats.title: точные UTF-8 байты пишутся туда,
если строка содержит U+0000, API возвращает исходную строку. Тест
test_nul_in_text_roundtrip: ответ, история, идемпотентный повтор, 409 на другой текст.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-17 12:33:28 +03:00
co-authored by Claude Opus 5.5
parent 54be66fd7b
commit 30b61609be
6 changed files with 98 additions and 32 deletions
+19 -17
View File
@@ -1,20 +1,22 @@
# 2026-11-17T09:31:58Z, sh scripts/test-lab3.sh (после исправления замечания PR #99)
PASS test_session_across_replicas (0.6s)
PASS test_same_key_concurrent_across_replicas (2.3s)
PASS test_same_key_concurrent_different_bodies (1.6s)
PASS test_key_scope_and_format (1.8s)
PASS test_replay_rechecks_session (1.6s)
PASS test_transient_failure_not_recorded (4.9s)
PASS test_sigterm_drain (10.0s)
PASS test_infrastructure_rules (0.4s)
8/8 passed
PASS test_wrong_password (0.8s)
PASS test_logout (0.7s)
PASS test_same_key_concurrent_across_replicas (3.1s)
PASS test_same_key_concurrent_different_bodies (2.5s)
PASS test_key_scope_and_format (2.3s)
PASS test_replay_rechecks_session (1.3s)
PASS test_transient_failure_not_recorded (6.6s)
PASS test_sigterm_drain (10.8s)
PASS test_infrastructure_rules (0.7s)
PASS test_nul_in_text_roundtrip (1.7s)
9/9 passed
PASS test_wrong_password (1.2s)
PASS test_logout (1.0s)
PASS test_short_ttl (3.5s)
PASS test_username_race (3.7s)
PASS test_chat_rollback (0.9s)
PASS test_cursor_rules (1.2s)
PASS test_valkey_cache_role (1.0s)
PASS test_revoke_during_cache_partition (1.7s)
PASS test_valkey_down (4.2s)
PASS test_postgres_down (10.9s)
PASS test_username_race (4.8s)
PASS test_chat_rollback (1.0s)
PASS test_cursor_rules (1.4s)
PASS test_valkey_cache_role (1.6s)
PASS test_revoke_during_cache_partition (2.3s)
PASS test_valkey_down (4.6s)
PASS test_postgres_down (10.4s)
10/10 passed