diff options
| author | Agando <roduccomm@gmail.com> | 2026-10-23 15:55:51 +0200 |
|---|---|---|
| committer | Agando <roduccomm@gmail.com> | 2026-10-23 15:55:51 +0200 |
| commit | ef7e4d4d64c294240542c74d8ad2f99b7ef641f2 (patch) | |
| tree | 9af2db07539f4438aed9e9f740731b291eca7d55 /modules/core/module-debug-supervisor.js | |
| parent | 0a21751ad27193cfd265c68360fd1bae116533d6 (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 'modules/core/module-debug-supervisor.js')
| -rw-r--r-- | modules/core/module-debug-supervisor.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/core/module-debug-supervisor.js b/modules/core/module-debug-supervisor.js index 485f4e2..78e3a46 100644 --- a/modules/core/module-debug-supervisor.js +++ b/modules/core/module-debug-supervisor.js @@ -325,7 +325,7 @@ class DebugSupervisorModule { // v4.6.38 (A5): auto-file fatal/error-class failures, max 3 per day, deduped by hash. if (classification.severity === 'fatal' || classification.severity === 'error') { - this._maybeAutoFile({ hash, message, source, type: classification.type, severity: classification.severity }); + this._maybeAutoFile({ hash, message, source, type: classification.type, severity: classification.severity, stack }); } } @@ -369,6 +369,9 @@ class DebugSupervisorModule { type: e.type, severity: e.severity, count: 1, + // Auto-filed reports are the majority of the inbox; without the stack they are + // a message with no location (the 2026-10-20 `toLowerCase` report proved it). + stack: e.stack ? String(e.stack).split('\n').slice(0, 10).join('\n').slice(0, 1200) : null, }], }, }; |