'cloud_vpc_enabled'") && str_contains($setup, "'value' => 'false'") && str_contains($setup, "'cloud_job_vpc', 'cloud_job_vpc_port'") && str_contains($setup, "'chk_cloud_vpc_port_release'"), 'cloudInit does not publish and validate the disabled VPC schema.'); $assert(str_contains($feature, "public const CONFIG_KEY = 'cloud_vpc_enabled'") && str_contains($feature, 'public static function enabled(): bool') && str_contains($feature, 'return self::$cached = false;') && str_contains($feature, 'public static function save(bool $enabled): void'), 'The fail-closed VPC feature switch is incomplete.'); $models = [ 'CloudHostVpcTransport' => 'cloud_host_vpc_transports', 'CloudVpcCidrPool' => 'cloud_vpc_cidr_pools', 'CloudVpc' => 'cloud_vpcs', 'CloudVpcPort' => 'cloud_vpc_ports', 'CloudVpcHostState' => 'cloud_vpc_host_states', ]; foreach ($models as $class => $table) { $source = file_get_contents($root . '/app/Models/' . $class . '.php'); $assert($source !== false && str_contains($source, 'final class ' . $class . ' extends Model') && str_contains($source, "protected \$table = '" . $table . "';") && str_contains($source, 'protected $casts = ['), 'Missing or incomplete VPC model: ' . $class); } $jobModel = file_get_contents($root . '/app/Models/CloudJob.php'); $assert(str_contains($jobModel, "'vpc_id' => 'int'") && str_contains($jobModel, "'vpc_port_id' => 'int'"), 'CloudJob does not cast VPC correlations.'); echo "VPC schema, model and feature-switch contracts passed.\n";