Ensures the unexpected-state path produces a structured JSON error response instead of an unmapped 500 RuntimeException. Adds OCR_TRAINING_CONFLICT ErrorCode and mirrors it in the frontend errors.ts. Adds coverage tests for getAllSenderModels() and runSenderTraining(). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>