feat: add reconcile strategies, deep check, rate limit and cost profile

- reconcile --strategy head, --deep (checksum_mismatch), restore needs the same SHA-256
- [reconciler] max_objects_per_second (2000), pause interrupted by signal
- --apply stops rechecks once the limit is exceeded (unchecked)
- pass cost in the summary: S3 objects and requests, bytes, DB sessions, phases
- S3 client counters, cleaner exits with os._exit after main()
- fault tests, hook args, driver reconcile-signal --pace
- bench profile reconcile / reconcile_quick: fill outside the API, gateway metrics, background load
- sync spec deltas, rules, AGENTS.md, PLAN.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-23 04:52:56 +03:00
co-authored by Claude Opus 5.5
parent dcdfe5f2e4
commit 8d4cf7eebf
41 changed files with 5344 additions and 441 deletions
+11
View File
@@ -56,3 +56,14 @@ paths:
`ReconcileFindingDTO` (класс, ключ, `id`, возраст, размеры) и
`ReconcilePassDTO` (итог прохода; `found` и `fixed` — неизменяемые
отображения `MappingProxyType`, а не `dict`: DTO frozen).
- Стоимость сверки (design change `track2-reconcile-cost`, решения 8 и
15): `ReconcileFinding.CHECKSUM_MISMATCH` (`checksum_mismatch`) и
`ReconcileStrategy` (`batch`, `head`) в `enums/attachment.py`;
`ReconcilePassDTO` — новые поля в конце со значениями по умолчанию:
`strategy`, `deep`, `max_objects_per_second`, `storage_objects`,
`s3_requests` и `phase_ms` (`MappingProxyType`, по умолчанию пустой —
`field(default_factory=…)`), `read_bytes`, `db_sessions`, `unchecked`;
`ReconcileFindingDTO.sha256: bytes | None = None` — SHA-256 строки для
перепроверки прочитанного объекта, в журнал не попадает. Снимок
счётчиков клиента S3 `StorageStats` — тип `src/infra/s3`, не DTO
слоёв.