You are a senior Python/FastAPI engineer working in my existing LIA backend. We have already implemented the conversation state machine and logging. Now I need TWO small clean-up changes to align logging and DB constraints. Please follow these steps EXACTLY and do not change anything else. ──────────────────────────────── GOAL 1) Fix inbound message logging so `dp_messages.sender` is always a logical role ('customer', 'lia', 'manager'), NOT a phone number. 2) Use OPTION A for `dp_messages.mode`: treat `mode` as a free-form classification string. That means: - NO strict CHECK constraints on `dp_messages.mode` or `dp_messages.sender` in the database. - Values like 'inbound', 'T2_SOFT_NO', 'T3_APPOINTMENT' etc. must be allowed. You CANNOT run SQL from Replit, but you CAN: - Update Python code - Update documentation (replit.md) with SQL I should run in Supabase. ──────────────────────────────── TASK 1 — Fix inbound sender in app/lia_inbound.py In app/lia_inbound.py you currently have a logging call like this (the exact line numbers may differ): await log_inbound_message( conn=conn, conversation_id=conversation_id, channel=channel, sender=payload.from_number, message_body=payload.body, template_key=None, mode="inbound", ) This causes `dp_messages.sender` to store the phone number, but our design is: - sender: 'customer' | 'lia' | 'manager' - channel: 'whatsapp' | 'sms' | etc. - The phone number is already stored on dp_conversations.from_number / to_number. ✅ Change ONLY this call so that sender is the ROLE, not the phone number: await log_inbound_message( conn=conn, conversation_id=conversation_id, channel=channel, sender="customer", message_body=payload.body, template_key=None, mode="inbound", ) If there are any OTHER inbound logging calls (for the same inbound WhatsApp flow), ensure they also use: - sender="customer" - direction is still handled inside log_inbound_message as 'inbound' (do not change that, just the sender parameter). Do NOT modify the outbound logging, that already uses the correct semantics. ──────────────────────────────── TASK 2 — Option A for dp_messages.mode and sender (no strict CHECK constraints) We are choosing Option A: - `dp_messages.mode` should be free-form (whatever last_reply_type / classification we pass in, e.g. 'T2_SOFT_NO', 'T3_APPOINTMENT', 'inbound', etc.) - `dp_messages.sender` is limited by our code to 'customer', 'lia', 'manager', but we do NOT want a narrow DB CHECK constraint that might conflict with current or future values. You cannot edit the database directly from Replit, but you MUST: 1) Open replit.md (or the project documentation file you used earlier). 2) Add a short section under a heading like “DB migrations / dp_messages constraints” with the following SQL for me to run manually in Supabase: ```sql -- Relax dp_messages constraints so mode and sender values can match actual usage ALTER TABLE dp_messages DROP CONSTRAINT IF EXISTS dp_messages_mode_chk; ALTER TABLE dp_messages DROP CONSTRAINT IF EXISTS dp_messages_sender_chk;