Skip to content

fix(dashboard): drop stale -1 sentinel metrics from served trends#141

Merged
mvalancy merged 1 commit into
devfrom
fix/dashboard-drop-stale-sentinel-metrics
Jun 19, 2026
Merged

fix(dashboard): drop stale -1 sentinel metrics from served trends#141
mvalancy merged 1 commit into
devfrom
fix/dashboard-drop-stale-sentinel-metrics

Conversation

@mvalancy

Copy link
Copy Markdown
Member

Problem

The live test dashboard still serves -1 for graph.driftPx and graph.avgTickMs in metric trends. Ingestion already filters these (commit 24eb497 for FPS; metrics.mjs measured() for sweep/large-graph), but the append-only metrics.jsonl retains points written before those fixes. A -1 on a lower-is-better metric reads as a perfect score and distorts the trend chart.

Fix

Add liveMetrics() in history.mjs — a defensive guard at the serve layer (server.mjs:104) dropping non-finite/negative metric values. Every GraphDone metric (fps, ms, px, counts, scores) is non-negative, so a negative is always a not-measured sentinel. Dedup-on-append (server.mjs:84) keeps reading raw.

Test

liveMetrics unit test added; full dashboard suite green (35/35 via node --test). Pure read-layer change — no app data/graph/deletion paths touched, so smoke gate is not the relevant gate.

…ic trends

Ingestion (metrics.mjs) already filters -1 sentinels, but the append-only
metrics.jsonl retains points written before that fix landed, so the served
state still carried -1 for graph.driftPx/avgTickMs. A -1 on a lower-is-better
metric reads as a perfect score and distorts the trend chart. Add a
liveMetrics() guard at the serve layer dropping non-finite/negative values
(every GraphDone metric is non-negative). Dedup-on-append still reads raw.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mvalancy mvalancy merged commit a7799d9 into dev Jun 19, 2026
9 of 11 checks passed
@mvalancy mvalancy deleted the fix/dashboard-drop-stale-sentinel-metrics branch June 19, 2026 20:46
@github-actions

Copy link
Copy Markdown

🧪 Comprehensive Test Suite

  • Unit suites (Node 18.x & 20.x) — core, web, server, mcp-server: ❌ failure
  • Installer & deploy config: ✅ passed

Full-stack smoke gate runs in the CI workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant