Skip to content

fix(observability): link the Miner usage (AMS) dashboard from the resource hub - #6084

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
luciferlive112116:fix/resource-hub-miner-usage-link
Jul 15, 2026
Merged

fix(observability): link the Miner usage (AMS) dashboard from the resource hub#6084
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
luciferlive112116:fix/resource-hub-miner-usage-link

Conversation

@luciferlive112116

Copy link
Copy Markdown
Contributor

Summary

Closes #5820

grafana/dashboards/resource-hub.json (uid loopover-hub) is Grafana's curated landing page for the self-host stack: its "Observability & dashboards" panel deep-links every provisioned dashboard by uid. It listed 9 of the 10 dashboards actually shipped in grafana/dashboards/.

Verified programmatically by reading every grafana/dashboards/*.json uid and grepping the hub for a /d/<uid> link — miner-usage.json (uid loopover-miner-usage, "LoopOver — Miner usage (AMS)") was the sole dashboard with no link, reachable only by someone who already knew its uid.

The hub does have an AMS panel (#5189/#5191), but it links the "Observing your miner" guide — how to wire the AMS datasources up — and never the dashboard itself once that wiring is done. So the dashboard shipped effectively orphaned despite being provisioned exactly like the other nine.

Fix: add the missing entry to the "Observability & dashboards" list in the same - **[Title](/d/uid)** — description. style as its 9 siblings, framed per the AMS panel's existing framing (the miner-side counterpart to the ORB review-service dashboards above it, with a pointer to the AMS panel for datasource wiring).

The test asserts the invariant, not this one uid. Pinning /d/loopover-miner-usage would only fix today's miss. Instead it reads every grafana/dashboards/*.json's uid and requires each one (except the hub's own loopover-hub) to appear as a /d/<uid> link somewhere in the hub's panel content — so the next dashboard that forgets to cross-link fails CI instead of silently shipping orphaned.

Scope

  • Conventional Commit title (fix(observability): …).
  • Focused: one additive markdown list entry + the invariant test. No dashboard/panel/query behavior changed.
  • Additive only — the hub's uid, title, existing panels, and every other link are untouched (the existing suite's "additive change only" test still passes).
  • Follows CONTRIBUTING.md; no site//CNAME/lovable changes; no changelog edit.
  • Linked open issue (Closes fix(observability): resource-hub.json is missing a link to the Miner usage (AMS) dashboard #5820, above).

Validation

  • git diff --check clean.
  • resource-hub.json still parses as valid JSON (asserted by the suite, which JSON.parses it).
  • Re-ran the orphan check after the fix: every provisioned dashboard is now linked from the hub.
  • Full Grafana suite green: 14 spec files — resource-hub, miner-usage, ai-usage, browserless, infra-health, rees, datasource-uids, provisioning-config, reporting, variable-query-text, no-dollar-underscore-sentinel, and the base dashboard spec — 101 tests passed.
  • Proved the new tests actually catch the bug: reverted only resource-hub.json and confirmed both new tests fail (expected '…' to contain '/d/loopover-miner-usage', and the invariant flags miner-usage.json as orphaned), then pass again with the fix. Not a tautological test.
  • The invariant guards itself: it asserts the directory read matched >1 dashboard and that every uid is a non-empty string, so a future glob/parse regression can't make the orphan check vacuously pass.
  • Rebased onto current main.

If any required check was skipped, explain why:

  • Full test:ci not run end-to-end locally (Linux-only steps on Windows).
  • selfhost-grafana-sentry-datasource / selfhost-grafana-github-datasource each fail one is executable assertion locally — Windows does not preserve the Unix exec bit. Confirmed pre-existing on a clean checkout of main with these changes stashed, and unrelated to this diff (no shell script is touched).
  • No Codecov patch-coverage obligation: the diff touches only grafana/** (a provisioned JSON asset) and test/**, both outside Codecov's coverage.include.

Safety

  • No secrets, wallets, hotkeys, trust scores, rewards, private rankings, or private maintainer evidence. The added text is a relative /d/<uid> Grafana link and a neutral description.
  • No auth/cookie/CORS/GitHub App/session change.
  • No runtime/API/OpenAPI/MCP change; no schema change. This is a provisioned dashboard asset plus a test.
  • Not a dead link: the target uid is read from miner-usage.json itself and asserted by the invariant, so it cannot be a typo.
  • No UI changes (no apps/**); no changelog edit.

…ource hub

resource-hub.json is Grafana's curated landing page for the self-host
stack: its "Observability & dashboards" panel deep-links every
provisioned dashboard by uid. It listed 9 of the 10 shipped in
grafana/dashboards/. miner-usage.json (uid loopover-miner-usage, "LoopOver
-- Miner usage (AMS)") was the sole exception, reachable only by someone
who already knew its uid.

The hub's AMS panel links the "Observing your miner" guide -- how to wire
the AMS datasources up -- but never the dashboard itself once that wiring
is done, so the dashboard shipped effectively orphaned despite being
provisioned exactly like the other nine.

Add the missing entry in the same style as its siblings, framed as the
miner-side counterpart to the ORB review-service dashboards above it.

The regression test asserts the invariant rather than this one uid: it
reads every grafana/dashboards/*.json uid and requires a /d/<uid> link
somewhere in the hub's panel content, so the next dashboard that forgets
to cross-link fails CI instead of silently shipping orphaned. Verified to
fail against the pre-fix resource-hub.json.

Closes JSONbored#5820
@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.23%. Comparing base (1c25803) to head (7857618).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6084      +/-   ##
==========================================
- Coverage   95.23%   95.23%   -0.01%     
==========================================
  Files         595      595              
  Lines       47015    47013       -2     
  Branches    15015    15015              
==========================================
- Hits        44773    44771       -2     
  Misses       1493     1493              
  Partials      749      749              
Flag Coverage Δ
shard-1 43.95% <ø> (+<0.01%) ⬆️
shard-2 36.58% <ø> (-0.01%) ⬇️
shard-3 31.96% <ø> (-0.01%) ⬇️
shard-4 33.78% <ø> (+<0.01%) ⬆️
shard-5 31.46% <ø> (+<0.01%) ⬆️
shard-6 44.70% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1 file with indirect coverage changes

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 15, 2026
@loopover-orb

loopover-orb Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-15 09:00:52 UTC

2 files · 1 AI reviewer · no blockers · readiness 98/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
Adds the missing Miner usage (AMS) dashboard link to the resource hub's markdown panel content, and extends the test suite with an invariant test that every provisioned dashboard uid (except the hub's own) must be deep-linked from the hub, preventing future orphaned dashboards. The change is additive-only, matches the existing entry style of its nine siblings, and the new test correctly reads live uids from grafana/dashboards/*.json rather than pinning today's specific uid. This is a well-scoped, low-risk fix directly tied to issue #5820.

Nits — 4 non-blocking
  • test/unit/selfhost-grafana-resource-hub-dashboard.test.ts: the `Dashboard` type used in `provisionedDashboards()` and `panel.options?.content` in `hubContent()` aren't shown in the diff — worth confirming they're already defined elsewhere in the file rather than newly introduced here.
  • grafana/dashboards/resource-hub.json: the new AMS entry's parenthetical wiring pointer ('see the AMS panel below for wiring its datasources up') assumes the AMS panel is positioned below in the rendered layout — worth double-checking panel ordering still holds true visually.
  • Consider asserting in the invariant test that the number of orphaned dashboards found is zero via a friendlier failure message (e.g. include the missing uids in the assertion output) for faster debugging if it regresses.
  • The `hubContent()` join of all panel markdown by `\n` is a reasonable approach; consider a brief comment noting why multiple panels are searched (already partially covered by the existing doc comment).
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #5820
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 113 registered-repo PR(s), 57 merged, 35 issue(s).
Contributor context ✅ Confirmed Gittensor contributor luciferlive112116; Gittensor profile; 113 PR(s), 35 issue(s).
Gate result ✅ Passing No configured blocker found.
Improvement ℹ️ Insufficient signal risk: clean · value: insufficient-signal · LLM: minor
Linked issue satisfaction

Addressed
The PR adds the required `[Miner usage (AMS)](/d/loopover-miner-usage)` entry to the resource-hub markdown list in the same style as siblings, and extends the test file with an invariant test that reads every dashboard's uid and asserts each is deep-linked from the hub, satisfying both stated deliverables.

Review context
  • Author: luciferlive112116
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 113 PR(s), 35 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://gittensory.aethereal.dev/docs/loopover-commands

🧪 Experimental — new and may change.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoopOver approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit 52794a7 into JSONbored:main Jul 15, 2026
16 checks passed
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.

fix(observability): resource-hub.json is missing a link to the Miner usage (AMS) dashboard

1 participant