Index/ Health Audit
SuperAssistant MVP

Health Audit

SuperAssistant MVP — deep infrastructure scan — 2026-03-08

DB Tables
52
Indexes
190+
RLS Warnings
117
Backups
29
Backup Gap
2d
01

Security Advisors

1 Finding

Leaked Password Protection Disabled AUTH

  • Fix: Enable in Supabase Dashboard → Auth → Providers → Email → Leaked password protection Documentation
02

Railway Deployment

Healthy

Latest Build

  • Build completed in 21.16 seconds
  • Builder: Nixpacks with Python venv
  • No error logs in recent deployment (filtered for “error” — zero results)
  • Both schedulers started successfully on deploy
03

Backup Integrity

Gap Detected

Daily Backups

  • 29 backups in storage, daily cadence confirmed (Feb 6 – Mar 6)
  • Naming convention consistent: backup_YYYYMMDD_020000.json
  • Consider: trigger a manual backup to close the gap

Recent Backup History

BackupCreated
backup_20260306_020000.jsonMar 6, 02:00 UTC
backup_20260305_020000.jsonMar 5, 02:00 UTC
backup_20260304_020000.jsonMar 4, 02:00 UTC
backup_20260303_020000.jsonMar 3, 02:00 UTC
backup_20260302_020000.jsonMar 2, 02:00 UTC
04

RLS Policy Audit

117 Warnings

Multiple Permissive Policies

  • Consider consolidating overlapping policies into fewer, more targeted ones

Policy counts by table

TablePolicy CountSeverity
conversations14High
documents11High
messages11High
users10High
document_chunks8Medium
notion_tokens8Medium
clients5Medium
cave_runs4Low
unified_evaluations4Low
theme_settings4Low
05

Database Indexes

Well Indexed

Index Coverage

  • 190+ indexes across 52 tables — comprehensive coverage
  • Vector index on document_chunks.embedding for pgvector similarity search
  • Composite indexes on hot paths: conversations(user_id, updated_at), messages(conversation_id, timestamp)
  • GIN indexes for text search: conversations.title, messages.content
  • Foreign key indexes present on all join columns
06

Table Row Counts

Low Volume
TableRowsNotes
help_chunks238Help documentation embeddings
evaluation_steps65AESOP evaluation pipeline
help_documents43Indexed help docs
interview_segments38ElevenLabs segments
evaluations13
users12
conversations11
messages12
interview_sessions9
agents6

Observation

  • Data volume is very low — this is a pre-production/MVP environment
  • Many tables have 0 rows (stakeholders, roi_opportunities, contract_analysis, etc.)
  • No performance concerns at this scale — the 190+ indexes are ready for growth
07

Vercel Env Vars

Duplicates

71 Environment Variables

  • This is likely intentional — Vercel allows different values per target (production vs preview)
  • Verify that production and preview values are intentionally different where duplicated
08

Recommended Actions

Priority 1: Security

  • Enable leaked password protection in Supabase Auth settings Dashboard → Authentication → Providers → Email → Enable “Leaked password protection”

Priority 2: Operations

Priority 3: Cleanup (Optional)

  • Clean orphaned storage — 45 files in documents bucket with no matching DB records (legacy uploads from Nov-Dec 2025)
  • Verify Vercel env var duplicates are intentional (production vs preview targeting)
  • Remove empty tables if features are deprecated (stakeholders, roi_opportunities, contract_analysis have 0 rows)