"), 'Gateway map does not explicitly cover panel kind: ' . $kind); $assert(str_contains($catalog, "'{$kind}' =>"), 'CloudOperationCatalog no longer contains panel kind: ' . $kind); } $assert(str_contains($gateway, "'action' => 'domain_power'"), 'The supported power-action mapping is missing.'); $assert(str_contains($gateway, "'poweroff' => 'destroy'"), 'Panel poweroff must map to the Agent destroy verb.'); $assert(!str_contains($gateway, "'reset' => '"), 'Panel reset must not be aliased to an unverified Agent action.'); $assert(str_contains($gateway, "该电源操作尚未由 Go Agent 实现"), 'Unsupported panel power actions must fail before dispatch.'); $assert(str_contains($gateway, "电源操作实例身份与目标不一致"), 'Power operations must bind the journal instance UUID to the Agent target.'); $assert(str_contains($gateway, "'create' => null") && str_contains($gateway, "'snapshot_create' => null") && str_contains($gateway, "'delete' => null"), 'Unsupported VM operations must fail closed instead of being aliased.'); foreach ([ 'CloudEngineClient', 'CloudJobService', 'CloudWorkerService', 'ssh', 'SSH', 'shell_exec', 'exec(', 'curl_exec', ] as $forbidden) { $assert(!str_contains($gateway, $forbidden), 'Gateway contains a forbidden legacy transport reference: ' . $forbidden); } foreach ([ 'CloudAgentHostClientResolver', 'CloudAgentOperationRepository', 'CloudAgentOperationEnvelope', 'requestHash(', 'idempotency_key', 'operation_id', 'markUncertain', 'CloudError', ] as $required) { $assert(str_contains($gateway, $required), 'Gateway is missing required typed operation boundary: ' . $required); } fwrite(STDOUT, "Cloud Agent VM gateway contract passed.\n");