# 3: воспроизводимый стенд и общие хранилища ## Что проверяется Запуск из репозитория; две реальные API, единый LB, одна БД и Redis, отдельный migration job. Статус выполнения проверок: **PASS**. Для исследования PASS означает успешную проверку данных и правил анализа; решение гипотезы указано отдельно и может быть неопределённым. Запуск: `lab3-report-04`. Команды выполнены из корня проекта в WSL; время и версии указаны в manifest. ## Команды и фактический вывод ### startup Проверка приложения. ```sh make app-up ``` Начало UTC: `2026-10-10T16:20:53.520001+00:00`; конец UTC: `2026-10-10T16:21:01.234255+00:00`; exit code: **0**. Фрагмент вывода; полный журнал доступен по ссылке ниже. ```text python3 scripts/init_env.py Using existing .env. chmod +x scripts/restart.sh scripts/stop-one.sh docker compose --project-name highload-lab3 --env-file .env -f compose.yml up -d --build --wait Image highload-lab3-frontend Building Image highload-lab3-migrate Building Image highload-lab3-api Building #1 [internal] load local bake definitions #1 reading from stdin 1.57kB done #1 DONE 0.0s #2 [frontend internal] load build definition from Dockerfile #2 transferring dockerfile: 181B 0.0s done #2 DONE 0.1s #3 [migrate internal] load build definition from Dockerfile #3 transferring dockerfile: 661B 0.0s done #3 DONE 0.1s #4 [api internal] load metadata for docker.io/library/golang:1.22.2-bookworm #4 DONE 0.1s #5 [frontend internal] load metadata for docker.io/library/node:22-bookworm-slim #5 DONE 0.1s #6 [migrate internal] load metadata for docker.io/library/debian:12.15-slim #6 DONE 0.1s #7 [migrate internal] load .dockerignore #7 transferring context: #7 transferring context: 268B 0.0s done #7 DONE 0.1s #8 [frontend internal] load .dockerignore #8 transferring context: 58B 0.0s done #8 DONE 0.1s #9 [api internal] load build context #9 DONE 0.0s #10 [api builder 1/6] FROM docker.io/library/golang:1.22.2-bookworm@sha256:d0902bacefdde1cf45528c098d14e55d78c107def8a22d148eabd71582d7a99f #10 resolve docker.io/library/golang:1.22.2-bookworm@sha256:d0902bacefdde1cf45528c098d14e55d78c107def8a22d148eabd71582d7a99f #10 resolve docker.io/library/golang:1.22.2-bookworm@sha256:d0902bacefdde1cf45528c098d14e55d78c107def8a22d148eabd71582d7a99f 0.1s done #10 DONE 0.1s #11 [migrate stage-1 1/4] FROM docker.io/library/debian:12.15-slim@sha256:88200866dfff7ea7f5cbcb6ec7c8a701889efe6fe859fe64d6990e4b07ea4171 #11 resolve docker.io/library/debian:12.15-slim@sha256:88200866dfff7ea7f5cbcb6ec7c8a701889efe6fe859fe64d6990e4b07ea4171 0.1s done #11 DONE 0.1s #12 [frontend 1/5] FROM docker.io/library/node:22-bookworm-slim@sha256:43ac6c60b8f89723f746e8a92ce91abd5017e627ce1ddfe4238355d3a30b772c #12 resolve docker.io/library/node:22-bookworm-slim@sha256:43ac6c60b8f89723f746e8a92ce91abd5017e627ce1ddfe4238355d3a30b772c 0.1s done #12 DONE 0.1s #13 [frontend internal] load build context #13 transferring context: 488B 0.1s done #13 DONE 0.1s #14 [frontend 2/5] WORKDIR /app #14 CACHED #15 [frontend 3/5] COPY package.json package-lock.json ./ #15 CACHED #16 [frontend 4/5] RUN npm ci #16 CACHED #17 [frontend 5/5] COPY . . #17 CACHED #18 [frontend] exporting to image ... [пропущенные строки — в полном журнале] ... Container highload-lab3-api-13 Waiting Container highload-lab3-api-12 Waiting Container highload-lab3-api-13 Healthy Container highload-lab3-api-12 Healthy Container highload-lab3-haproxy-1 Waiting Container highload-lab3-haproxy-1 Healthy Container highload-lab3-redis-1 Waiting Container highload-lab3-db-1 Waiting Container highload-lab3-migrate-1 Waiting Container highload-lab3-api-13 Waiting Container highload-lab3-api-12 Waiting Container highload-lab3-haproxy-1 Waiting Container highload-lab3-frontend-1 Waiting Container highload-lab3-redis-1 Healthy Container highload-lab3-db-1 Healthy Container highload-lab3-migrate-1 Exited Container highload-lab3-haproxy-1 Healthy Container highload-lab3-frontend-1 Healthy Container highload-lab3-api-13 Healthy Container highload-lab3-api-12 Healthy ``` Полный сохранённый вывод: [evidence/criteria/runs/lab3-report-04/startup.txt](runs/lab3-report-04/startup.txt). ### inventory Проверка приложения. ```sh python3 scripts/generate_evidence.py --inspect ``` Начало UTC: `2026-10-10T16:21:17.236315+00:00`; конец UTC: `2026-10-10T16:21:18.715399+00:00`; exit code: **0**. Фрагмент вывода; полный журнал доступен по ссылке ниже. ```text { "containers": [ { "service": "api", "instance": "04f3baa4775a", "state": "running", "exit_code": 0, "health": "healthy", "cpu": 500000000, "memory": 134217728, "ports": {}, "networks": { "highload-lab3_data": { "address": "172.25.0.5" }, "highload-lab3_proxy": { "address": "172.24.0.3" } }, "image": "sha256:363f45fa05716cae10a22502ffcf239d6caa1071b83ffff36f38293bfc23c01b", "started": "2026-10-10T16:14:19.585285959Z", "container_id": "04f3baa4775a9bbbdddef6946e6afd668350a2122344523620da4c9ab01b7d98", "gomaxprocs": "1" }, { "service": "api", "instance": "4864ca4d784f", "state": "running", "exit_code": 0, "health": "healthy", "cpu": 500000000, "memory": 134217728, "ports": {}, "networks": { "highload-lab3_data": { "address": "172.25.0.4" }, "highload-lab3_proxy": { "address": "172.24.0.2" } }, "image": "sha256:363f45fa05716cae10a22502ffcf239d6caa1071b83ffff36f38293bfc23c01b", "started": "2026-10-10T16:15:26.924492269Z", "container_id": "4864ca4d784f90c711346dfa3e290dfeb54e65f53dd2aa0019cf224976513cc1", "gomaxprocs": "1" }, { "service": "db", "instance": "edfcf3091ee4", "state": "running", "exit_code": 0, "health": "healthy", "cpu": 1000000000, "memory": 536870912, "ports": {}, "networks": { "highload-lab3_data": { "address": "172.25.0.3" } }, "image": "sha256:38471f330eb885e04de130b768d6db4e10469e2311879c7e5c699f6d2d8a1c74", "started": "2026-10-10T16:14:14.990276912Z", "container_id": "edfcf3091ee410c68a4d6845fee0aaed1477744abba90d7b6de8dffbfe51f05c" }, { "service": "frontend", "instance": "ceb091ff4cee", "state": "running", "exit_code": 0, "health": "healthy", ... [пропущенные строки — в полном журнале] ... "path": "/health/ready", "status": 200, "instance": "4864ca4d784f" } ], "migration_version_dirty": "3|f", "git_ignored": [ ".env", ".memory/" ], "hook_scope": { "restart.sh": { "sha256": "0bdb05ec336f4e175ab2a76f172fcab06512003f70962adcd3e4c64567da1c43" }, "stop-one.sh": { "sha256": "6eda7ff0eaaf521a2510e3b4ea2675ec7cd44851aeedf7300ca099ade9fa46f8" } } } PASS: actual containers and HAProxy addresses agree; migration 3 clean; storage/API private; secrets ignored ``` Полный сохранённый вывод: [evidence/criteria/runs/lab3-report-04/inventory.txt](runs/lab3-report-04/inventory.txt). ## Реализация и дополнительные доказательства - [compose.yml](../../compose.yml) - [src/Dockerfile](../../src/Dockerfile) - [scripts/init_env.py](../../scripts/init_env.py) - [src/backend/repositories/database.go](../../src/backend/repositories/database.go) - [evidence/criteria/runs/lab3-report-04/manifest.json](runs/lab3-report-04/manifest.json)