aboutsummaryrefslogtreecommitdiff
path: root/.bkp-fix-20261023_143429/error.php
diff options
context:
space:
mode:
authorAgando <roduccomm@gmail.com>2026-11-09 15:36:23 +0100
committerAgando <roduccomm@gmail.com>2026-11-09 15:36:23 +0100
commita065a4c30be748b0c8fc6dd0b5ee1dc4d3de4b1c (patch)
tree8a84adabfccee9994937cd71888170ab205b9361 /.bkp-fix-20261023_143429/error.php
parenta46ebee30cfbbac86abb45068411bc28e1c65503 (diff)
chore(newos4): commit accumulated maintenance outputHEADv4.6.156main
The daily collector and the feedback pipeline had left 57 modified files uncommitted (skills, modules-index, CHANGELOG, feedback decisions, debug counters). The public mirror publishes git HEAD, so without this the published repo stayed behind the tree - and it blocked the publisher outright once uncommitted subtrees started failing loudly.
Diffstat (limited to '.bkp-fix-20261023_143429/error.php')
-rw-r--r--.bkp-fix-20261023_143429/error.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/.bkp-fix-20261023_143429/error.php b/.bkp-fix-20261023_143429/error.php
new file mode 100644
index 0000000..242dfca
--- /dev/null
+++ b/.bkp-fix-20261023_143429/error.php
@@ -0,0 +1,36 @@
+<?php
+require_once __DIR__ . '/config.php';
+
+$hash = $_GET['hash'] ?? '';
+if (!$hash) error_response('Missing hash parameter');
+
+$errors = load_json(ERRORS_FILE);
+$sessions = load_json(SESSIONS_FILE);
+
+$matches = array_filter($errors, fn($e) => ($e['hash'] ?? '') === $hash);
+$matches = array_values($matches);
+
+if (empty($matches)) {
+ error_response('Error not found', 404);
+}
+
+$totalCount = array_sum(array_column($matches, 'count'));
+$uniqueSessions = array_unique(array_column($matches, 'session_id'));
+$firstSeen = min(array_column($matches, 'first_seen'));
+$lastSeen = max(array_column($matches, 'last_seen'));
+
+json_response([
+ 'success' => true,
+ 'hash' => $hash,
+ 'total_occurrences' => count($matches),
+ 'total_count' => $totalCount,
+ 'unique_sessions' => count($uniqueSessions),
+ 'first_seen' => $firstSeen,
+ 'last_seen' => $lastSeen,
+ 'type' => $matches[0]['type'] ?? 'unknown',
+ 'severity' => $matches[0]['severity'] ?? 'error',
+ 'category' => $matches[0]['category'] ?? 'runtime',
+ 'sample_message' => $matches[0]['message'] ?? '',
+ 'sample_stack' => $matches[0]['stack'] ?? null,
+ 'occurrences' => array_slice($matches, 0, 20),
+]);