Files
mtusi2026lab4/evidence/cache/hits.md
T
ricoromaandClaude Opus 5.5 8dc925e8ca docs: add attachments evidence and report
- re-capture coverage-exclusion evidence on the lab 4 stand: cache,
  auth storage, replay after API recreate, test-persistence,
  attachment-failover (stop, kill), attachment-storage
- green evidence/tests: student_test via LB, test_isolated,
  failure_checks; smoke, slow transfer, test-failover per replica
- bench_rollout label attachments: e1161f7 -> schema with attachments
  under load, no errors, messages = keys
- REPORT.md: attachments architecture, write order, defense answers,
  level 3/4 evidence rows, limitations; PLAN.md stage 2

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 01:50:10 +03:00

33 lines
2.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Кэш карточки чата на стенде лабы 4
- Дата: 2026-10-20, 22:30:18 UTC.
- Commit: `d56b892` (код приложения — `116d8d3`, change `attachments`).
- Стенд: рабочий `mtusi-lab4` — HAProxy на `127.0.0.1:8080`, две
реплики API, PostgreSQL, Valkey, S3. Перед командой — `make
test_isolated` (временная база `test_messenger`, 22:28:23–22:30:15
UTC): её ключи кэша остаются в Valkey до срока.
- Исключения сверки покрытия `chat-cache`: «Чтение из кэша», «Срок
записи», «Временная база» (`student-tests/spec_coverage.py`).
```
$ python3 .claude/skills/run-mtusi-messenger/driver.py --port 8080 cache-check --require-test-keys
users alice_… (creator) and bob_… (reader), chat 848eb2e5-b9b9-463e-9695-11e13f6b9381
key messenger:v1:messenger:chat:848eb2e5-b9b9-463e-9695-11e13f6b9381
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 2bc86cb81f10 25, c0ae55959fb2 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:*: 3
keys messenger:v1:test_messenger:chat:*: 138
PASS: one read of chats, the rest from Valkey; TTL is bounded; temporary database: 138 keys under its own prefix
exit=0
```
- «Чтение из кэша»: 50 чтений через LB (по 25 на реплику) — одно чтение
таблицы `chats` (промах после `DEL`), 49 попаданий в Valkey.
- «Срок записи»: TTL не больше настроенного (3600 с) и чтениями не
продлевается.
- «Временная база»: ключи рабочей (`messenger`) и временной
(`test_messenger`) базы — под разными префиксами.