Skip to content

fix(selfhost): correct stale gittensory_ metric names in .env.example - #6079

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
galuis116:fix/env-example-queue-metrics-prefix
Jul 15, 2026
Merged

fix(selfhost): correct stale gittensory_ metric names in .env.example#6079
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
galuis116:fix/env-example-queue-metrics-prefix

Conversation

@galuis116

Copy link
Copy Markdown
Contributor

Summary

  • .env.example's QUEUE_CONCURRENCY tuning comment told operators to watch gittensory_queue_live_pending / gittensory_queue_oldest_live_pending_age_seconds — neither metric exists under that prefix. The rebrand only ever registered loopover_queue_live_pending (src/selfhost/metrics.ts) and loopover_queue_oldest_live_pending_age_seconds (same file, and used in prometheus/rules/alerts.yml's real alert expressions).
  • Corrects both metric names in the comment block; no other change to the guidance itself.
  • Adds a regression test (test/unit/env-example-metric-names.test.ts) asserting .env.example never references the stale gittensory_<metric> shape again, and positively pins the two corrected metric names.

Scope

  • The PR title follows type(scope): short summary Conventional Commit format, for example fix(api): restore profile access checks.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked a currently open issue this PR resolves (e.g. Closes #123) — a linked open issue is required for every contributor PR.

Closes #5936

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally; codecov/patch requires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

  • The local machine is under persistent memory contention from multiple concurrent processes (several other active dev sessions on the same box), and the full npm run test:ci chain's local tsc --noEmit step OOM-crashes repeatedly regardless of heap tuning (confirmed reproducible even in isolation with a 1.8GB heap). This PR changes zero .ts/.js source — only .env.example (a comment/config file) and one new self-contained test file using patterns already proven elsewhere in the suite (readFileSync/join/.env.example, mirroring test/unit/selfhost-grafana-sentry-datasource.test.ts's own .env.example assertion). What I could run locally (actionlint, db:migrations:check, git diff --check, npm audit, and the new test in isolation via npx vitest run) is green; I manually verified the new test actually catches the regression by temporarily reintroducing the stale gittensory_ names and confirming it fails, then restored the fix and confirmed it passes. CI's validate/validate-code/validate-tests checks run on GitHub's own isolated runners with no such contention and will independently confirm the rest (typecheck included) before merge.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests.
  • API/OpenAPI/MCP behavior is updated and tested where needed.
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks.
  • Visible UI changes include a UI Evidence section below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

Not applicable: this is a config-comment + test-only change, no UI/auth/session/API surface touched.

Notes

…JSONbored#5936)

The QUEUE_CONCURRENCY tuning comment told operators to watch
gittensory_queue_live_pending / gittensory_queue_oldest_live_pending_age_seconds,
but neither metric exists under that prefix -- the rebrand only ever
registered them as loopover_queue_live_pending /
loopover_queue_oldest_live_pending_age_seconds (src/selfhost/metrics.ts).
Adds a regression test asserting .env.example never references the
stale gittensory_<metric> shape again.
@galuis116
galuis116 requested a review from JSONbored as a code owner July 15, 2026 08:35
@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 (00db6b7) to head (2b0205e).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6079   +/-   ##
=======================================
  Coverage   95.22%   95.23%           
=======================================
  Files         595      595           
  Lines       46998    47011   +13     
  Branches    15015    15015           
=======================================
+ Hits        44756    44769   +13     
  Misses       1493     1493           
  Partials      749      749           
Flag Coverage Δ
shard-1 43.94% <ø> (-0.09%) ⬇️
shard-2 36.59% <ø> (+0.10%) ⬆️
shard-3 31.96% <ø> (+0.01%) ⬆️
shard-4 31.97% <ø> (-1.06%) ⬇️
shard-5 32.65% <ø> (+1.15%) ⬆️
shard-6 44.70% <ø> (+0.05%) ⬆️

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

@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 08:51:04 UTC

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

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This is a small, well-targeted documentation fix correcting two stale `gittensory_`-prefixed metric names in `.env.example`'s QUEUE_CONCURRENCY tuning comment to the correct `loopover_` prefix, matching the actual metric registrations in `src/selfhost/metrics.ts`. The change is a pure comment-text correction with no functional code impact, and includes a regression test that pins both corrected names and asserts against any stale `gittensory_` references reappearing. The diff is narrow, closes a linked issue (#5936), and the accompanying test directly exercises the changed content.

Nits — 2 non-blocking
  • The regex `/gittensory_[a-z_]+/` in test/unit/env-example-metric-names.test.ts requires at least one lowercase/underscore char after the prefix, so a bare `gittensory_` with nothing following would slip past undetected, though this is unlikely to occur in practice.
  • Consider widening the regex to `/gittensory_\w*/` or similar in test/unit/env-example-metric-names.test.ts to also catch a bare trailing `gittensory_` prefix with no suffix.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #5936
Related work ⚠️ 2 scoped overlaps Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High 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: 1909 registered-repo PR(s), 1260 merged, 50 issue(s).
Contributor context ✅ Confirmed Gittensor contributor galuis116; Gittensor profile; 1909 PR(s), 50 issue(s).
Gate result ✅ Passing No configured blocker found.
Improvement ℹ️ Insufficient signal risk: clean · value: insufficient-signal · LLM: minor
Linked issue satisfaction

Addressed
The diff replaces both stale gittensory_ metric names with the correct loopover_ names in the QUEUE_CONCURRENCY comment block without altering the surrounding advice, and adds a Vitest regression test that both greps for the stale prefix anywhere in .env.example and pins the two corrected metric names.

Review context
Contributor next steps
  • Start here: Review top overlaps.
  • Then work through the remaining 2 steps in the Signals table above.
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.

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(selfhost): .env.example QUEUE_CONCURRENCY guidance references nonexistent gittensory_queue_* metrics

1 participant