where('template_import_intent_id', (string) \$intent->id)") && !str_contains($cancellation, 'self::runtime($intent)'), 'Template cancellation retained the legacy frozen-runtime cleanup path.'); $hashPosition = is_string($frontend) ? strpos($frontend, 'const sha256 = await activeHash.promise;') : false; $reservePosition = is_string($frontend) ? strpos($frontend, "'/api/v1/admin/cloud-template-imports', {") : false; $assert(is_int($hashPosition) && is_int($reservePosition) && $hashPosition < $reservePosition && str_contains($frontend, 'protection_pending === true') && str_contains($frontend, 'const unknownCreate =') && !str_contains($frontend, "body: { sha256 }, response: 'task'"), 'Template upload UI crosses storage before hashing or rejects protection wait.'); echo "Template multipart storage-ledger contract passed.\n";