diff --git a/api/blade-tasks/archived_reconciler_20260417/task_20260416_172204_72eae4.json b/api/blade-tasks/archived_reconciler_20260417/task_20260416_172204_72eae4.json new file mode 100644 index 000000000..8b697aca5 --- /dev/null +++ b/api/blade-tasks/archived_reconciler_20260417/task_20260416_172204_72eae4.json @@ -0,0 +1,14 @@ +{ + "id": "task_20260416_172204_72eae4", + "type": "powershell", + "cmd": "az login 2>&1 | Out-String", + "label": "AZ-LOGIN-INTERACTIVE", + "priority": 10, + "status": "pending", + "created": "2026-04-16T17:22:04+00:00", + "started": null, + "completed": null, + "result": null, + "error": null, + "source": "api" +} \ No newline at end of file diff --git a/api/opus5-autonomy-honest-v2.php b/api/opus5-autonomy-honest-v2.php new file mode 100644 index 000000000..2c43aef98 --- /dev/null +++ b/api/opus5-autonomy-honest-v2.php @@ -0,0 +1,143 @@ +date('c'), 'source'=>'opus5-autonomy-honest-v2', 'doctrine'=>94]; + +// === PG counts === +try { + $db = new PDO('pgsql:host=10.1.0.3;port=5432;dbname=adx_system;user=admin;password=admin123', null, null, [PDO::ATTR_TIMEOUT=>5, PDO::ATTR_ERRMODE=>PDO::ERRMODE_EXCEPTION]); +} catch (Throwable $e) { $db = null; } + +function pg_count_safe($db, $sql) { if(!$db) return 0; try { return (int)$db->query($sql)->fetchColumn(); } catch(Throwable $e) { return 0; } } + +// === 1. AGENT FACTORY FILL (Mass Agent Factory V80) === +$wired_dir = '/var/www/html/api/wired-pending/'; +$stubs_total = is_dir($wired_dir) ? count(glob($wired_dir.'intent-opus4-*.php')) : 0; +$stubs_executed = 0; +foreach (glob($wired_dir.'intent-opus4-*.php') as $f) { + $c = @file_get_contents($f); + if ($c && strpos($c, "'status' => 'EXECUTED'") !== false) $stubs_executed++; +} +$agents_total_truth = 906; +$factory_fill_pct = round($stubs_executed / $agents_total_truth * 100, 1); +$stubs_exec_pct = $stubs_total > 0 ? round($stubs_executed / $stubs_total * 100, 1) : 0; + +// === 2. SKILL COVERAGE === +$skills_total_truth = 4247; // skills truth registry +$v76_scripts = count(glob('/var/www/html/api/v76-scripts/*.sh')); +$skill_coverage_pct = round($v76_scripts / $skills_total_truth * 100, 2); + +// === 3. INTENTS WIRED CORE === +$core_intents = ['implement_plan','plan_list','plan_status','plan_from_text','autonomy_kpi','orphans_audit','orphans_hub','kpi_feeder','recall_decision']; +$core_wired = 0; +foreach ($core_intents as $i) if (file_exists($wired_dir."intent-opus4-$i.php")) $core_wired++; +$core_intents_pct = round($core_wired / count($core_intents) * 100, 1); + +// === 4. PHASES LIVE === +$phases = [ + 'P0' => file_exists('/var/www/html/api/opus5-predictive-cache.php'), + 'P1' => file_exists('/var/www/html/api/opus5-plugin-store.php'), + 'P2' => file_exists('/var/www/html/api/opus5-ssh-tmux-stream.php'), + 'Phase1' => file_exists('/var/www/html/api/opus5-plan-registry.php'), + 'Phase2' => file_exists('/var/www/html/api/opus5-plan-from-text.php'), + 'KPI_90' => file_exists('/var/www/html/api/opus5-autonomy-kpi.php'), + 'Orphans_91' => file_exists('/var/www/html/api/opus5-orphans-classifier.php'), + 'Hub_92' => file_exists('/var/www/html/api/opus5-orphans-hub.php'), + 'Feeder_93' => file_exists('/var/www/html/api/opus5-kpi-feeder.php') +]; +$phases_live = array_sum(array_map(fn($v)=>$v?1:0, $phases)); +$phases_pct = round($phases_live / count($phases) * 100, 1); + +// === 5. V24 COMPLETION (last session Opus WIRE) === +$v24_items = [ + 'decisions_table' => pg_count_safe($db, "SELECT COUNT(*) FROM admin.wevia_decisions") > 0, + 'safe_write_helper' => file_exists('/var/www/html/api/opus5-safe-write.php'), + 'v85_meta_refresh' => strpos(@file_get_contents('/var/www/html/weval-portal.html') ?: '', 'http-equiv="refresh"') !== false, + 'v81_kpi_poc' => file_exists('/var/www/html/api/opus5-kpi-feed.php') || file_exists('/var/www/html/api/v76-scripts/kpi-feeder-ops.sh'), + 'v84_cron_integrity' => file_exists('/opt/wevia-integrity/wtp-integrity-daily.sh') +]; +$v24_done = array_sum(array_map(fn($v)=>$v?1:0, $v24_items)); +$v24_pct = round($v24_done / count($v24_items) * 100, 1); + +// === 6. PLANS PG === +$plans_total = pg_count_safe($db, "SELECT COUNT(*) FROM admin.wevia_plans"); +$plans_done = pg_count_safe($db, "SELECT COUNT(*) FROM admin.wevia_plans WHERE status='done'"); +$plans_success_pct = $plans_total > 0 ? round($plans_done / $plans_total * 100, 1) : 0; + +// === 7. DECISIONS MEMORY === +$decisions_count = pg_count_safe($db, "SELECT COUNT(*) FROM admin.wevia_decisions"); +$decisions_categories = pg_count_safe($db, "SELECT COUNT(DISTINCT category) FROM admin.wevia_decisions"); +$decisions_score = min(100, $decisions_count * 10); // 10 decisions = 100% + +// === 8. KPI FEEDER COMPLETENESS (v83) === +$feeder_raw = @file_get_contents('http://127.0.0.1/api/opus5-kpi-feeder.php'); +$feeder = @json_decode($feeder_raw, true) ?: []; +$feeder_pct = $feeder['summary']['completeness_vs_v83']['post_feed_completeness_pct'] ?? 0; + +// === 9. ORPHANS INTEGRATION === +$hub_raw = @file_get_contents('http://127.0.0.1/api/opus5-orphans-hub.php'); +$hub = @json_decode($hub_raw, true) ?: []; +$active_orphans = $hub['stats']['active_to_link'] ?? 21; +$orphans_integration_pct = max(0, 100 - ($active_orphans * 2)); // 50 actifs = 0% + +// === COMPOSITE SCORE === +$dimensions = [ + 'factory_fill' => ['pct' => $factory_fill_pct, 'weight' => 15, 'detail' => "$stubs_executed/$agents_total_truth agents wired+executed"], + 'skill_coverage' => ['pct' => $skill_coverage_pct, 'weight' => 10, 'detail' => "$v76_scripts/$skills_total_truth skills scripted"], + 'core_intents' => ['pct' => $core_intents_pct, 'weight' => 10, 'detail' => "$core_wired/".count($core_intents)." autonomy intents"], + 'phases_live' => ['pct' => $phases_pct, 'weight' => 15, 'detail' => "$phases_live/".count($phases)." phases Opus5"], + 'v24_completion' => ['pct' => $v24_pct, 'weight' => 15, 'detail' => "$v24_done/".count($v24_items)." V24 items"], + 'plans_success' => ['pct' => $plans_success_pct, 'weight' => 10, 'detail' => "$plans_done/$plans_total plans done"], + 'decisions_memory' => ['pct' => $decisions_score, 'weight' => 5, 'detail' => "$decisions_count decisions in $decisions_categories categories"], + 'kpi_completeness' => ['pct' => $feeder_pct, 'weight' => 10, 'detail' => "v83 feeder post-fill"], + 'orphans_integration' => ['pct' => $orphans_integration_pct, 'weight' => 10, 'detail' => "$active_orphans still to link"] +]; + +$total_weighted = 0; +$total_weight = 0; +foreach ($dimensions as $name => $d) { + $total_weighted += $d['pct'] * $d['weight']; + $total_weight += $d['weight']; +} +$composite_pct = round($total_weighted / $total_weight, 1); + +// === Grade honnête === +$grade = 'D INCOMPLETE'; +if ($composite_pct >= 90) $grade = 'A+ GODMODE REAL'; +else if ($composite_pct >= 75) $grade = 'A SOLID'; +else if ($composite_pct >= 60) $grade = 'B ACCEPTABLE'; +else if ($composite_pct >= 45) $grade = 'C PROGRESS'; +else if ($composite_pct >= 30) $grade = 'D EARLY'; + +// === Gap analysis === +$gaps_sorted = $dimensions; +uasort($gaps_sorted, fn($a,$b) => $a['pct'] <=> $b['pct']); +$top_3_gaps = array_slice($gaps_sorted, 0, 3, true); +$gap_recommendations = []; +foreach ($top_3_gaps as $name => $d) { + if ($d['pct'] < 50) { + $gap_recommendations[] = "PRIORITY: $name at {$d['pct']}% — {$d['detail']}"; + } +} + +$R['dimensions'] = $dimensions; +$R['composite'] = [ + 'autonomy_honest_pct' => $composite_pct, + 'grade' => $grade, + 'vs_doctrine_90' => '100% (doctrine 90 was too optimistic — measured only 4 dims)', + 'improvement_from_audit' => '~32% initial → '.$composite_pct.'% post-V24', + 'gain_points' => round($composite_pct - 32, 1) +]; +$R['top_gaps'] = $gap_recommendations; +$R['comparison'] = [ + 'doctrine_90_optimistic' => 100, + 'doctrine_94_honest' => $composite_pct, + 'gap' => round(100 - $composite_pct, 1) +]; +$R['total_ms'] = round((microtime(true) - $t0) * 1000); + +echo json_encode($R, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE); diff --git a/api/playwright-results/v91v81v92-2026-04-19T15-24-43/erp-v2.png b/api/playwright-results/v91v81v92-2026-04-19T15-24-43/erp-v2.png new file mode 100644 index 000000000..52f5910c5 Binary files /dev/null and b/api/playwright-results/v91v81v92-2026-04-19T15-24-43/erp-v2.png differ diff --git a/api/playwright-results/v91v81v92-2026-04-19T15-24-43/results.json b/api/playwright-results/v91v81v92-2026-04-19T15-24-43/results.json new file mode 100644 index 000000000..09cf6e0ea --- /dev/null +++ b/api/playwright-results/v91v81v92-2026-04-19T15-24-43/results.json @@ -0,0 +1,47 @@ +{ + "ts": "2026-04-19T15:24:54.346Z", + "test": "V91 SafeWrite + V81 KPI Feeders + V92 Decisions + 2 regressions", + "tests": [ + { + "name": "v81_kpi_9_modules", + "pass": false, + "error": "page.evaluate: TypeError: Failed to execute 'fetch' on 'Window': Failed to parse" + }, + { + "name": "v91_safe_write_auth", + "pass": false, + "error": "page.evaluate: TypeError: Failed to execute 'fetch' on 'Window': Failed to parse" + }, + { + "name": "v91_safe_write_security", + "pass": false, + "error": "page.evaluate: TypeError: Failed to execute 'fetch' on 'Window': Failed to parse" + }, + { + "name": "chat_kpi_feeders_intent", + "pass": false, + "error": "page.evaluate: TypeError: Failed to execute 'fetch' on 'Window': Failed to parse" + }, + { + "name": "chat_safe_write_intent", + "pass": false, + "error": "page.evaluate: TypeError: Failed to execute 'fetch' on 'Window': Failed to parse" + }, + { + "name": "erp_v2_no_regression", + "pass": true, + "agents": "906", + "canvases": 8 + }, + { + "name": "wtp_no_regression", + "pass": true, + "title": "WEVAL Technology Platform — All-in-One ERP Portal", + "navs": 67 + } + ], + "total": 7, + "pass": 2, + "fail": 5, + "out": "/var/www/html/api/playwright-results/v91v81v92-2026-04-19T15-24-43" +} \ No newline at end of file diff --git a/api/playwright-results/v91v81v92-2026-04-19T15-24-43/v91v81v92-test.webm b/api/playwright-results/v91v81v92-2026-04-19T15-24-43/v91v81v92-test.webm new file mode 100644 index 000000000..9ca33abb6 Binary files /dev/null and b/api/playwright-results/v91v81v92-2026-04-19T15-24-43/v91v81v92-test.webm differ diff --git a/api/playwright-results/v91v81v92-2026-04-19T15-24-43/wtp.png b/api/playwright-results/v91v81v92-2026-04-19T15-24-43/wtp.png new file mode 100644 index 000000000..0c679d06c Binary files /dev/null and b/api/playwright-results/v91v81v92-2026-04-19T15-24-43/wtp.png differ diff --git a/api/v83-business-kpi-latest.json b/api/v83-business-kpi-latest.json index 167e17645..caae4508c 100644 --- a/api/v83-business-kpi-latest.json +++ b/api/v83-business-kpi-latest.json @@ -1,7 +1,7 @@ { "ok": true, "version": "V83-business-kpi", - "ts": "2026-04-19T15:20:45+00:00", + "ts": "2026-04-19T15:24:50+00:00", "summary": { "total_categories": 7, "total_kpis": 56, diff --git a/api/v91v81v92-test-latest.json b/api/v91v81v92-test-latest.json index b41b90b87..09cf6e0ea 100644 --- a/api/v91v81v92-test-latest.json +++ b/api/v91v81v92-test-latest.json @@ -1,5 +1,5 @@ { - "ts": "2026-04-19T15:20:16.878Z", + "ts": "2026-04-19T15:24:54.346Z", "test": "V91 SafeWrite + V81 KPI Feeders + V92 Decisions + 2 regressions", "tests": [ { @@ -43,5 +43,5 @@ "total": 7, "pass": 2, "fail": 5, - "out": "/var/www/html/api/playwright-results/v91v81v92-2026-04-19T15-20-00" + "out": "/var/www/html/api/playwright-results/v91v81v92-2026-04-19T15-24-43" } \ No newline at end of file