diff --git a/REPORT.md b/REPORT.md index df516229..f89b696f 100644 --- a/REPORT.md +++ b/REPORT.md @@ -6,7 +6,11 @@ `f591fa64e525679a31c9db7f942d36c789e1a12f`, код переноса — `8e4532f6f5c05d902b6e2c310f54320d95585904`. Текущие проверки уровня 3: [новая матрица](evidence/sqlalchemy-2026-11-06/grade3/NOTES.md), полный SHA каждой команды в raw-выводе. - Уровни 4/5 обновляются последовательными циклами; итоговую редакцию отчёта подготовит этап после ревью. + Новые проверки уровня4: [протокол и память](evidence/sqlalchemy-2026-11-06/grade4/NOTES.md). + Штатные3слота: 840/840 успешных загрузок в18точках штатной конфигурации (36точек вместе с контролем), максимум API448MiB, + OOM 0; clean-clone cf41f7c прошёл и сохранил volumes. Штатная уборка сняла все 30 pending, + после неё 1669 строк/объектов без расхождений. Сверка трека проверяется отдельным циклом; + итоговую редакцию отчёта подготовит этап после ревью. **Таблицы и численные результаты ниже, ссылающиеся на evidence вне sqlalchemy-2026-11-06, относятся к исторической реализации asyncpg и не подтверждают текущий SQLAlchemy-код.** Публикация в этой фазе не выполняется. diff --git a/evidence/sqlalchemy-2026-11-06/README.md b/evidence/sqlalchemy-2026-11-06/README.md new file mode 100644 index 00000000..1dc564e4 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/README.md @@ -0,0 +1,22 @@ +# Проверки ЛР4 после переноса SQLAlchemy + +Источник основы — immutable snapshot `f591fa64e525679a31c9db7f942d36c789e1a12f` ЛР3. +Перенос: `8e4532f6f5c05d902b6e2c310f54320d95585904`, архив `41700c27e58474f35ea6d1c3352c8217c3f70274`. +Приложение, схема и нормативные файлы в циклах проверки уровней 3/4 не менялись. +Даты raw в UTC: 5 ноября вечером соответствует 6 ноября МСК. + +- [Уровень 3](grade3/NOTES.md): завершён, архив/коммит `02f3858`. +- [Уровень 4](grade4/NOTES.md): завершён:19 stack-тестов,36точек памяти,чистый clone,штатная уборка30намерений + и3прогона записи; основной стенд остановлен, volumes сохранены. +- [Проверка всех 21 замечаний](REVIEW-CLOSURE.md): для каждой строки указаны текущие основания; + незавершённые измерения reconciler явно отмечены. + +В raw `*.txt` записаны команда, полный SHA, разрешённые параметры окружения, stdout/stderr, +exit code и длительность. JSON памяти содержит SHA и UTC; сводка получается командой +из grade4/NOTES.md. Старые серии вне этого каталога сохранены и не выданы за новые. +Сбой синтаксиса команды LB (`grade3/lb-check.txt`) и ожидаемый отказ перезаписи каталога +(`grade4/reuse-rejected.txt`) сохранены, причины и успешный повтор описаны в заметках. + +Стенды изолированы по Compose project, данные синтетические. Публикаций нет. +Чистый clone размещён в игнорируемой `.verification/`, его контейнеры остановлены, +volumes сохранены. Стенд уровней3/4 также остановлен; стенды трека будут остановлены после его завершения. diff --git a/evidence/sqlalchemy-2026-11-06/REVIEW-CLOSURE.md b/evidence/sqlalchemy-2026-11-06/REVIEW-CLOSURE.md index 0bbad55b..c3394063 100644 --- a/evidence/sqlalchemy-2026-11-06/REVIEW-CLOSURE.md +++ b/evidence/sqlalchemy-2026-11-06/REVIEW-CLOSURE.md @@ -12,10 +12,10 @@ SQLAlchemy-перенос 8e4532f6f5c05d902b6e2c310f54320d95585904, 404 теку | 3 | REPORT различает наблюдавшийся grace и recheck. test_row_written_after_listing_keeps_the_object проходит; новый demo должен отдельно вывести rechecked_total. | | 4 | scripts/reconcile-inject.sh fresh использует один UUID; demo сравнивает множества. Методика: 18 явных загрузок + fixture предварительного публичного smoke. Ожидает нового demo. | | 5 | _row хеширует любую строку в карантине даже без deep. test_other_bytes_of_the_same_length_keep_the_quarantine проходит; новый heal ожидается в track5. | -| 6 | Историческая колонка LB переименована в максимум из трёх. Новая таблица будет рассчитывать медиану и диапазон непосредственно из трёх JSON. | +| 6 | Историческая колонка LB переименована в максимум из трёх. grade4/memory-summary.json и NOTES.md содержат медиану и диапазон непосредственно из36 JSON; tools/summarize_upload_memory.py воспроизводит расчёт. | | 7 | grade3/s3-security.txt: полный SHA/UTC, JSON политик сформирован json.dumps, 31 PASS и RESULT PASS. | | 8 | grade3/failover-upload.json: UTC/SHA, target exited и сосед running при download, SHA равен. | -| 9 | scripts/clean-clone.sh сохраняет raw, проверяет ошибки и не удаляет volumes. Ожидает нового clone-прогона. | +| 9 | scripts/clean-clone.sh сохраняет raw, проверяет ошибки и не удаляет volumes. grade4/clean-clone-command.txt: smoke/persistence/failover/S3/reconcile/migrate PASS, exit0; три volumes сохранены. | | 10 | grade4/stack-faults.txt: test_token_is_checked_before_the_declared_size, 401 при Content-Length 10485761. | | 11 | grade3/s3-security.txt: API ListBucket deny, Get/Put/Delete allow; отдельные ограниченные ключи reconciler. | | 12 | Положительный прогресс продлевает deadline. grade4/stack-faults.txt: upload 3 MiB за 12,2 с, download за 16,0 с — оба PASS. | @@ -24,7 +24,7 @@ SQLAlchemy-перенос 8e4532f6f5c05d902b6e2c310f54320d95585904, 404 теку | 15 | _rows использует lookahead size+1; test_pages_of_rows_are_not_followed_by_an_empty_one проходит. Ожидает новых чисел SQL из cost. | | 16 | compose x-s3-client user65534:65534; grade3/limits.txt проверяет и одноразовые сервисы. CI отдельно проверяет s3-init/migrate через ps -aq. | | 17 | REPORT ограничения процесса: carry-over закрывает 3.9, номер 4.1 пришёл из ЛР3; превышение 400 слов признано. Старые архивы не переписаны. | -| 18 | load-evidence.sh содержит полный digest и монтирования, сеть из project; ошибка клиента возвращается. Ожидает трёх реальных прогонов. | +| 18 | load-evidence.sh содержит полный digest и монтирования, сеть из project; ошибка клиента возвращается. grade4/load.txt и load/run1–3.json: три успешных прогона, ошибок0; команды полные, медиана1529,186RPS. | | 19 | Новая серия S3 ×3: upload 0,828–5,039, download 0,510–1,397 с, <6 с. Счётчик negative: 53 в grade3, 54 в grade4; оба 0×5xx. Это число наблюдений, не константа. | | 20 | upload_memory.py --out требует пустой каталог; provenance в каждом JSON. Изоляция cost будет проверена в track5 без удаления старых файлов. | | 21 | Дубликат №5: любой карантин снимается только после SHA-256; тест с другими байтами той же длины проходит. | diff --git a/evidence/sqlalchemy-2026-11-06/grade4/NOTES.md b/evidence/sqlalchemy-2026-11-06/grade4/NOTES.md new file mode 100644 index 00000000..d6859a0b --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/NOTES.md @@ -0,0 +1,86 @@ +# Уровень 4: промежуточные результаты SQLAlchemy + +Протокол: openspec change verify-lab4-grade4-sqlalchemy, plan c7e7a86 до измерений. +Обвязка 6c706a727ec7b4c5f8254e19401705847e8e9c78; приложение не менялось после переноса. + +| Критерий | Команда / файл | Наблюдение | +| --- | --- | --- | +| Все негативные файлы без 500 | pytest -m stack student-tests/stack, stack-faults.txt | 19 passed; negative-files: 54 ответа, 0×5xx | +| Компенсация PostgreSQL/S3 | тот же suite | COMMIT fault → 503, сразу строка отсутствует, объект HEAD404; audit reason=compensation | +| Уборка после падения | тот же suite | обе реплики поочерёдно убиты между PUT и COMMIT; pending+HEAD200; старый остаток удалён, свежий сохранён, готовое вложение осталось побайтно | +| Abort/stall | тот же suite | обрыв 256KiB/5MiB: 400, намерение отсутствует; зависание: 503 за 8,01 с | +| Auth/size и deadline | тот же suite | без токена и Content-Length>10MiB: 401; upload3MiB за12,2с и download за16,0с успешны | +| Ограничение памяти, ≥10 одновременных | memory-{1,2,3}.txt и memory/run{1,2,3} | 36 точек (12×3); raw сохранён, сводка ниже | +| Bootstrap и приватные ограниченные ключи | ../grade3/s3-security.txt, ../grade3/limits.txt | 31 PASS, повтор×2 без изменений, API ListBucket deny, anonymousGET403, non-root65534 | + +Протокол использует реальные Docker-сервисы, два API через LB18084. Все19 stack-тестов +пройдены за129,51с, включая PG/Valkey outage, logout/TTL, рестарты. Тест намеренно сдвигает +created_at только своих синтетических объектов для проверки grace; пользовательские данные не затронуты. + +В первом повторе default3 slots: пик API431,3MiB, OOM 0, все 201; negative-control64 slots: пик513,7MiB и один503. Это предварительное наблюдение, итоговая таблица по трём повторам ниже. + +Повторы1/2 записаны на6c706a7, повтор3 наcf41f7c. `git diff --quiet 6c706a7 cf41f7c -- src compose.yaml Dockerfile infra alembic pyproject.toml uv.lock` вернул0: изменились только документы и отдельный агрегатор, runtime и методика памяти одинаковы. + +## Итог памяти + +Команда агрегации: `.venv/bin/python tools/summarize_upload_memory.py evidence/sqlalchemy-2026-11-06/grade4/memory > evidence/sqlalchemy-2026-11-06/grade4/memory-summary.json`. +Каждая ячейка API/LB — медиана и min–max трёх пиков. Пик API в одном прогоне — +максимум memory.peak двух реплик (cgroup: процессы, страничный кэш и сокеты); +p95 считается только среди ответов 201. + +| Слоты | MiB | Клиенты | API MiB (median; min–max) | LB MiB (median; min–max) | 201 по повторам | 503 по повторам | +| ---: | ---: | ---: | --- | --- | --- | --- | +| 3 | 1 | 10 | 279.9; 279.6–280.4 | 21.9; 21.1–24.3 | 20/20/20 | 0/0/0 | +| 3 | 1 | 20 | 283.8; 282.6–285.2 | 25.4; 25.1–26.2 | 40/40/40 | 0/0/0 | +| 3 | 1 | 40 | 288.9; 288.0–289.8 | 26.8; 25.4–26.9 | 80/80/80 | 0/0/0 | +| 3 | 10 | 10 | 401.5; 391.8–404.2 | 21.1; 21.0–21.4 | 20/20/20 | 0/0/0 | +| 3 | 10 | 20 | 427.2; 424.9–444.0 | 23.4; 23.2–25.8 | 40/40/40 | 0/0/0 | +| 3 | 10 | 40 | 440.3; 431.3–448.0 | 28.6; 28.4–28.9 | 80/80/80 | 0/0/0 | +| 64 | 1 | 10 | 281.4; 280.8–282.2 | 23.1; 21.4–23.3 | 20/20/20 | 0/0/0 | +| 64 | 1 | 20 | 292.8; 290.3–293.7 | 27.1; 24.8–28.2 | 40/40/40 | 0/0/0 | +| 64 | 1 | 40 | 323.3; 303.2–325.9 | 26.6; 24.7–27.5 | 80/80/80 | 0/0/0 | +| 64 | 10 | 10 | 398.1; 384.9–429.4 | 21.5; 21.5–23.4 | 20/20/20 | 0/0/0 | +| 64 | 10 | 20 | 512.0; 512.0–512.0 | 24.5; 23.4–26.3 | 40/40/40 | 0/0/0 | +| 64 | 10 | 40 | 512.6; 512.6–513.7 | 26.3; 25.0–28.5 | 79/62/72 | 1/18/8 | + +Штатные 3 слота: все 840 загрузок201, максимальный пик 448 MiB при лимите 512 MiB, +OOM 0 у API/LB. Контроль 64 слота: 27×503 из 840, пик512,6–513,7MiB; OOM 0 — превышение +memory.peak немного выше memory.max возможно во время учёта cgroup, это не доказательство OOM. +Вывод: ограничение конкуренции удерживает память с запасом64MiB в этой матрице. +Порог 3 не обещает такую же задержку при произвольной скорости/размере изображений. +Старый максимум3слота345MiB меньше нового448MiB: новый код требует больше RAM. +Это сравнение серий, не изолированный причинный эксперимент одной библиотеки. +На снимке host-during-memory.txt запущены только контейнеры этого project. + +## Чистый clone + +`sh scripts/clean-clone.sh` на cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e: +76,866с, exit0. Полный вывод в clean-clone-command.txt и clean-clone.txt. +Проект hlpipe-lab4-clean-20261105231220, свежие volumes, HTTP18084/stats24845. +Smoke/persistence/failover, upload→stop→download, S3-outage,31securityPASS, +dry-run reconciler и повторная миграция завершены. После down все три volumes остались. +Во время проверки был остановлен только LB проекта grades для освобождения18084; +его API/PG/S3 продолжали штатную уборку. После clone его LB восстановлен. + +Повтор make check/lint и make student-test после изменений обвязки: checks.txt и student-tests.txt,404passed19deselected за79,50с. reuse-rejected.txt: существующий каталог отклонён exit2 до нагрузки. + +## Штатная уборка после перегрузки + +leftovers-command.txt / overload-leftovers.txt: команда длилась 847,812 с, +с 23:11:34 до23:25:41UTC. Возраст строк не сдвигался. До уборки30pending (27от503 +серии памяти и3от S3-outage); восемь из них имели объект. Sweeper с grace900с удалил +30намерений, audit reason=abandoned30 и swept30, с23:14:02 до23:25:32UTC. +После:1669ready,1669объектов,0pending; shallow dry-run errors0 и все found0. +CLI сверки использовал свой default grace3600/skew60, очищал именно API-sweeper с900с. + +## Запись сообщений и завершение + +load-command.txt/load.txt и load/run{1,2,3}.json: полный digest, монтирования и сеть из +Compose project;3×8с,64клиента, пауза15с. RPS1470,074/1529,186/1549,329 (медиана1529,186), +p95 93,452/95,152/95,973мс, ошибок0 во всех повторах. По Docker-снимку чужих контейнеров нет. +Это ниже исторических2106RPS; старый результат не переносится на SQLAlchemy. +Закрытый контур, клиент на той же VM, один чат: результат не является предельной производительностью +архитектуры. Финальный make test PASS; make down остановил project с сохранением volumes. + +Все четыре пункта уровня4 README подтверждены. Остаточные пункты review1 про reconciler +перенесены в следующий последовательный цикл track5, см. ../REVIEW-CLOSURE.md. diff --git a/evidence/sqlalchemy-2026-11-06/grade4/checks.txt b/evidence/sqlalchemy-2026-11-06/grade4/checks.txt new file mode 100644 index 00000000..95abf643 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/checks.txt @@ -0,0 +1,12 @@ +date: 2026-11-05T23:14:04Z commit: cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e +environment: {"NO_PROXY": "localhost,127.0.0.1,::1"} +$ make check lint +python3 scripts/check_contract.py +PASS: offline skeleton structure, local refs and Python syntax; application NOT tested. +.venv/bin/ruff check src student-tests scripts/capture_evidence.py alembic scripts/scaling.py tools scripts/probe.py scripts/limits.py scripts/lab4_scenarios.py scripts/lab4_seed.py scripts/upload_memory.py scripts/reconcile_check.py scripts/reconcile_track.py +All checks passed! +.venv/bin/ruff format --check src student-tests scripts/capture_evidence.py alembic scripts/scaling.py tools scripts/probe.py scripts/limits.py scripts/lab4_scenarios.py scripts/lab4_seed.py scripts/upload_memory.py scripts/reconcile_check.py scripts/reconcile_track.py +154 files already formatted +.venv/bin/ty check src student-tests alembic +All checks passed! +exit_code: 0 elapsed_seconds: 0.312 diff --git a/evidence/sqlalchemy-2026-11-06/grade4/clean-clone-command.txt b/evidence/sqlalchemy-2026-11-06/grade4/clean-clone-command.txt new file mode 100644 index 00000000..4a577447 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/clean-clone-command.txt @@ -0,0 +1,559 @@ +date: 2026-11-05T23:12:20Z commit: cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e +environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-grades-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/sqlalchemy-2026-11-06/grade4", "NO_PROXY": "localhost,127.0.0.1,::1"} +$ sh scripts/clean-clone.sh +date: 2026-11-05T23:12:20Z commit: cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e project: hlpipe-lab4-clean-20261105231220 +HTTP=18084 stats=24845 +$ git clone --quiet --no-hardlinks /.verification/hlpipe-lab4-clean-20261105231220 +$ git checkout --quiet --detach cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e +$ make secrets +sh scripts/secrets.sh +создан secrets/postgres_password +создан secrets/database_url +создан secrets/cursor_secret +создан secrets/valkey_password +создан secrets/valkey.conf +создан secrets/cache_url +создан secrets/s3_root_user +создан secrets/s3_root_password +создан secrets/s3_access_key_id +создан secrets/s3_secret_access_key +создан secrets/s3_reconciler_access_key_id +создан secrets/s3_reconciler_secret_access_key +создан .env из .env.example +$ docker compose --env-file .env config --quiet +$ make up +sh scripts/secrets.sh +docker compose up -d --build --wait +#1 [internal] load local bake definitions +#1 reading from stdin 545B done +#1 DONE 0.0s + +#2 [internal] load build definition from Dockerfile +#2 transferring dockerfile: 1.65kB done +#2 DONE 0.0s + +#3 [internal] load metadata for ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142 +#3 DONE 0.0s + +#4 [internal] load metadata for docker.io/library/python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d +#4 DONE 1.4s + +#5 [internal] load .dockerignore +#5 transferring context: 453B done +#5 DONE 0.1s + +#6 FROM ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142 +#6 resolve ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142 0.0s done +#6 DONE 0.0s + +#7 [builder 1/7] FROM docker.io/library/python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d +#7 resolve docker.io/library/python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d 0.0s done +#7 DONE 0.0s + +#8 [internal] load build context +#8 transferring context: 483.54kB 0.0s done +#8 DONE 0.0s + +#9 [builder 2/7] COPY --from=ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142 /uv /usr/local/bin/uv +#9 CACHED + +#10 [builder 3/7] WORKDIR /build +#10 CACHED + +#11 [builder 4/7] COPY pyproject.toml uv.lock README.md ./ +#11 CACHED + +#12 [builder 5/7] RUN uv sync --locked --no-dev --no-install-project --no-editable +#12 CACHED + +#13 [builder 6/7] COPY src ./src +#13 DONE 0.0s + +#14 [builder 7/7] RUN uv sync --locked --no-dev --no-editable +#14 0.152 Resolved 78 packages in 0.39ms +#14 0.153 Building mtusi-messenger @ file:///build +#14 1.399 Built mtusi-messenger @ file:///build +#14 1.403 Prepared 1 package in 1.24s +#14 1.407 Installed 1 package in 3ms +#14 1.481 Bytecode compiled 1701 files in 74ms +#14 1.481 + mtusi-messenger==1.4.0 (from file:///build) +#14 DONE 1.5s + +#15 [runtime 2/6] RUN groupadd --system --gid 10001 messenger && useradd --system --uid 10001 --gid messenger --no-create-home --shell /usr/sbin/nologin messenger +#15 CACHED + +#16 [runtime 3/6] COPY --from=builder --chown=root:root /opt/venv /opt/venv +#16 DONE 0.3s + +#17 [runtime 4/6] WORKDIR /app +#17 DONE 0.0s + +#18 [runtime 5/6] COPY --chown=root:root alembic.ini ./ +#18 DONE 0.0s + +#19 [runtime 6/6] COPY --chown=root:root alembic ./alembic +#19 DONE 0.0s + +#20 exporting to image +#20 exporting layers +#20 exporting layers 2.8s done +#20 exporting manifest sha256:b0f8b4f5bfdca8059b9184ca5af11b5341a64dd469a52e6daedd593b2689c003 +#20 exporting manifest sha256:b0f8b4f5bfdca8059b9184ca5af11b5341a64dd469a52e6daedd593b2689c003 done +#20 exporting config sha256:07d0696b888e360b9e3e8c2cbc9105c9794a86343045cfb9e1efcc797c65d091 done +#20 exporting attestation manifest sha256:13bcaf7f8d32ec9c3b61cf342963eac3f4022a26ae7ebab90afd39ceb7cc6ca0 done +#20 exporting manifest list sha256:01a5e25934253c3377e9e2f255a54e7f958465552c70d98ca02d088176edb344 done +#20 naming to docker.io/library/mtusi-messenger:hlpipe-lab4-clean-20261105231220 done +#20 unpacking to docker.io/library/mtusi-messenger:hlpipe-lab4-clean-20261105231220 +#20 unpacking to docker.io/library/mtusi-messenger:hlpipe-lab4-clean-20261105231220 0.6s done +#20 DONE 3.4s + +#21 resolving provenance for metadata file +#21 DONE 0.0s + api Built + Network hlpipe-lab4-clean-20261105231220_backend Creating + Network hlpipe-lab4-clean-20261105231220_backend Created + Network hlpipe-lab4-clean-20261105231220_edge Creating + Network hlpipe-lab4-clean-20261105231220_edge Created + Volume "hlpipe-lab4-clean-20261105231220_valkeydata" Creating + Volume "hlpipe-lab4-clean-20261105231220_valkeydata" Created + Volume "hlpipe-lab4-clean-20261105231220_pgdata" Creating + Volume "hlpipe-lab4-clean-20261105231220_pgdata" Created + Volume "hlpipe-lab4-clean-20261105231220_s3data" Creating + Volume "hlpipe-lab4-clean-20261105231220_s3data" Created + Container hlpipe-lab4-clean-20261105231220-lb-1 Creating + Container hlpipe-lab4-clean-20261105231220-valkey-1 Creating + Container hlpipe-lab4-clean-20261105231220-s3-1 Creating + Container hlpipe-lab4-clean-20261105231220-postgres-1 Creating + Container hlpipe-lab4-clean-20261105231220-valkey-1 Created + Container hlpipe-lab4-clean-20261105231220-s3-1 Created + Container hlpipe-lab4-clean-20261105231220-postgres-1 Created + Container hlpipe-lab4-clean-20261105231220-s3-init-1 Creating + Container hlpipe-lab4-clean-20261105231220-migrate-1 Creating + Container hlpipe-lab4-clean-20261105231220-lb-1 Created + Container hlpipe-lab4-clean-20261105231220-s3-init-1 Created + Container hlpipe-lab4-clean-20261105231220-migrate-1 Created + Container hlpipe-lab4-clean-20261105231220-api-2 Creating + Container hlpipe-lab4-clean-20261105231220-api-1 Creating + Container hlpipe-lab4-clean-20261105231220-api-1 Created + Container hlpipe-lab4-clean-20261105231220-api-2 Created + Container hlpipe-lab4-clean-20261105231220-postgres-1 Starting + Container hlpipe-lab4-clean-20261105231220-valkey-1 Starting + Container hlpipe-lab4-clean-20261105231220-s3-1 Starting + Container hlpipe-lab4-clean-20261105231220-lb-1 Starting + Container hlpipe-lab4-clean-20261105231220-postgres-1 Started + Container hlpipe-lab4-clean-20261105231220-postgres-1 Waiting + Container hlpipe-lab4-clean-20261105231220-valkey-1 Started + Container hlpipe-lab4-clean-20261105231220-s3-1 Started + Container hlpipe-lab4-clean-20261105231220-s3-1 Waiting + Container hlpipe-lab4-clean-20261105231220-lb-1 Started + Container hlpipe-lab4-clean-20261105231220-postgres-1 Healthy + Container hlpipe-lab4-clean-20261105231220-migrate-1 Starting + Container hlpipe-lab4-clean-20261105231220-migrate-1 Started + Container hlpipe-lab4-clean-20261105231220-s3-1 Healthy + Container hlpipe-lab4-clean-20261105231220-s3-init-1 Starting + Container hlpipe-lab4-clean-20261105231220-s3-init-1 Started + Container hlpipe-lab4-clean-20261105231220-migrate-1 Waiting + Container hlpipe-lab4-clean-20261105231220-s3-init-1 Waiting + Container hlpipe-lab4-clean-20261105231220-migrate-1 Exited + Container hlpipe-lab4-clean-20261105231220-s3-init-1 Exited + Container hlpipe-lab4-clean-20261105231220-api-1 Starting + Container hlpipe-lab4-clean-20261105231220-api-1 Started + Container hlpipe-lab4-clean-20261105231220-api-2 Starting + Container hlpipe-lab4-clean-20261105231220-api-2 Started + Container hlpipe-lab4-clean-20261105231220-migrate-1 Waiting + Container hlpipe-lab4-clean-20261105231220-s3-1 Waiting + Container hlpipe-lab4-clean-20261105231220-api-1 Waiting + Container hlpipe-lab4-clean-20261105231220-api-2 Waiting + Container hlpipe-lab4-clean-20261105231220-valkey-1 Waiting + Container hlpipe-lab4-clean-20261105231220-postgres-1 Waiting + Container hlpipe-lab4-clean-20261105231220-lb-1 Waiting + Container hlpipe-lab4-clean-20261105231220-s3-init-1 Waiting + Container hlpipe-lab4-clean-20261105231220-valkey-1 Healthy + Container hlpipe-lab4-clean-20261105231220-postgres-1 Healthy + Container hlpipe-lab4-clean-20261105231220-s3-1 Healthy + Container hlpipe-lab4-clean-20261105231220-migrate-1 Exited + Container hlpipe-lab4-clean-20261105231220-s3-init-1 Exited + Container hlpipe-lab4-clean-20261105231220-api-1 Healthy + Container hlpipe-lab4-clean-20261105231220-api-2 Healthy + Container hlpipe-lab4-clean-20261105231220-lb-1 Healthy +scripts/lb-wait.sh +$ docker compose ps -a --format {{.Service}} {{.State}} {{.Status}} {{.Ports}} +api running Up 4 seconds (healthy) +api running Up 4 seconds (healthy) +lb running Up 10 seconds (healthy) 127.0.0.1:18084->8080/tcp, 127.0.0.1:24845->8404/tcp +migrate exited Exited (0) 8 seconds ago +postgres running Up 10 seconds (healthy) +s3 running Up 10 seconds (healthy) +s3-init exited Exited (0) 4 seconds ago +valkey running Up 10 seconds (healthy) +$ make test +python3 tests/smoke.py --base-url "http://127.0.0.1:18084" +PASS: lab4 public API scenario; infrastructure and grading evidence remain separate. +$ make test-persistence ACTION_SCRIPT=scripts/restart.sh +python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://127.0.0.1:18084" +Executing explicit persistence hook; hook output suppressed to avoid leaking secrets. +PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence. +$ make test-failover ACTION_SCRIPT=scripts/stop-one.sh +python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://127.0.0.1:18084" +Executing explicit failover hook; hook output suppressed to avoid leaking secrets. +{"observed_instances_before": 2, "successful_writes": 130, "failed_attempts": 0, "first_recovery_seconds": 3.119} +PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence. +$ docker compose ps -a --format {{.Service}} {{.Name}} {{.State}} api +api hlpipe-lab4-clean-20261105231220-api-1 exited +api hlpipe-lab4-clean-20261105231220-api-2 running +$ make restore +scripts/restore.sh + Container hlpipe-lab4-clean-20261105231220-api-2 Running + Container hlpipe-lab4-clean-20261105231220-api-1 Starting + Container hlpipe-lab4-clean-20261105231220-api-1 Started + Container hlpipe-lab4-clean-20261105231220-api-1 Waiting + Container hlpipe-lab4-clean-20261105231220-api-2 Waiting + Container hlpipe-lab4-clean-20261105231220-api-1 Healthy + Container hlpipe-lab4-clean-20261105231220-api-2 Healthy +$ make scenario SCENARIO=failover-upload +python3 scripts/lab4_scenarios.py failover-upload --base-url "http://127.0.0.1:18084" --restore --output evidence/failover-upload.json +{ + "ok": true, + "date": "2026-11-05T23:13:10Z", + "commit": "cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e", + "scenario": "failover-upload", + "upload_instance": "56788b3aeacd", + "download_instance": "cc3f04d0a6fd", + "sha256_equal": true, + "hook_seconds": 2.67, + "download_ok_after_seconds": 2.727, + "replicas_at_download": [ + { + "hostname": "56788b3aeacd", + "status": "exited", + "exit_code": "0", + "started_at": "2026-11-05T23:13:08.93749347Z", + "finished_at": "2026-11-05T23:13:13.57454975Z" + }, + { + "hostname": "cc3f04d0a6fd", + "status": "running", + "exit_code": "0", + "started_at": "2026-11-05T23:12:49.688416461Z", + "finished_at": "2026-11-05T23:12:43.290906014Z" + } + ], + "restored": true, + "replicas_after_restore": [ + { + "hostname": "56788b3aeacd", + "status": "running", + "exit_code": "0", + "started_at": "2026-11-05T23:13:14.013949083Z", + "finished_at": "2026-11-05T23:13:13.57454975Z" + }, + { + "hostname": "cc3f04d0a6fd", + "status": "running", + "exit_code": "0", + "started_at": "2026-11-05T23:12:49.688416461Z", + "finished_at": "2026-11-05T23:12:43.290906014Z" + } + ] +} +scripts/lb-wait.sh +$ make restore +scripts/restore.sh + Container hlpipe-lab4-clean-20261105231220-api-1 Running + Container hlpipe-lab4-clean-20261105231220-api-2 Running + Container hlpipe-lab4-clean-20261105231220-api-1 Waiting + Container hlpipe-lab4-clean-20261105231220-api-2 Waiting + Container hlpipe-lab4-clean-20261105231220-api-1 Healthy + Container hlpipe-lab4-clean-20261105231220-api-2 Healthy +$ make scenario SCENARIO=s3-outage +python3 scripts/lab4_scenarios.py s3-outage --base-url "http://127.0.0.1:18084" --restore --output evidence/s3-outage.json +{ + "ok": true, + "date": "2026-11-05T23:13:18Z", + "commit": "cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e", + "scenario": "s3-outage", + "s3_container_during_outage": [ + { + "hostname": "63d23d7d728d", + "status": "exited", + "exit_code": "0", + "started_at": "2026-11-05T23:12:43.658545375Z", + "finished_at": "2026-11-05T23:13:18.368174877Z" + } + ], + "during_outage": { + "upload": { + "status": 503, + "seconds": 1.528, + "instance": "cc3f04d0a6fd" + }, + "metadata": { + "status": 200, + "seconds": 0.02, + "instance": "56788b3aeacd" + }, + "download": { + "status": 503, + "seconds": 1.889, + "instance": "cc3f04d0a6fd" + }, + "text_message": { + "status": 201, + "seconds": 0.015, + "instance": "56788b3aeacd" + }, + "health_ready": { + "status": 200, + "seconds": 0.004, + "instance": "cc3f04d0a6fd" + } + }, + "expected": { + "upload": 503, + "download": 503, + "text_message": 201 + }, + "as_expected": true, + "s3_back_healthy_seconds": 5.742, + "download_after_recovery": "sha256 equal" +} +scripts/lb-wait.sh +$ sh scripts/s3-check.sh +date: 2026-11-05T23:13:28Z commit: cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e == S3 privacy and bootstrap checks +PASS s3: опубликованные host-порты: нет +PASS s3: консоль :9001 внутри контейнера: 000 +PASS s3-init: повторный запуск 1: 0 +PASS s3-init: повторный запуск 2: 0 +PASS s3-init: состояние IAM/bucket не изменилось: same +PASS api: PutObject: allow +PASS api: HeadObject: allow +PASS api: GetObject: allow +PASS api: ListBucket: deny +PASS reconciler: ListBucket: allow +PASS reconciler: HeadObject: allow +PASS reconciler: GetObject: allow +PASS reconciler: PutObject: deny +PASS reconciler: DeleteObject: allow +PASS reconciler: CreateBucket: deny +PASS reconciler: PutBucketPolicy (public): deny +PASS reconciler: admin ListUsers: deny +PASS api: CreateBucket: deny +PASS api: DeleteBucket: deny +PASS api: PutBucketPolicy (public): deny +PASS api: PutBucketLifecycle (HeadBucket уже 403): deny +PASS api: admin ListUsers: deny +PASS api: PutObject в чужой bucket: deny +PASS api: ListBucket чужого bucket: deny +PASS anonymous: HeadObject: deny +PASS anonymous: ListBucket: deny +PASS anonymous: PutObject: deny +PASS anonymous: прямой HTTP GET объекта из отдельного контейнера: 403 +PASS bucket: anonymous policy: private +PASS api: DeleteObject: allow +PASS s3: консоль :9001 из отдельного контейнера сети стенда: connection refused +== IAM/bucket snapshot (без секретов) +{ + "items": [ + { + "key": "messenger-attachments", + "last_modified": "2026-11-05T23:12:35Z", + "is_dir": true + } + ], + "truncated": false +} +{ + "path": "root/messenger-attachments", + "permission": "private" +} +{ + "name": "messenger-api", + "policy": { + "policy": { + "Statement": [ + { + "Action": [ + "s3:GetObject", + "s3:PutObject", + "s3:DeleteObject" + ], + "Effect": "Allow", + "Resource": [ + "arn:aws:s3:::messenger-attachments/*" + ], + "Sid": "MessengerApiObjects" + } + ], + "Version": "2012-10-17" + }, + "policy_name": "messenger-api" + } +} +{ + "name": "messenger-reconciler", + "policy": { + "policy": { + "Statement": [ + { + "Action": [ + "s3:GetObject", + "s3:DeleteObject" + ], + "Effect": "Allow", + "Resource": [ + "arn:aws:s3:::messenger-attachments/*" + ], + "Sid": "MessengerReconcilerObjects" + }, + { + "Action": [ + "s3:ListBucket" + ], + "Effect": "Allow", + "Resource": [ + "arn:aws:s3:::messenger-attachments" + ], + "Sid": "MessengerReconcilerListing" + } + ], + "Version": "2012-10-17" + }, + "policy_name": "messenger-reconciler" + } +} +{ + "accessKey": "", + "status": "enabled", + "policies": [ + "messenger-api" + ], + "memberOf": [] +} +{ + "accessKey": "", + "status": "enabled", + "policies": [ + "messenger-reconciler" + ], + "memberOf": [] +} +{ + "rules": [ + { + "id": "abort-incomplete-uploads", + "status": "Enabled", + "prefix": "", + "abortIncompleteMultipartUploadDays": 1 + } + ] +} +RESULT: PASS +$ make reconcile +docker compose run --rm --no-deps reconciler +{ + "mode": "dry-run", + "skipped": false, + "grace_seconds": 3600, + "skew_seconds": 60, + "deep": false, + "page_size": 1000, + "scanned": { + "objects": 5, + "rows": 6 + }, + "found": { + "orphan_stale": 0, + "orphan_fresh": 0, + "missing": 0, + "size_mismatch": 0, + "sha_mismatch": 0, + "pending_stale": 0, + "pending_fresh": 1, + "quarantined": 0, + "healed": 0 + }, + "fixed": { + "orphan_stale": 0, + "missing": 0, + "size_mismatch": 0, + "sha_mismatch": 0, + "pending_stale": 0, + "healed": 0 + }, + "rechecked": {}, + "errors": 0, + "samples": { + "pending_fresh": [ + "01a1adfc-f486-7437-8860-2cc085fb3b72" + ] + }, + "cost": { + "seconds": 0.025, + "requests": { + "s3_list": 1, + "s3_head": 0, + "s3_get": 0, + "s3_delete": 0, + "sql": 1 + }, + "waited_seconds": { + "s3_list": 0.011, + "sql": 0.005 + }, + "hashed_bytes": 0, + "cpu_seconds": 0.557, + "max_rss_mib": 107.2 + } +} +$ make migrate +docker compose run --rm migrate + Container hlpipe-lab4-clean-20261105231220-postgres-1 Running +$ make down +docker compose --profile bench --profile tools --profile reconcile down + Container hlpipe-lab4-clean-20261105231220-lb-1 Stopping + Container hlpipe-lab4-clean-20261105231220-api-2 Stopping + Container hlpipe-lab4-clean-20261105231220-api-1 Stopping + Container hlpipe-lab4-clean-20261105231220-lb-1 Stopped + Container hlpipe-lab4-clean-20261105231220-lb-1 Removing + Container hlpipe-lab4-clean-20261105231220-lb-1 Removed + Container hlpipe-lab4-clean-20261105231220-api-2 Stopped + Container hlpipe-lab4-clean-20261105231220-api-2 Removing + Container hlpipe-lab4-clean-20261105231220-api-1 Stopped + Container hlpipe-lab4-clean-20261105231220-api-1 Removing + Container hlpipe-lab4-clean-20261105231220-api-2 Removed + Container hlpipe-lab4-clean-20261105231220-api-1 Removed + Container hlpipe-lab4-clean-20261105231220-migrate-1 Stopping + Container hlpipe-lab4-clean-20261105231220-s3-init-1 Stopping + Container hlpipe-lab4-clean-20261105231220-valkey-1 Stopping + Container hlpipe-lab4-clean-20261105231220-migrate-1 Stopped + Container hlpipe-lab4-clean-20261105231220-migrate-1 Removing + Container hlpipe-lab4-clean-20261105231220-s3-init-1 Stopped + Container hlpipe-lab4-clean-20261105231220-s3-init-1 Removing + Container hlpipe-lab4-clean-20261105231220-s3-init-1 Removed + Container hlpipe-lab4-clean-20261105231220-s3-1 Stopping + Container hlpipe-lab4-clean-20261105231220-migrate-1 Removed + Container hlpipe-lab4-clean-20261105231220-postgres-1 Stopping + Container hlpipe-lab4-clean-20261105231220-s3-1 Stopped + Container hlpipe-lab4-clean-20261105231220-s3-1 Removing + Container hlpipe-lab4-clean-20261105231220-postgres-1 Stopped + Container hlpipe-lab4-clean-20261105231220-postgres-1 Removing + Container hlpipe-lab4-clean-20261105231220-s3-1 Removed + Container hlpipe-lab4-clean-20261105231220-postgres-1 Removed + Container hlpipe-lab4-clean-20261105231220-valkey-1 Stopped + Container hlpipe-lab4-clean-20261105231220-valkey-1 Removing + Container hlpipe-lab4-clean-20261105231220-valkey-1 Removed + Network hlpipe-lab4-clean-20261105231220_edge Removing + Network hlpipe-lab4-clean-20261105231220_backend Removing + Network hlpipe-lab4-clean-20261105231220_backend Removed + Network hlpipe-lab4-clean-20261105231220_edge Removed +$ docker volume ls --filter label=com.docker.compose.project=hlpipe-lab4-clean-20261105231220 +DRIVER VOLUME NAME +local hlpipe-lab4-clean-20261105231220_pgdata +local hlpipe-lab4-clean-20261105231220_s3data +local hlpipe-lab4-clean-20261105231220_valkeydata +DRIVER VOLUME NAME +local hlpipe-lab4-clean-20261105231220_pgdata +local hlpipe-lab4-clean-20261105231220_s3data +local hlpipe-lab4-clean-20261105231220_valkeydata +exit_code: 0; volumes retained +exit_code: 0 elapsed_seconds: 76.866 diff --git a/evidence/sqlalchemy-2026-11-06/grade4/clean-clone.txt b/evidence/sqlalchemy-2026-11-06/grade4/clean-clone.txt new file mode 100644 index 00000000..2e732c1b --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/clean-clone.txt @@ -0,0 +1,555 @@ +date: 2026-11-05T23:12:20Z commit: cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e project: hlpipe-lab4-clean-20261105231220 +HTTP=18084 stats=24845 +$ git clone --quiet --no-hardlinks /.verification/hlpipe-lab4-clean-20261105231220 +$ git checkout --quiet --detach cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e +$ make secrets +sh scripts/secrets.sh +создан secrets/postgres_password +создан secrets/database_url +создан secrets/cursor_secret +создан secrets/valkey_password +создан secrets/valkey.conf +создан secrets/cache_url +создан secrets/s3_root_user +создан secrets/s3_root_password +создан secrets/s3_access_key_id +создан secrets/s3_secret_access_key +создан secrets/s3_reconciler_access_key_id +создан secrets/s3_reconciler_secret_access_key +создан .env из .env.example +$ docker compose --env-file .env config --quiet +$ make up +sh scripts/secrets.sh +docker compose up -d --build --wait +#1 [internal] load local bake definitions +#1 reading from stdin 545B done +#1 DONE 0.0s + +#2 [internal] load build definition from Dockerfile +#2 transferring dockerfile: 1.65kB done +#2 DONE 0.0s + +#3 [internal] load metadata for ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142 +#3 DONE 0.0s + +#4 [internal] load metadata for docker.io/library/python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d +#4 DONE 1.4s + +#5 [internal] load .dockerignore +#5 transferring context: 453B done +#5 DONE 0.1s + +#6 FROM ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142 +#6 resolve ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142 0.0s done +#6 DONE 0.0s + +#7 [builder 1/7] FROM docker.io/library/python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d +#7 resolve docker.io/library/python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d 0.0s done +#7 DONE 0.0s + +#8 [internal] load build context +#8 transferring context: 483.54kB 0.0s done +#8 DONE 0.0s + +#9 [builder 2/7] COPY --from=ghcr.io/astral-sh/uv:0.9.7@sha256:ba4857bf2a068e9bc0e64eed8563b065908a4cd6bfb66b531a9c424c8e25e142 /uv /usr/local/bin/uv +#9 CACHED + +#10 [builder 3/7] WORKDIR /build +#10 CACHED + +#11 [builder 4/7] COPY pyproject.toml uv.lock README.md ./ +#11 CACHED + +#12 [builder 5/7] RUN uv sync --locked --no-dev --no-install-project --no-editable +#12 CACHED + +#13 [builder 6/7] COPY src ./src +#13 DONE 0.0s + +#14 [builder 7/7] RUN uv sync --locked --no-dev --no-editable +#14 0.152 Resolved 78 packages in 0.39ms +#14 0.153 Building mtusi-messenger @ file:///build +#14 1.399 Built mtusi-messenger @ file:///build +#14 1.403 Prepared 1 package in 1.24s +#14 1.407 Installed 1 package in 3ms +#14 1.481 Bytecode compiled 1701 files in 74ms +#14 1.481 + mtusi-messenger==1.4.0 (from file:///build) +#14 DONE 1.5s + +#15 [runtime 2/6] RUN groupadd --system --gid 10001 messenger && useradd --system --uid 10001 --gid messenger --no-create-home --shell /usr/sbin/nologin messenger +#15 CACHED + +#16 [runtime 3/6] COPY --from=builder --chown=root:root /opt/venv /opt/venv +#16 DONE 0.3s + +#17 [runtime 4/6] WORKDIR /app +#17 DONE 0.0s + +#18 [runtime 5/6] COPY --chown=root:root alembic.ini ./ +#18 DONE 0.0s + +#19 [runtime 6/6] COPY --chown=root:root alembic ./alembic +#19 DONE 0.0s + +#20 exporting to image +#20 exporting layers +#20 exporting layers 2.8s done +#20 exporting manifest sha256:b0f8b4f5bfdca8059b9184ca5af11b5341a64dd469a52e6daedd593b2689c003 +#20 exporting manifest sha256:b0f8b4f5bfdca8059b9184ca5af11b5341a64dd469a52e6daedd593b2689c003 done +#20 exporting config sha256:07d0696b888e360b9e3e8c2cbc9105c9794a86343045cfb9e1efcc797c65d091 done +#20 exporting attestation manifest sha256:13bcaf7f8d32ec9c3b61cf342963eac3f4022a26ae7ebab90afd39ceb7cc6ca0 done +#20 exporting manifest list sha256:01a5e25934253c3377e9e2f255a54e7f958465552c70d98ca02d088176edb344 done +#20 naming to docker.io/library/mtusi-messenger:hlpipe-lab4-clean-20261105231220 done +#20 unpacking to docker.io/library/mtusi-messenger:hlpipe-lab4-clean-20261105231220 +#20 unpacking to docker.io/library/mtusi-messenger:hlpipe-lab4-clean-20261105231220 0.6s done +#20 DONE 3.4s + +#21 resolving provenance for metadata file +#21 DONE 0.0s + api Built + Network hlpipe-lab4-clean-20261105231220_backend Creating + Network hlpipe-lab4-clean-20261105231220_backend Created + Network hlpipe-lab4-clean-20261105231220_edge Creating + Network hlpipe-lab4-clean-20261105231220_edge Created + Volume "hlpipe-lab4-clean-20261105231220_valkeydata" Creating + Volume "hlpipe-lab4-clean-20261105231220_valkeydata" Created + Volume "hlpipe-lab4-clean-20261105231220_pgdata" Creating + Volume "hlpipe-lab4-clean-20261105231220_pgdata" Created + Volume "hlpipe-lab4-clean-20261105231220_s3data" Creating + Volume "hlpipe-lab4-clean-20261105231220_s3data" Created + Container hlpipe-lab4-clean-20261105231220-lb-1 Creating + Container hlpipe-lab4-clean-20261105231220-valkey-1 Creating + Container hlpipe-lab4-clean-20261105231220-s3-1 Creating + Container hlpipe-lab4-clean-20261105231220-postgres-1 Creating + Container hlpipe-lab4-clean-20261105231220-valkey-1 Created + Container hlpipe-lab4-clean-20261105231220-s3-1 Created + Container hlpipe-lab4-clean-20261105231220-postgres-1 Created + Container hlpipe-lab4-clean-20261105231220-s3-init-1 Creating + Container hlpipe-lab4-clean-20261105231220-migrate-1 Creating + Container hlpipe-lab4-clean-20261105231220-lb-1 Created + Container hlpipe-lab4-clean-20261105231220-s3-init-1 Created + Container hlpipe-lab4-clean-20261105231220-migrate-1 Created + Container hlpipe-lab4-clean-20261105231220-api-2 Creating + Container hlpipe-lab4-clean-20261105231220-api-1 Creating + Container hlpipe-lab4-clean-20261105231220-api-1 Created + Container hlpipe-lab4-clean-20261105231220-api-2 Created + Container hlpipe-lab4-clean-20261105231220-postgres-1 Starting + Container hlpipe-lab4-clean-20261105231220-valkey-1 Starting + Container hlpipe-lab4-clean-20261105231220-s3-1 Starting + Container hlpipe-lab4-clean-20261105231220-lb-1 Starting + Container hlpipe-lab4-clean-20261105231220-postgres-1 Started + Container hlpipe-lab4-clean-20261105231220-postgres-1 Waiting + Container hlpipe-lab4-clean-20261105231220-valkey-1 Started + Container hlpipe-lab4-clean-20261105231220-s3-1 Started + Container hlpipe-lab4-clean-20261105231220-s3-1 Waiting + Container hlpipe-lab4-clean-20261105231220-lb-1 Started + Container hlpipe-lab4-clean-20261105231220-postgres-1 Healthy + Container hlpipe-lab4-clean-20261105231220-migrate-1 Starting + Container hlpipe-lab4-clean-20261105231220-migrate-1 Started + Container hlpipe-lab4-clean-20261105231220-s3-1 Healthy + Container hlpipe-lab4-clean-20261105231220-s3-init-1 Starting + Container hlpipe-lab4-clean-20261105231220-s3-init-1 Started + Container hlpipe-lab4-clean-20261105231220-migrate-1 Waiting + Container hlpipe-lab4-clean-20261105231220-s3-init-1 Waiting + Container hlpipe-lab4-clean-20261105231220-migrate-1 Exited + Container hlpipe-lab4-clean-20261105231220-s3-init-1 Exited + Container hlpipe-lab4-clean-20261105231220-api-1 Starting + Container hlpipe-lab4-clean-20261105231220-api-1 Started + Container hlpipe-lab4-clean-20261105231220-api-2 Starting + Container hlpipe-lab4-clean-20261105231220-api-2 Started + Container hlpipe-lab4-clean-20261105231220-migrate-1 Waiting + Container hlpipe-lab4-clean-20261105231220-s3-1 Waiting + Container hlpipe-lab4-clean-20261105231220-api-1 Waiting + Container hlpipe-lab4-clean-20261105231220-api-2 Waiting + Container hlpipe-lab4-clean-20261105231220-valkey-1 Waiting + Container hlpipe-lab4-clean-20261105231220-postgres-1 Waiting + Container hlpipe-lab4-clean-20261105231220-lb-1 Waiting + Container hlpipe-lab4-clean-20261105231220-s3-init-1 Waiting + Container hlpipe-lab4-clean-20261105231220-valkey-1 Healthy + Container hlpipe-lab4-clean-20261105231220-postgres-1 Healthy + Container hlpipe-lab4-clean-20261105231220-s3-1 Healthy + Container hlpipe-lab4-clean-20261105231220-migrate-1 Exited + Container hlpipe-lab4-clean-20261105231220-s3-init-1 Exited + Container hlpipe-lab4-clean-20261105231220-api-1 Healthy + Container hlpipe-lab4-clean-20261105231220-api-2 Healthy + Container hlpipe-lab4-clean-20261105231220-lb-1 Healthy +scripts/lb-wait.sh +$ docker compose ps -a --format {{.Service}} {{.State}} {{.Status}} {{.Ports}} +api running Up 4 seconds (healthy) +api running Up 4 seconds (healthy) +lb running Up 10 seconds (healthy) 127.0.0.1:18084->8080/tcp, 127.0.0.1:24845->8404/tcp +migrate exited Exited (0) 8 seconds ago +postgres running Up 10 seconds (healthy) +s3 running Up 10 seconds (healthy) +s3-init exited Exited (0) 4 seconds ago +valkey running Up 10 seconds (healthy) +$ make test +python3 tests/smoke.py --base-url "http://127.0.0.1:18084" +PASS: lab4 public API scenario; infrastructure and grading evidence remain separate. +$ make test-persistence ACTION_SCRIPT=scripts/restart.sh +python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://127.0.0.1:18084" +Executing explicit persistence hook; hook output suppressed to avoid leaking secrets. +PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence. +$ make test-failover ACTION_SCRIPT=scripts/stop-one.sh +python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://127.0.0.1:18084" +Executing explicit failover hook; hook output suppressed to avoid leaking secrets. +{"observed_instances_before": 2, "successful_writes": 130, "failed_attempts": 0, "first_recovery_seconds": 3.119} +PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence. +$ docker compose ps -a --format {{.Service}} {{.Name}} {{.State}} api +api hlpipe-lab4-clean-20261105231220-api-1 exited +api hlpipe-lab4-clean-20261105231220-api-2 running +$ make restore +scripts/restore.sh + Container hlpipe-lab4-clean-20261105231220-api-2 Running + Container hlpipe-lab4-clean-20261105231220-api-1 Starting + Container hlpipe-lab4-clean-20261105231220-api-1 Started + Container hlpipe-lab4-clean-20261105231220-api-1 Waiting + Container hlpipe-lab4-clean-20261105231220-api-2 Waiting + Container hlpipe-lab4-clean-20261105231220-api-1 Healthy + Container hlpipe-lab4-clean-20261105231220-api-2 Healthy +$ make scenario SCENARIO=failover-upload +python3 scripts/lab4_scenarios.py failover-upload --base-url "http://127.0.0.1:18084" --restore --output evidence/failover-upload.json +{ + "ok": true, + "date": "2026-11-05T23:13:10Z", + "commit": "cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e", + "scenario": "failover-upload", + "upload_instance": "56788b3aeacd", + "download_instance": "cc3f04d0a6fd", + "sha256_equal": true, + "hook_seconds": 2.67, + "download_ok_after_seconds": 2.727, + "replicas_at_download": [ + { + "hostname": "56788b3aeacd", + "status": "exited", + "exit_code": "0", + "started_at": "2026-11-05T23:13:08.93749347Z", + "finished_at": "2026-11-05T23:13:13.57454975Z" + }, + { + "hostname": "cc3f04d0a6fd", + "status": "running", + "exit_code": "0", + "started_at": "2026-11-05T23:12:49.688416461Z", + "finished_at": "2026-11-05T23:12:43.290906014Z" + } + ], + "restored": true, + "replicas_after_restore": [ + { + "hostname": "56788b3aeacd", + "status": "running", + "exit_code": "0", + "started_at": "2026-11-05T23:13:14.013949083Z", + "finished_at": "2026-11-05T23:13:13.57454975Z" + }, + { + "hostname": "cc3f04d0a6fd", + "status": "running", + "exit_code": "0", + "started_at": "2026-11-05T23:12:49.688416461Z", + "finished_at": "2026-11-05T23:12:43.290906014Z" + } + ] +} +scripts/lb-wait.sh +$ make restore +scripts/restore.sh + Container hlpipe-lab4-clean-20261105231220-api-1 Running + Container hlpipe-lab4-clean-20261105231220-api-2 Running + Container hlpipe-lab4-clean-20261105231220-api-1 Waiting + Container hlpipe-lab4-clean-20261105231220-api-2 Waiting + Container hlpipe-lab4-clean-20261105231220-api-1 Healthy + Container hlpipe-lab4-clean-20261105231220-api-2 Healthy +$ make scenario SCENARIO=s3-outage +python3 scripts/lab4_scenarios.py s3-outage --base-url "http://127.0.0.1:18084" --restore --output evidence/s3-outage.json +{ + "ok": true, + "date": "2026-11-05T23:13:18Z", + "commit": "cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e", + "scenario": "s3-outage", + "s3_container_during_outage": [ + { + "hostname": "63d23d7d728d", + "status": "exited", + "exit_code": "0", + "started_at": "2026-11-05T23:12:43.658545375Z", + "finished_at": "2026-11-05T23:13:18.368174877Z" + } + ], + "during_outage": { + "upload": { + "status": 503, + "seconds": 1.528, + "instance": "cc3f04d0a6fd" + }, + "metadata": { + "status": 200, + "seconds": 0.02, + "instance": "56788b3aeacd" + }, + "download": { + "status": 503, + "seconds": 1.889, + "instance": "cc3f04d0a6fd" + }, + "text_message": { + "status": 201, + "seconds": 0.015, + "instance": "56788b3aeacd" + }, + "health_ready": { + "status": 200, + "seconds": 0.004, + "instance": "cc3f04d0a6fd" + } + }, + "expected": { + "upload": 503, + "download": 503, + "text_message": 201 + }, + "as_expected": true, + "s3_back_healthy_seconds": 5.742, + "download_after_recovery": "sha256 equal" +} +scripts/lb-wait.sh +$ sh scripts/s3-check.sh +date: 2026-11-05T23:13:28Z commit: cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e == S3 privacy and bootstrap checks +PASS s3: опубликованные host-порты: нет +PASS s3: консоль :9001 внутри контейнера: 000 +PASS s3-init: повторный запуск 1: 0 +PASS s3-init: повторный запуск 2: 0 +PASS s3-init: состояние IAM/bucket не изменилось: same +PASS api: PutObject: allow +PASS api: HeadObject: allow +PASS api: GetObject: allow +PASS api: ListBucket: deny +PASS reconciler: ListBucket: allow +PASS reconciler: HeadObject: allow +PASS reconciler: GetObject: allow +PASS reconciler: PutObject: deny +PASS reconciler: DeleteObject: allow +PASS reconciler: CreateBucket: deny +PASS reconciler: PutBucketPolicy (public): deny +PASS reconciler: admin ListUsers: deny +PASS api: CreateBucket: deny +PASS api: DeleteBucket: deny +PASS api: PutBucketPolicy (public): deny +PASS api: PutBucketLifecycle (HeadBucket уже 403): deny +PASS api: admin ListUsers: deny +PASS api: PutObject в чужой bucket: deny +PASS api: ListBucket чужого bucket: deny +PASS anonymous: HeadObject: deny +PASS anonymous: ListBucket: deny +PASS anonymous: PutObject: deny +PASS anonymous: прямой HTTP GET объекта из отдельного контейнера: 403 +PASS bucket: anonymous policy: private +PASS api: DeleteObject: allow +PASS s3: консоль :9001 из отдельного контейнера сети стенда: connection refused +== IAM/bucket snapshot (без секретов) +{ + "items": [ + { + "key": "messenger-attachments", + "last_modified": "2026-11-05T23:12:35Z", + "is_dir": true + } + ], + "truncated": false +} +{ + "path": "root/messenger-attachments", + "permission": "private" +} +{ + "name": "messenger-api", + "policy": { + "policy": { + "Statement": [ + { + "Action": [ + "s3:GetObject", + "s3:PutObject", + "s3:DeleteObject" + ], + "Effect": "Allow", + "Resource": [ + "arn:aws:s3:::messenger-attachments/*" + ], + "Sid": "MessengerApiObjects" + } + ], + "Version": "2012-10-17" + }, + "policy_name": "messenger-api" + } +} +{ + "name": "messenger-reconciler", + "policy": { + "policy": { + "Statement": [ + { + "Action": [ + "s3:GetObject", + "s3:DeleteObject" + ], + "Effect": "Allow", + "Resource": [ + "arn:aws:s3:::messenger-attachments/*" + ], + "Sid": "MessengerReconcilerObjects" + }, + { + "Action": [ + "s3:ListBucket" + ], + "Effect": "Allow", + "Resource": [ + "arn:aws:s3:::messenger-attachments" + ], + "Sid": "MessengerReconcilerListing" + } + ], + "Version": "2012-10-17" + }, + "policy_name": "messenger-reconciler" + } +} +{ + "accessKey": "", + "status": "enabled", + "policies": [ + "messenger-api" + ], + "memberOf": [] +} +{ + "accessKey": "", + "status": "enabled", + "policies": [ + "messenger-reconciler" + ], + "memberOf": [] +} +{ + "rules": [ + { + "id": "abort-incomplete-uploads", + "status": "Enabled", + "prefix": "", + "abortIncompleteMultipartUploadDays": 1 + } + ] +} +RESULT: PASS +$ make reconcile +docker compose run --rm --no-deps reconciler +{ + "mode": "dry-run", + "skipped": false, + "grace_seconds": 3600, + "skew_seconds": 60, + "deep": false, + "page_size": 1000, + "scanned": { + "objects": 5, + "rows": 6 + }, + "found": { + "orphan_stale": 0, + "orphan_fresh": 0, + "missing": 0, + "size_mismatch": 0, + "sha_mismatch": 0, + "pending_stale": 0, + "pending_fresh": 1, + "quarantined": 0, + "healed": 0 + }, + "fixed": { + "orphan_stale": 0, + "missing": 0, + "size_mismatch": 0, + "sha_mismatch": 0, + "pending_stale": 0, + "healed": 0 + }, + "rechecked": {}, + "errors": 0, + "samples": { + "pending_fresh": [ + "01a1adfc-f486-7437-8860-2cc085fb3b72" + ] + }, + "cost": { + "seconds": 0.025, + "requests": { + "s3_list": 1, + "s3_head": 0, + "s3_get": 0, + "s3_delete": 0, + "sql": 1 + }, + "waited_seconds": { + "s3_list": 0.011, + "sql": 0.005 + }, + "hashed_bytes": 0, + "cpu_seconds": 0.557, + "max_rss_mib": 107.2 + } +} +$ make migrate +docker compose run --rm migrate + Container hlpipe-lab4-clean-20261105231220-postgres-1 Running +$ make down +docker compose --profile bench --profile tools --profile reconcile down + Container hlpipe-lab4-clean-20261105231220-lb-1 Stopping + Container hlpipe-lab4-clean-20261105231220-api-2 Stopping + Container hlpipe-lab4-clean-20261105231220-api-1 Stopping + Container hlpipe-lab4-clean-20261105231220-lb-1 Stopped + Container hlpipe-lab4-clean-20261105231220-lb-1 Removing + Container hlpipe-lab4-clean-20261105231220-lb-1 Removed + Container hlpipe-lab4-clean-20261105231220-api-2 Stopped + Container hlpipe-lab4-clean-20261105231220-api-2 Removing + Container hlpipe-lab4-clean-20261105231220-api-1 Stopped + Container hlpipe-lab4-clean-20261105231220-api-1 Removing + Container hlpipe-lab4-clean-20261105231220-api-2 Removed + Container hlpipe-lab4-clean-20261105231220-api-1 Removed + Container hlpipe-lab4-clean-20261105231220-migrate-1 Stopping + Container hlpipe-lab4-clean-20261105231220-s3-init-1 Stopping + Container hlpipe-lab4-clean-20261105231220-valkey-1 Stopping + Container hlpipe-lab4-clean-20261105231220-migrate-1 Stopped + Container hlpipe-lab4-clean-20261105231220-migrate-1 Removing + Container hlpipe-lab4-clean-20261105231220-s3-init-1 Stopped + Container hlpipe-lab4-clean-20261105231220-s3-init-1 Removing + Container hlpipe-lab4-clean-20261105231220-s3-init-1 Removed + Container hlpipe-lab4-clean-20261105231220-s3-1 Stopping + Container hlpipe-lab4-clean-20261105231220-migrate-1 Removed + Container hlpipe-lab4-clean-20261105231220-postgres-1 Stopping + Container hlpipe-lab4-clean-20261105231220-s3-1 Stopped + Container hlpipe-lab4-clean-20261105231220-s3-1 Removing + Container hlpipe-lab4-clean-20261105231220-postgres-1 Stopped + Container hlpipe-lab4-clean-20261105231220-postgres-1 Removing + Container hlpipe-lab4-clean-20261105231220-s3-1 Removed + Container hlpipe-lab4-clean-20261105231220-postgres-1 Removed + Container hlpipe-lab4-clean-20261105231220-valkey-1 Stopped + Container hlpipe-lab4-clean-20261105231220-valkey-1 Removing + Container hlpipe-lab4-clean-20261105231220-valkey-1 Removed + Network hlpipe-lab4-clean-20261105231220_edge Removing + Network hlpipe-lab4-clean-20261105231220_backend Removing + Network hlpipe-lab4-clean-20261105231220_backend Removed + Network hlpipe-lab4-clean-20261105231220_edge Removed +$ docker volume ls --filter label=com.docker.compose.project=hlpipe-lab4-clean-20261105231220 +DRIVER VOLUME NAME +local hlpipe-lab4-clean-20261105231220_pgdata +local hlpipe-lab4-clean-20261105231220_s3data +local hlpipe-lab4-clean-20261105231220_valkeydata +DRIVER VOLUME NAME +local hlpipe-lab4-clean-20261105231220_pgdata +local hlpipe-lab4-clean-20261105231220_s3data +local hlpipe-lab4-clean-20261105231220_valkeydata +exit_code: 0; volumes retained diff --git a/evidence/sqlalchemy-2026-11-06/grade4/down.txt b/evidence/sqlalchemy-2026-11-06/grade4/down.txt new file mode 100644 index 00000000..48deb692 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/down.txt @@ -0,0 +1,41 @@ +date: 2026-11-05T23:27:03Z commit: cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e +environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-grades-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/sqlalchemy-2026-11-06/grade4", "NO_PROXY": "localhost,127.0.0.1,::1"} +$ make down +docker compose --profile bench --profile tools --profile reconcile down + Container hlpipe-lab4-grades-20261106-api-2 Stopping + Container hlpipe-lab4-grades-20261106-api-1 Stopping + Container hlpipe-lab4-grades-20261106-lb-1 Stopping + Container hlpipe-lab4-grades-20261106-lb-1 Stopped + Container hlpipe-lab4-grades-20261106-lb-1 Removing + Container hlpipe-lab4-grades-20261106-lb-1 Removed + Container hlpipe-lab4-grades-20261106-api-1 Stopped + Container hlpipe-lab4-grades-20261106-api-1 Removing + Container hlpipe-lab4-grades-20261106-api-2 Stopped + Container hlpipe-lab4-grades-20261106-api-2 Removing + Container hlpipe-lab4-grades-20261106-api-1 Removed + Container hlpipe-lab4-grades-20261106-api-2 Removed + Container hlpipe-lab4-grades-20261106-s3-init-1 Stopping + Container hlpipe-lab4-grades-20261106-valkey-1 Stopping + Container hlpipe-lab4-grades-20261106-migrate-1 Stopping + Container hlpipe-lab4-grades-20261106-s3-init-1 Stopped + Container hlpipe-lab4-grades-20261106-s3-init-1 Removing + Container hlpipe-lab4-grades-20261106-migrate-1 Stopped + Container hlpipe-lab4-grades-20261106-migrate-1 Removing + Container hlpipe-lab4-grades-20261106-migrate-1 Removed + Container hlpipe-lab4-grades-20261106-postgres-1 Stopping + Container hlpipe-lab4-grades-20261106-s3-init-1 Removed + Container hlpipe-lab4-grades-20261106-s3-1 Stopping + Container hlpipe-lab4-grades-20261106-valkey-1 Stopped + Container hlpipe-lab4-grades-20261106-valkey-1 Removing + Container hlpipe-lab4-grades-20261106-postgres-1 Stopped + Container hlpipe-lab4-grades-20261106-postgres-1 Removing + Container hlpipe-lab4-grades-20261106-valkey-1 Removed + Container hlpipe-lab4-grades-20261106-s3-1 Stopped + Container hlpipe-lab4-grades-20261106-s3-1 Removing + Container hlpipe-lab4-grades-20261106-postgres-1 Removed + Container hlpipe-lab4-grades-20261106-s3-1 Removed + Network hlpipe-lab4-grades-20261106_edge Removing + Network hlpipe-lab4-grades-20261106_backend Removing + Network hlpipe-lab4-grades-20261106_backend Removed + Network hlpipe-lab4-grades-20261106_edge Removed +exit_code: 0 elapsed_seconds: 3.245 diff --git a/evidence/sqlalchemy-2026-11-06/grade4/final-smoke.txt b/evidence/sqlalchemy-2026-11-06/grade4/final-smoke.txt new file mode 100644 index 00000000..1ad0e04e --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/final-smoke.txt @@ -0,0 +1,6 @@ +date: 2026-11-05T23:27:03Z commit: cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e +environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-grades-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/sqlalchemy-2026-11-06/grade4", "NO_PROXY": "localhost,127.0.0.1,::1"} +$ make test +python3 tests/smoke.py --base-url "http://127.0.0.1:18084" +PASS: lab4 public API scenario; infrastructure and grading evidence remain separate. +exit_code: 0 elapsed_seconds: 0.406 diff --git a/evidence/sqlalchemy-2026-11-06/grade4/host-during-memory.txt b/evidence/sqlalchemy-2026-11-06/grade4/host-during-memory.txt new file mode 100644 index 00000000..5c8a87d6 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/host-during-memory.txt @@ -0,0 +1,10 @@ +date: 2026-11-05T23:07:17Z commit: 6c706a727ec7b4c5f8254e19401705847e8e9c78 +environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-grades-20261106", "COMPOSE_FILE": "compose.yaml"} +$ docker ps --format '{{.Names}} {{.Status}}' +hlpipe-lab4-grades-20261106-api-1 Up 4 seconds (healthy) +hlpipe-lab4-grades-20261106-api-2 Up 4 seconds (healthy) +hlpipe-lab4-grades-20261106-lb-1 Up 4 seconds (healthy) +hlpipe-lab4-grades-20261106-postgres-1 Up 3 minutes (healthy) +hlpipe-lab4-grades-20261106-s3-1 Up About a minute (healthy) +hlpipe-lab4-grades-20261106-valkey-1 Up 3 minutes (healthy) +exit_code: 0 elapsed_seconds: 0.042 diff --git a/evidence/sqlalchemy-2026-11-06/grade4/leftovers-command.txt b/evidence/sqlalchemy-2026-11-06/grade4/leftovers-command.txt new file mode 100644 index 00000000..246ee2ff --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/leftovers-command.txt @@ -0,0 +1,151 @@ +date: 2026-11-05T23:11:34Z commit: cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e +environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-grades-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/sqlalchemy-2026-11-06/grade4", "NO_PROXY": "localhost,127.0.0.1,::1"} +$ sh scripts/overload-leftovers.sh +date: 2026-11-05T23:11:34Z commit: cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e +# make overload-leftovers (scripts/overload-leftovers.sh) после серии памяти: невидимые намерения от 503 по +# таймауту видны сверке свежими, уборка API удаляет их после UPLOAD_GRACE_SECONDS; стенд тот же +$ make reconcile # dry-run +{ + "mode": "dry-run", + "skipped": false, + "grace_seconds": 3600, + "skew_seconds": 60, + "deep": false, + "page_size": 1000, + "scanned": { + "objects": 1677, + "rows": 1699 + }, + "found": { + "orphan_stale": 0, + "orphan_fresh": 0, + "missing": 0, + "size_mismatch": 0, + "sha_mismatch": 0, + "pending_stale": 0, + "pending_fresh": 30, + "quarantined": 0, + "healed": 0 + }, + "fixed": { + "orphan_stale": 0, + "missing": 0, + "size_mismatch": 0, + "sha_mismatch": 0, + "pending_stale": 0, + "healed": 0 + }, + "rechecked": {}, + "errors": 0, + "samples": { + "pending_fresh": [ + "01a1adef-d982-7568-a4e4-806e55ce3d37", + "01a1adf0-0885-72da-8cd6-e61660a24073", + "01a1adf0-2ab2-76bf-a42e-03cf494bbb35", + "01a1adf5-c5a6-711d-97a4-c202111e7c42", + "01a1adf7-ed0e-7329-8a26-e57af871c267", + "01a1adf7-ed0e-77d0-a406-bd7fa28751fd", + "01a1adf7-ed32-779f-b1e9-55f318fe3c1a", + "01a1adf7-ed9f-746c-b073-3b5f60212364", + "01a1adf7-edd6-75a8-8ec9-00fc1928a524", + "01a1adf7-ee71-758d-9272-f4b18b6bf7d2", + "01a1adf7-ee79-74b8-bd88-0dfb1b312025", + "01a1adf7-ee9d-71c6-a259-23b00a895555", + "01a1adf7-ee9f-7223-8e24-e9a09fffc11e", + "01a1adf7-eea6-70b8-9cb1-8131305b4d53", + "01a1adf7-eeb4-758c-a256-6aaee7f64398", + "01a1adf7-eec8-744e-bfc8-f1c5c60dd827", + "01a1adf7-eee6-75e4-8965-019e89d931c8", + "01a1adf7-ef01-71fb-8618-78cc5cd3c960", + "01a1adf7-f11a-70f1-846b-e890c223dacd", + "01a1adf7-f98f-7035-92f1-190362580270" + ] + }, + "cost": { + "seconds": 0.288, + "requests": { + "s3_list": 2, + "s3_head": 0, + "s3_get": 0, + "s3_delete": 0, + "sql": 2 + }, + "waited_seconds": { + "s3_list": 0.261, + "sql": 0.017 + }, + "hashed_bytes": 0, + "cpu_seconds": 0.611, + "max_rss_mib": 110.1 + } +} +$ psql -c "SELECT status, count(*), min(created_at), max(created_at) FROM attachments GROUP BY status ORDER BY status" + status | count | min | max +---------+-------+-------------------------------+------------------------------- + pending | 30 | 2026-11-05 22:58:59.586832+00 | 2026-11-05 23:10:14.949798+00 + ready | 1669 | 2026-11-05 21:02:17.920667+00 | 2026-11-05 23:11:27.041409+00 +(2 rows) + +$ until [ "$(psql -tAc "SELECT count(*) FROM attachments WHERE status = 'pending'")" = 0 ]; do sleep 10; done +pending = 0 в 2026-11-05T23:25:40Z +$ docker compose logs --since 2026-11-05T23:11:34Z api | audit.attachment_discarded и attachments.swept +{'abandoned': 30} swept 30 first 2026-11-05T23:14:02Z last 2026-11-05T23:25:32Z +$ psql -c "SELECT status, count(*), min(created_at), max(created_at) FROM attachments GROUP BY status ORDER BY status" + status | count | min | max +--------+-------+-------------------------------+------------------------------- + ready | 1669 | 2026-11-05 21:02:17.920667+00 | 2026-11-05 23:11:27.041409+00 +(1 row) + +$ make reconcile # dry-run после уборки +{ + "mode": "dry-run", + "skipped": false, + "grace_seconds": 3600, + "skew_seconds": 60, + "deep": false, + "page_size": 1000, + "scanned": { + "objects": 1669, + "rows": 1669 + }, + "found": { + "orphan_stale": 0, + "orphan_fresh": 0, + "missing": 0, + "size_mismatch": 0, + "sha_mismatch": 0, + "pending_stale": 0, + "pending_fresh": 0, + "quarantined": 0, + "healed": 0 + }, + "fixed": { + "orphan_stale": 0, + "missing": 0, + "size_mismatch": 0, + "sha_mismatch": 0, + "pending_stale": 0, + "healed": 0 + }, + "rechecked": {}, + "errors": 0, + "samples": {}, + "cost": { + "seconds": 0.18, + "requests": { + "s3_list": 2, + "s3_head": 0, + "s3_get": 0, + "s3_delete": 0, + "sql": 2 + }, + "waited_seconds": { + "s3_list": 0.155, + "sql": 0.015 + }, + "hashed_bytes": 0, + "cpu_seconds": 0.596, + "max_rss_mib": 110.2 + } +} +exit_code: 0 elapsed_seconds: 847.812 diff --git a/evidence/sqlalchemy-2026-11-06/grade4/load-command.txt b/evidence/sqlalchemy-2026-11-06/grade4/load-command.txt new file mode 100644 index 00000000..3eb8b9d4 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/load-command.txt @@ -0,0 +1,115 @@ +date: 2026-11-05T23:25:41Z commit: cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e +environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-grades-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/sqlalchemy-2026-11-06/grade4", "NO_PROXY": "localhost,127.0.0.1,::1"} +$ sh scripts/load-evidence.sh +date: 2026-11-05T23:25:42Z commit: cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e network: hlpipe-lab4-grades-20261106_edge +# make load-evidence (scripts/load-evidence.sh): закрытый контур tests/load.py, 64 потока, 8 с, все записи +# прогона в один новый чат, 3 повтора с паузой 15 с; клиент — одноразовый контейнер в сети <проект>_edge +# стенда (2 CPU, 512 MiB, базовый образ API по digest, tests/, contracts/ и lab.json только для чтения, +# tcp_tw_reuse=1), адрес http://lb:8080. На 4-й секунде — docker stats; после прогона — request.handled реплик. +$ docker ps --format '{{.Names}}' | grep -v '^hlpipe-lab4-grades-20261106-' # чужие контейнеры на VM во время серии +$ client() { docker run --rm --name hlpipe-lab4-grades-20261106-load-client --network hlpipe-lab4-grades-20261106_edge --cpus 2 --memory 512m --sysctl net.ipv4.tcp_tw_reuse=1 -v "$PWD/tests:/w/tests:ro" -v "$PWD/contracts:/w/contracts:ro" -v "$PWD/lab.json:/w/lab.json:ro" -v "$PWD/evidence/sqlalchemy-2026-11-06/grade4/load:/out" python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d python /w/tests/load.py "$@"; } +$ client --base-url http://lb:8080 --duration 8 --concurrency 64 --output /out/run1.json +exit 0 +{ + "lab": 4, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 8.0, + "elapsed_seconds": 8.217, + "concurrency": 64, + "successful_requests": 12080, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1470.074, + "successful_latency_ms": { + "p50": 39.79, + "p95": 93.452, + "p99": 151.516 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +$ docker stats --no-stream # 4-я секунда прогона: контейнер CPU% память +api-1 89.96% 303.4MiB / 512MiB +api-2 89.30% 304.2MiB / 512MiB +lb-1 49.87% 28.32MiB / 128MiB +load-client 57.80% 83.67MiB / 512MiB +postgres-1 158.15% 152.3MiB / 1GiB +s3-1 3.54% 305.3MiB / 512MiB +valkey-1 4.45% 14.4MiB / 128MiB +$ docker compose logs --since 2026-11-05T23:25:42Z api | request.handled: статус метод маршрут число +200 GET /health/live 1 +200 GET /health/ready 23 +201 POST /api/v1/auth/sessions 3 +201 POST /api/v1/chats 1 +201 POST /api/v1/chats/{chat_id}/messages 12080 +201 POST /api/v1/users 3 +$ client --base-url http://lb:8080 --duration 8 --concurrency 64 --output /out/run2.json +exit 0 +{ + "lab": 4, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 8.0, + "elapsed_seconds": 8.231, + "concurrency": 64, + "successful_requests": 12586, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1529.186, + "successful_latency_ms": { + "p50": 35.17, + "p95": 95.152, + "p99": 125.557 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +$ docker stats --no-stream # 4-я секунда прогона: контейнер CPU% память +api-1 91.79% 304.9MiB / 512MiB +api-2 93.46% 305.7MiB / 512MiB +lb-1 54.02% 35.44MiB / 128MiB +load-client 62.65% 83.86MiB / 512MiB +postgres-1 161.36% 162.3MiB / 1GiB +s3-1 3.47% 310.1MiB / 512MiB +valkey-1 3.13% 13.96MiB / 128MiB +$ docker compose logs --since 2026-11-05T23:26:06Z api | request.handled: статус метод маршрут число +200 GET /health/live 1 +200 GET /health/ready 24 +201 POST /api/v1/auth/sessions 3 +201 POST /api/v1/chats 1 +201 POST /api/v1/chats/{chat_id}/messages 12586 +201 POST /api/v1/users 3 +$ client --base-url http://lb:8080 --duration 8 --concurrency 64 --output /out/run3.json +exit 0 +{ + "lab": 4, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 8.0, + "elapsed_seconds": 8.161, + "concurrency": 64, + "successful_requests": 12644, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1549.329, + "successful_latency_ms": { + "p50": 32.996, + "p95": 95.973, + "p99": 132.35 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +$ docker stats --no-stream # 4-я секунда прогона: контейнер CPU% память +api-1 93.75% 305.2MiB / 512MiB +api-2 93.88% 306MiB / 512MiB +lb-1 52.91% 35.45MiB / 128MiB +load-client 63.78% 83.7MiB / 512MiB +postgres-1 178.75% 169MiB / 1GiB +s3-1 0.09% 311.9MiB / 512MiB +valkey-1 4.11% 13.28MiB / 128MiB +$ docker compose logs --since 2026-11-05T23:26:30Z api | request.handled: статус метод маршрут число +200 GET /health/live 1 +200 GET /health/ready 23 +201 POST /api/v1/auth/sessions 3 +201 POST /api/v1/chats 1 +201 POST /api/v1/chats/{chat_id}/messages 12644 +201 POST /api/v1/users 3 +$ docker compose exec -T postgres psql -c 'SELECT count(*) FROM messages' +37474 +exit_code: 0 elapsed_seconds: 57.752 diff --git a/evidence/sqlalchemy-2026-11-06/grade4/load.txt b/evidence/sqlalchemy-2026-11-06/grade4/load.txt new file mode 100644 index 00000000..49f92eb0 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/load.txt @@ -0,0 +1,111 @@ +date: 2026-11-05T23:25:42Z commit: cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e network: hlpipe-lab4-grades-20261106_edge +# make load-evidence (scripts/load-evidence.sh): закрытый контур tests/load.py, 64 потока, 8 с, все записи +# прогона в один новый чат, 3 повтора с паузой 15 с; клиент — одноразовый контейнер в сети <проект>_edge +# стенда (2 CPU, 512 MiB, базовый образ API по digest, tests/, contracts/ и lab.json только для чтения, +# tcp_tw_reuse=1), адрес http://lb:8080. На 4-й секунде — docker stats; после прогона — request.handled реплик. +$ docker ps --format '{{.Names}}' | grep -v '^hlpipe-lab4-grades-20261106-' # чужие контейнеры на VM во время серии +$ client() { docker run --rm --name hlpipe-lab4-grades-20261106-load-client --network hlpipe-lab4-grades-20261106_edge --cpus 2 --memory 512m --sysctl net.ipv4.tcp_tw_reuse=1 -v "$PWD/tests:/w/tests:ro" -v "$PWD/contracts:/w/contracts:ro" -v "$PWD/lab.json:/w/lab.json:ro" -v "$PWD/evidence/sqlalchemy-2026-11-06/grade4/load:/out" python:3.14-slim-trixie@sha256:51dafde81dbdb6ebde285137a295cf18a47ca95234fe388a343719cb97305b3d python /w/tests/load.py "$@"; } +$ client --base-url http://lb:8080 --duration 8 --concurrency 64 --output /out/run1.json +exit 0 +{ + "lab": 4, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 8.0, + "elapsed_seconds": 8.217, + "concurrency": 64, + "successful_requests": 12080, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1470.074, + "successful_latency_ms": { + "p50": 39.79, + "p95": 93.452, + "p99": 151.516 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +$ docker stats --no-stream # 4-я секунда прогона: контейнер CPU% память +api-1 89.96% 303.4MiB / 512MiB +api-2 89.30% 304.2MiB / 512MiB +lb-1 49.87% 28.32MiB / 128MiB +load-client 57.80% 83.67MiB / 512MiB +postgres-1 158.15% 152.3MiB / 1GiB +s3-1 3.54% 305.3MiB / 512MiB +valkey-1 4.45% 14.4MiB / 128MiB +$ docker compose logs --since 2026-11-05T23:25:42Z api | request.handled: статус метод маршрут число +200 GET /health/live 1 +200 GET /health/ready 23 +201 POST /api/v1/auth/sessions 3 +201 POST /api/v1/chats 1 +201 POST /api/v1/chats/{chat_id}/messages 12080 +201 POST /api/v1/users 3 +$ client --base-url http://lb:8080 --duration 8 --concurrency 64 --output /out/run2.json +exit 0 +{ + "lab": 4, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 8.0, + "elapsed_seconds": 8.231, + "concurrency": 64, + "successful_requests": 12586, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1529.186, + "successful_latency_ms": { + "p50": 35.17, + "p95": 95.152, + "p99": 125.557 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +$ docker stats --no-stream # 4-я секунда прогона: контейнер CPU% память +api-1 91.79% 304.9MiB / 512MiB +api-2 93.46% 305.7MiB / 512MiB +lb-1 54.02% 35.44MiB / 128MiB +load-client 62.65% 83.86MiB / 512MiB +postgres-1 161.36% 162.3MiB / 1GiB +s3-1 3.47% 310.1MiB / 512MiB +valkey-1 3.13% 13.96MiB / 128MiB +$ docker compose logs --since 2026-11-05T23:26:06Z api | request.handled: статус метод маршрут число +200 GET /health/live 1 +200 GET /health/ready 24 +201 POST /api/v1/auth/sessions 3 +201 POST /api/v1/chats 1 +201 POST /api/v1/chats/{chat_id}/messages 12586 +201 POST /api/v1/users 3 +$ client --base-url http://lb:8080 --duration 8 --concurrency 64 --output /out/run3.json +exit 0 +{ + "lab": 4, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 8.0, + "elapsed_seconds": 8.161, + "concurrency": 64, + "successful_requests": 12644, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1549.329, + "successful_latency_ms": { + "p50": 32.996, + "p95": 95.973, + "p99": 132.35 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} +$ docker stats --no-stream # 4-я секунда прогона: контейнер CPU% память +api-1 93.75% 305.2MiB / 512MiB +api-2 93.88% 306MiB / 512MiB +lb-1 52.91% 35.45MiB / 128MiB +load-client 63.78% 83.7MiB / 512MiB +postgres-1 178.75% 169MiB / 1GiB +s3-1 0.09% 311.9MiB / 512MiB +valkey-1 4.11% 13.28MiB / 128MiB +$ docker compose logs --since 2026-11-05T23:26:30Z api | request.handled: статус метод маршрут число +200 GET /health/live 1 +200 GET /health/ready 23 +201 POST /api/v1/auth/sessions 3 +201 POST /api/v1/chats 1 +201 POST /api/v1/chats/{chat_id}/messages 12644 +201 POST /api/v1/users 3 +$ docker compose exec -T postgres psql -c 'SELECT count(*) FROM messages' +37474 diff --git a/evidence/sqlalchemy-2026-11-06/grade4/load/run1.json b/evidence/sqlalchemy-2026-11-06/grade4/load/run1.json new file mode 100644 index 00000000..9bd1ea6a --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/load/run1.json @@ -0,0 +1,17 @@ +{ + "lab": 4, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 8.0, + "elapsed_seconds": 8.217, + "concurrency": 64, + "successful_requests": 12080, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1470.074, + "successful_latency_ms": { + "p50": 39.79, + "p95": 93.452, + "p99": 151.516 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/load/run2.json b/evidence/sqlalchemy-2026-11-06/grade4/load/run2.json new file mode 100644 index 00000000..fa8bf316 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/load/run2.json @@ -0,0 +1,17 @@ +{ + "lab": 4, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 8.0, + "elapsed_seconds": 8.231, + "concurrency": 64, + "successful_requests": 12586, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1529.186, + "successful_latency_ms": { + "p50": 35.17, + "p95": 95.152, + "p99": 125.557 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/load/run3.json b/evidence/sqlalchemy-2026-11-06/grade4/load/run3.json new file mode 100644 index 00000000..faf7b3ad --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/load/run3.json @@ -0,0 +1,17 @@ +{ + "lab": 4, + "workload": "closed-loop POST messages; no automatic retries", + "requested_duration_seconds": 8.0, + "elapsed_seconds": 8.161, + "concurrency": 64, + "successful_requests": 12644, + "failed_requests": 0, + "error_ratio": 0.0, + "successful_rps": 1549.329, + "successful_latency_ms": { + "p50": 32.996, + "p95": 95.973, + "p99": 132.35 + }, + "note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead." +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory-1.txt b/evidence/sqlalchemy-2026-11-06/grade4/memory-1.txt new file mode 100644 index 00000000..31173b0a --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory-1.txt @@ -0,0 +1,18 @@ +date: 2026-11-05T23:04:25Z commit: 6c706a727ec7b4c5f8254e19401705847e8e9c78 +environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-grades-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/sqlalchemy-2026-11-06/grade4", "NO_PROXY": "localhost,127.0.0.1,::1"} +$ python3 scripts/upload_memory.py --base-url http://127.0.0.1:18084 --out evidence/sqlalchemy-2026-11-06/grade4/memory/run1 +# 2026-11-05T23:04:25Z commit 6c706a727ec7b4c5f8254e19401705847e8e9c78; api x2: 1 CPU, 512 MiB, 2 workers; MALLOC_MMAP_THRESHOLD_=131072; 2 uploads per client; peaks from cgroup memory.peak, MiB +slots size conc codes p50_ms p95_ms api_idle api_peak api_oom lb_peak lb_oom + 64 1.0M 10 201x20 137.3 232.2 231.3 281.4 0 23.3 0 + 64 1.0M 20 201x40 186.9 245.3 230.8 292.8 0 28.2 0 + 64 1.0M 40 201x80 236.9 344.5 232.4 303.2 0 24.7 0 + 64 10.0M 10 201x20 890.9 3664.1 231.3 384.9 0 21.5 0 + 64 10.0M 20 201x40 1384.2 2158.1 231.3 512.0 0 24.5 0 + 64 10.0M 40 201x79,503x1 4970.8 7101.0 231.9 513.7 0 28.5 0 + 3 1.0M 10 201x20 131.5 144.6 231.5 279.9 0 24.3 0 + 3 1.0M 20 201x40 119.1 245.7 232.0 285.2 0 25.4 0 + 3 1.0M 40 201x80 223.4 376.9 231.4 288.0 0 26.8 0 + 3 10.0M 10 201x20 820.5 1011.6 232.2 404.2 0 21.1 0 + 3 10.0M 20 201x40 1236.1 2406.2 231.2 424.9 0 25.8 0 + 3 10.0M 40 201x80 2723.1 4479.6 232.1 431.3 0 28.6 0 +exit_code: 0 elapsed_seconds: 145.400 diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory-2.txt b/evidence/sqlalchemy-2026-11-06/grade4/memory-2.txt new file mode 100644 index 00000000..5a09ac65 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory-2.txt @@ -0,0 +1,18 @@ +date: 2026-11-05T23:06:50Z commit: 6c706a727ec7b4c5f8254e19401705847e8e9c78 +environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-grades-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/sqlalchemy-2026-11-06/grade4", "NO_PROXY": "localhost,127.0.0.1,::1"} +$ python3 scripts/upload_memory.py --base-url http://127.0.0.1:18084 --out evidence/sqlalchemy-2026-11-06/grade4/memory/run2 +# 2026-11-05T23:06:51Z commit 6c706a727ec7b4c5f8254e19401705847e8e9c78; api x2: 1 CPU, 512 MiB, 2 workers; MALLOC_MMAP_THRESHOLD_=131072; 2 uploads per client; peaks from cgroup memory.peak, MiB +slots size conc codes p50_ms p95_ms api_idle api_peak api_oom lb_peak lb_oom + 64 1.0M 10 201x20 83.1 158.9 231.5 282.2 0 23.1 0 + 64 1.0M 20 201x40 133.1 265.2 230.4 290.3 0 24.8 0 + 64 1.0M 40 201x80 224.6 469.1 230.8 323.3 0 26.6 0 + 64 10.0M 10 201x20 729.6 765.3 231.6 398.1 0 23.4 0 + 64 10.0M 20 201x40 1844.0 2445.2 231.2 512.0 0 26.3 0 + 64 10.0M 40 201x62,503x18 4387.3 6754.0 231.2 512.6 0 26.3 0 + 3 1.0M 10 201x20 87.9 160.8 232.5 280.4 0 21.1 0 + 3 1.0M 20 201x40 163.1 241.4 232.4 283.8 0 25.1 0 + 3 1.0M 40 201x80 231.9 456.7 231.7 289.8 0 25.4 0 + 3 10.0M 10 201x20 753.5 1420.1 231.2 401.5 0 21.4 0 + 3 10.0M 20 201x40 1512.7 3297.5 231.7 444.0 0 23.4 0 + 3 10.0M 40 201x80 3686.8 6511.5 231.1 440.3 0 28.4 0 +exit_code: 0 elapsed_seconds: 144.363 diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory-3.txt b/evidence/sqlalchemy-2026-11-06/grade4/memory-3.txt new file mode 100644 index 00000000..7228f7fe --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory-3.txt @@ -0,0 +1,18 @@ +date: 2026-11-05T23:09:15Z commit: cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e +environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-grades-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/sqlalchemy-2026-11-06/grade4", "NO_PROXY": "localhost,127.0.0.1,::1"} +$ python3 scripts/upload_memory.py --base-url http://127.0.0.1:18084 --out evidence/sqlalchemy-2026-11-06/grade4/memory/run3 +# 2026-11-05T23:09:15Z commit cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e; api x2: 1 CPU, 512 MiB, 2 workers; MALLOC_MMAP_THRESHOLD_=131072; 2 uploads per client; peaks from cgroup memory.peak, MiB +slots size conc codes p50_ms p95_ms api_idle api_peak api_oom lb_peak lb_oom + 64 1.0M 10 201x20 105.7 146.5 232.3 280.8 0 21.4 0 + 64 1.0M 20 201x40 213.8 246.9 231.6 293.7 0 27.1 0 + 64 1.0M 40 201x80 252.3 508.5 231.4 325.9 0 27.5 0 + 64 10.0M 10 201x20 1061.1 1078.9 231.5 429.4 0 21.5 0 + 64 10.0M 20 201x40 1869.2 1998.6 231.4 512.0 0 23.4 0 + 64 10.0M 40 201x72,503x8 3627.9 7946.2 231.9 512.6 0 25.0 0 + 3 1.0M 10 201x20 84.1 162.1 232.2 279.6 0 21.9 0 + 3 1.0M 20 201x40 159.6 286.3 232.1 282.6 0 26.2 0 + 3 1.0M 40 201x80 274.0 392.0 231.5 288.9 0 26.9 0 + 3 10.0M 10 201x20 669.3 888.4 230.8 391.8 0 21.0 0 + 3 10.0M 20 201x40 1081.6 2073.2 232.9 427.2 0 23.2 0 + 3 10.0M 40 201x80 3454.0 5293.9 231.8 448.0 0 28.9 0 +exit_code: 0 elapsed_seconds: 138.797 diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory-summary.json b/evidence/sqlalchemy-2026-11-06/grade4/memory-summary.json new file mode 100644 index 00000000..6e3cd9c0 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory-summary.json @@ -0,0 +1,509 @@ +[ + { + "slots": 3, + "mib": 1, + "concurrency": 10, + "files": [ + "run1/slots3-1mib-c10.json", + "run2/slots3-1mib-c10.json", + "run3/slots3-1mib-c10.json" + ], + "commits": [ + "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e" + ], + "status_codes": [ + { + "201": 20 + }, + { + "201": 20 + }, + { + "201": 20 + } + ], + "api_peak_mib": { + "median": 279.9, + "min": 279.6, + "max": 280.4 + }, + "lb_peak_mib": { + "median": 21.9, + "min": 21.1, + "max": 24.3 + }, + "p95_ms": { + "median": 160.8, + "min": 144.6, + "max": 162.1 + }, + "api_oom": 0, + "lb_oom": 0 + }, + { + "slots": 3, + "mib": 1, + "concurrency": 20, + "files": [ + "run1/slots3-1mib-c20.json", + "run2/slots3-1mib-c20.json", + "run3/slots3-1mib-c20.json" + ], + "commits": [ + "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e" + ], + "status_codes": [ + { + "201": 40 + }, + { + "201": 40 + }, + { + "201": 40 + } + ], + "api_peak_mib": { + "median": 283.8, + "min": 282.6, + "max": 285.2 + }, + "lb_peak_mib": { + "median": 25.4, + "min": 25.1, + "max": 26.2 + }, + "p95_ms": { + "median": 245.7, + "min": 241.4, + "max": 286.3 + }, + "api_oom": 0, + "lb_oom": 0 + }, + { + "slots": 3, + "mib": 1, + "concurrency": 40, + "files": [ + "run1/slots3-1mib-c40.json", + "run2/slots3-1mib-c40.json", + "run3/slots3-1mib-c40.json" + ], + "commits": [ + "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e" + ], + "status_codes": [ + { + "201": 80 + }, + { + "201": 80 + }, + { + "201": 80 + } + ], + "api_peak_mib": { + "median": 288.9, + "min": 288.0, + "max": 289.8 + }, + "lb_peak_mib": { + "median": 26.8, + "min": 25.4, + "max": 26.9 + }, + "p95_ms": { + "median": 392.0, + "min": 376.9, + "max": 456.7 + }, + "api_oom": 0, + "lb_oom": 0 + }, + { + "slots": 3, + "mib": 10, + "concurrency": 10, + "files": [ + "run1/slots3-10mib-c10.json", + "run2/slots3-10mib-c10.json", + "run3/slots3-10mib-c10.json" + ], + "commits": [ + "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e" + ], + "status_codes": [ + { + "201": 20 + }, + { + "201": 20 + }, + { + "201": 20 + } + ], + "api_peak_mib": { + "median": 401.5, + "min": 391.8, + "max": 404.2 + }, + "lb_peak_mib": { + "median": 21.1, + "min": 21.0, + "max": 21.4 + }, + "p95_ms": { + "median": 1011.6, + "min": 888.4, + "max": 1420.1 + }, + "api_oom": 0, + "lb_oom": 0 + }, + { + "slots": 3, + "mib": 10, + "concurrency": 20, + "files": [ + "run1/slots3-10mib-c20.json", + "run2/slots3-10mib-c20.json", + "run3/slots3-10mib-c20.json" + ], + "commits": [ + "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e" + ], + "status_codes": [ + { + "201": 40 + }, + { + "201": 40 + }, + { + "201": 40 + } + ], + "api_peak_mib": { + "median": 427.2, + "min": 424.9, + "max": 444.0 + }, + "lb_peak_mib": { + "median": 23.4, + "min": 23.2, + "max": 25.8 + }, + "p95_ms": { + "median": 2406.2, + "min": 2073.2, + "max": 3297.5 + }, + "api_oom": 0, + "lb_oom": 0 + }, + { + "slots": 3, + "mib": 10, + "concurrency": 40, + "files": [ + "run1/slots3-10mib-c40.json", + "run2/slots3-10mib-c40.json", + "run3/slots3-10mib-c40.json" + ], + "commits": [ + "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e" + ], + "status_codes": [ + { + "201": 80 + }, + { + "201": 80 + }, + { + "201": 80 + } + ], + "api_peak_mib": { + "median": 440.3, + "min": 431.3, + "max": 448.0 + }, + "lb_peak_mib": { + "median": 28.6, + "min": 28.4, + "max": 28.9 + }, + "p95_ms": { + "median": 5293.9, + "min": 4479.6, + "max": 6511.5 + }, + "api_oom": 0, + "lb_oom": 0 + }, + { + "slots": 64, + "mib": 1, + "concurrency": 10, + "files": [ + "run1/slots64-1mib-c10.json", + "run2/slots64-1mib-c10.json", + "run3/slots64-1mib-c10.json" + ], + "commits": [ + "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e" + ], + "status_codes": [ + { + "201": 20 + }, + { + "201": 20 + }, + { + "201": 20 + } + ], + "api_peak_mib": { + "median": 281.4, + "min": 280.8, + "max": 282.2 + }, + "lb_peak_mib": { + "median": 23.1, + "min": 21.4, + "max": 23.3 + }, + "p95_ms": { + "median": 158.9, + "min": 146.5, + "max": 232.2 + }, + "api_oom": 0, + "lb_oom": 0 + }, + { + "slots": 64, + "mib": 1, + "concurrency": 20, + "files": [ + "run1/slots64-1mib-c20.json", + "run2/slots64-1mib-c20.json", + "run3/slots64-1mib-c20.json" + ], + "commits": [ + "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e" + ], + "status_codes": [ + { + "201": 40 + }, + { + "201": 40 + }, + { + "201": 40 + } + ], + "api_peak_mib": { + "median": 292.8, + "min": 290.3, + "max": 293.7 + }, + "lb_peak_mib": { + "median": 27.1, + "min": 24.8, + "max": 28.2 + }, + "p95_ms": { + "median": 246.9, + "min": 245.3, + "max": 265.2 + }, + "api_oom": 0, + "lb_oom": 0 + }, + { + "slots": 64, + "mib": 1, + "concurrency": 40, + "files": [ + "run1/slots64-1mib-c40.json", + "run2/slots64-1mib-c40.json", + "run3/slots64-1mib-c40.json" + ], + "commits": [ + "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e" + ], + "status_codes": [ + { + "201": 80 + }, + { + "201": 80 + }, + { + "201": 80 + } + ], + "api_peak_mib": { + "median": 323.3, + "min": 303.2, + "max": 325.9 + }, + "lb_peak_mib": { + "median": 26.6, + "min": 24.7, + "max": 27.5 + }, + "p95_ms": { + "median": 469.1, + "min": 344.5, + "max": 508.5 + }, + "api_oom": 0, + "lb_oom": 0 + }, + { + "slots": 64, + "mib": 10, + "concurrency": 10, + "files": [ + "run1/slots64-10mib-c10.json", + "run2/slots64-10mib-c10.json", + "run3/slots64-10mib-c10.json" + ], + "commits": [ + "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e" + ], + "status_codes": [ + { + "201": 20 + }, + { + "201": 20 + }, + { + "201": 20 + } + ], + "api_peak_mib": { + "median": 398.1, + "min": 384.9, + "max": 429.4 + }, + "lb_peak_mib": { + "median": 21.5, + "min": 21.5, + "max": 23.4 + }, + "p95_ms": { + "median": 1078.9, + "min": 765.3, + "max": 3664.1 + }, + "api_oom": 0, + "lb_oom": 0 + }, + { + "slots": 64, + "mib": 10, + "concurrency": 20, + "files": [ + "run1/slots64-10mib-c20.json", + "run2/slots64-10mib-c20.json", + "run3/slots64-10mib-c20.json" + ], + "commits": [ + "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e" + ], + "status_codes": [ + { + "201": 40 + }, + { + "201": 40 + }, + { + "201": 40 + } + ], + "api_peak_mib": { + "median": 512.0, + "min": 512.0, + "max": 512.0 + }, + "lb_peak_mib": { + "median": 24.5, + "min": 23.4, + "max": 26.3 + }, + "p95_ms": { + "median": 2158.1, + "min": 1998.6, + "max": 2445.2 + }, + "api_oom": 0, + "lb_oom": 0 + }, + { + "slots": 64, + "mib": 10, + "concurrency": 40, + "files": [ + "run1/slots64-10mib-c40.json", + "run2/slots64-10mib-c40.json", + "run3/slots64-10mib-c40.json" + ], + "commits": [ + "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e" + ], + "status_codes": [ + { + "201": 79, + "503": 1 + }, + { + "201": 62, + "503": 18 + }, + { + "201": 72, + "503": 8 + } + ], + "api_peak_mib": { + "median": 512.6, + "min": 512.6, + "max": 513.7 + }, + "lb_peak_mib": { + "median": 26.3, + "min": 25.0, + "max": 28.5 + }, + "p95_ms": { + "median": 7101.0, + "min": 6754.0, + "max": 7946.2 + }, + "api_oom": 0, + "lb_oom": 0 + } +] diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots3-10mib-c10.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots3-10mib-c10.json new file mode 100644 index 00000000..3fd9f73e --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots3-10mib-c10.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:06:14Z", + "commit": "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "upload_concurrency": 3, + "mode": "http", + "count": 20, + "concurrency": 10, + "body_bytes": 10485256, + "status_codes": { + "201": 20 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 1.628, + "successful_rps": 12.29, + "latency_ms": { + "p50": 820.5, + "p95": 1011.6, + "p99": 1011.6, + "max": 1011.6 + }, + "memory": { + "61a0fafabd14": { + "idle_mib": 232.2, + "docker_stats_peak_mib": 267.0, + "cgroup_memory_peak_mib": 404.2, + "oom_kill": 0 + }, + "9135a61a22c3": { + "idle_mib": 230.2, + "docker_stats_peak_mib": 290.0, + "cgroup_memory_peak_mib": 372.6, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 21.1, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots3-10mib-c20.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots3-10mib-c20.json new file mode 100644 index 00000000..ddce3b76 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots3-10mib-c20.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:06:23Z", + "commit": "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "upload_concurrency": 3, + "mode": "http", + "count": 40, + "concurrency": 20, + "body_bytes": 10485256, + "status_codes": { + "201": 40 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 3.193, + "successful_rps": 12.53, + "latency_ms": { + "p50": 1236.1, + "p95": 2406.2, + "p99": 2423.4, + "max": 2423.4 + }, + "memory": { + "e0c2220ce78d": { + "idle_mib": 229.9, + "docker_stats_peak_mib": 304.3, + "cgroup_memory_peak_mib": 396.0, + "oom_kill": 0 + }, + "525372080ee1": { + "idle_mib": 231.2, + "docker_stats_peak_mib": 306.6, + "cgroup_memory_peak_mib": 424.9, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 25.8, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots3-10mib-c40.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots3-10mib-c40.json new file mode 100644 index 00000000..d30b5a88 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots3-10mib-c40.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:06:35Z", + "commit": "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "upload_concurrency": 3, + "mode": "http", + "count": 80, + "concurrency": 40, + "body_bytes": 10485256, + "status_codes": { + "201": 80 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 6.735, + "successful_rps": 11.88, + "latency_ms": { + "p50": 2723.1, + "p95": 4479.6, + "p99": 4684.8, + "max": 4684.8 + }, + "memory": { + "76eb4acb8990": { + "idle_mib": 230.5, + "docker_stats_peak_mib": 398.3, + "cgroup_memory_peak_mib": 413.9, + "oom_kill": 0 + }, + "02fd884f3e2d": { + "idle_mib": 232.1, + "docker_stats_peak_mib": 350.9, + "cgroup_memory_peak_mib": 431.3, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 28.6, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots3-1mib-c10.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots3-1mib-c10.json new file mode 100644 index 00000000..4c3ce66b --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots3-1mib-c10.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:05:45Z", + "commit": "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "upload_concurrency": 3, + "mode": "http", + "count": 20, + "concurrency": 10, + "body_bytes": 1048276, + "status_codes": { + "201": 20 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 0.23, + "successful_rps": 87.0, + "latency_ms": { + "p50": 131.5, + "p95": 144.6, + "p99": 144.6, + "max": 144.6 + }, + "memory": { + "2c158e93b612": { + "idle_mib": 230.5, + "docker_stats_peak_mib": 266.3, + "cgroup_memory_peak_mib": 279.9, + "oom_kill": 0 + }, + "d65ad984259e": { + "idle_mib": 231.5, + "docker_stats_peak_mib": 266.5, + "cgroup_memory_peak_mib": 279.1, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 24.3, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots3-1mib-c20.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots3-1mib-c20.json new file mode 100644 index 00000000..2f2170d5 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots3-1mib-c20.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:05:54Z", + "commit": "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "upload_concurrency": 3, + "mode": "http", + "count": 40, + "concurrency": 20, + "body_bytes": 1048276, + "status_codes": { + "201": 40 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 0.309, + "successful_rps": 129.28, + "latency_ms": { + "p50": 119.1, + "p95": 245.7, + "p99": 253.4, + "max": 253.4 + }, + "memory": { + "fb15906915a9": { + "idle_mib": 232.0, + "docker_stats_peak_mib": 268.9, + "cgroup_memory_peak_mib": 281.8, + "oom_kill": 0 + }, + "80171a082870": { + "idle_mib": 230.2, + "docker_stats_peak_mib": 268.1, + "cgroup_memory_peak_mib": 285.2, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 25.4, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots3-1mib-c40.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots3-1mib-c40.json new file mode 100644 index 00000000..38e24d0b --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots3-1mib-c40.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:06:04Z", + "commit": "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "upload_concurrency": 3, + "mode": "http", + "count": 80, + "concurrency": 40, + "body_bytes": 1048276, + "status_codes": { + "201": 80 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 0.545, + "successful_rps": 146.71, + "latency_ms": { + "p50": 223.4, + "p95": 376.9, + "p99": 394.2, + "max": 394.2 + }, + "memory": { + "af1b2560179d": { + "idle_mib": 230.8, + "docker_stats_peak_mib": 273.0, + "cgroup_memory_peak_mib": 288.0, + "oom_kill": 0 + }, + "b1ded71786d7": { + "idle_mib": 231.4, + "docker_stats_peak_mib": 271.4, + "cgroup_memory_peak_mib": 287.2, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 26.8, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots64-10mib-c10.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots64-10mib-c10.json new file mode 100644 index 00000000..8d0469ff --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots64-10mib-c10.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:04:59Z", + "commit": "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "upload_concurrency": 64, + "mode": "http", + "count": 20, + "concurrency": 10, + "body_bytes": 10485256, + "status_codes": { + "201": 20 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 4.557, + "successful_rps": 4.39, + "latency_ms": { + "p50": 890.9, + "p95": 3664.1, + "p99": 3664.1, + "max": 3664.1 + }, + "memory": { + "e2b062908a74": { + "idle_mib": 231.0, + "docker_stats_peak_mib": 327.9, + "cgroup_memory_peak_mib": 384.9, + "oom_kill": 0 + }, + "154f12828567": { + "idle_mib": 231.3, + "docker_stats_peak_mib": 288.5, + "cgroup_memory_peak_mib": 378.5, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 21.5, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots64-10mib-c20.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots64-10mib-c20.json new file mode 100644 index 00000000..14948d09 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots64-10mib-c20.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:05:12Z", + "commit": "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "upload_concurrency": 64, + "mode": "http", + "count": 40, + "concurrency": 20, + "body_bytes": 10485256, + "status_codes": { + "201": 40 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 3.428, + "successful_rps": 11.67, + "latency_ms": { + "p50": 1384.2, + "p95": 2158.1, + "p99": 2158.4, + "max": 2158.4 + }, + "memory": { + "4667b350e180": { + "idle_mib": 230.8, + "docker_stats_peak_mib": 353.4, + "cgroup_memory_peak_mib": 498.1, + "oom_kill": 0 + }, + "eedec74c9f81": { + "idle_mib": 231.3, + "docker_stats_peak_mib": 421.2, + "cgroup_memory_peak_mib": 512.0, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 24.5, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots64-10mib-c40.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots64-10mib-c40.json new file mode 100644 index 00000000..df5611c0 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots64-10mib-c40.json @@ -0,0 +1,41 @@ +{ + "date": "2026-11-05T23:05:24Z", + "commit": "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "upload_concurrency": 64, + "mode": "http", + "count": 80, + "concurrency": 40, + "body_bytes": 10485256, + "status_codes": { + "201": 79, + "503": 1 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 11.957, + "successful_rps": 6.61, + "latency_ms": { + "p50": 4970.8, + "p95": 7101.0, + "p99": 8114.5, + "max": 8114.5 + }, + "memory": { + "45f12d9c6e15": { + "idle_mib": 231.9, + "docker_stats_peak_mib": 507.1, + "cgroup_memory_peak_mib": 512.2, + "oom_kill": 0 + }, + "65c1e42e91b0": { + "idle_mib": 230.6, + "docker_stats_peak_mib": 499.4, + "cgroup_memory_peak_mib": 513.7, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 28.5, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots64-1mib-c10.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots64-1mib-c10.json new file mode 100644 index 00000000..8bf3071b --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots64-1mib-c10.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:04:31Z", + "commit": "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "upload_concurrency": 64, + "mode": "http", + "count": 20, + "concurrency": 10, + "body_bytes": 1048276, + "status_codes": { + "201": 20 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 0.234, + "successful_rps": 85.62, + "latency_ms": { + "p50": 137.3, + "p95": 232.2, + "p99": 232.2, + "max": 232.2 + }, + "memory": { + "963637b45c8f": { + "idle_mib": 231.3, + "docker_stats_peak_mib": 266.6, + "cgroup_memory_peak_mib": 280.2, + "oom_kill": 0 + }, + "87c912ff8e7e": { + "idle_mib": 179.4, + "docker_stats_peak_mib": 267.0, + "cgroup_memory_peak_mib": 281.4, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 23.3, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots64-1mib-c20.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots64-1mib-c20.json new file mode 100644 index 00000000..cc5f5fa5 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots64-1mib-c20.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:04:40Z", + "commit": "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "upload_concurrency": 64, + "mode": "http", + "count": 40, + "concurrency": 20, + "body_bytes": 1048276, + "status_codes": { + "201": 40 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 0.349, + "successful_rps": 114.48, + "latency_ms": { + "p50": 186.9, + "p95": 245.3, + "p99": 246.0, + "max": 246.0 + }, + "memory": { + "f25da08c4d33": { + "idle_mib": 230.8, + "docker_stats_peak_mib": 267.9, + "cgroup_memory_peak_mib": 292.8, + "oom_kill": 0 + }, + "ddd8bafce905": { + "idle_mib": 180.4, + "docker_stats_peak_mib": 269.8, + "cgroup_memory_peak_mib": 289.3, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 28.2, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots64-1mib-c40.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots64-1mib-c40.json new file mode 100644 index 00000000..b3919a10 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/slots64-1mib-c40.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:04:49Z", + "commit": "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "upload_concurrency": 64, + "mode": "http", + "count": 80, + "concurrency": 40, + "body_bytes": 1048276, + "status_codes": { + "201": 80 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 0.536, + "successful_rps": 149.16, + "latency_ms": { + "p50": 236.9, + "p95": 344.5, + "p99": 420.4, + "max": 420.4 + }, + "memory": { + "3ffcd3348b95": { + "idle_mib": 232.4, + "docker_stats_peak_mib": 275.2, + "cgroup_memory_peak_mib": 303.2, + "oom_kill": 0 + }, + "2695a3723997": { + "idle_mib": 230.5, + "docker_stats_peak_mib": 273.5, + "cgroup_memory_peak_mib": 302.9, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 24.7, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/summary.txt b/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/summary.txt new file mode 100644 index 00000000..eb1b912a --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run1/summary.txt @@ -0,0 +1,14 @@ +# 2026-11-05T23:04:25Z commit 6c706a727ec7b4c5f8254e19401705847e8e9c78; api x2: 1 CPU, 512 MiB, 2 workers; MALLOC_MMAP_THRESHOLD_=131072; 2 uploads per client; peaks from cgroup memory.peak, MiB +slots size conc codes p50_ms p95_ms api_idle api_peak api_oom lb_peak lb_oom + 64 1.0M 10 201x20 137.3 232.2 231.3 281.4 0 23.3 0 + 64 1.0M 20 201x40 186.9 245.3 230.8 292.8 0 28.2 0 + 64 1.0M 40 201x80 236.9 344.5 232.4 303.2 0 24.7 0 + 64 10.0M 10 201x20 890.9 3664.1 231.3 384.9 0 21.5 0 + 64 10.0M 20 201x40 1384.2 2158.1 231.3 512.0 0 24.5 0 + 64 10.0M 40 201x79,503x1 4970.8 7101.0 231.9 513.7 0 28.5 0 + 3 1.0M 10 201x20 131.5 144.6 231.5 279.9 0 24.3 0 + 3 1.0M 20 201x40 119.1 245.7 232.0 285.2 0 25.4 0 + 3 1.0M 40 201x80 223.4 376.9 231.4 288.0 0 26.8 0 + 3 10.0M 10 201x20 820.5 1011.6 232.2 404.2 0 21.1 0 + 3 10.0M 20 201x40 1236.1 2406.2 231.2 424.9 0 25.8 0 + 3 10.0M 40 201x80 2723.1 4479.6 232.1 431.3 0 28.6 0 diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots3-10mib-c10.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots3-10mib-c10.json new file mode 100644 index 00000000..146d1cba --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots3-10mib-c10.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:08:36Z", + "commit": "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "upload_concurrency": 3, + "mode": "http", + "count": 20, + "concurrency": 10, + "body_bytes": 10485256, + "status_codes": { + "201": 20 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 1.531, + "successful_rps": 13.06, + "latency_ms": { + "p50": 753.5, + "p95": 1420.1, + "p99": 1420.1, + "max": 1420.1 + }, + "memory": { + "d711d1db6df0": { + "idle_mib": 230.5, + "docker_stats_peak_mib": 281.1, + "cgroup_memory_peak_mib": 401.5, + "oom_kill": 0 + }, + "8e09a49e6983": { + "idle_mib": 231.2, + "docker_stats_peak_mib": 309.7, + "cgroup_memory_peak_mib": 396.8, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 21.4, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots3-10mib-c20.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots3-10mib-c20.json new file mode 100644 index 00000000..460ead65 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots3-10mib-c20.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:08:46Z", + "commit": "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "upload_concurrency": 3, + "mode": "http", + "count": 40, + "concurrency": 20, + "body_bytes": 10485256, + "status_codes": { + "201": 40 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 5.141, + "successful_rps": 7.78, + "latency_ms": { + "p50": 1512.7, + "p95": 3297.5, + "p99": 3925.5, + "max": 3925.5 + }, + "memory": { + "22977f26a335": { + "idle_mib": 231.7, + "docker_stats_peak_mib": 370.9, + "cgroup_memory_peak_mib": 444.0, + "oom_kill": 0 + }, + "7b80b3fdc7d7": { + "idle_mib": 230.4, + "docker_stats_peak_mib": 357.2, + "cgroup_memory_peak_mib": 428.7, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 23.4, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots3-10mib-c40.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots3-10mib-c40.json new file mode 100644 index 00000000..e8f77d40 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots3-10mib-c40.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:08:59Z", + "commit": "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "upload_concurrency": 3, + "mode": "http", + "count": 80, + "concurrency": 40, + "body_bytes": 10485256, + "status_codes": { + "201": 80 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 8.475, + "successful_rps": 9.44, + "latency_ms": { + "p50": 3686.8, + "p95": 6511.5, + "p99": 6516.2, + "max": 6516.2 + }, + "memory": { + "f460945e9855": { + "idle_mib": 230.4, + "docker_stats_peak_mib": 408.4, + "cgroup_memory_peak_mib": 430.8, + "oom_kill": 0 + }, + "e7f7c4cce1a2": { + "idle_mib": 231.1, + "docker_stats_peak_mib": 397.9, + "cgroup_memory_peak_mib": 440.3, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 28.4, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots3-1mib-c10.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots3-1mib-c10.json new file mode 100644 index 00000000..94fd5517 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots3-1mib-c10.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:08:08Z", + "commit": "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "upload_concurrency": 3, + "mode": "http", + "count": 20, + "concurrency": 10, + "body_bytes": 1048276, + "status_codes": { + "201": 20 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 0.183, + "successful_rps": 109.32, + "latency_ms": { + "p50": 87.9, + "p95": 160.8, + "p99": 160.8, + "max": 160.8 + }, + "memory": { + "0954bd6d35ea": { + "idle_mib": 232.5, + "docker_stats_peak_mib": 266.1, + "cgroup_memory_peak_mib": 274.3, + "oom_kill": 0 + }, + "4599e3a91d10": { + "idle_mib": 232.2, + "docker_stats_peak_mib": 267.0, + "cgroup_memory_peak_mib": 280.4, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 21.1, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots3-1mib-c20.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots3-1mib-c20.json new file mode 100644 index 00000000..94366119 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots3-1mib-c20.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:08:17Z", + "commit": "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "upload_concurrency": 3, + "mode": "http", + "count": 40, + "concurrency": 20, + "body_bytes": 1048276, + "status_codes": { + "201": 40 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 0.347, + "successful_rps": 115.21, + "latency_ms": { + "p50": 163.1, + "p95": 241.4, + "p99": 241.5, + "max": 241.5 + }, + "memory": { + "7c2b41526113": { + "idle_mib": 232.4, + "docker_stats_peak_mib": 269.5, + "cgroup_memory_peak_mib": 283.8, + "oom_kill": 0 + }, + "8e51cc694f44": { + "idle_mib": 230.1, + "docker_stats_peak_mib": 268.4, + "cgroup_memory_peak_mib": 282.9, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 25.1, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots3-1mib-c40.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots3-1mib-c40.json new file mode 100644 index 00000000..e5d03ee2 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots3-1mib-c40.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:08:27Z", + "commit": "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "upload_concurrency": 3, + "mode": "http", + "count": 80, + "concurrency": 40, + "body_bytes": 1048276, + "status_codes": { + "201": 80 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 0.571, + "successful_rps": 140.03, + "latency_ms": { + "p50": 231.9, + "p95": 456.7, + "p99": 522.8, + "max": 522.8 + }, + "memory": { + "c9b995ee4ee0": { + "idle_mib": 230.6, + "docker_stats_peak_mib": 271.9, + "cgroup_memory_peak_mib": 288.6, + "oom_kill": 0 + }, + "182cc09aa957": { + "idle_mib": 231.7, + "docker_stats_peak_mib": 272.0, + "cgroup_memory_peak_mib": 289.8, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 25.4, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots64-10mib-c10.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots64-10mib-c10.json new file mode 100644 index 00000000..880f7e6a --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots64-10mib-c10.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:07:24Z", + "commit": "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "upload_concurrency": 64, + "mode": "http", + "count": 20, + "concurrency": 10, + "body_bytes": 10485256, + "status_codes": { + "201": 20 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 1.49, + "successful_rps": 13.42, + "latency_ms": { + "p50": 729.6, + "p95": 765.3, + "p99": 765.3, + "max": 765.3 + }, + "memory": { + "e13dd8f792db": { + "idle_mib": 230.5, + "docker_stats_peak_mib": 315.4, + "cgroup_memory_peak_mib": 388.2, + "oom_kill": 0 + }, + "bd7096445ac3": { + "idle_mib": 231.6, + "docker_stats_peak_mib": 312.3, + "cgroup_memory_peak_mib": 398.1, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 23.4, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots64-10mib-c20.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots64-10mib-c20.json new file mode 100644 index 00000000..c75f6773 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots64-10mib-c20.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:07:34Z", + "commit": "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "upload_concurrency": 64, + "mode": "http", + "count": 40, + "concurrency": 20, + "body_bytes": 10485256, + "status_codes": { + "201": 40 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 4.25, + "successful_rps": 9.41, + "latency_ms": { + "p50": 1844.0, + "p95": 2445.2, + "p99": 2448.0, + "max": 2448.0 + }, + "memory": { + "1b0138cb7482": { + "idle_mib": 231.2, + "docker_stats_peak_mib": 481.5, + "cgroup_memory_peak_mib": 512.0, + "oom_kill": 0 + }, + "45b6f6f227f7": { + "idle_mib": 179.4, + "docker_stats_peak_mib": 438.2, + "cgroup_memory_peak_mib": 489.7, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 26.3, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots64-10mib-c40.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots64-10mib-c40.json new file mode 100644 index 00000000..e424f903 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots64-10mib-c40.json @@ -0,0 +1,41 @@ +{ + "date": "2026-11-05T23:07:46Z", + "commit": "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "upload_concurrency": 64, + "mode": "http", + "count": 80, + "concurrency": 40, + "body_bytes": 10485256, + "status_codes": { + "201": 62, + "503": 18 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 12.927, + "successful_rps": 4.8, + "latency_ms": { + "p50": 4387.3, + "p95": 6754.0, + "p99": 7085.1, + "max": 7085.1 + }, + "memory": { + "fc6f3a568487": { + "idle_mib": 230.9, + "docker_stats_peak_mib": 512.0, + "cgroup_memory_peak_mib": 512.3, + "oom_kill": 0 + }, + "8bc264fc670a": { + "idle_mib": 231.2, + "docker_stats_peak_mib": 512.3, + "cgroup_memory_peak_mib": 512.6, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 26.3, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots64-1mib-c10.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots64-1mib-c10.json new file mode 100644 index 00000000..df8ca7c2 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots64-1mib-c10.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:06:56Z", + "commit": "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "upload_concurrency": 64, + "mode": "http", + "count": 20, + "concurrency": 10, + "body_bytes": 1048276, + "status_codes": { + "201": 20 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 0.23, + "successful_rps": 86.8, + "latency_ms": { + "p50": 83.1, + "p95": 158.9, + "p99": 158.9, + "max": 158.9 + }, + "memory": { + "df72e034b161": { + "idle_mib": 230.8, + "docker_stats_peak_mib": 266.1, + "cgroup_memory_peak_mib": 282.2, + "oom_kill": 0 + }, + "cb66c8accf1c": { + "idle_mib": 231.5, + "docker_stats_peak_mib": 266.6, + "cgroup_memory_peak_mib": 276.2, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 23.1, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots64-1mib-c20.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots64-1mib-c20.json new file mode 100644 index 00000000..35ead0f7 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots64-1mib-c20.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:07:06Z", + "commit": "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "upload_concurrency": 64, + "mode": "http", + "count": 40, + "concurrency": 20, + "body_bytes": 1048276, + "status_codes": { + "201": 40 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 0.346, + "successful_rps": 115.57, + "latency_ms": { + "p50": 133.1, + "p95": 265.2, + "p99": 267.5, + "max": 267.5 + }, + "memory": { + "8b846235394d": { + "idle_mib": 180.5, + "docker_stats_peak_mib": 271.5, + "cgroup_memory_peak_mib": 282.4, + "oom_kill": 0 + }, + "cf075faf1a6b": { + "idle_mib": 230.4, + "docker_stats_peak_mib": 268.7, + "cgroup_memory_peak_mib": 290.3, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 24.8, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots64-1mib-c40.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots64-1mib-c40.json new file mode 100644 index 00000000..15aca4ba --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/slots64-1mib-c40.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:07:15Z", + "commit": "6c706a727ec7b4c5f8254e19401705847e8e9c78", + "upload_concurrency": 64, + "mode": "http", + "count": 80, + "concurrency": 40, + "body_bytes": 1048276, + "status_codes": { + "201": 80 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 0.649, + "successful_rps": 123.28, + "latency_ms": { + "p50": 224.6, + "p95": 469.1, + "p99": 472.4, + "max": 472.4 + }, + "memory": { + "29bf14daefaa": { + "idle_mib": 180.8, + "docker_stats_peak_mib": 273.6, + "cgroup_memory_peak_mib": 323.3, + "oom_kill": 0 + }, + "92f7a57a4751": { + "idle_mib": 230.8, + "docker_stats_peak_mib": 272.9, + "cgroup_memory_peak_mib": 313.1, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 26.6, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/summary.txt b/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/summary.txt new file mode 100644 index 00000000..f32ea5b9 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run2/summary.txt @@ -0,0 +1,14 @@ +# 2026-11-05T23:06:51Z commit 6c706a727ec7b4c5f8254e19401705847e8e9c78; api x2: 1 CPU, 512 MiB, 2 workers; MALLOC_MMAP_THRESHOLD_=131072; 2 uploads per client; peaks from cgroup memory.peak, MiB +slots size conc codes p50_ms p95_ms api_idle api_peak api_oom lb_peak lb_oom + 64 1.0M 10 201x20 83.1 158.9 231.5 282.2 0 23.1 0 + 64 1.0M 20 201x40 133.1 265.2 230.4 290.3 0 24.8 0 + 64 1.0M 40 201x80 224.6 469.1 230.8 323.3 0 26.6 0 + 64 10.0M 10 201x20 729.6 765.3 231.6 398.1 0 23.4 0 + 64 10.0M 20 201x40 1844.0 2445.2 231.2 512.0 0 26.3 0 + 64 10.0M 40 201x62,503x18 4387.3 6754.0 231.2 512.6 0 26.3 0 + 3 1.0M 10 201x20 87.9 160.8 232.5 280.4 0 21.1 0 + 3 1.0M 20 201x40 163.1 241.4 232.4 283.8 0 25.1 0 + 3 1.0M 40 201x80 231.9 456.7 231.7 289.8 0 25.4 0 + 3 10.0M 10 201x20 753.5 1420.1 231.2 401.5 0 21.4 0 + 3 10.0M 20 201x40 1512.7 3297.5 231.7 444.0 0 23.4 0 + 3 10.0M 40 201x80 3686.8 6511.5 231.1 440.3 0 28.4 0 diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots3-10mib-c10.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots3-10mib-c10.json new file mode 100644 index 00000000..29c1ef11 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots3-10mib-c10.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:10:57Z", + "commit": "cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e", + "upload_concurrency": 3, + "mode": "http", + "count": 20, + "concurrency": 10, + "body_bytes": 10485256, + "status_codes": { + "201": 20 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 1.556, + "successful_rps": 12.85, + "latency_ms": { + "p50": 669.3, + "p95": 888.4, + "p99": 888.4, + "max": 888.4 + }, + "memory": { + "29ce8c5e3f49": { + "idle_mib": 230.7, + "docker_stats_peak_mib": 269.1, + "cgroup_memory_peak_mib": 391.8, + "oom_kill": 0 + }, + "c8e8e88d5b8a": { + "idle_mib": 230.8, + "docker_stats_peak_mib": 277.4, + "cgroup_memory_peak_mib": 381.0, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 21.0, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots3-10mib-c20.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots3-10mib-c20.json new file mode 100644 index 00000000..f376ca01 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots3-10mib-c20.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:11:06Z", + "commit": "cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e", + "upload_concurrency": 3, + "mode": "http", + "count": 40, + "concurrency": 20, + "body_bytes": 10485256, + "status_codes": { + "201": 40 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 3.09, + "successful_rps": 12.94, + "latency_ms": { + "p50": 1081.6, + "p95": 2073.2, + "p99": 2074.3, + "max": 2074.3 + }, + "memory": { + "2d506451f576": { + "idle_mib": 232.9, + "docker_stats_peak_mib": 374.2, + "cgroup_memory_peak_mib": 422.5, + "oom_kill": 0 + }, + "0ef7cb5af6e8": { + "idle_mib": 230.8, + "docker_stats_peak_mib": 416.5, + "cgroup_memory_peak_mib": 427.2, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 23.2, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots3-10mib-c40.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots3-10mib-c40.json new file mode 100644 index 00000000..d8191fa8 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots3-10mib-c40.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:11:18Z", + "commit": "cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e", + "upload_concurrency": 3, + "mode": "http", + "count": 80, + "concurrency": 40, + "body_bytes": 10485256, + "status_codes": { + "201": 80 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 7.9, + "successful_rps": 10.13, + "latency_ms": { + "p50": 3454.0, + "p95": 5293.9, + "p99": 5825.1, + "max": 5825.1 + }, + "memory": { + "d3715a122597": { + "idle_mib": 230.3, + "docker_stats_peak_mib": 421.0, + "cgroup_memory_peak_mib": 441.5, + "oom_kill": 0 + }, + "d98529446b07": { + "idle_mib": 231.8, + "docker_stats_peak_mib": 426.8, + "cgroup_memory_peak_mib": 448.0, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 28.9, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots3-1mib-c10.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots3-1mib-c10.json new file mode 100644 index 00000000..a16d23dd --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots3-1mib-c10.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:10:29Z", + "commit": "cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e", + "upload_concurrency": 3, + "mode": "http", + "count": 20, + "concurrency": 10, + "body_bytes": 1048276, + "status_codes": { + "201": 20 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 0.221, + "successful_rps": 90.65, + "latency_ms": { + "p50": 84.1, + "p95": 162.1, + "p99": 162.1, + "max": 162.1 + }, + "memory": { + "db24d08bad3f": { + "idle_mib": 232.2, + "docker_stats_peak_mib": 267.4, + "cgroup_memory_peak_mib": 277.1, + "oom_kill": 0 + }, + "10ad212b4803": { + "idle_mib": 231.2, + "docker_stats_peak_mib": 266.6, + "cgroup_memory_peak_mib": 279.6, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 21.9, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots3-1mib-c20.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots3-1mib-c20.json new file mode 100644 index 00000000..cdfb5514 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots3-1mib-c20.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:10:38Z", + "commit": "cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e", + "upload_concurrency": 3, + "mode": "http", + "count": 40, + "concurrency": 20, + "body_bytes": 1048276, + "status_codes": { + "201": 40 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 0.378, + "successful_rps": 105.93, + "latency_ms": { + "p50": 159.6, + "p95": 286.3, + "p99": 286.7, + "max": 286.7 + }, + "memory": { + "9281f7efca7b": { + "idle_mib": 232.1, + "docker_stats_peak_mib": 267.4, + "cgroup_memory_peak_mib": 278.8, + "oom_kill": 0 + }, + "ef7744992d37": { + "idle_mib": 230.9, + "docker_stats_peak_mib": 268.4, + "cgroup_memory_peak_mib": 282.6, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 26.2, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots3-1mib-c40.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots3-1mib-c40.json new file mode 100644 index 00000000..9b241015 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots3-1mib-c40.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:10:48Z", + "commit": "cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e", + "upload_concurrency": 3, + "mode": "http", + "count": 80, + "concurrency": 40, + "body_bytes": 1048276, + "status_codes": { + "201": 80 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 0.657, + "successful_rps": 121.75, + "latency_ms": { + "p50": 274.0, + "p95": 392.0, + "p99": 544.8, + "max": 544.8 + }, + "memory": { + "2edd6d11a039": { + "idle_mib": 231.4, + "docker_stats_peak_mib": 270.9, + "cgroup_memory_peak_mib": 286.4, + "oom_kill": 0 + }, + "b493d4f871e1": { + "idle_mib": 231.5, + "docker_stats_peak_mib": 272.6, + "cgroup_memory_peak_mib": 288.9, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 26.9, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots64-10mib-c10.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots64-10mib-c10.json new file mode 100644 index 00000000..9572c5c2 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots64-10mib-c10.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:09:47Z", + "commit": "cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e", + "upload_concurrency": 64, + "mode": "http", + "count": 20, + "concurrency": 10, + "body_bytes": 10485256, + "status_codes": { + "201": 20 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 1.983, + "successful_rps": 10.09, + "latency_ms": { + "p50": 1061.1, + "p95": 1078.9, + "p99": 1078.9, + "max": 1078.9 + }, + "memory": { + "427f27cee29e": { + "idle_mib": 231.5, + "docker_stats_peak_mib": 378.1, + "cgroup_memory_peak_mib": 429.4, + "oom_kill": 0 + }, + "75f02c526bcc": { + "idle_mib": 230.0, + "docker_stats_peak_mib": 302.0, + "cgroup_memory_peak_mib": 403.3, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 21.5, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots64-10mib-c20.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots64-10mib-c20.json new file mode 100644 index 00000000..f81afca8 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots64-10mib-c20.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:09:57Z", + "commit": "cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e", + "upload_concurrency": 64, + "mode": "http", + "count": 40, + "concurrency": 20, + "body_bytes": 10485256, + "status_codes": { + "201": 40 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 3.842, + "successful_rps": 10.41, + "latency_ms": { + "p50": 1869.2, + "p95": 1998.6, + "p99": 2001.2, + "max": 2001.2 + }, + "memory": { + "67a09d00a1b9": { + "idle_mib": 231.4, + "docker_stats_peak_mib": 420.3, + "cgroup_memory_peak_mib": 512.0, + "oom_kill": 0 + }, + "f3aa5310b2e9": { + "idle_mib": 230.7, + "docker_stats_peak_mib": 290.4, + "cgroup_memory_peak_mib": 512.0, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 23.4, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots64-10mib-c40.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots64-10mib-c40.json new file mode 100644 index 00000000..5c30b1c7 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots64-10mib-c40.json @@ -0,0 +1,41 @@ +{ + "date": "2026-11-05T23:10:09Z", + "commit": "cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e", + "upload_concurrency": 64, + "mode": "http", + "count": 80, + "concurrency": 40, + "body_bytes": 10485256, + "status_codes": { + "201": 72, + "503": 8 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 11.342, + "successful_rps": 6.35, + "latency_ms": { + "p50": 3627.9, + "p95": 7946.2, + "p99": 9984.6, + "max": 9984.6 + }, + "memory": { + "2e330d5bea15": { + "idle_mib": 231.9, + "docker_stats_peak_mib": 511.4, + "cgroup_memory_peak_mib": 512.2, + "oom_kill": 0 + }, + "8f6718a8ceaf": { + "idle_mib": 230.7, + "docker_stats_peak_mib": 512.0, + "cgroup_memory_peak_mib": 512.6, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 25.0, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots64-1mib-c10.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots64-1mib-c10.json new file mode 100644 index 00000000..5e9471bc --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots64-1mib-c10.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:09:21Z", + "commit": "cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e", + "upload_concurrency": 64, + "mode": "http", + "count": 20, + "concurrency": 10, + "body_bytes": 1048276, + "status_codes": { + "201": 20 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 0.197, + "successful_rps": 101.61, + "latency_ms": { + "p50": 105.7, + "p95": 146.5, + "p99": 146.5, + "max": 146.5 + }, + "memory": { + "5604325e0ef8": { + "idle_mib": 232.3, + "docker_stats_peak_mib": 266.6, + "cgroup_memory_peak_mib": 280.8, + "oom_kill": 0 + }, + "b4c16fe5ae60": { + "idle_mib": 231.7, + "docker_stats_peak_mib": 266.4, + "cgroup_memory_peak_mib": 278.2, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 21.4, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots64-1mib-c20.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots64-1mib-c20.json new file mode 100644 index 00000000..395b64de --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots64-1mib-c20.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:09:30Z", + "commit": "cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e", + "upload_concurrency": 64, + "mode": "http", + "count": 40, + "concurrency": 20, + "body_bytes": 1048276, + "status_codes": { + "201": 40 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 0.367, + "successful_rps": 109.02, + "latency_ms": { + "p50": 213.8, + "p95": 246.9, + "p99": 247.0, + "max": 247.0 + }, + "memory": { + "ff021d00e724": { + "idle_mib": 231.6, + "docker_stats_peak_mib": 268.9, + "cgroup_memory_peak_mib": 290.4, + "oom_kill": 0 + }, + "e0ea224f2f5d": { + "idle_mib": 230.4, + "docker_stats_peak_mib": 268.7, + "cgroup_memory_peak_mib": 293.7, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 27.1, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots64-1mib-c40.json b/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots64-1mib-c40.json new file mode 100644 index 00000000..805cee04 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/slots64-1mib-c40.json @@ -0,0 +1,40 @@ +{ + "date": "2026-11-05T23:09:38Z", + "commit": "cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e", + "upload_concurrency": 64, + "mode": "http", + "count": 80, + "concurrency": 40, + "body_bytes": 1048276, + "status_codes": { + "201": 80 + }, + "instances": 2, + "linked_in_messages": 0, + "elapsed_seconds": 0.674, + "successful_rps": 118.76, + "latency_ms": { + "p50": 252.3, + "p95": 508.5, + "p99": 512.7, + "max": 512.7 + }, + "memory": { + "5ca53d6aeb78": { + "idle_mib": 231.1, + "docker_stats_peak_mib": 272.8, + "cgroup_memory_peak_mib": 325.9, + "oom_kill": 0 + }, + "a10366500329": { + "idle_mib": 231.4, + "docker_stats_peak_mib": 272.9, + "cgroup_memory_peak_mib": 306.4, + "oom_kill": 0 + } + }, + "lb": { + "cgroup_memory_peak_mib": 27.5, + "oom_kill": 0 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/summary.txt b/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/summary.txt new file mode 100644 index 00000000..a62dc317 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/memory/run3/summary.txt @@ -0,0 +1,14 @@ +# 2026-11-05T23:09:15Z commit cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e; api x2: 1 CPU, 512 MiB, 2 workers; MALLOC_MMAP_THRESHOLD_=131072; 2 uploads per client; peaks from cgroup memory.peak, MiB +slots size conc codes p50_ms p95_ms api_idle api_peak api_oom lb_peak lb_oom + 64 1.0M 10 201x20 105.7 146.5 232.3 280.8 0 21.4 0 + 64 1.0M 20 201x40 213.8 246.9 231.6 293.7 0 27.1 0 + 64 1.0M 40 201x80 252.3 508.5 231.4 325.9 0 27.5 0 + 64 10.0M 10 201x20 1061.1 1078.9 231.5 429.4 0 21.5 0 + 64 10.0M 20 201x40 1869.2 1998.6 231.4 512.0 0 23.4 0 + 64 10.0M 40 201x72,503x8 3627.9 7946.2 231.9 512.6 0 25.0 0 + 3 1.0M 10 201x20 84.1 162.1 232.2 279.6 0 21.9 0 + 3 1.0M 20 201x40 159.6 286.3 232.1 282.6 0 26.2 0 + 3 1.0M 40 201x80 274.0 392.0 231.5 288.9 0 26.9 0 + 3 10.0M 10 201x20 669.3 888.4 230.8 391.8 0 21.0 0 + 3 10.0M 20 201x40 1081.6 2073.2 232.9 427.2 0 23.2 0 + 3 10.0M 40 201x80 3454.0 5293.9 231.8 448.0 0 28.9 0 diff --git a/evidence/sqlalchemy-2026-11-06/grade4/overload-leftovers.txt b/evidence/sqlalchemy-2026-11-06/grade4/overload-leftovers.txt new file mode 100644 index 00000000..55d6de03 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/overload-leftovers.txt @@ -0,0 +1,147 @@ +date: 2026-11-05T23:11:34Z commit: cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e +# make overload-leftovers (scripts/overload-leftovers.sh) после серии памяти: невидимые намерения от 503 по +# таймауту видны сверке свежими, уборка API удаляет их после UPLOAD_GRACE_SECONDS; стенд тот же +$ make reconcile # dry-run +{ + "mode": "dry-run", + "skipped": false, + "grace_seconds": 3600, + "skew_seconds": 60, + "deep": false, + "page_size": 1000, + "scanned": { + "objects": 1677, + "rows": 1699 + }, + "found": { + "orphan_stale": 0, + "orphan_fresh": 0, + "missing": 0, + "size_mismatch": 0, + "sha_mismatch": 0, + "pending_stale": 0, + "pending_fresh": 30, + "quarantined": 0, + "healed": 0 + }, + "fixed": { + "orphan_stale": 0, + "missing": 0, + "size_mismatch": 0, + "sha_mismatch": 0, + "pending_stale": 0, + "healed": 0 + }, + "rechecked": {}, + "errors": 0, + "samples": { + "pending_fresh": [ + "01a1adef-d982-7568-a4e4-806e55ce3d37", + "01a1adf0-0885-72da-8cd6-e61660a24073", + "01a1adf0-2ab2-76bf-a42e-03cf494bbb35", + "01a1adf5-c5a6-711d-97a4-c202111e7c42", + "01a1adf7-ed0e-7329-8a26-e57af871c267", + "01a1adf7-ed0e-77d0-a406-bd7fa28751fd", + "01a1adf7-ed32-779f-b1e9-55f318fe3c1a", + "01a1adf7-ed9f-746c-b073-3b5f60212364", + "01a1adf7-edd6-75a8-8ec9-00fc1928a524", + "01a1adf7-ee71-758d-9272-f4b18b6bf7d2", + "01a1adf7-ee79-74b8-bd88-0dfb1b312025", + "01a1adf7-ee9d-71c6-a259-23b00a895555", + "01a1adf7-ee9f-7223-8e24-e9a09fffc11e", + "01a1adf7-eea6-70b8-9cb1-8131305b4d53", + "01a1adf7-eeb4-758c-a256-6aaee7f64398", + "01a1adf7-eec8-744e-bfc8-f1c5c60dd827", + "01a1adf7-eee6-75e4-8965-019e89d931c8", + "01a1adf7-ef01-71fb-8618-78cc5cd3c960", + "01a1adf7-f11a-70f1-846b-e890c223dacd", + "01a1adf7-f98f-7035-92f1-190362580270" + ] + }, + "cost": { + "seconds": 0.288, + "requests": { + "s3_list": 2, + "s3_head": 0, + "s3_get": 0, + "s3_delete": 0, + "sql": 2 + }, + "waited_seconds": { + "s3_list": 0.261, + "sql": 0.017 + }, + "hashed_bytes": 0, + "cpu_seconds": 0.611, + "max_rss_mib": 110.1 + } +} +$ psql -c "SELECT status, count(*), min(created_at), max(created_at) FROM attachments GROUP BY status ORDER BY status" + status | count | min | max +---------+-------+-------------------------------+------------------------------- + pending | 30 | 2026-11-05 22:58:59.586832+00 | 2026-11-05 23:10:14.949798+00 + ready | 1669 | 2026-11-05 21:02:17.920667+00 | 2026-11-05 23:11:27.041409+00 +(2 rows) + +$ until [ "$(psql -tAc "SELECT count(*) FROM attachments WHERE status = 'pending'")" = 0 ]; do sleep 10; done +pending = 0 в 2026-11-05T23:25:40Z +$ docker compose logs --since 2026-11-05T23:11:34Z api | audit.attachment_discarded и attachments.swept +{'abandoned': 30} swept 30 first 2026-11-05T23:14:02Z last 2026-11-05T23:25:32Z +$ psql -c "SELECT status, count(*), min(created_at), max(created_at) FROM attachments GROUP BY status ORDER BY status" + status | count | min | max +--------+-------+-------------------------------+------------------------------- + ready | 1669 | 2026-11-05 21:02:17.920667+00 | 2026-11-05 23:11:27.041409+00 +(1 row) + +$ make reconcile # dry-run после уборки +{ + "mode": "dry-run", + "skipped": false, + "grace_seconds": 3600, + "skew_seconds": 60, + "deep": false, + "page_size": 1000, + "scanned": { + "objects": 1669, + "rows": 1669 + }, + "found": { + "orphan_stale": 0, + "orphan_fresh": 0, + "missing": 0, + "size_mismatch": 0, + "sha_mismatch": 0, + "pending_stale": 0, + "pending_fresh": 0, + "quarantined": 0, + "healed": 0 + }, + "fixed": { + "orphan_stale": 0, + "missing": 0, + "size_mismatch": 0, + "sha_mismatch": 0, + "pending_stale": 0, + "healed": 0 + }, + "rechecked": {}, + "errors": 0, + "samples": {}, + "cost": { + "seconds": 0.18, + "requests": { + "s3_list": 2, + "s3_head": 0, + "s3_get": 0, + "s3_delete": 0, + "sql": 2 + }, + "waited_seconds": { + "s3_list": 0.155, + "sql": 0.015 + }, + "hashed_bytes": 0, + "cpu_seconds": 0.596, + "max_rss_mib": 110.2 + } +} diff --git a/evidence/sqlalchemy-2026-11-06/grade4/reuse-rejected.txt b/evidence/sqlalchemy-2026-11-06/grade4/reuse-rejected.txt new file mode 100644 index 00000000..513578b3 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/reuse-rejected.txt @@ -0,0 +1,9 @@ +date: 2026-11-05T23:15:49Z commit: cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e +environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-grades-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "NO_PROXY": "localhost,127.0.0.1,::1"} +$ python3 scripts/upload_memory.py --out evidence/sqlalchemy-2026-11-06/grade4/memory/run1 +usage: upload_memory.py [-h] [--base-url BASE_URL] [--slots SLOTS [SLOTS ...]] + [--sizes SIZES [SIZES ...]] + [--levels LEVELS [LEVELS ...]] [--rounds ROUNDS] + [--out OUT] +upload_memory.py: error: output directory must be empty; choose a new --out +exit_code: 2 elapsed_seconds: 0.044 diff --git a/evidence/sqlalchemy-2026-11-06/grade4/stack-faults.txt b/evidence/sqlalchemy-2026-11-06/grade4/stack-faults.txt new file mode 100644 index 00000000..f8880aa8 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/stack-faults.txt @@ -0,0 +1,107 @@ +date: 2026-11-05T23:02:15Z commit: 6c706a727ec7b4c5f8254e19401705847e8e9c78 +environment: {"COMPOSE_PROJECT_NAME": "hlpipe-lab4-grades-20261106", "COMPOSE_FILE": "compose.yaml", "LB_HTTP_PORT": "18084", "LB_STATS_PORT": "24844", "BASE_URL": "http://127.0.0.1:18084", "EVIDENCE_DIR": "evidence/sqlalchemy-2026-11-06/grade4", "NO_PROXY": "localhost,127.0.0.1,::1"} +$ .venv/bin/pytest -m stack -v -s --no-header --tb=short -p no:cacheprovider student-tests/stack +============================= test session starts ============================== +collecting ... collected 19 items + +student-tests/stack/test_attachment_faults.py::test_user_errors_never_become_500 10 MiB + 1 с Content-Length, тело не отправлено: 413 +10 MiB + 1 chunked: 413 +PNG 100000×100000 (бомба): 413 +PNG 8001×5000: 413 +обрезанный PNG: 415 +обрезанный JPEG: 415 +JPEG как image/png: 415 +GIF как image/png: 415 +WebP как image/png: 415 +текст как image/png: 415 +PNG как image/jpeg: 415 +пустое тело: 415 +application/octet-stream: 415 +без Content-Type: 415 +filename='../a.png': 400 +filename='a/b.png': 400 +filename='a\\b.png': 400 +filename='a\x00.png': 400 +filename='a\x01.png': 400 +filename='a\x7f.png': 400 +filename='': 400 +filename=' ': 400 +filename='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx: 400 +filename=None: 400 +посторонний: upload в чужой чат: 404 +посторонний: метаданные: 404 +посторонний: /content: 404 +посторонний: ссылка на чужое вложение: 404 +вложение другого чата: 404 +неизвестное вложение: 404 +11 вложений: 400 +повтор вложения: 400 +невалидный UUID: 400 +пустой текст без вложений: 400 +невалидный id вложения: 400 +variant=thumbnail: 400 +строк вложений в чате: 2 (= ответов 201); ответов в журнале реплик: 54, из них 5xx: 0 +PASSED +student-tests/stack/test_attachment_faults.py::test_commit_failure_is_compensated_at_once отказ COMMIT после записи объекта: 503 unavailable +сразу после ответа: строка нет, объект HEAD 404 +журнал: audit.attachment_discarded reason=compensation +PASSED +student-tests/stack/test_attachment_faults.py::test_crash_between_put_and_commit_is_swept_after_grace реплика cff4a17e0883 убита между PUT и COMMIT, клиент получил 502 +реплика f2e1260f6803 убита между PUT и COMMIT, клиент получил 502 +остаток после падения: строка pending, объект HEAD 200 +остаток после падения: строка pending, объект HEAD 200 +старше grace: строка убрана через 26.2 с, объект HEAD 404 +моложе grace: строка pending, объект HEAD 200 +тот же после сдвига: убран через 2.0 с, объект HEAD 404 +готовое вложение в сообщении со сдвинутым created_at скачивается, SHA-256 совпадает +PASSED +student-tests/stack/test_attachment_faults.py::test_aborted_upload_leaves_nothing обрыв после 256 KiB из 5 MiB: статус в журнале реплики [400], намерение None +PASSED +student-tests/stack/test_attachment_faults.py::test_stalled_upload_is_cut_and_leaves_nothing тело зависло после 1 KiB: 503 unavailable за 8.01 с +PASSED +student-tests/stack/test_attachment_faults.py::test_token_is_checked_before_the_declared_size без токена, Content-Length 10485761: 401 unauthorized +PASSED +student-tests/stack/test_attachment_faults.py::test_slow_but_steady_transfers_outlive_the_request_timeout upload 3 MiB ≈ 256 KiB/s: клиент 12.2 с, реплика (201, 11.962893) +скачивание 3 MiB ≈ 192 KiB/s из сети edge: клиент 16.0 с, реплика (200, 12.439652) +PASSED +student-tests/stack/test_faults.py::test_registration_race_yields_exactly_one_user гонка 50 регистраций: 201×1, 409×49 +PASSED +student-tests/stack/test_faults.py::test_chat_creation_rolls_back_on_unknown_member чат с несуществующим участником: 400 invalid_request +PASSED +student-tests/stack/test_faults.py::test_wrong_password_and_unknown_user_get_same_basic_challenge неверный пароль: 401 за 0.013 с +неизвестный пользователь: 401 за 0.012 с +PASSED +student-tests/stack/test_faults.py::test_logout_then_token_is_dead logout: 204, затем 401, повтор 401 +PASSED +student-tests/stack/test_faults.py::test_valkey_serves_repeated_checks 5 проверок токена: keyspace_hits 521 → 526 +PASSED +student-tests/stack/test_faults.py::test_valkey_stopped_is_bypassed_but_logout_waits valkey остановлен, действующий токен: 200 за 0.007 с +valkey остановлен, неизвестный токен: 401 за 0.004 с +valkey остановлен: ready 200, вход 201, выход 503 +valkey снова запущен: повторный выход 204 +PASSED +student-tests/stack/test_faults.py::test_valkey_restart_keeps_cache_and_revocations рестарт valkey: ключей 38 → 38 +рестарт valkey: живой 200, отозванный 401 +PASSED +student-tests/stack/test_faults.py::test_valkey_flushall_loses_nothing FLUSHALL: живой 200, отозванный 401 +PASSED +student-tests/stack/test_faults.py::test_postgres_stopped_gives_bounded_503_and_recovers postgres остановлен, ready: 503 за 0.004 с +postgres остановлен, me: 503 за 0.003 с +postgres остановлен, stranger: 503 за 0.003 с +postgres остановлен, login: 503 за 0.002 с +postgres остановлен, register: 503 за 0.016 с +live внутри реплики 200; LB исключил все реплики ещё через 0.96 с +live через LB без реплик: 503 за 0.000 с +postgres запущен: готовность через 1.8 с, прежний токен 200 +postgres запущен: 40 регистраций 201 через 2 реплики без рестарта API +PASSED +student-tests/stack/test_faults.py::test_api_restart_keeps_session_without_extending_it рестарт api: готовность через 2.8 с, токен 200 +expires_at при входе 2026-11-06T00:03:46.324559Z, в БД после рестарта 2026-11-06T00:03:46.324559Z +PASSED +student-tests/stack/test_faults.py::test_full_restart_keeps_session_until_logout restart.sh: готовность через 0.0 с, прежний токен 200, выход 204, затем 401 +PASSED +student-tests/stack/test_faults.py::test_session_expires_after_restart_at_original_time срок сессии сокращён до 20 с, рестарт api: готовность через 3.1 с, до срока 200, после срока 401 +PASSED + +======================== 19 passed in 129.51s (0:02:09) ======================== +exit_code: 0 elapsed_seconds: 130.279 diff --git a/evidence/sqlalchemy-2026-11-06/grade4/student-tests.txt b/evidence/sqlalchemy-2026-11-06/grade4/student-tests.txt new file mode 100644 index 00000000..bd3c6e79 --- /dev/null +++ b/evidence/sqlalchemy-2026-11-06/grade4/student-tests.txt @@ -0,0 +1,12 @@ +date: 2026-11-05T23:14:04Z commit: cf41f7c64dcf1dea6da0643f5793bd2e5dd1f03e +environment: {"NO_PROXY": "localhost,127.0.0.1,::1"} +$ make student-test PYTEST_ARGS=-q +.venv/bin/pytest -q +........................................................................ [ 17%] +........................................................................ [ 35%] +........................................................................ [ 53%] +........................................................................ [ 71%] +........................................................................ [ 89%] +............................................ [100%] +404 passed, 19 deselected in 79.50s (0:01:19) +exit_code: 0 elapsed_seconds: 80.974 diff --git a/openspec/changes/verify-lab4-grade4-sqlalchemy/.openspec.yaml b/openspec/changes/archive/2026-11-06-verify-lab4-grade4-sqlalchemy/.openspec.yaml similarity index 57% rename from openspec/changes/verify-lab4-grade4-sqlalchemy/.openspec.yaml rename to openspec/changes/archive/2026-11-06-verify-lab4-grade4-sqlalchemy/.openspec.yaml index 8a94d769..09767f3d 100644 --- a/openspec/changes/verify-lab4-grade4-sqlalchemy/.openspec.yaml +++ b/openspec/changes/archive/2026-11-06-verify-lab4-grade4-sqlalchemy/.openspec.yaml @@ -1,2 +1,5 @@ schema: spec-driven created: 2026-11-06 + +archived: 2026-11-06 +lab: 4 diff --git a/openspec/changes/verify-lab4-grade4-sqlalchemy/design.md b/openspec/changes/archive/2026-11-06-verify-lab4-grade4-sqlalchemy/design.md similarity index 100% rename from openspec/changes/verify-lab4-grade4-sqlalchemy/design.md rename to openspec/changes/archive/2026-11-06-verify-lab4-grade4-sqlalchemy/design.md diff --git a/openspec/changes/verify-lab4-grade4-sqlalchemy/proposal.md b/openspec/changes/archive/2026-11-06-verify-lab4-grade4-sqlalchemy/proposal.md similarity index 100% rename from openspec/changes/verify-lab4-grade4-sqlalchemy/proposal.md rename to openspec/changes/archive/2026-11-06-verify-lab4-grade4-sqlalchemy/proposal.md diff --git a/openspec/changes/verify-lab4-grade4-sqlalchemy/specs/lab4-evidence-runs/spec.md b/openspec/changes/archive/2026-11-06-verify-lab4-grade4-sqlalchemy/specs/lab4-evidence-runs/spec.md similarity index 82% rename from openspec/changes/verify-lab4-grade4-sqlalchemy/specs/lab4-evidence-runs/spec.md rename to openspec/changes/archive/2026-11-06-verify-lab4-grade4-sqlalchemy/specs/lab4-evidence-runs/spec.md index 816bcbc6..7aa62052 100644 --- a/openspec/changes/verify-lab4-grade4-sqlalchemy/specs/lab4-evidence-runs/spec.md +++ b/openspec/changes/archive/2026-11-06-verify-lab4-grade4-sqlalchemy/specs/lab4-evidence-runs/spec.md @@ -1,6 +1,7 @@ ## ADDED Requirements ### Requirement: Изоляция серий +Трассировка: README.md, уровень4, эксперимент памяти и доказательства экспериментов. Сбор доказательств MUST сохранять UTC, полный SHA, команду и фактический exit code. Повторная серия памяти MUST использовать новый каталог и MUST NOT перезаписывать прежние результаты. @@ -9,6 +10,7 @@ - **THEN** драйвер завершается до запуска нагрузки с ошибкой ### Requirement: Безопасный чистый clone +Трассировка: README.md, работающий минимум и общий воспроизводимый стенд. Проверка clone MUST использовать собственный Compose project, сохранять volumes и возвращать ошибку первого неуспешного обязательного шага, останавливая собственный стенд при завершении. @@ -17,6 +19,7 @@ - **THEN** собственные контейнеры останавливаются, а именованные volumes сохраняются ### Requirement: Ошибка эксперимента +Трассировка: README.md, уровень4, доказательства отказов и измерений. Ненулевой exit клиента нагрузки или оставшиеся после таймаута pending MUST означать неуспешную проверку. #### Scenario: Клиент завершился с ошибкой diff --git a/openspec/changes/verify-lab4-grade4-sqlalchemy/tasks.md b/openspec/changes/archive/2026-11-06-verify-lab4-grade4-sqlalchemy/tasks.md similarity index 72% rename from openspec/changes/verify-lab4-grade4-sqlalchemy/tasks.md rename to openspec/changes/archive/2026-11-06-verify-lab4-grade4-sqlalchemy/tasks.md index 27233f33..2a590791 100644 --- a/openspec/changes/verify-lab4-grade4-sqlalchemy/tasks.md +++ b/openspec/changes/archive/2026-11-06-verify-lab4-grade4-sqlalchemy/tasks.md @@ -6,11 +6,11 @@ ## 2. Проверки - [x] 2.1 Выполнить все stack-тесты отказов и загрузок через LB. -- [ ] 2.2 Снять три серии памяти, проверить уборку оставшихся намерений. -- [ ] 2.3 Подтвердить воспроизводимый клиент нагрузки и чистый clone с сырым выводом. +- [x] 2.2 Снять три серии памяти, проверить уборку оставшихся намерений. +- [x] 2.3 Подтвердить воспроизводимый клиент нагрузки и чистый clone с сырым выводом. ## 3. Документация -- [ ] 3.1 Сверить каждое из 21 замечания; результаты трека явно передать следующему циклу. -- [ ] 3.2 Исправить текущие утверждения REPORT и индекс, записать матрицу критериев и ограничения. -- [ ] 3.3 Синхронизировать спецификацию, архивировать после проверок и коммита. +- [x] 3.1 Сверить каждое из 21 замечания; результаты трека явно передать следующему циклу. +- [x] 3.2 Исправить текущие утверждения REPORT и индекс, записать матрицу критериев и ограничения. +- [x] 3.3 Синхронизировать спецификацию, архивировать после проверок и коммита. diff --git a/openspec/specs/lab4-evidence-runs/spec.md b/openspec/specs/lab4-evidence-runs/spec.md new file mode 100644 index 00000000..d31a173a --- /dev/null +++ b/openspec/specs/lab4-evidence-runs/spec.md @@ -0,0 +1,32 @@ +# lab4-evidence-runs Specification + +## Purpose +Определяет изолированный сбор проверяемых результатов и безопасный запуск чистого clone ЛР4. + +## Requirements + +### Requirement: Изоляция серий +Трассировка: README.md, уровень4, эксперимент памяти и доказательства экспериментов. +Сбор доказательств MUST сохранять UTC, полный SHA, команду и фактический exit code. +Повторная серия памяти MUST использовать новый каталог и MUST NOT перезаписывать прежние результаты. + +#### Scenario: Существующий каталог памяти +- **WHEN** каталог уже содержит результаты +- **THEN** драйвер завершается до запуска нагрузки с ошибкой + +### Requirement: Безопасный чистый clone +Трассировка: README.md, работающий минимум и общий воспроизводимый стенд. +Проверка clone MUST использовать собственный Compose project, сохранять volumes и возвращать ошибку +первого неуспешного обязательного шага, останавливая собственный стенд при завершении. + +#### Scenario: Проверка завершена +- **WHEN** последовательность smoke/persistence/failover/security завершается или падает +- **THEN** собственные контейнеры останавливаются, а именованные volumes сохраняются + +### Requirement: Ошибка эксперимента +Трассировка: README.md, уровень4, доказательства отказов и измерений. +Ненулевой exit клиента нагрузки или оставшиеся после таймаута pending MUST означать неуспешную проверку. + +#### Scenario: Клиент завершился с ошибкой +- **WHEN** load-client возвращает ненулевой exit code +- **THEN** сырой вывод сохраняется и команда сбора также возвращает ненулевой exit code