Skip to content

fix(observability): restore historical continuity in the Self-Host dashboard - #6779

Merged
JSONbored merged 1 commit into
mainfrom
claude/grafana-selfhost-history-continuity
Jul 17, 2026
Merged

fix(observability): restore historical continuity in the Self-Host dashboard#6779
JSONbored merged 1 commit into
mainfrom
claude/grafana-selfhost-history-continuity

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • The gittensory->loopover rebrand renamed every emitted Prometheus metric's __name__ (e.g. gittensory_queue_pending -> loopover_queue_pending), not just a job/instance label. Prometheus treats a __name__ change as a completely distinct time series — it does not retroactively merge old and new names — so every panel querying only the new loopover_* names went dark for anything before the rename, even though the old gittensory_* series are still fully present and queryable (90d retention, nothing was ever deleted).
  • Confirmed live: 118 gittensory_* metric names still hold real historical data in Prometheus (weeks of it for some), completely invisible to every panel in this dashboard.
  • Wraps each panel query's bare metric/range-vector reference in an or fallback against its gittensory_* counterpart — e.g. loopover_queue_pending -> (loopover_queue_pending or gittensory_queue_pending), and for rate()/increase() (which require a literal range-vector selector, not an arbitrary sub-expression) duplicates the whole function call per name and unions the two resulting instant vectors instead. 55 of the 60 metric names referenced in this dashboard have a real gittensory_* historical counterpart; the other 5 are genuinely new (post-rename) metrics with nothing to recover, left as-is.
  • Verified against live Prometheus: the transformed queries now return continuous data spanning the full pre-rename / transitional / post-rename range instead of cutting off at the rename boundary. Already deployed to the live Grafana instance (checksum-verified file copy) ahead of this PR merging, given it's a pure observability config fix with zero application-code risk.

Note: this dashboard's own filename (gittensory.json) and internal job= references to the legacy label are intentionally left alone in this PR — that's part of a separate, broader "eliminate remaining gittensory branding" pass, not bundled here to keep this fix narrow and reviewable.

Validation

  • npm run selfhost:validate-observability — dashboards and alert rules valid
  • git diff --check — clean
  • Not in src/**, no Codecov patch-coverage obligation for this file
  • Manually verified against live Prometheus: transformed queries execute successfully and return continuous multi-segment data across the rename boundary

…shboard

The gittensory->loopover rebrand renamed every emitted Prometheus metric's
__name__ (e.g. gittensory_queue_pending -> loopover_queue_pending), not just
a job/instance label. Prometheus treats a __name__ change as a completely
distinct time series -- it does not retroactively merge old and new names --
so every panel querying only the new loopover_* names went dark for anything
before the rename, even though the old gittensory_* series are still fully
present and queryable (90d retention, nothing was ever deleted).

Confirmed live: 118 gittensory_* metric names still hold real historical
data in Prometheus (weeks of it for some), completely invisible to every
panel in this dashboard.

Wraps each panel query's bare metric/range-vector reference in an `or`
fallback against its gittensory_* counterpart -- e.g.
`loopover_queue_pending` -> `(loopover_queue_pending or
gittensory_queue_pending)`, and for rate()/increase() (which require a
literal range-vector selector, not an arbitrary sub-expression) duplicates
the whole function call per name and unions the two resulting instant
vectors instead. 55 of the 60 metric names referenced in this dashboard
have a real gittensory_* historical counterpart; the other 5 are
genuinely new (post-rename) metrics with nothing to recover, left as-is.

Verified against live Prometheus: the transformed queries now return
continuous data spanning the full pre-rename / transitional / post-rename
range instead of cutting off at the rename boundary.
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@JSONbored JSONbored self-assigned this Jul 17, 2026
@JSONbored
JSONbored merged commit 42cca18 into main Jul 17, 2026
10 checks passed
@JSONbored
JSONbored deleted the claude/grafana-selfhost-history-continuity branch July 17, 2026 05:29
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 17, 2026
JSONbored added a commit that referenced this pull request Jul 17, 2026
…ssertions-6779

test(selfhost): sync grafana dashboard assertions with #6779's gittensory_ fallback exprs
thomasalvaedison7777-lgtm pushed a commit to thomasalvaedison7777-lgtm/loopover that referenced this pull request Jul 17, 2026
…s gittensory_ fallback exprs

PR JSONbored#6779 changed most Prometheus expr query strings in
grafana/dashboards/gittensory.json to add a legacy-metric fallback
(e.g. "loopover_x" became "(loopover_x or gittensory_x)"), a dual-read
migration for the old gittensory_-prefixed metric names alongside the
new loopover_-prefixed ones. That change to the dashboard JSON was
intentional and correct, but test/unit/selfhost-grafana-dashboard.test.ts
was never updated to match, so its exact-string expr/legendFormat
assertions started failing on main.

Updates the 25 affected assertions across 6 describe/it blocks (GitHub
response cache counters, Orb zero-safe panels, Postgres/backup
freshness, maintenance admission deferrals, self-host runtime-drift
signals, and backlog-vs-fresh-intake lane fairness) to match the
dashboard JSON's current, shipped expr values. No behavior change --
grafana/dashboards/gittensory.json is untouched.
thomasalvaedison7777-lgtm pushed a commit to thomasalvaedison7777-lgtm/loopover that referenced this pull request Jul 17, 2026
…tinuity query rewrite

JSONbored#6779 wrapped 71 panel queries in this dashboard with an
(new_metric or gittensory_old_metric) union for historical Prometheus
continuity across the rebrand, but didn't update this test file's exact
target.expr string assertions to match -- 25 of them were pinned to the
pre-JSONbored#6779 query text and have been silently failing since that PR merged.
thomasalvaedison7777-lgtm pushed a commit to thomasalvaedison7777-lgtm/loopover that referenced this pull request Jul 17, 2026
…hboard

JSONbored#5522's hard-cutover rename of the gittensory_ metric prefix to loopover_
left this dashboard's 9 loopover_ai_* queries with no fallback to their
pre-rebrand names, so every panel here only ever showed data recorded
after that cutover -- confirmed live, both metric names have real
historical series in Prometheus going back well past the cutover.

Applies the same (loopover_x or gittensory_x) union fix already shipped
for grafana/dashboards/gittensory.json (JSONbored#6779/JSONbored#6787), including that
fix's own lesson: a label matcher like {provider="codex"} must bind to
each side of the union individually, never to the closing paren of the
union as a whole -- verified all 9 rewritten queries directly against
live Prometheus before deploying.

Deployed to edge-nl-01 and restarted Grafana to force a clean reprovision.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant