What problem does it solve? Supabase backends accumulate expired function cache rows, failed webhook attempts, orphaned storage objects, stale AI jobs, and dead sessions that leak storage and degrade performance, and manual cleanup risks deleting active customer data. ## Core Features & Use Cases - Ten Mandatory Cleanup Tasks: Covers function_cache expiry, webhook attempt retention, temp uploads, abandoned draft estimates, orphaned storage, stale AI jobs, dead mobile sessions, log retention, duplicate imports, and empty contacts. - Safety-First Contract: Every task enforces active-data guards, dry-run-first deployment, batch limits, tenant isolation, and an audit row in cleanup_worker_runs. - Use Case: Schedule a pg_cron job at 03:15 that invokes the cleanup-worker edge function to purge 30-day-old failed webhook attempts and fail AI measurement jobs stuck in processing for over two hours, all logged with per-task scanned/deleted counts. ## Quick Start Ask the AI to build the cleanup-worker edge function with all ten cleanup tasks, dry-run enabled, and the pg_cron nightly schedule.