Skip to content

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

Description

@JSONbored

Context

grafana/dashboards/resource-hub.json (uid loopover-hub, "LoopOver — Resource hub") is Grafana's
curated landing page for every dashboard/service in the self-host stack. Its "Observability & dashboards"
panel is a hand-maintained markdown list linking to every other provisioned dashboard by its Grafana
uid:

- [Upstream PRs & issues (GitHub)](/d/loopover-github)
- [Reviews & PRs (maintainer)](/d/loopover-maintainer)
- [AI usage](/d/loopover-ai-usage)
- [LoopOver (infra)](/d/loopover-selfhost)
- [GPU metrics](/d/loopover-gpu)
- [Infra health](/d/loopover-infra-health)
- [REES (review-enrichment)](/d/loopover-rees)
- [Browserless (visual review)](/d/loopover-browserless)
- [Sentry issues](/d/loopover-sentry)

That's 9 of the 10 dashboards actually shipped in grafana/dashboards/*.json. The missing one is
grafana/dashboards/miner-usage.json (uid loopover-miner-usage, title "LoopOver — Miner usage (AMS)") —
grepping the full resource-hub.json file for miner-usage or loopover-miner-usage returns nothing.

The resource-hub does have a separate "AMS — Autonomous Miner System" panel (added by #5189/#5191), but it
only links to the documentation guide
(packages/loopover-miner/docs/observability.md) explaining how to wire up the AMS datasources — it never
links to the dashboard itself once that wiring is done. Every other dashboard in the folder gets a direct
/d/<uid> deep link from the "Observability & dashboards" list; the Miner usage dashboard is the sole
exception, even though it is provisioned the exact same way as the rest (same
grafana/provisioning/dashboards/provider.yml glob over grafana/dashboards/*.json) and is covered by its
own dedicated test (test/unit/selfhost-grafana-miner-usage-dashboard.test.ts).

test/unit/selfhost-grafana-resource-hub-dashboard.test.ts currently only asserts the AMS panel exists,
is a markdown text panel, and links to the docs-guide file — it does not assert every dashboard file under
grafana/dashboards/ has a corresponding /d/<uid> link somewhere in resource-hub.json, so this gap
isn't caught.

Requirements

  • Add a [Miner usage (AMS)](/d/loopover-miner-usage) entry to the "Observability & dashboards" panel's
    markdown list in grafana/dashboards/resource-hub.json, in the same style/format as the other 9 entries
    (a one-line description matching the AMS panel's existing framing — this is the AMS ledger dashboard,
    distinct from the ORB review-service dashboards above it).
  • Add a regression test (extending test/unit/selfhost-grafana-resource-hub-dashboard.test.ts or a new
    spec) that reads every grafana/dashboards/*.json file's uid, and asserts every uid that isn't
    resource-hub.json's own (loopover-hub) appears as a /d/<uid> link somewhere in
    resource-hub.json's panel content — so a future dashboard addition that forgets to cross-link from the
    hub fails CI instead of silently shipping an orphaned dashboard.

Deliverables

  • resource-hub.json's "Observability & dashboards" panel links directly to
    /d/loopover-miner-usage, alongside the other 9 dashboard links.
  • A new "every dashboard uid is linked from the hub" invariant test, following the existing pattern in
    test/unit/selfhost-grafana-resource-hub-dashboard.test.ts (e.g. its
    "INVARIANT: the AMS link target is a well-formed reference..." test already does the same kind of
    existence-proof check, just for the docs-guide link rather than dashboard links).

Test Coverage Requirements

grafana/dashboards/resource-hub.json is a JSON config file outside src/**/coverage.include, so
Codecov's patch gate does not apply to the dashboard-content edit itself. The new/extended test under
test/unit/** IS measured and must hit 99%+ patch coverage: both the pass case (every current dashboard
uid is linked) and a regression-proof case (temporarily asserting against a fixture/mutated panel content
missing one uid fails), matching the coverage rigor already established by the sibling
selfhost-grafana-*-dashboard.test.ts files in this repo.

Expected Outcome

Every Grafana dashboard shipped in grafana/dashboards/ — including the AMS Miner usage dashboard — is
reachable with one click from the resource hub, the documented single entry point for the observability
stack. A future PR that adds a new dashboard JSON file without also linking it from the hub fails CI.

Links & Resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:bugGittensor-scored bug fix — scores a 0.05x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions