\$overviewError"), 'Administrator landing page must render a database snapshot with a safe fallback.'); $assert(str_contains($service, 'CloudInvoice') && str_contains($service, 'CloudInstance') && str_contains($service, 'CloudJob') && str_contains($service, 'CloudHost') && !str_contains($service, 'App\\Models\\Code') && !str_contains($service, 'Bought') && !str_contains($service, 'CloudEngineClient') && !str_contains($service, 'CloudEngineSession'), 'Overview metrics must use cloud business tables without legacy ledgers or engine calls.'); $assert(str_contains($service, "where('status', 'paid')") && str_contains($service, "whereNotNull('paid_at')") && str_contains($service, "where('status', '<>', 'deleted')") && str_contains($service, "where('kind', 'create')") && str_contains($service, "whereNotNull('order_id')") && str_contains($service, "whereIn('status', ['queued', 'running', 'uncertain'])") && str_contains($service, "status = 'failed' AND updated_at") && str_contains($service, "status = 'active' AND (service_status = 'exempt'") && str_contains($service, 'updated_at >= {$todayStart}') && str_contains($service, "modify('+1 day')"), 'Financial, instance and job overview boundaries are incomplete.'); $assert(str_contains($service, "foreach (\$window['trend'] as \$index => \$day)") && substr_count($service, 'CloudInvoice::where') <= 3, 'Revenue trend must use bounded aggregate queries rather than one query per day.'); $assert(str_contains($schema, 'cloud_invoice_overview_paid (status, paid_at, purpose, plan_id)') && str_contains($schema, 'cloud_job_overview_status_updated (status, updated_at)') && str_contains($schema, 'cloud_job_overview_kind_created (kind, created_at)') && str_contains($schema, 'ticket_overview_root_status (rootid, status)') && str_contains($baseSchema, '`ticket_overview_root_status` (`rootid`,`status`)'), 'Overview range queries must have bounded operational indexes.'); $assert(str_contains($template, '
') && str_contains($template, "admin_extra_css_href value='/cloud/admin-overview.css'") && str_contains($template, '数据库快照') && str_contains($template, '已启用宿主机配置') && str_contains($template, '不推断真实开关机状态') && str_contains($template, '退款后会从历史有效实收中移除') && substr_count($template, '
span:nth-of-type(2)') && !str_contains($styles, 'min-width: 1120px'), 'Overview responsive, touch and keyboard accessibility contracts are incomplete.'); echo 'Administrator operational overview contracts passed.' . PHP_EOL;