When Your Automation Betrays You: Building Safety Into AI Systems