start( scope: FindingsLifecycleBackfillScope::allTenants(), initiator: null, reason: new RunbookReason( reasonCode: RunbookReason::CODE_DATA_REPAIR, reasonText: 'Deploy hook automated runbooks', ), source: 'deploy_hook', ); $this->info('Deploy runbooks started (if needed).'); return self::SUCCESS; } catch (ValidationException $e) { $errors = $e->errors(); $skippable = isset($errors['preflight.affected_count']) || isset($errors['scope']); if ($skippable) { $this->info('Deploy runbooks skipped (nothing to do or already running).'); return self::SUCCESS; } $this->error('Deploy runbooks blocked by validation errors.'); return self::FAILURE; } } }