Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/handoff-2026-05-09-onda-9-vault-recovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ Linha do tempo:
| F3.11 HTTP request 949 status_code | ✅ **200 OK** (Evolution API respondeu) |
| F3.12 Reabilitar cron jobid 27 | ✅ active=true |
| F3.13 Validar próximo run automático (08:30) | ✅ **succeeded** após 4 falhas seguidas pré-fix |
| F3.14 Test `fn_get_vault_secret('evolution_api_key')` | ✅ retorna `429683...` |
| F3.14 Test `fn_get_vault_secret('evolution_api_key')` | ✅ retorna `<REDACTED-evolution-api-key-prefix>` |
| F3.15 Test `fn_collect_restore_logs()` | ✅ 1 row |
| F3.16 Test `fn_validate_whatsapp_connection_url(uuid)` | ⚠️ função não existe com essa assinatura (não relacionado) |

Expand Down Expand Up @@ -269,7 +269,7 @@ Conteúdo: lista de volumes críticos, comandos proibidos, sobre pgsodium_root.k

- F4.P1 estendida: criar **stack/cron AUTOMATIZADO** do volume db-config (hoje só fiz manual)
- F4.P2: healthcheck SQL `SELECT count(*) FROM vault.decrypted_secrets WHERE name='evolution_api_key'` em cron de 5min, alerta GlitchTip se NULL
- F4.P4: PR no zapp-web adicionando `# DO NOT REMOVE — pgsodium key` em docker-compose-supabase
- F4.P4: PR no zapp-web adicionando `# DO NOT REMOVE — pgsodium key` no compose Supabase (`/root/supabase.yaml` na VPS)
- F4.P5: GitHub issue rastreando deprecação pgsodium

## 🎯 Resultado da Onda 9
Expand Down Expand Up @@ -387,7 +387,7 @@ Se aparecer `status:degraded` ou fail>0 → vault em problemas, investigar.
2. **Investigar** se `minio_secret_key` é necessário (provavelmente DEPRECATED, R2 substituiu)
3. **Investigar** se `restore_test_ingest_token` tem caller (provavelmente não)
4. **F4.P1 automatizado**: cron de backup do volume `supabase_db_config` (hoje só manual)
5. **F4.P4**: PR no zapp-web — comentário "DO NOT REMOVE" no docker-compose-supabase
5. **F4.P4**: PR no zapp-web — comentário "DO NOT REMOVE" no compose Supabase (`/root/supabase.yaml` na VPS)
6. **F4.P5**: GitHub issue tracking deprecação pgsodium
7. **Bug pendente**: `fn_validate_whatsapp_connection_url(uuid)` não existe — é referência stale?

Expand Down
4 changes: 2 additions & 2 deletions docs/runbooks/SUPABASE-VOLUMES-DOS-AND-DONTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ PGHOST=supabase_db psql -d postgres -c \
PGHOST=supabase_db psql -d postgres -c "SELECT * FROM public.fn_vault_healthcheck();"

# 4. Deploy
docker stack deploy -c docker-compose-supabase.yml supabase
docker stack deploy -c /root/supabase.yaml supabase

# 5. Aguardar containers estabilizarem (30s)
sleep 30
Expand Down Expand Up @@ -177,5 +177,5 @@ Tracking: GitHub issue (a criar em PR Onda 9.3).

- Doc-mãe da Onda 9: `docs/handoff-2026-05-09-onda-9-vault-recovery.md`
- Migration do healthcheck: `supabase/migrations/20260510131942_a5fcc99c-92cc-4be6-895a-f9a0d453a871.sql`
- Backup volume (artefato): `/workspace/notes/backups/supabase_db_config_20260510_112819.tar.gz`
- Backup volume (artefato): `<internal-backup-storage>/supabase_db_config_20260510_112819.tar.gz`
- Issue Supabase pgsodium deprecation: https://github.com/orgs/supabase/discussions/1204
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
-- - Funções/View: CREATE OR REPLACE
-- - Cron: cron.unschedule() em DO...EXCEPTION + cron.schedule()
--
-- Ref: /workspace/notes/onda-9-vault-recovery-2026-05-09.md
-- Ref: internal incident record (Onda 9)
-- ============================================================================

-- ----------------------------------------------------------------------------
Expand Down Expand Up @@ -174,6 +174,12 @@ LIMIT 20;
COMMENT ON VIEW public.v_vault_health IS
'Onda 9.1 — atalho de leitura: top 20 últimas leituras do healthcheck.';

-- ----------------------------------------------------------------------------
-- Pré-requisito de cron: garantir extensão pg_cron
-- (defensive — outras migrations já criam, mas mantemos pra reaplicabilidade)
-- ----------------------------------------------------------------------------
CREATE EXTENSION IF NOT EXISTS pg_cron;

-- ----------------------------------------------------------------------------
-- 6) Cron jobs (idempotentes via DO...EXCEPTION)
-- ----------------------------------------------------------------------------
Expand Down
Loading