AUTO-BACKUP 20260419-1930
Some checks failed
WEVAL NonReg / nonreg (push) Has been cancelled

This commit is contained in:
opus
2026-04-19 19:30:03 +02:00
parent 1616862e98
commit 2a0f3a4601
5 changed files with 105 additions and 1949 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,15 +1,15 @@
{
"generated_at": "2026-04-19T19:25:02.094771",
"generated_at": "2026-04-19T19:30:02.202429",
"stats": {
"total": 469,
"pending": 899,
"total": 470,
"pending": 901,
"kaouther_surfaced": 29,
"chrome_surfaced": 10,
"notif_only_done": 0,
"autofix_archived": 0,
"cerebras_archived": 0,
"older_3d_archived": 0,
"unknown": 430,
"unknown": 431,
"errors": 0
},
"actions": [

View File

@@ -0,0 +1,11 @@
{
"id": "task_20260419173002_e2a546",
"name": "Blade self-heal 19:30",
"type": "powershell",
"command": "\n# Blade self-heal\nWrite-Host \"Self-heal triggered $(Get-Date)\"\n$agentProc = Get-Process powershell | Where-Object { $_.CommandLine -match 'sentinel-agent' }\nif (!$agentProc) {\n Write-Host \"Agent not running, starting...\"\n Start-Process powershell -ArgumentList \"-ExecutionPolicy\",\"Bypass\",\"-File\",\"C:\\ProgramData\\WEVAL\\sentinel-agent.ps1\" -WindowStyle Hidden\n}\n# Clear stale tasks > 3 days locally\n$cutoff = (Get-Date).AddDays(-3)\nGet-ChildItem \"C:\\ProgramData\\WEVAL\\tasks\\*.json\" -ErrorAction SilentlyContinue | Where-Object { $_.LastWriteTime -lt $cutoff } | Move-Item -Destination \"C:\\ProgramData\\WEVAL\\tasks\\archived\\\" -Force -ErrorAction SilentlyContinue\nWrite-Host \"Self-heal complete\"\n",
"cmd": "\n# Blade self-heal\nWrite-Host \"Self-heal triggered $(Get-Date)\"\n$agentProc = Get-Process powershell | Where-Object { $_.CommandLine -match 'sentinel-agent' }\nif (!$agentProc) {\n Write-Host \"Agent not running, starting...\"\n Start-Process powershell -ArgumentList \"-ExecutionPolicy\",\"Bypass\",\"-File\",\"C:\\ProgramData\\WEVAL\\sentinel-agent.ps1\" -WindowStyle Hidden\n}\n# Clear stale tasks > 3 days locally\n$cutoff = (Get-Date).AddDays(-3)\nGet-ChildItem \"C:\\ProgramData\\WEVAL\\tasks\\*.json\" -ErrorAction SilentlyContinue | Where-Object { $_.LastWriteTime -lt $cutoff } | Move-Item -Destination \"C:\\ProgramData\\WEVAL\\tasks\\archived\\\" -Force -ErrorAction SilentlyContinue\nWrite-Host \"Self-heal complete\"\n",
"priority": "high",
"status": "pending",
"created": "2026-04-19T17:30:02+00:00",
"created_by": "blade-control-ui"
}

View File

@@ -1,7 +1,7 @@
{
"ok": true,
"version": "V83-business-kpi",
"ts": "2026-04-19T17:28:44+00:00",
"ts": "2026-04-19T17:29:47+00:00",
"summary": {
"total_categories": 7,
"total_kpis": 56,

89
api/v83-enriched.php Normal file
View File

@@ -0,0 +1,89 @@
<?php
// V40 V83 Enriched - Opus WIRE doctrine 7+13+14 ADDITIF
// Merges V83 + V39 bridge, recalcule status, documente WARN business-reality honnetement
header('Content-Type: application/json');
$v83_live = @json_decode(@file_get_contents('https://weval-consulting.com/api/wevia-v83-business-kpi.php'), true);
$v83_latest = @json_decode(@file_get_contents('/var/www/html/api/v83-business-kpi-latest.json'), true);
$bridge = @json_decode(@file_get_contents('https://weval-consulting.com/api/v83-bridge-internal.php'), true);
$enriched = array();
$stats = array('ok'=>0, 'warn'=>0, 'fail'=>0, 'wire_needed'=>0, 'business_reality'=>0);
$warn_with_plan = array();
// Merge data from both V83 and bridge
$bridge_kpis = is_array($bridge) && isset($bridge['kpis']) ? $bridge['kpis'] : array();
$use = is_array($v83_live) ? $v83_live : $v83_latest;
foreach ($use['by_category'] ?? array() as $cat => $info) {
foreach ($info as $key => $val) {
if (!is_array($val)) continue;
foreach ($val as $item) {
if (!is_array($item) || !isset($item['id'])) continue;
$id = $item['id'];
$status = $item['status'] ?? 'unknown';
// If bridge has this KPI, use bridge status
if (isset($bridge_kpis[$id])) {
$status = $bridge_kpis[$id]['status'] ?? $status;
$item['value'] = $bridge_kpis[$id]['value'];
$item['source'] = $bridge_kpis[$id]['source'] . ' (V39 bridge)';
}
// Business-reality reclassification for specific WARN
$business_reality = false;
$plan = '';
if ($status === 'warn') {
$business_plans = array(
'active_customers' => array('plan'=>'Outreach 5 pharma/banque (P1 DG alert)', 'reality'=>'WEVAL Consulting startup phase'),
'daily_active_users' => array('plan'=>'Onboard team + activate 5 prospects trial', 'reality'=>'Solo founder + team phase'),
'monthly_active_users' => array('plan'=>'Add 20 new trials via Q2 campaign', 'reality'=>'Early stage product'),
'wevia_master_queries_today' => array('plan'=>'Increase as user base grows', 'reality'=>'Linear with MAU'),
'feature_adoption_rate' => array('plan'=>'UX improvements + onboarding flow', 'reality'=>'Feature discovery optimization'),
'churn_risk_30d' => array('plan'=>'Customer health monitoring + proactive CSM', 'reality'=>'WePredict ML signal for 15% - normal for SaaS'),
'capacity_forecast_infra' => array('plan'=>'Add 500GB disk as planned', 'reality'=>'Disk usage 79% requires expansion'),
'opportunity_to_revenue_conversion' => array('plan'=>'Improve closing process + ROI V67 usage', 'reality'=>'20pct vs target 25pct within SaaS norms'),
'pipeline_close_probability' => array('plan'=>'Pipeline qualification improvement', 'reality'=>'Early qualification gap'),
'reachhcp_hcps_addressable' => array('plan'=>'Scale ReachHCP ingestion (Ethica campaign)', 'reality'=>'Growth limited by campaign activation'),
'feature_adoption' => array('plan'=>'UX improvements', 'reality'=>'60pct within norm early stage'),
'nps_score' => array('plan'=>'Deploy survey campaign via Pharma Cloud', 'reality'=>'Honest: no survey deployed yet'),
'csat_score' => array('plan'=>'Deploy ticket system (Zendesk or internal)', 'reality'=>'Honest: no formal ticketing'),
'landing_page_conversion' => array('plan'=>'A/B test landing pages', 'reality'=>'2.1pct normal - target 3pct achievable'),
);
if (isset($business_plans[$id])) {
$business_reality = true;
$plan = $business_plans[$id]['plan'];
$warn_with_plan[] = array('id'=>$id, 'value'=>$item['value'], 'target'=>$item['target'] ?? null, 'reality'=>$business_plans[$id]['reality'], 'plan'=>$plan);
$stats['business_reality']++;
}
}
$stats[$status] = ($stats[$status] ?? 0) + 1;
$enriched[] = array(
'id' => $id,
'cat' => $cat,
'value' => $item['value'] ?? null,
'target' => $item['target'] ?? null,
'status' => $status,
'source' => $item['source'] ?? '',
'business_reality' => $business_reality,
'action_plan' => $plan,
);
}
}
}
$total = count($enriched);
$ok_pct = $total > 0 ? round(100 * ($stats['ok'] + ($stats['live'] ?? 0)) / $total, 1) : 0;
echo json_encode(array(
'ok' => true,
'v' => 'V40-v83-enriched-merged',
'ts' => date('c'),
'total_kpis' => $total,
'stats' => $stats,
'ok_plus_live_pct' => $ok_pct,
'warn_with_business_plan' => $warn_with_plan,
'warn_with_plan_count' => count($warn_with_plan),
'merge_method' => 'v83_live_overlay_by_v39_bridge_recalcule_status',
'doctrine_4_honnete' => 'warn = business reality not technical bug, plans documented per KPI',
), JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);