Compliance false negative
If a message is sent to a contact after they have opted out, an immediate critical alert fires to Friyay operators. The CI compliance gate prevents this from deploying — but if a runtime failure escapes the gate, the alert catches it before further messages send.
How it works: The highest-severity alert in the system — paged immediately per the monitoring architecture. Distinct from the CI gate which prevents deployment.
AI parse failure
When the AI returns a response that fails schema validation and a fallback is substituted, a high-severity alert fires. Any non-zero parse failure rate warrants investigation — it may indicate model drift, a prompt change, or a schema mismatch.
How it works: Fallback flag is set on conversation_turns (tested in CI). The alert pathway from fallback=True to operator notification is the monitoring layer — verified in staging.
Token budget alerts
When a campaign's monthly token usage reaches 80% of its configured monthly_token_budget, a nightly alert fires to Friyay operators. This gives time to discuss with the client before costs exceed the agreed limit. Per-turn anomalies (5× average) alert immediately.
How it works: monthly_token_budget field and model_pricing table specified in platform architecture. Nightly budget check job fires alert at 80% threshold.
Queue and delivery monitoring
Delivery failure rates above 1% over a rolling 5-minute window indicate a systemic problem — not isolated retries. Queue depth alerts distinguish between a traffic spike and a worker outage. Both alert at different thresholds.
How it works: Queue depth observable via RQ Dashboard. Delivery failure rate tracked via delivery_status on outbound message rows — monitored at the infrastructure layer.