lab5: очереди и асинхронная обработка изображений

Durable staging handoff, transactional outbox, at-least-once worker with lease fencing, idempotent versioned pipeline, three variants, operator tooling, contract tests and evidence. Includes the review fixes: reprocess source selection and failure settlement, replay guards, stale-job retirement, PNG structural/raster validation, migration rollback safety and audit events.
This commit is contained in:
Vladislav Kunetskiy
2026-10-31 14:34:24 +03:00
parent 6c5ba026f1
commit 01b885e846
99 changed files with 10164 additions and 1452 deletions
@@ -38,3 +38,13 @@ WHERE actor_id = sqlc.arg(actor_id)
SELECT id, chat_id, sender_id, text, created_at
FROM messages
WHERE id = sqlc.arg(id);
-- Read-only replay lookup used before attachment-state validation. A live key
-- returns the stored message; an expired key is ignored and may be claimed.
-- name: LookupMessageIdempotency :one
SELECT message_id, request_hash
FROM message_idempotency
WHERE actor_id = sqlc.arg(actor_id)
AND chat_id = sqlc.arg(chat_id)
AND key = sqlc.arg(key)
AND expires_at > now();