aboutsummaryrefslogtreecommitdiff
path: root/api/debug/dashboard.php
diff options
context:
space:
mode:
authorAgando <roduccomm@gmail.com>2026-10-23 15:55:51 +0200
committerAgando <roduccomm@gmail.com>2026-10-23 15:55:51 +0200
commitef7e4d4d64c294240542c74d8ad2f99b7ef641f2 (patch)
tree9af2db07539f4438aed9e9f740731b291eca7d55 /api/debug/dashboard.php
parent0a21751ad27193cfd265c68360fd1bae116533d6 (diff)
fix(newos4): empty-pipeline crash, stacks in reports, frame in digest + dashboard (v4.6.55)
Root cause: splitPipe() splits on every '|', so `help |`, `| wc -l`, `a || b` produced a stage with no argv and executePipeChain() called parts[0].toLowerCase() on undefined — 989 occurrences, first filed 2026-10-20, unfixable from the report because bug reports dropped the stack that named executePipeChain:3955. Same unguarded read existed in _classify(). - terminal.js: _classify() returns an inert classification for empty argv; executePipeChain() parses each stage once, filters stages with no argv (so the last real stage stays final), warns only when the whole pipeline is empty. Last-stage test now compares against the filtered length. - module-system.js: `bug` diagnostics include the stack (10 frames, 1200 chars); auto-filed reports carry it too — they are the majority of the inbox and were previously message-only. - report.php: per-stack 2 KB cap; fingerprint pinned to message/source/count so adding `stack` cannot break dedupe against reports filed before today. - ingest.php: first_frame() parsed once on ingest, stored as `frame` on each signature. - newos4-triage.py: FRAME| line with the first application frame. - dashboard.php: frame under each Top Errors row. - modules/test/test-pipe-guard.js: ordering tripwire (guard must precede the parts[0] read). Verified: test RED exit=1 -> GREEN exit=0; browser matrix on v4.6.55 (help |, | wc -l, echo hi || echo bye, ls | | wc -l, |) -> 0 new error signatures, "|" warns; auto-filed report now carries stack (RPT-...f3e31124, archived after the probe); frame = modules/core/core-bundle.js:3955:42; maintain OK; skill audit 7/7.
Diffstat (limited to 'api/debug/dashboard.php')
-rw-r--r--api/debug/dashboard.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/api/debug/dashboard.php b/api/debug/dashboard.php
index 08e6194..9b717c8 100644
--- a/api/debug/dashboard.php
+++ b/api/debug/dashboard.php
@@ -31,7 +31,8 @@ foreach ($errors as $e) {
$hash = $e['hash'] ?? '';
if ($hash) {
if (!isset($topErrors[$hash])) {
- $topErrors[$hash] = ['hash' => $hash, 'message' => $e['message'] ?? '', 'count' => 0, 'type' => $t];
+ $topErrors[$hash] = ['hash' => $hash, 'message' => $e['message'] ?? '', 'count' => 0, 'type' => $t,
+ 'frame' => $e['frame'] ?? null];
}
$topErrors[$hash]['count'] += $e['count'] ?? 1;
}
@@ -297,7 +298,9 @@ $thread = array_slice($thread, -6);
<?php $i = 1; foreach ($topErrors as $e): ?>
<tr>
<td><?= $i++ ?></td>
- <td class="max-w-300"><a href="error.php?hash=<?= urlencode($e['hash'] ?? '') ?>" style="color:var(--text);text-decoration:none;" title="View details"><?= htmlspecialchars(substr($e['message'] ?? '', 0, 80)) ?></a></td>
+ <td class="max-w-300"><a href="error.php?hash=<?= urlencode($e['hash'] ?? '') ?>" style="color:var(--text);text-decoration:none;" title="View details"><?= htmlspecialchars(substr($e['message'] ?? '', 0, 80)) ?></a>
+ <?php if (!empty($e['frame'])): ?><div class="hide-sm" style="font-size:.72em;color:var(--muted)"><?= htmlspecialchars($e['frame']) ?></div><?php endif; ?>
+ </td>
<td class="hide-sm"><span class="tag"><?= htmlspecialchars($e['type'] ?? '?') ?></span></td>
<td><?= (int)($e['count'] ?? 0) ?></td>
</tr>