# Доказывает: проверки рабочего и изолированных стендов на машине замеров.
# Дата UTC: 2026-11-16; выполнено Codex.
# Окружение: macOS 26.6.2; Docker 28.0.4; Compose 5.6.1;
# Python хоста 3.11.12, pytest в uv-окружении Python 3.13.7.
# Docker VM: 10 CPU, 8218034176 байт RAM; рабочий LB http://localhost:8080.
# Код: src_sha256 81c47ffceeb40acc6f333a9265a15480b3e13e2cb53b2e2229e5fa7391bd0b7a
# Повторить после make install и make env:
#   sh tools/docker-compat/setup.sh
#   export PATH="$PWD/tools/docker-compat:$PATH"
#   make up; make test; make telemetry-check; make test-isolated;
#   make failure-checks; make stop
# Первые попытки запуска выявили совместимость Docker CLI/старого Compose;
# обход описан в REPORT.md, код приложения и сигналы не менялись.
# Ниже — реальные строки успешного прогона из журнала, в исходном порядке.
# ... опущены сборка, подъём/остановка контейнеров, прогресс pytest и предупреждение
# StarletteDeprecationWarning об httpx (по одному у каждого набора).

PASS: lab6 public API scenario; infrastructure and grading evidence remain separate.
PASS  grafana /api/health: status 200
PASS  datasources provisioned: ['logs', 'metrics', 'traces']
PASS  dashboard messenger-lab6 provisioned: status 200, panels 26
PASS  controlled request GET /api/v1/users/me: status 200, X-Request-Id tcheck-36fc9ebc-me
PASS  upload accepted: status 202
PASS  attachment ready: ready
PASS  message with attachment: status 201
PASS  API trace found by request id: 8cfe98b66d66ec826b933d24257c231b
PASS  server span with route template: 2 spans: GET /api/v1/users/me, postgresql read
PASS  no spans from FastAPI native telemetry: []
PASS  API log record in Loki with the same trace_id: GET /api/v1/users/me -> 200 (0.8 ms)
PASS  API stdout line carries the same trace_id: 2026-11-16T10:06:26.259Z INFO    src.http [rid=tcheck-36fc9ebc-me] GET /api/v1/users/me -> 200 (0.8 ms) trace_id=8cfe98b66d66ec826b933d24257
PASS  upload trace has PostgreSQL and S3 child spans: POST /api/v1/chats/{chat_id}/attachments, S3 get_object, S3 put_object, postgresql read, postgresql transaction, process messenger.attachment-jobs, publish messenger.attachment-jobs, render variants
PASS  worker consumer span with outcome ready: POST /api/v1/chats/{chat_id}/attachments, S3 get_object, S3 put_object, postgresql read, postgresql transaction, process messenger.attachment-jobs, publish messenger.attachment-jobs, render variants
PASS  worker log 'attachment processed' with the job trace_id: attachment processed attachment_id=505ea93e-007b-4bc5-8dd6-ef869ccbbe40 job_id=398d2d94-4b5a-4a8d-8d
PASS  HTTP duration histogram (API): count 3
PASS  job duration histogram (worker, ready): count 2
PASS  relay published counter: 2
PASS  resource attributes (target_info): messenger-api@0.6.0/lab, messenger-relay@0.6.0/lab, messenger-worker@0.6.0/lab
PASS  HTTP histogram has a single source: rate 0
PASS  metric labels without ids, raw URLs and filenames: 35 series
PASS  no password, token, message text, filename or Authorization in telemetry: 85 log records, 54618 bytes of traces
telemetry-check: PASS (22/22 checks)
[isolated] ready: lb=http://127.0.0.1:59685 replicas=2
[isolated] make test
PASS: lab6 public API scenario; infrastructure and grading evidence remain separate.
================ 178 passed, 34 deselected, 1 warning in 40.98s ================
[isolated] make test-failover (scripts/stop-one.sh)
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
PASS
[isolated] make test-persistence (scripts/restart.sh)
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
[isolated] results: {'test': 0, 'student-test': 0, 'test-failover': 0, 'attachment-failover': 0, 'test-persistence': 0}
[failures] ready: api=http://127.0.0.1:60220 tight=http://127.0.0.1:60225 uploads=http://127.0.0.1:60230 backlog=http://127.0.0.1:60235 vladimirceva-lab6-failures-cleaner vladimirceva-lab6-failures-relay vladimirceva-lab6-failures-worker
[failures] pytest -m fault
========== 34 passed, 178 deselected, 1 warning in 441.78s (0:07:21) ===========
[failures] results: {'fault': 0}

# Итог: smoke PASS; telemetry-check 22/22; isolated 178 passed и results все 0;
# failure-checks 34 passed и fault=0. Тестовые стенды убраны самим runner,
# рабочий стенд остановлен перед bench-telemetry-quick.

