jobRepository->findById(Uuid::fromString($message->jobId)); if (null === $job) { return; } $job->incrementAttempt(); $job->markProcessing(); $this->jobRepository->save($job); $result = $this->visionAgent->analyze($message->storedPhotoPath); $job->recordStep('vision', [ 'manufacturer' => $result['manufacturer'], 'model' => $result['model'], 'serial' => $result['serial'], ]); $this->jobRepository->save($job); if ('' === $result['model']) { $job->markNeedsReview('OllamaVisionAgent: no model name detected on nameplate'); $this->jobRepository->save($job); return; } $this->bus->dispatch(new SpecsResearchMessage( jobId: $message->jobId, articleTypeId: $message->articleTypeId, modelName: $result['model'], serialNumber: $result['serial'], manufacturer: $result['manufacturer'], )); } }