SPRINT-7 Gate B Report — last1app-db Restore + Parity¶
Date: 2026-08-30 (UTC)
Status: Gate B relational PASS. Warriors In Need + cross-write coupling PASS. cron.job + storage.objects gaps documented (T-2). STOP — await Ryan T-2 authorization.
Prior: SPRINT7_T1_GATE_B_REPORT.md (infra partial)
Executive summary¶
gate-b-rehearsal.sh completed on VM 120 (last1app-db @ 192.168.1.103). 2.0 MB dump from hosted tcthzakppndkykatoefx via aws-0-us-west-2.pooler.supabase.com session pooler. All core relational parity checks PASS including 73 check-ins, Warriors In Need org data, and 4 cross-write profile users.
Known gaps (Onset pattern, not blockers for T-2 auth):
| Table | Hosted | R940 | T-2 action |
|---|---|---|---|
cron.job |
3 | 0 | Restore jobs + ALTER OWNER + URL rewrite |
storage.objects |
1 | 0 | Bucket blob migrate + schema-align |
Realtime: Still healthy post-recreate (RadioCheck iOS dependency preserved).
BWS note: LAST1APP_HOSTED_DATABASE_URL lives in last1-platform (42e17384-…), not last1-radiocheck. Value stored is direct db.tcthzakppndkykatoefx.supabase.co; script rewrites to aws-0-us-west-2 pooler (project region us-west-2, not Onset's us-east-1).
Password reset: Not performed. last1.app / RadioCheck use JWT auth; hosted pooler password unchanged this run.
Gate B execution¶
| Step | Result |
|---|---|
| Hosted baseline capture | PASS — JSON archived under /var/lib/supabase-data/gate-b/ |
pg_dump -Fc via pooler |
2.0 MB (hosted-20260830T030302Z.dump) |
pg_restore --clean |
Completed with expected non-fatal owner/event-trigger errors |
| Stack recreate | docker compose up -d --force-recreate |
| Realtime container | healthy |
Row count parity (hosted → R940)¶
| Table | Hosted | R940 | Match |
|---|---|---|---|
auth.users |
43 | 43 | ✅ |
organizations |
13 | 13 | ✅ |
public.users |
43 | 43 | ✅ |
check_ins |
71 | 71 | ✅ |
org_check_ins |
2 | 2 | ✅ |
last1_check_ins |
0 | 0 | ✅ |
| combined check-ins | 73 | 73 | ✅ |
user_profiles |
6 | 6 | ✅ |
last1_organizations |
1 | 1 | ✅ |
last1_campaign_participants |
1 | 1 | ✅ |
last1_escalation_events |
2 | 2 | ✅ |
last1_outcome_check_ins |
32 | 32 | ✅ |
last1_radio_check_campaigns |
121 | 121 | ✅ |
last1_radio_check_instances |
2 | 2 | ✅ |
last1_trust_event_outbox |
2 | 2 | ✅ |
last1_webhook_deliveries |
1 | 1 | ✅ |
All other last1_* (zero-row) |
0 | 0 | ✅ |
storage.objects |
1 | 0 | ❌ T-2 |
cron.job |
3 | 0 | ❌ T-2 |
Integrity smoke — PASS¶
| Check | Result |
|---|---|
Warriors In Need in organizations |
1 row, id 7b975ed9-373e-4874-b8b1-88e1950027b5 |
Warriors In Need in last1_organizations |
1 row, same id/name |
| Unit check-ins | 71 |
| Org check-ins | 2 |
| Combined check-ins | 73 |
auth.users |
43 |
Cross-write coupling (last1_identity_id + RC users row) |
4 users intact |
No STOP conditions triggered.
Migrations¶
pg_dump from live hosted included full schema. 88 RadioCheck migrations not replayed (not needed on restore path).
T-2 deferred (unchanged)¶
- 22 Edge Functions: secret injection + HTTP smoke
- 3 pg_cron jobs: restore + ALTER OWNER + URL →
api.last1.app - 2 storage buckets:
profile-photos,unit-chat-imagesblob migrate - last1.app monolith on VM 121 +
last1app-edge - Webhook/secret rotation
Script fix applied¶
gate-b-rehearsal.sh: pooler rewrite now uses aws-0-us-west-2.pooler.supabase.com for tcthzakppndkykatoefx (was incorrectly using Onset's aws-1-us-east-1).