fix: address unit-of-work verify findings

Abort the transport when a bounded close ends, so a frozen server leaves
no sessions over the pool once the ping has no transaction. Under the
shared request deadline a block sets no timer of its own, so a single
cancel closes the connection and the log has one record. Add a test that
concurrent worker deliveries get separate units of work, and state the
cost of the pattern against both baselines in the report.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-01 01:58:51 +03:00
co-authored by Claude Opus 5.5
parent 952c16350e
commit d8fe2e87f1
17 changed files with 588 additions and 60 deletions
+1 -1
View File
@@ -75,7 +75,7 @@ paths:
вставленного сообщения: внешний ключ на `messages` отложен до
commit. Так повтор не пишет и не откатывает сообщение (design
change `instance-id-idempotency`, решение 2);
- захват — `idempotency_repo.claim_key` по `(user_id, chat_id, key)`
- захват — `self.uow.idempotency.claim_key` по `(user_id, chat_id, key)`
с порогом `expired_before = now - [idempotency] ttl_seconds`
(часы приложения, как у сессий). Захватили (новый или просроченный
ключ) — вставка сообщения и один `commit()`. Не захватили — ключ