Skip to content

refactor(observability): hard-cutover rename gittensory_ metric prefix to loopover_#5522

Merged
JSONbored merged 2 commits into
mainfrom
loopover/observability-rename
Jul 13, 2026
Merged

refactor(observability): hard-cutover rename gittensory_ metric prefix to loopover_#5522
JSONbored merged 2 commits into
mainfrom
loopover/observability-rename

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

Hard-cutover rename (per maintainer decision on issue #5330) of all 139 emitted Prometheus/OTEL metric names (the issue text undercounted at 106 — this was audited empirically) from gittensory_* to loopover_*, across src/selfhost/metrics.ts, ~98 call sites in ~20 files, prometheus/rules/alerts.yml (42 references), all 10 Grafana dashboard JSON files (panel queries, titles, uids), the sqlite/AMS datasource provisioning + dashboard-provider config, scripts/backup-metrics.sh, scripts/smoke-selfhost.sh, two smoke-observability-*.mjs scripts, docker-compose.yml's backup-exporter healthcheck, the selfhost.yml CI smoke step, and three self-hosting docs pages that document these exact metric/alert names.

Also fixes a real, pre-existing bug surfaced while cross-checking the rename: metrics.ts registered HELP/TYPE metadata for the PR-files-fetch counter under an abbreviated name that never matched what backfill.ts actually emitted — these two names have never agreed, independent of this rebrand.

Deliberately unchanged

Each a real, separate, unrenamed identifier surface:

  • GITTENSORY_* env vars and MCP tool names (separate, already-scoped rebrand items).
  • The gittensory-api Worker/domain and its Cloudflare Queue bindings (gittensory-jobs, etc.) — real deploy/DNS implications, needs its own deliberate handling.
  • The Qdrant default collection name — renaming would orphan existing self-hosters' indexed embeddings without a migration step.
  • gittensory_session/gittensory_oauth_state cookie names, the gittensory-native DB discriminant, GraphQL operation names.
  • packages/gittensory-engine's own miner-prediction metric names — deferred to the npm package rename (currently blocked on re-planning against a new @loopover org).

Test plan

  • Full npx vitest run test/unit/ test/integration/ — 789/790 files, 15354/15360 tests, 0 failures.
  • npm run typecheck — clean.
  • npm run selfhost:validate-observability — dashboards and alert rules valid.
  • Cross-checked every loopover_-prefixed name in metrics.ts against every occurrence in alerts.yml and all 10 dashboard JSON files for verbatim agreement (catches independent-agent name drift).
  • Verified the sqlite datasource uid rename (gittensory-dbloopover-db) is consistent between provisioning and every dashboard that references it.
  • Fixed ~46 stale test files whose assertions expected the old brand.
  • Full npm run test:ci gate green (fixed one prettier/line-wrap issue from string-length changes after the initial pass).

Closes #5330.

…x to loopover_

Renames all 139 emitted Prometheus/OTEL metric names across src/selfhost/metrics.ts
and ~98 call sites, plus every downstream consumer: prometheus/rules/alerts.yml,
all 10 Grafana dashboard JSON files (panel queries, titles, uids), the sqlite/AMS
datasource provisioning and dashboard-provider config, scripts/backup-metrics.sh,
scripts/smoke-selfhost.sh, two smoke-observability .mjs scripts, docker-compose.yml's
backup-exporter healthcheck, the selfhost.yml CI smoke step, and three self-hosting
docs pages that document these exact metric/alert names.

Also fixes a pre-existing, unrelated bug surfaced while cross-checking the rename:
metrics.ts registered HELP/TYPE metadata for the PR-files-fetch counter under an
abbreviated name that never matched what backfill.ts actually emitted.

Deliberately unchanged (real, separate, unrenamed identifier surfaces): GITTENSORY_*
env vars, MCP tool names, the gittensory-api Worker/domain and Cloudflare Queue
bindings, the Qdrant default collection name (renaming would orphan existing
self-hosters' indexed embeddings without a migration step), gittensory_session/
oauth_state cookie names, the gittensory-native DB discriminant, GraphQL operation
names, and packages/gittensory-engine's own miner-prediction metric names (deferred
to the still-unplanned npm package rename).

Closes #5330.
@superagent-security

Copy link
Copy Markdown
Contributor

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

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
gittensory-ui 3c93c18 Commit Preview URL

Branch Preview URL
Jul 13 2026, 01:00 AM

@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.79%. Comparing base (05d1fb0) to head (3c93c18).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5522   +/-   ##
=======================================
  Coverage   94.79%   94.79%           
=======================================
  Files         566      566           
  Lines       45065    45065           
  Branches    14675    14675           
=======================================
  Hits        42718    42718           
  Misses       1613     1613           
  Partials      734      734           
Flag Coverage Δ
shard-1 44.20% <61.15%> (ø)
shard-2 35.47% <27.27%> (ø)
shard-3 31.94% <21.48%> (ø)
shard-4 31.92% <19.83%> (-0.01%) ⬇️
shard-5 32.87% <13.22%> (ø)
shard-6 43.51% <24.79%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/github/backfill.ts 97.22% <100.00%> (ø)
src/github/client.ts 100.00% <100.00%> (ø)
src/github/graphql-cache.ts 100.00% <100.00%> (ø)
src/github/webhook.ts 100.00% <100.00%> (ø)
src/orb/broker-client.ts 99.14% <100.00%> (ø)
src/queue/dlq.ts 100.00% <100.00%> (ø)
src/queue/processors.ts 95.67% <100.00%> (ø)
src/queue/slop-detection.ts 100.00% <100.00%> (ø)
src/review/enrichment-wire.ts 98.45% <100.00%> (ø)
src/review/grounding-wire.ts 96.77% <100.00%> (ø)
... and 21 more
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

loopover-orb Bot commented Jul 13, 2026

Copy link
Copy Markdown

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-13 01:57:27 UTC

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

⏸️ Suggested Action - Manual Review

  • Touches a guarded path — held for manual review: This PR changes guardrail-protected path(s): apps/gittensory-ui/src/routes/docs.self-hosting-configuration.tsx (matched apps/gittensory-ui/**), apps/gittensory-ui/src/routes/docs.self-hosting-operations.tsx (matched apps/gittensory-ui/**), apps/gittensory-ui/src/routes/docs.self-hosting-troubleshooting.tsx (matched apps/gittensory-ui/**), .github/workflows/selfhost.yml (matched .github/workflows/**), scripts/backup-metrics.sh (matched scripts/**), and 32 more.

Review summary
This is a mechanical, comprehensive rename of the `gittensory_*` metric prefix to `loopover_*` across the alert rules, metrics registration, all Grafana dashboards, provisioning config, backup/smoke scripts, CI, and docs, per issue #5330 and a maintainer-authorized hard-cutover decision. The alerts.yml hunk is internally consistent (rule names, expr, summary/description/runbook text all track together), and CI is green with a full test suite pass at 15354/15360. The description also calls out a real pre-existing bug fix (a HELP/TYPE metadata mismatch between metrics.ts and backfill.ts) surfaced during the rename, and explicitly lists what was deliberately left unrenamed (env vars, Worker/DNS-bound names, Qdrant collection, cookie names) with sound reasoning for each — that scoping discipline is a good sign for a change this wide.

Nits — 7 non-blocking
  • grafana/dashboards/gittensory.json still keeps its file name and old `gittensory.json`/`gittensory-selfhost` style identifiers in some spots even though panel titles/uid were changed to LoopOver — worth confirming the file itself isn't slated for a follow-up rename or that dashboard provisioning doesn't reference the old filename somewhere unchanged.
  • Given the scale (139 metrics, ~98 call sites, 10 dashboards), a stray missed occurrence is plausible outside the visible diff — the `selfhost:validate-observability` script mentioned in the test plan is the right guardrail here, worth double-checking it actually asserts zero remaining `gittensory_` metric occurrences repo-wide rather than just spot-checking known names.
  • Since this is a hard cutover with no dual-emission period, confirm the PR description's claim that all 10 Grafana dashboard JSON files were fully swept (uids, panel titles, queries) is validated by an automated check (e.g. a grep-based test) rather than manual review, since a single missed `gittensory_` string in a dashboard query would silently break a panel post-deploy.
  • Consider linking this validation script in the PR description for reviewers, since the sheer file count here makes manual line-by-line verification impractical.
  • nit: `grafana/dashboards/gittensory.json` still keeps the old filename while the dashboard title, tags, and uid are renamed to LoopOver, so future operators may miss that this file now owns the LoopOver self-host dashboard.
  • PR author also opened the linked issue — Link an issue that was opened by a different contributor, or provide a rationale for why this self-authored issue represents genuine discovery work.
  • Touches a guarded path — held for manual review — A maintainer must review and merge this change.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #5330
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: 44 registered-repo PR(s), 36 merged, 403 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 44 PR(s), 403 issue(s).
Gate result ⚠️ Not blocking Advisory; not blocking this PR.
Improvement ✅ Minor risk: clean · value: minor — Code changes are accompanied by test evidence.
Review context
  • Author: JSONbored
  • Role context: owner (maintainer lane)
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, TypeScript, Ruby, Go, JavaScript, MDX, Shell, Solidity
  • Official Gittensor activity: 44 PR(s), 403 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Treat this as maintainer-lane context rather than normal contributor-lane activity.
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.
[BETA] Chat with Gittensory

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

  • @gittensory ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @gittensory chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @gittensory 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/gittensory-commands

Visual preview
Route Viewport Before (production) After (this PR's preview) Diff
/docs/self-hosting-configuration desktop before /docs/self-hosting-configuration after /docs/self-hosting-configuration
/docs/self-hosting-configuration mobile before /docs/self-hosting-configuration (mobile) after /docs/self-hosting-configuration (mobile)
/docs/self-hosting-operations desktop before /docs/self-hosting-operations after /docs/self-hosting-operations
/docs/self-hosting-operations mobile before /docs/self-hosting-operations (mobile) after /docs/self-hosting-operations (mobile)

Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy.

🟩 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 Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

@loopover-orb loopover-orb Bot added the manual-review Gittensor contributor context label Jul 13, 2026
@JSONbored JSONbored merged commit 577a69e into main Jul 13, 2026
20 checks passed
@JSONbored JSONbored deleted the loopover/observability-rename branch July 13, 2026 02:28
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. manual-review Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Observability rename: Prometheus metric prefix, Grafana dashboards/provisioning, and alert rules

1 participant