Tiering plan: record durability decision A + reconcile tech-plan#100
Merged
Conversation
The detailed tiering tech-plan was stale in a few spots: the next free migration is 012 (011 is already applied; 010 is an unused gap), Phase 0 (off-box sink) is prepped on the VPS and blocked only on R2 credentials, and the summaries table DDL had a BIGGENERATED typo. No design change — accuracy only, ahead of implementing the SessionStateStore seam (slice 2) and the nightly summarization (slice 5). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Closes the open A-vs-B decision in the layered-persistence plan: Postgres write-through stays the synchronous durability anchor; the off-box backup is a per-turn outbox append (never a periodic snapshot or nightly flush as the durability boundary). Renan's Redis-operational-truth design (Option B) is kept as a triggered escalation ladder (Redis hot state, then read cache, then local Redis-first) rather than discarded, so A can grow into B incrementally when volume actually demands it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
O que foi feito
Canoniza a arquitetura de persistência em camadas e fecha a decisão que estava em aberto, além das correções de precisão do tech-plan.
Decisão (fecha A vs B, §4/§11)
Opção A: Postgres write-through = âncora síncrona de durabilidade; Redis = cache/estado quente não-crítico; backup off-box e fan-out = assíncronos via outbox (append por-turno, nunca snapshot/flush diário como fronteira de durabilidade).
As ideias da Opção B (desenho do Renan: Redis como verdade operacional + Postgres noturno) viram uma escada de escalada incremental sob gatilho (Redis hot state → read cache 7d → Redis-first localizado), em vez de descarte — a A cresce pra dentro da B quando o volume provar a necessidade.
Reconciliações do tech-plan
BIGGENERATED).Doc-only.
🤖 Generated with Claude Code