For decades, warehouses checked their inventory just twice a year, letting errors hide for months. AI is changing that.