feat: implement lab 4 attachments and storage reconciliation

This commit is contained in:
2026-10-27 22:14:19 +03:00
parent ec540a1a72
commit fea6770389
128 changed files with 27650 additions and 24 deletions
+35
View File
@@ -0,0 +1,35 @@
---
name: lab4-bench
description: Load measurements of lab 4 for grade 5 — peak memory of concurrent attachment uploads (level 4, profile uploads) and the cost of the bucket/database reconcile pass (track 2, profile reconcile). Use when asked to run benchmarks, make bench-uploads / bench-reconcile (or their -quick self-checks), or fill REPORT.md with measured numbers and hypothesis outcomes.
---
# Замеры лабы 4 (уровень 4 и трек 2)
Порядок работы — **`bench/RUNBOOK.md`**, правила стенда —
`bench/AGENTS.md`. Прочитать оба целиком (`cat`) до первой команды
`make bench-*`; корневой `AGENTS.md` (разделы 2, 8–11) действует всегда.
Коротко:
1. Шаг 0 RUNBOOK: ресурсы ВМ Docker (≥ 10 CPU, ≥ 7 ГиБ, ядро ≥ 6.12),
самопроверки разбора (`bench/analysis.py`, `uploads.py`,
`reconcile.py` с `--selftest`), `make test-isolated`,
`make failure-checks`, `make stop`, самопроверки
`make bench-uploads-quick` и `make bench-reconcile-quick`. Остановка и
отчёт пользователю.
2. Уровень 4: `make bench-uploads` (~45 мин) → `evidence/uploads/baseline/`;
таблица ячеек и итоги U1–U4 из `summary.md` — в `REPORT.md`.
3. Трек 2: `make bench-reconcile` (~45 мин) →
`evidence/reconcile/baseline/`; таблицы проходов и фоновой нагрузки,
итоги H1–H5 — в `REPORT.md`.
4. Шаг 3 RUNBOOK: строки `TODO (Codex)` в `REPORT.md`, раздел «Железо и
стенд замеров» из `meta.json`, `make lint`, `make check`,
`make test-isolated`, уборка `vlad-bench*`.
Нельзя: переписывать гипотезы после замеров, менять код приложения или
профиль ради результата, править файлы меток руками, перезаписывать или
удалять каталоги меток без согласия, считать числа вручную вместо
`summary.md`. Долгие команды — в фоне с журналом (`nohup make … >
/tmp/bench-*.log 2>&1 &`), docker — вне sandbox с одобрения пользователя.
`found differs from the model`, `aborted`, `host_warnings` — остановиться
и сказать пользователю.