Skip to content

fix(selfhost): default miner prometheus export script to the real bin name - #6000

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
davion-knight:fix-selfhost-export-miner-bin-default
Jul 15, 2026
Merged

fix(selfhost): default miner prometheus export script to the real bin name#6000
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
davion-knight:fix-selfhost-export-miner-bin-default

Conversation

@davion-knight

Copy link
Copy Markdown
Contributor

Closes #5934.

scripts/export-miner-prometheus-textfile.sh defaulted MINER_BIN to gittensory-miner, which is not an installable binary after the rebrand's hard cutover — the package's real bin entry is loopover-miner. An operator running the script with no LOOPOVER_MINER_BIN override (the documented usage) hits command not found (exit 127) on the first call, and because export_family is fail-open, all four metric families silently fail and the .prom is never populated.

Changes

  • scripts/export-miner-prometheus-textfile.sh: MINER_BIN default gittensory-minerloopover-miner. Refreshed the one matching `gittensory-miner metrics` command reference in the header comment. The LOOPOVER_MINER_BIN override mechanism is unchanged.
  • test/unit/miner-prometheus-textfile-export.test.ts (new): the regression guard the issue asks for — readFileSync + assert the default MINER_BIN is loopover-miner and the hyphenated gittensory-miner binary name is gone. Mirrors test/unit/miner-docker-compose.test.ts.

OUT_FILE decision

Per the issue's note, I deliberately left OUT_FILE's default filename …/gittensory_miner.prom unchanged. It is a cosmetic filename, not a functional break like the binary — renaming it would silently move where the textfile lands and could break operators' existing node_exporter/dashboard wiring keyed on that path. The regression test asserts on the hyphenated binary name only, so it does not touch this separate underscore filename.

Validation

  • New regression test passes (2/2); sh -n clean on the script.
  • Confirmed loopover-miner is the real bin entry (packages/loopover-miner/package.json) and no existing test asserted the old default.
  • scripts/** is outside Codecov's coverage.include, so no patch-coverage gate applies.

… name

scripts/export-miner-prometheus-textfile.sh defaulted MINER_BIN to
gittensory-miner, which is not an installable binary after the rebrand's
hard cutover, so an operator running the script with no LOOPOVER_MINER_BIN
override hits command-not-found and (since export_family is fail-open)
silently produces an empty .prom on every run. Default MINER_BIN to the
package's real bin entry loopover-miner, refresh the matching command
reference in the header comment, and add a test/unit regression guard.

Closes JSONbored#5934
@davion-knight
davion-knight requested a review from JSONbored as a code owner July 15, 2026 06:18
@superagent-security

Copy link
Copy Markdown
Contributor

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

@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 06:31:26 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 one-line default-value fix: MINER_BIN's default changes from the non-installable pre-rename `gittensory-miner` to the real bin entry `loopover-miner`, matching a single header-comment reference, plus a new regression test that content-checks the script for the correct default and absence of the old name. The `OUT_FILE` filename is deliberately left as `gittensory_miner.prom` with a clear rationale (avoiding breaking operators' existing textfile-collector paths), which is a reasonable and explicitly justified scope boundary. The change is small, targeted, and directly closes the linked issue.

Nits — 3 non-blocking
  • The new test only checks for the literal string `MINER_BIN="${LOOPOVER_MINER_BIN:-loopover-miner}"` via `toContain`, so it would silently pass/fail to catch drift if whitespace or quoting style in the script changes for unrelated reasons — a regex-based assertion would be slightly more robust but is not necessary here.
  • The header comment change only updates the one `gittensory-miner metrics` reference shown in the diff; worth double-checking (not visible in this diff) that no other prose in the script's larger comment block still refers to the old binary name.
  • Consider asserting the `MINER_BIN` default with a small regex (e.g. matching the variable assignment pattern) rather than an exact string, so future minor formatting changes to the script don't break the test unnecessarily (test/unit/miner-prometheus-textfile-export.test.ts).
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #5934
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: 143 registered-repo PR(s), 95 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor davion-knight; Gittensor profile; 143 PR(s), 0 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 changes the MINER_BIN default from gittensory-miner to loopover-miner exactly as required, leaves LOOPOVER_MINER_BIN override and OUT_FILE untouched with explicit justification, and adds a regression test asserting the fixed default and absence of the old binary name.

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 <question> answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat <question> 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 f135b84 into JSONbored:main Jul 15, 2026
13 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(selfhost): export-miner-prometheus-textfile.sh defaults to a nonexistent gittensory-miner binary

1 participant