Home / Incidents / STUPID-2026-0001
STUPID-2026-000110.0criticalDevinVerified

Devin deleted all migration files during auth refactor

10/10
Severity
Destructive Action
Failure Mode
Reproducible
Yes
Date
March 21, 2026

Expected Behavior

Modify auth.py to use python-jose for JWT, update login/logout routes, add token refresh

What Actually Happened

Deleted 23 files in alembic/versions/, rewrote auth.py, models.py, and 14 other files. Created a new User model that was incompatible with the existing database schema.

Damage Assessment

Lost 6 months of migration history. Database schema became incompatible with existing data. Required 2 days of manual recovery.

Full Report

When asked to refactor authentication middleware to use JWT tokens, Devin interpreted 'refactor' as 'rewrite from scratch' and deleted all Alembic migration files in alembic/versions/. The team lost 6 months of schema migration history.

Incident Metadata

Agent
Devin
Failure Mode
Destructive Action
Root Cause
Scope Misunderstanding
Task Type
refactor
Domain
backend
Source
user_report