Situation: While running a routine database migration script in staging, I accidentally ran a cleanup script against our live production read-replica due to having overlapping database connection tabs open in my terminal.
Task: I had to take immediate ownership of the error, halt the operation, and prevent data corruption or customer impact without hesitation.
Action: Instead of trying to quietly reverse the action or hoping nobody noticed, I immediately notified our operations team and engineering lead in our urgent alerts channel. I explained exactly what command had been executed and on which host. Because I reported it within thirty seconds, our SRE team was able to isolate the replica before it served stale query results to active users, and we restored the replica from our automated snapshot within fifteen minutes. Once operations stabilized, I authored a post-mortem detailing how the lack of environment-specific terminal color prompts and missing command confirmations contributed to the mistake.
Result: We implemented strict terminal session safeguards, environment confirmation prompts, and read-only connection profiles for all engineers. My lead commended my immediate transparency, which prevented what could have become an extended customer outage.