Files
mtusi2026lab4/evidence/reconcile/README.md
T
ArtyomandClaude Opus 5.5 58cae16ef8 Report track 2 and check levels 3 and 4 after it
REPORT.md gets the track 2 section: what the reconciler does and why it
is safe, the hypotheses written before the first run, the method of the
demo and the cost matrix with its screening, both result tables, the
verdicts and the limits. H1 holds. H2 holds for the pass cost: time is
linear (t(30k)/t(10k) = 3.73, 3.05 in the series of 29.10), the listing
is 95 % of it, list requests are ceil(N/1000) and SQL one more for the
empty last keyset page, RSS stays at 82.5-83.8 MiB; --deep is 4.3-5
times dearer per object, not ten. The criteria table, the failure table,
the limits, AGENTS.md and the openspec context name the track rows, and
evidence/reconcile/README.md describes every file.

On a stand from a clean state make test, test-persistence,
test-failover, restore, reconcile, lint, check, validate and
student-test (342 passed) all pass; the dry-run after these scenarios
finds 3 objects, 3 rows and no discrepancy.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
2026-10-30 07:19:16 +03:00

35 lines
5.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Трек 2 «Согласованность двух хранилищ»: сырые данные
Отчёты сверки — stdout `python -m messenger.attachments.entrypoints.reconcile` (поля описаны в
`openspec/specs/lab4-storage-reconciler/spec.md`) плюс `exit_code` и `wall_seconds` (время `docker compose run`
вместе со стартом контейнера). Независимая проверка — `scripts/reconcile_check.py`: листинг bucket через `rc`
под root-ключом, строки через `psql`, SHA-256 каждого объекта через `rc object show | sha256sum`, без кода API.
Время в JSON — UTC.
| Файл | Что внутри | Чем получен |
| --- | --- | --- |
| `demo.json` | итог сценария: коммит, внедрённые ключи и id по классам, 12 проверок с деталями, `ok` | `make reconcile-demo` |
| `ready-before.json`, `ready-untouched.json` | id → SHA-256 готовых вложений до внедрения; то же без повреждаемых — ожидаемый набор после `apply` | `reconcile_check.py --save-ready` |
| `check-before.json`, `check-after.json` | независимая проверка (`--deep`) после внедрения и после двух `apply` | `reconcile_check.py` |
| `dry-run.json`, `apply-1.json`, `apply-2.json` | `--dry-run --deep`, затем `--apply --deep` дважды, `--grace 60 --skew 0` | сервис `reconciler` |
| `healed.json` | `--apply` после возврата объекта вложения в карантине `missing` | сервис `reconciler` |
| `lock-busy.json` | проход, пока `pg_advisory_lock(20260004)` держит другой сеанс: `skipped` | сервис `reconciler` |
| `s3-down.json` | проход при остановленном `s3`: код, время, stdout, строки журнала `reconcile.*` | сервис `reconciler` |
| `ready-load.json` | id → SHA-256 всех вложений, которые должны пережить нагрузку: готовые до неё и каждое `201` под ней | `reconcile_track.py` |
| `under-load.json`, `check-under-load.json` | 75 с загрузок через LB (3 потока, каждое 10-е вложение — в сообщение) и `--apply` подряд: ответы, время проходов, исправленное, увиденное свежим; проверка `--deep --expect-ready` после | `reconcile_track.py` |
| `cost/n<N>-<режим>-<повтор>.json` | отчёт прохода `--dry-run` на N объектах и строках; режимы `shallow` (страница 1000), `deep` (`--deep`), `page100` (страница 100); `screen` — чужая нагрузка CPU за окно прогона | `make reconcile-cost` |
| `cost/disturbed/*.json` | отбракованные прогоны (чужого CPU больше 2 ядер во всей VM или 0,25 на закреплённых ядрах сверх запуска контейнера); каждый повторён после 15 с тишины | `make reconcile-cost` |
| `cost/summary.json`, `cost/summary.txt` | медианы трёх прогонов на точку, запросы, RSS, CPU, наибольшая чужая нагрузка, число отбракованных; закрепление CPU и лимиты `s3`/`postgres`; время наполнения | `make reconcile-cost` |
| `cost/host-docker-stats.txt` | `docker stats --all` и `docker ps` всего хоста до и после серии, loadavg macOS | `make reconcile-cost` |
| `cost-2026-10-29/` | первая полная серия той же матрицы (`5ca2cdc`, 29.10): без отбраковки и без `cpu_seconds`, рядом шёл k6 другой лабы; для сравнения между днями, `NOTE.txt` | `make reconcile-cost` на `5ca2cdc` |
| `after-checks.txt` | после трека на стенде из чистого состояния: `make test`, `test-persistence`, `test-failover`, `restore`, `reconcile`, `lint`, `check`, `validate`, `student-test` | команды внутри файла |
| `cost-aborted/` | две прерванные попытки наполнить RustFS до 100k объектов и их точки 1k/10k; диагноз — `NOTE.txt` | `make reconcile-cost` до `5ca2cdc` |
Поля `screen`: `window_seconds` — окно между двумя чтениями счётчиков VM (`/proc/uptime`), `ours_cores` — CPU
`s3`, `postgres` и процесса сверки за окно, `other_cores` и `other_on_pinned_cores` — чужой CPU во всей VM и на
ядрах `s3`/`postgres`/`reconciler` сверх запуска контейнера (1,5 и 0,5 ядро·с), в ядрах, `disturbed` — прогон
отбракован. Итоговая серия снята на `b191623`: её `summary.json` записывает пороги, но не запас на запуск
контейнера и число повторов — это значения по умолчанию сценария этого коммита (1,5 и 0,5 ядро·с, 3 повтора);
начиная с `8cb5a66` они пишутся в `summary.json`. Объём данных в матрице — синтетические вложения
`student-tests/tools/seed_storage.py` (PNG 8 × 8, 264 B, строки `ready` двухчасовой давности).