auto-sync via WEVIA git_sync_all intent 2026-04-20T22:56:47+02:00
Some checks failed
WEVAL NonReg / nonreg (push) Has been cancelled

This commit is contained in:
opus
2026-04-20 22:56:47 +02:00
parent 07a7bf3e02
commit fd63353e66
12 changed files with 547 additions and 1 deletions

View File

@@ -0,0 +1,281 @@
{
"ts": "2026-04-20T20:55:01+00:00",
"server": "s204",
"s204": {
"load": 1.36,
"uptime": "2026-04-14 11:51:24",
"ram_total_mb": 31335,
"ram_used_mb": 13552,
"ram_free_mb": 17782,
"disk_total": "150G",
"disk_used": "113G",
"disk_free": "32G",
"disk_pct": "79%",
"fpm_workers": 120,
"docker_containers": 19,
"cpu_cores": 8
},
"s95": {
"load": 1.9,
"disk_pct": "82%",
"status": "UP",
"ram_total_mb": 15610,
"ram_free_mb": 11781
},
"pmta": [
{
"name": "SER6",
"ip": "110.239.84.121",
"status": "DOWN"
},
{
"name": "SER7",
"ip": "110.239.65.64",
"status": "DOWN"
},
{
"name": "SER8",
"ip": "182.160.55.107",
"status": "DOWN"
},
{
"name": "SER9",
"ip": "110.239.86.68",
"status": "DOWN"
}
],
"assets": {
"html_pages": 288,
"php_apis": 759,
"wiki_entries": 1861,
"vault_doctrines": 59,
"vault_sessions": 103,
"vault_decisions": 12
},
"tools": {
"total": 627,
"registry_version": "?"
},
"sovereign": {
"status": "UP",
"providers": [
"Cerebras-fast",
"Cerebras-think",
"Groq",
"Cloudflare-AI",
"Gemini",
"SambaNova",
"NVIDIA-NIM",
"Mistral",
"Groq-OSS",
"HF-Space",
"HF-Router",
"OpenRouter",
"GitHub-Models"
],
"active": 13,
"total": 13,
"primary": "Cerebras-fast",
"cost": "0€"
},
"ethica": {
"total_hcps": 161730,
"with_email": 110545,
"with_phone": 155145,
"gap_email": 51185,
"pct_email": 68.4,
"pct_phone": 95.9,
"by_country": [
{
"country": "DZ",
"hcps": 122337,
"with_email": 78456,
"with_tel": 119394,
"pct_email": 64.1,
"pct_tel": 97.6
},
{
"country": "MA",
"hcps": 19720,
"with_email": 15071,
"with_tel": 18733,
"pct_email": 76.4,
"pct_tel": 95
},
{
"country": "TN",
"hcps": 17794,
"with_email": 15139,
"with_tel": 17018,
"pct_email": 85.1,
"pct_tel": 95.6
},
{
"country": "INTL",
"hcps": 1879,
"with_email": 1879,
"with_tel": 0,
"pct_email": 100,
"pct_tel": 0
}
]
},
"docker": [
{
"name": "loki",
"status": "Up 4 days",
"ports": ""
},
{
"name": "listmonk",
"status": "Up 4 days",
"ports": ""
},
{
"name": "plausible-plausible-1",
"status": "Up 3 days",
"ports": ""
},
{
"name": "plausible-plausible-db-1",
"status": "Up 3 days",
"ports": ""
},
{
"name": "plausible-plausible-events-db-1",
"status": "Up 3 days",
"ports": ""
},
{
"name": "n8n-docker-n8n-1",
"status": "Up 4 days",
"ports": ""
},
{
"name": "mattermost-docker-mm-db-1",
"status": "Up 4 days",
"ports": ""
},
{
"name": "mattermost-docker-mattermost-1",
"status": "Up 4 days (healthy)",
"ports": ""
},
{
"name": "twenty",
"status": "Up 4 days",
"ports": ""
},
{
"name": "twenty-redis",
"status": "Up 4 days",
"ports": ""
},
{
"name": "langfuse",
"status": "Up 4 days",
"ports": ""
},
{
"name": "redis-weval",
"status": "Up 6 days",
"ports": ""
},
{
"name": "gitea",
"status": "Up 6 days",
"ports": ""
},
{
"name": "node-exporter",
"status": "Up 6 days",
"ports": ""
},
{
"name": "prometheus",
"status": "Up 6 days",
"ports": ""
},
{
"name": "searxng",
"status": "Up 6 days",
"ports": ""
},
{
"name": "uptime-kuma",
"status": "Up 21 hours (healthy)",
"ports": ""
},
{
"name": "vaultwarden",
"status": "Up 6 days (healthy)",
"ports": ""
},
{
"name": "qdrant",
"status": "Up 6 days",
"ports": ""
}
],
"crons": {
"active": 35
},
"git": {
"head": "07a7bf3e0 auto-sync-2255",
"dirty": 1,
"status": "DIRTY"
},
"nonreg": {
"total": 153,
"passed": 153,
"score": "100%"
},
"services": [
{
"name": "DeerFlow",
"port": 3002,
"status": "UP"
},
{
"name": "DeerFlow API",
"port": 8001,
"status": "UP"
},
{
"name": "Qdrant",
"port": 6333,
"status": "UP"
},
{
"name": "Ollama",
"port": 11434,
"status": "UP"
},
{
"name": "Redis",
"port": 6379,
"status": "UP"
},
{
"name": "Sovereign",
"port": 4000,
"status": "UP"
},
{
"name": "SearXNG",
"port": 8080,
"status": "UP"
}
],
"whisper": {
"binary": "COMPILED",
"model": "142MB"
},
"grand_total": 3613,
"health": {
"score": 5,
"max": 6,
"pct": 83
},
"elapsed_ms": 11581
}

View File

@@ -0,0 +1,122 @@
<?php
// WEVIA Intent Helper : incident-remediation
// PENDING_APPROVAL wired by Opus 20 Apr - triggered EXCLUSIVELY by Yacine
// Usage: /api/incident-remediation.php?action=<action>
// Doctrine #2 zero regression, #3 GOLD backup, #14 zero écrasement sans auth
// All actions are reversible except kill which is trivially recoverable (systemd would restart)
header('Content-Type: application/json');
$action = $_GET['action'] ?? '';
$VAULT = '/opt/wevads/vault/incident-20260420-postgres-cron';
@mkdir($VAULT, 0755, true);
$TS = date('Ymd-His');
$out = ['action'=>$action, 'ts'=>date('c')];
switch($action) {
case 'backup-only':
// Pure backup - safest step
$r = @shell_exec('sudo cat /var/spool/cron/crontabs/postgres 2>&1');
$path = "$VAULT/pre-action-postgres-crontab-{$TS}.txt";
@file_put_contents($path, $r);
$out['backup'] = $path;
$out['size'] = strlen($r);
$out['md5'] = md5($r);
break;
case 'remove-postgres-pastebin-cron':
// Backup first
$r = @shell_exec('sudo cat /var/spool/cron/crontabs/postgres 2>&1');
$path = "$VAULT/pre-remove-postgres-crontab-{$TS}.txt";
@file_put_contents($path, $r);
$out['backup_path'] = $path;
// Filter out malicious line
$lines = explode("\n", $r);
$new_lines = [];
$removed = [];
foreach($lines as $l) {
if (stripos($l, 'pastebin.com/raw/C0Y31fxq') !== false) {
$removed[] = $l;
} else {
$new_lines[] = $l;
}
}
if (empty($removed)) {
$out['status'] = 'already_removed_or_not_present';
break;
}
$new_content = implode("\n", $new_lines);
// Write via postgres user crontab reinstall
$tmpfile = "/tmp/postgres-crontab-clean-{$TS}";
@file_put_contents($tmpfile, $new_content);
@shell_exec("sudo chown postgres:crontab $tmpfile 2>&1");
@shell_exec("sudo chmod 600 $tmpfile 2>&1");
$install = @shell_exec("sudo -u postgres crontab $tmpfile 2>&1");
@unlink($tmpfile);
// Verify
$after = @shell_exec('sudo cat /var/spool/cron/crontabs/postgres 2>&1');
$out['removed_lines'] = $removed;
$out['install_result'] = trim($install);
$out['still_present'] = (stripos($after, 'pastebin.com/raw/C0Y31fxq') !== false);
$out['new_content'] = $after;
break;
case 'chattr-lock-crontab':
// Make postgres crontab immutable to prevent re-install
$out['before'] = trim(@shell_exec('sudo lsattr /var/spool/cron/crontabs/postgres 2>&1'));
@shell_exec('sudo chattr +i /var/spool/cron/crontabs/postgres 2>&1');
$out['after'] = trim(@shell_exec('sudo lsattr /var/spool/cron/crontabs/postgres 2>&1'));
break;
case 'kill-orphan-paperclip-postgres':
// Dynamically find orphan node running as postgres with cwd=/opt/paperclip-weval
$find = @shell_exec(
"ps -eo pid,user,ppid,cmd 2>/dev/null | awk '\$2==\"postgres\" && \$4 ~ /\\/node$/ && \$3==\"1\" {print \$1}' | head -5"
);
$pids = array_filter(array_map('trim', explode("\n", trim($find))));
$out['found_pids'] = $pids;
if (empty($pids)) {
$out['status'] = 'no_orphan_found';
break;
}
$killed = [];
foreach($pids as $pid) {
if (!preg_match('/^\d+$/', $pid)) continue;
// Verify cwd before killing
$cwd = @shell_exec("sudo readlink /proc/$pid/cwd 2>/dev/null");
if (strpos((string)$cwd, '/opt/paperclip-weval') === false) {
$killed[] = ['pid'=>$pid, 'skipped'=>'cwd_not_paperclip', 'cwd'=>trim($cwd ?? '')];
continue;
}
$r = @shell_exec("sudo kill -TERM $pid 2>&1");
sleep(2);
$alive = trim(@shell_exec("ps -p $pid -o pid= 2>/dev/null"));
if ($alive !== '') {
// Still alive, escalate
@shell_exec("sudo kill -KILL $pid 2>&1");
}
$killed[] = ['pid'=>$pid, 'term_result'=>trim($r), 'alive_after'=>($alive!==''), 'cwd'=>trim($cwd)];
}
$out['killed'] = $killed;
break;
case 'full-cleanup':
// 1) backup, 2) remove, 3) lock, 4) kill orphan
$sub = [];
foreach(['backup-only','remove-postgres-pastebin-cron','chattr-lock-crontab','kill-orphan-paperclip-postgres'] as $a) {
$url = "http://localhost/api/incident-remediation.php?action=$a";
$sub[$a] = json_decode(@file_get_contents($url), true);
}
$out['sub_actions'] = $sub;
break;
default:
$out['status'] = 'unknown_action';
$out['valid_actions'] = ['backup-only','remove-postgres-pastebin-cron','chattr-lock-crontab','kill-orphan-paperclip-postgres','full-cleanup'];
}
// Always log
@file_put_contents("$VAULT/remediation-log-{$TS}.json", json_encode($out, JSON_PRETTY_PRINT));
echo json_encode($out, JSON_PRETTY_PRINT);

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

@@ -0,0 +1,33 @@
{
"tests": [
{
"test": "wtp_loads",
"status": "PASS"
},
{
"test": "live_state_populated",
"status": "PASS",
"sample": "\n 100/100L99 score\n 153/153NonReg\n 32 / 24 / 0KPIs ok / warn / fail\n 100%Complet"
},
{
"test": "catalog_cards_rendered",
"status": "PASS",
"count": 288
},
{
"test": "screenshots_saved",
"status": "PASS"
},
{
"test": "filter_agents",
"status": "FAIL",
"err": "Agents tab not found"
}
],
"summary": {
"pass": 4,
"fail": 1,
"total": 5
},
"ts": "2026-04-20T20:56:33.546Z"
}

View File

@@ -1,7 +1,7 @@
{
"ok": true,
"version": "V83-business-kpi",
"ts": "2026-04-20T20:54:02+00:00",
"ts": "2026-04-20T20:56:32+00:00",
"summary": {
"total_categories": 7,
"total_kpis": 56,

View File

@@ -7629,5 +7629,55 @@
"status": "PENDING_APPROVAL",
"created_at": "2026-04-20T20:46:47+00:00",
"source": "opus4-autowire-early-v2"
},
"582": {
"name": "incident_backup_postgres_cron",
"triggers": [
"incident backup postgres cron"
],
"cmd": "curl -s http:\/\/localhost\/api\/incident-remediation.php?action=backup-only",
"status": "PENDING_APPROVAL",
"created_at": "2026-04-20T20:55:52+00:00",
"source": "opus4-autowire-early-v2"
},
"583": {
"name": "incident_remove_postgres_cron",
"triggers": [
"confirm remove postgres pastebin cron yanis"
],
"cmd": "curl -s http:\/\/localhost\/api\/incident-remediation.php?action=remove-postgres-pastebin-cron",
"status": "PENDING_APPROVAL",
"created_at": "2026-04-20T20:55:53+00:00",
"source": "opus4-autowire-early-v2"
},
"584": {
"name": "incident_lock_postgres_cron",
"triggers": [
"confirm lock postgres crontab yanis"
],
"cmd": "curl -s http:\/\/localhost\/api\/incident-remediation.php?action=chattr-lock-crontab",
"status": "PENDING_APPROVAL",
"created_at": "2026-04-20T20:55:53+00:00",
"source": "opus4-autowire-early-v2"
},
"585": {
"name": "incident_kill_orphan_node",
"triggers": [
"confirm kill orphan paperclip node yanis"
],
"cmd": "curl -s http:\/\/localhost\/api\/incident-remediation.php?action=kill-orphan-paperclip-postgres",
"status": "PENDING_APPROVAL",
"created_at": "2026-04-20T20:55:53+00:00",
"source": "opus4-autowire-early-v2"
},
"586": {
"name": "incident_full_cleanup",
"triggers": [
"confirm full incident cleanup yanis authorized"
],
"cmd": "curl -s http:\/\/localhost\/api\/incident-remediation.php?action=full-cleanup",
"status": "PENDING_APPROVAL",
"created_at": "2026-04-20T20:55:54+00:00",
"source": "opus4-autowire-early-v2"
}
}

View File

@@ -0,0 +1,12 @@
<?php
return array (
'name' => 'incident_backup_postgres_cron',
'triggers' =>
array (
0 => 'incident backup postgres cron',
),
'cmd' => 'curl -s http://localhost/api/incident-remediation.php?action=backup-only',
'status' => 'PENDING_APPROVAL',
'created_at' => '2026-04-20T20:55:52+00:00',
'source' => 'opus4-autowire-early-v2',
);

View File

@@ -0,0 +1,12 @@
<?php
return array (
'name' => 'incident_full_cleanup',
'triggers' =>
array (
0 => 'confirm full incident cleanup yanis authorized',
),
'cmd' => 'curl -s http://localhost/api/incident-remediation.php?action=full-cleanup',
'status' => 'PENDING_APPROVAL',
'created_at' => '2026-04-20T20:55:54+00:00',
'source' => 'opus4-autowire-early-v2',
);

View File

@@ -0,0 +1,12 @@
<?php
return array (
'name' => 'incident_kill_orphan_node',
'triggers' =>
array (
0 => 'confirm kill orphan paperclip node yanis',
),
'cmd' => 'curl -s http://localhost/api/incident-remediation.php?action=kill-orphan-paperclip-postgres',
'status' => 'PENDING_APPROVAL',
'created_at' => '2026-04-20T20:55:53+00:00',
'source' => 'opus4-autowire-early-v2',
);

View File

@@ -0,0 +1,12 @@
<?php
return array (
'name' => 'incident_lock_postgres_cron',
'triggers' =>
array (
0 => 'confirm lock postgres crontab yanis',
),
'cmd' => 'curl -s http://localhost/api/incident-remediation.php?action=chattr-lock-crontab',
'status' => 'PENDING_APPROVAL',
'created_at' => '2026-04-20T20:55:53+00:00',
'source' => 'opus4-autowire-early-v2',
);

View File

@@ -0,0 +1,12 @@
<?php
return array (
'name' => 'incident_remove_postgres_cron',
'triggers' =>
array (
0 => 'confirm remove postgres pastebin cron yanis',
),
'cmd' => 'curl -s http://localhost/api/incident-remediation.php?action=remove-postgres-pastebin-cron',
'status' => 'PENDING_APPROVAL',
'created_at' => '2026-04-20T20:55:53+00:00',
'source' => 'opus4-autowire-early-v2',
);