Files
mtusi2026lab6/evidence/cache/hits.md
T
ricoromaandClaude Opus 5.5 6c6e6d5192 docs: capture lab 6 exclusion evidence, full checks and final report
Coverage-exclusion evidence on the lab 6 stand (db3340d), failure checks,
isolated and LB test runs, clean clone and secrets check; fill REPORT.md
from the skeleton template, drop PLAN.md (last version db3340d).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 10:35:25 +03:00

2.8 KiB
Raw Blame History

Кэш карточки чата

  • Команды: make test_isolated KEEP_TEST_DB=1 (ключи временной базы), затем python3 .claude/skills/run-mtusi-messenger/driver.py --port 8080 cache-check --require-test-keys
  • Дата: 2026-11-15; make test_isolated до 06:36:07 UTC, cache-check 06:36:37–06:37:02 UTC, код выхода cache-check 0
  • Код выхода make test_isolated 2 и только по одной причине: test_exclusion_evidence_exists (этого файла и соседних исключений ещё не было); публичный make test в нём — код 0. Снятие файла этой команды требует её прогона, поэтому поменять порядок нельзя
  • Commit: db3340d (ветка feat/lab6-final), рабочее дерево без правок кода (изменены только QUESTIONS.md и файлы evidence/)
  • Стенд: проект compose mtusi-lab6, две реплики за HAProxy, телеметрия включена, собран make run_docker из HEAD; пользователи и чат синтетические
  • Спеки: chat-cache, «Чтение из кэша», «Срок записи», «Временная база» (исключения сверки покрытия: по HTTP ответ из кэша не отличить от ответа из PostgreSQL)

Итог: на 50 чтений карточки через LB — одно чтение таблицы chats (первое, ключ перед этим удалён), +49 попаданий и +1 промах Valkey; срок ключа не больше настроенного (3600 с), чтения его не продлевают; ключи рабочей и временной базы — под разными префиксами (1 и 166).

users alice_… (creator) and bob_… (reader), chat a0334358-bf18-4591-a565-056c4e4ef3e3
key messenger:v1:messenger:chat:a0334358-bf18-4591-a565-056c4e4ef3e3
right after 201: EXISTS 1, TTL 3600 s (configured [cache] chat_ttl_seconds 3600 s in the replica); value keys ['created_at', 'id', 'member_ids', 'title'], member_ids in creation order: yes
DEL key: the first read is a miss; waiting 11 s
50 × GET /api/v1/chats/{id} by the reader through LB: 50 equal to the creation response; by replica 8112fa687696 25, e6c96453fc1b 25
after 11 s: reads of table chats (seq_scan + idx_scan) +1, keyspace_hits +49, keyspace_misses +1
TTL 3589 s, then 10 more reads, TTL 3588 s: reads do not extend the key
keys messenger:v1:messenger:chat:*: 1
keys messenger:v1:test_messenger:chat:*: 166
PASS: one read of chats, the rest from Valkey; TTL is bounded; temporary database: 166 keys under its own prefix