where('purpose', \$purpose)") && str_contains($service, 'normalizePurpose(') && str_contains($service, "if (\$purpose === 'all')") && str_contains($service, "status IN ('open', 'overdue')") && str_contains($service, 'CloudInvoiceService::listSummaries') && str_contains($service, "'per_page' => \$perPage") && str_contains($service, "->limit(\$perPage)"), 'Shared invoice pagination must remain owner scoped and bounded.'); $assert(str_contains($template, 'id="invoices-bootstrap"') && str_contains($template, '{foreach $cloud_invoice_rows as $invoice}') && str_contains($template, 'purpose=renewal') && str_contains($template, 'cloud-invoice-context') && str_contains($controller, "'对应实例到期 '") && !str_contains($template, '正在加载…'), 'Invoice HTML must contain the first records instead of a client-only loading placeholder.'); $assert(!str_contains($module, '/cloud/runtime.js') && !str_contains($module, '/api/v1/session') && str_contains($module, 'function hydrate()') && str_contains($module, 'purpose=${encodeURIComponent(state.purpose)}') && str_contains($module, 'function invoiceContext(') && str_contains($module, 'invoice?.renews_expires_at ?? invoice?.due_at') && str_contains($module, 'state.invoices.some(invoiceNeedsPolling)') && str_contains($module, "if (['open', 'overdue'].includes(status)) return true;") && !str_contains($module, 'needs_attention') && !str_contains($module, 'setInterval('), 'Invoice list module must be lightweight and stop polling terminal records.'); $assert(!str_contains($shell, '/theme/venix/js/qrcode.min.js'), 'The shared cloud shell must not block first paint on the QR code library.'); $assert(str_contains($topbar, "\$user->user_name|default:'账户'") && !str_contains($topbar, '{if $panel_cloud_mode}账户{else}'), 'Cloud pages must render the authenticated account name without a session API request.'); echo "Invoice server-rendered first-page performance contract passed.\n";