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 versiondb3340d). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
# Принявшая реплика остановлена
|
||||
|
||||
- Команда: `python3 .claude/skills/run-mtusi-messenger/driver.py --port 8080 attachment-failover --mode stop`, затем то же с `--mode kill` (`make replicas` драйвер выполняет сам в `finally`)
|
||||
- Дата: 2026-11-15, 06:38:59–06:39:10 UTC; оба прогона — код выхода 0
|
||||
- Commit: `db3340d` (ветка `feat/lab6-final`), рабочее дерево без правок кода (изменены только `QUESTIONS.md` и файлы `evidence/`)
|
||||
- Стенд: проект compose `mtusi-lab6`, две реплики за HAProxy, телеметрия включена, собран `make run_docker` из `HEAD`; пользователи синтетические
|
||||
- Сценарий: `attachments` «Принявшая реплика остановлена»
|
||||
- Вывод сокращён: убраны снимки `docker compose ps` до и после (все 15 сервисов `Up`, реплики `healthy`; после прогона `stop` у `api-14` новый `StartedAt` — его вернул `make replicas`)
|
||||
|
||||
## `stop`
|
||||
|
||||
```text
|
||||
mode: stop; fixture sample.png: 111817 bytes
|
||||
sha256 uploaded: 99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75
|
||||
sha256 downloaded: 99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75
|
||||
step expected got x-instance-id
|
||||
alice uploads 202 202 e6c96453fc1b
|
||||
attachment is ready ready ready
|
||||
alice sends message 201 201 e6c96453fc1b
|
||||
stop-one.sh stop 0 0 e6c96453fc1b
|
||||
bob downloads 200 200 8112fa687696
|
||||
bob reads metadata 200 200 8112fa687696
|
||||
eve reads metadata 404 404 8112fa687696
|
||||
eve downloads 404 404 8112fa687696
|
||||
make replicas 0 0
|
||||
LB slots UP 2 2
|
||||
PASS: accepted by e6c96453fc1b, served by 8112fa687696 after stop, sha256 matches, outsider gets 404
|
||||
```
|
||||
|
||||
## `kill`
|
||||
|
||||
```text
|
||||
mode: kill; fixture sample.png: 111817 bytes
|
||||
sha256 uploaded: 99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75
|
||||
sha256 downloaded: 99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75
|
||||
step expected got x-instance-id
|
||||
alice uploads 202 202 e6c96453fc1b
|
||||
attachment is ready ready ready
|
||||
alice sends message 201 201 e6c96453fc1b
|
||||
stop-one.sh kill 0 0 e6c96453fc1b
|
||||
bob downloads 200 200 8112fa687696
|
||||
bob reads metadata 200 200 8112fa687696
|
||||
eve reads metadata 404 404 8112fa687696
|
||||
eve downloads 404 404 8112fa687696
|
||||
make replicas 0 0
|
||||
LB slots UP 2 2
|
||||
PASS: accepted by e6c96453fc1b, served by 8112fa687696 after kill, sha256 matches, outsider gets 404
|
||||
```
|
||||
@@ -0,0 +1,108 @@
|
||||
# Вложения: метаданные, байты и ограничения обработки
|
||||
|
||||
- Команда: `python3 .claude/skills/run-mtusi-messenger/driver.py --port 8080 attachment-storage`
|
||||
- Дата: 2026-11-15, 06:37:43–06:37:47 UTC; код выхода 0
|
||||
- Commit: `db3340d` (ветка `feat/lab6-final`), рабочее дерево без правок кода (изменены только `QUESTIONS.md` и файлы `evidence/`)
|
||||
- Стенд: проект compose `mtusi-lab6`, две реплики за HAProxy, телеметрия включена, собран `make run_docker` из `HEAD`. Контейнеры `docker diff`: реплики `8112fa687696`, `e6c96453fc1b` и worker `2b6afe2410a9`
|
||||
- Сценарии: `attachments` «Байты не в БД и не на диске API», `data-storage` «Ограничения обработки в схеме» (пробы в откатываемой транзакции, запись аудита с неизвестным заданием). В списке колонок есть и колонки контекста W3C задания `traceparent`, `tracestate` (ревизия `e4b8c2d17f90`)
|
||||
- Вывод сокращён: таблица второго вложения повторяет первую и совпала с ожидаемым
|
||||
|
||||
Итог: байты — только объекты приватного bucket (анонимный GET 403), в PostgreSQL — метаданные и SHA-256 (`bytea`, 32 байта), в файловых системах реплик и worker — только смонтированный `config.toml`; четыре пробы ограничений дают названные коды, после отката — одно задание и три варианта.
|
||||
|
||||
```text
|
||||
columns of attachment tables:
|
||||
attachment_job_replays id uuid
|
||||
attachment_job_replays job_id uuid
|
||||
attachment_job_replays operator text
|
||||
attachment_job_replays error_code text
|
||||
attachment_job_replays reason text
|
||||
attachment_job_replays attempt integer
|
||||
attachment_job_replays created_at timestamp with time zone
|
||||
attachment_jobs id uuid
|
||||
attachment_jobs attachment_id uuid
|
||||
attachment_jobs pipeline_version integer
|
||||
attachment_jobs state text
|
||||
attachment_jobs attempt integer
|
||||
attachment_jobs last_error_code text
|
||||
attachment_jobs next_attempt_at timestamp with time zone
|
||||
attachment_jobs lease_expires_at timestamp with time zone
|
||||
attachment_jobs published_at timestamp with time zone
|
||||
attachment_jobs updated_at timestamp with time zone
|
||||
attachment_jobs finished_at timestamp with time zone
|
||||
attachment_jobs created_at timestamp with time zone
|
||||
attachment_jobs attempt_base integer
|
||||
attachment_jobs traceparent text
|
||||
attachment_jobs tracestate text
|
||||
attachment_variants attachment_id uuid
|
||||
attachment_variants pipeline_version integer
|
||||
attachment_variants variant text
|
||||
attachment_variants object_key text
|
||||
attachment_variants content_type text
|
||||
attachment_variants size_bytes integer
|
||||
attachment_variants width integer
|
||||
attachment_variants height integer
|
||||
attachment_variants sha256 bytea
|
||||
attachment_variants created_at timestamp with time zone
|
||||
attachments id uuid
|
||||
attachments chat_id uuid
|
||||
attachments owner_id uuid
|
||||
attachments filename text
|
||||
attachments content_type text
|
||||
attachments size_bytes integer
|
||||
attachments sha256 bytea
|
||||
attachments object_key text
|
||||
attachments status text
|
||||
attachments updated_at timestamp with time zone
|
||||
attachments created_at timestamp with time zone
|
||||
attachments lost_at timestamp with time zone
|
||||
attachments staging_key text
|
||||
attachments error_code text
|
||||
message_attachments message_id uuid
|
||||
message_attachments position smallint
|
||||
message_attachments attachment_id uuid
|
||||
message_attachments created_at timestamp with time zone
|
||||
upload via 8112fa687696: object_key messenger/attachments/178cf6ce-9630-4b2d-85a2-e7b051b328ab/original, staging_key messenger/staging/178cf6ce-9630-4b2d-85a2-e7b051b328ab/original
|
||||
sha256 uploaded 99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75, downloaded by a member (200) 99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75
|
||||
upload via 8112fa687696: object_key messenger/attachments/47cce102-97b2-422d-b519-3a7acecd2d27/original, staging_key messenger/staging/47cce102-97b2-422d-b519-3a7acecd2d27/original
|
||||
sha256 uploaded 99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75, downloaded by a member (200) 99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75
|
||||
constraint probes (rolled back):
|
||||
second job of the version: 23505 uq_attachment_jobs_attachment_id_pipeline_version
|
||||
second variant of the name: 23505 pk_attachment_variants
|
||||
error_code on not failed: 23514 ck_attachments_error_code_failed
|
||||
replay audit of an unknown job: 23503 fk_attachment_job_replays_job_id_attachment_jobs
|
||||
docker diff 8112fa687696: 2 changes
|
||||
C /app
|
||||
A /app/config.toml
|
||||
docker diff e6c96453fc1b: 2 changes
|
||||
C /app
|
||||
A /app/config.toml
|
||||
docker diff 2b6afe2410a9: 2 changes
|
||||
C /app
|
||||
A /app/config.toml
|
||||
bytea columns expected attachment_variants.sha256,attachments.sha256 got attachment_variants.sha256,attachments.sha256
|
||||
octet_length(sha256) expected 32 got 32
|
||||
object_key form expected messenger/attachments/178cf6ce-9630-4b2d-85a2-e7b051b328ab/original got messenger/attachments/178cf6ce-9630-4b2d-85a2-e7b051b328ab/original
|
||||
staging_key: its form or already empty expected yes got yes
|
||||
filename not in key expected no got no
|
||||
variant rows expected crop,optimized,thumbnail got crop,optimized,thumbnail
|
||||
crop in bucket expected yes got yes
|
||||
anonymous GET of crop expected 403 got 403
|
||||
optimized in bucket expected yes got yes
|
||||
anonymous GET of optimized expected 403 got 403
|
||||
thumbnail in bucket expected yes got yes
|
||||
anonymous GET of thumbnail expected 403 got 403
|
||||
object in bucket, bytes expected 111817 got 111817
|
||||
anonymous GET of the key expected 403 got 403
|
||||
downloaded sha256 = uploaded expected yes got yes
|
||||
(второе вложение 47cce102-…: те же 13 строк, expected = got)
|
||||
probe: second job of the version expected 23505 uq_attachment_jobs_attachment_id_pipeline_version got 23505 uq_attachment_jobs_attachment_id_pipeline_version
|
||||
probe: second variant of the name expected 23505 pk_attachment_variants got 23505 pk_attachment_variants
|
||||
probe: error_code on not failed expected 23514 ck_attachments_error_code_failed got 23514 ck_attachments_error_code_failed
|
||||
probe: replay audit of an unknown job expected 23503 fk_attachment_job_replays_job_id_attachment_jobs got 23503 fk_attachment_job_replays_job_id_attachment_jobs
|
||||
jobs | variants after the probes expected 1|3 got 1|3
|
||||
original files in 8112fa687696 expected 0 got 0
|
||||
original files in e6c96453fc1b expected 0 got 0
|
||||
original files in 2b6afe2410a9 expected 0 got 0
|
||||
sha256 of the fixture: 99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75
|
||||
PASS: metadata in PostgreSQL, bytes only in the private bucket messenger, none in the API containers
|
||||
```
|
||||
Reference in New Issue
Block a user