Files
mtusi2026lab5/openspec/changes/add-lab5-async-attachments/specs/lab3-load-balancing/spec.md
T
ArtyomandClaude Opus 5.5 d9bcc7324b Propose asynchronous attachment processing as an openspec change
Plan grade 3 of lab 5: upload answers 202 queued after the original is
in a private staging prefix and the attachment, its job and an outbox
row are committed in one transaction; a separate relay publishes the
outbox to a RabbitMQ quorum queue with publisher confirms and returns
jobs with an expired lease; a separate worker on FastStream claims a
job under a lease, publishes the original and a 256 px JPEG thumbnail,
commits the result fenced by the lease token and acks only after the
commit, retries transient errors up to JOB_MAX_ATTEMPTS and fails
undecodable images at once. Content answers 409 until ready and a
failed attachment cannot be sent.

The change adds the lab5-attachment-pipeline and lab5-job-delivery
capabilities and deltas to lab4-attachments, lab4-upload-resilience,
lab1-messenger-history and lab3-load-balancing.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-29 00:42:15 +03:00

11 lines
1.1 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.
## MODIFIED Requirements
### Requirement: Рестарт стенда
Хук `scripts/restart.sh` SHALL перезапускать балансировщик, все реплики API, relay, worker, PostgreSQL, Valkey, S3-сервер и брокер с сохранением volumes, без удаления и повторного заполнения данных, и SHALL завершаться кодом 0 не позднее 90 секунд, когда стенд, включая S3, снова готов: первое же чтение метаданных и байтов вложения после хука SHALL проходить без повторов.
#### Scenario: Полный рестарт сохраняет сессию
- **WHEN** выполняется `make test-persistence ACTION_SCRIPT=scripts/restart.sh`
- **THEN** тест печатает `PASS: persistence preserved confirmed data and existing session`, а `StartedAt` контейнеров `lb`, `api`, `relay`, `worker`, `postgres`, `valkey`, `s3` и `broker` после прогона позже, чем до него