From testing raw materials to holding batches and conducting mock recalls, food companies are building systems to catch problems related to products before they reach consumers