Implementation started on branch codex/session-06-archive-retention. Chosen safety model: reversible idempotent archive/unarchive stays distinct from destructive deletion; deletion is owner-authorized and persisted as requested -> deleting -> completed, with a durable tombstone and audit events; active legal hold blocks request/start/completion; request establishes a canonical write fence; dry-run builds a bounded deterministic inventory of exact BlobRefs and execution requires a typed inventory digest, deletes only those keys, and is resumable after interruption. Current work also adds session-scoped YDB indexes needed to avoid unbounded scans and Object Storage lifecycle tiering/runbook before opening the MR.


Implementation is ready for review in !32: https://gitcode.com/urandon/sessionless/merge_requests/32 (commit abcbb0b). Delivered idempotent archive/unarchive, STANDARD -> COLD -> ICE lifecycle policy, durable legal holds and deletion tombstones/audit, owner authorization and write fencing, bounded exact-object dry-run with digest confirmation, resumable deletion, operator Make targets, migrations 00060-00064, and the public retention/recovery runbook. Verification passed: make test, make build, make integration, full make ydb-integration, make local-integration, make terraform-ci, clean-schema migration/repeatability, and make e2e-local on a clean stand. An earlier E2E attempt reused YDB-suite fixtures and failed only in the queue-outage recovery scenario; after the required clean-volume isolation, the full black-box suite passed.


Дополнение к MR !32 после self-review: commit a1918ea закрывает privacy-gap в legacy Telegram delivery state.
- добавлен bounded reverse index
telegram_deliveries_by_run(migration00065), dual-write и immutable run ownership для delivery ID; - inline delivery text удаляется вместе с outbox/ready rows;
- delivery
BlobRefвходит в точный session-scoped inventory и confirmation digest; - completion удаляет legacy/v2 ready rows, outbox и reverse-index rows транзакционно;
- интеграционный lifecycle test покрывает inline и blob deliveries и подтверждает отсутствие строк после completion.
Проверки после дополнения: make test, make ydb-integration, make local-integration, make build, git diff --check — зелёные. MR: https://gitcode.com/urandon/sessionless/merge_requests/32


Implemented and merged via MR !32.
Final merge commit: cf7cfccb16e5d4bf9617ec267631ce078c9f074e (verified feature head 94480af84ecc30fe919a7555ed686d42fa4fcfe2).
Review cycle addressed all four findings: migration-safe reverse-index backfill/cutover, session-owned worker object paths with bounded legacy compatibility, durable non-TTL delivery/checkpoint ledgers, and a shared bounded deletion inventory.
Verification passed: make test, make build, make ci, clean make ydb-integration, make local-integration, make terraform-ci, clean make e2e-local, and GitHub exact-head Actions run 32137432646 (all six jobs successful).


Parent and architecture
Outcome
Implement reversible session archive state, explicit payload tiering and an audited destructive-retention procedure without allowing operational TTL cleanup to erase canonical history.
Estimate
Scope
STANDARD;COLD;ICEonly after an explicit age/economic threshold.Non-goals
/new.Verification
Acceptance criteria
archivedis a logical reversible state, not a retention deadline.