PageStatusEnum::Fetched, self::Rejected => PageStatusEnum::Rejected, self::Failed, self::Timeout, self::BlockedRobots, self::Blocked4xx, self::Blocked5xx => PageStatusEnum::Failed, }; } /** * True if the worker should retry this outcome (transient failures only). * Permanent failures (4xx, robots block, rejected content type) and successes do not retry. */ public function isRetryable(): bool { return match ($this) { self::Failed, self::Timeout, self::Blocked5xx => true, self::Success, self::Rejected, self::BlockedRobots, self::Blocked4xx => false, }; } /** * True if the worker should register the outbound links discovered during the fetch. * Only Success outcomes have meaningful links; everything else either failed or returned no usable HTML. */ public function shouldRegisterOutboundLinks(): bool { return $this === self::Success; } }