getMethods(ReflectionMethod::IS_PUBLIC), static fn (ReflectionMethod $method): bool => $method->getDeclaringClass()->getName() === CloudPortableRestoreTargetService::class )); $assert(count($public) === 1 && $public[0]->getName() === 'candidates', 'Portable restore target scheduler exposed more than one interface method.'); $assert(str_contains($network, 'advisoryDualStackBundleEvidence') && str_contains($network, '$available[$hostId][$lineId][]') && str_contains($network, "'network_attachment_id'") && str_contains($network, "'ipv4' => \$families[4]") && str_contains($network, "'ipv6' => \$families[6]"), 'Dual-stack advisory evidence lost host+line or same-attachment identity.'); $assert(str_contains($service, '->getConnection()->transaction(') && str_contains($service, 'advisoryDualStackBundleEvidence(') && !str_contains($service, 'backupRestoreTargets(') && !str_contains($service, 'advisoryDualStackAvailableHosts(') && str_contains($service, 'CloudPortableRestoreBackupEvidence::fromBackup(') && str_contains($evidence, 'object_identity_sha256') && str_contains($evidence, 'source_public_network_sha256') && str_contains($evidence, 'source_spec_sha256') && str_contains($evidence, 'restore_request_sha256') && str_contains($plan, 'public static function fromEvidence(') && str_contains($plan, 'self::exactKeys(') && str_contains($plan, "'address_family'") && str_contains($plan, "'vpc_inherited'") && !str_contains($plan, 'public static function freeze('), 'Plan validation or one-snapshot advisory evidence was weakened.'); foreach (['->save(', '->insert(', 'insertGetId(', '->update(', '->delete(', 'lockForUpdate(', 'headObject(', 'presignedGet('] as $write) { $assert(!str_contains($service, $write), 'Portable restore target scheduler gained a side effect: ' . $write); } $assert(str_contains($request, 'CloudPortableRestoreTargetService::candidates(') && str_contains($request, 'CloudPortableRestoreAttemptCoordinator::reserve(') && str_contains($request, 'CloudPortableRestoreJobDispatcher::queue(') && str_contains($request, 'target_plan_sha256') && str_contains($backup, 'CloudPortableRestoreRequestService::request(') && str_contains($backup, 'CloudPortableRestoreTargetService::candidates(') && substr_count($backup, 'self::restoreTargetProjection($row)') >= 2 && str_contains($backup, "'target_plan_sha256' => \$plan->sha256()") && !str_contains($backup, 'CloudPlacementService::backupRestoreTargets(\n' . ' (int) \$row->source_host_id') && !str_contains( $backup, 'CloudPublicNetworkTransitionGate::assertPortableRestoreReady();' ), 'Restore entry did not connect exclusively through the frozen portable plan.'); echo "Portable restore target scheduling contract passed.\n";