Skip to content

feat(miner)!: rename GITTENSORY_MINER_*/GITTENSORY_* env vars to LOOPOVER_MINER_*/LOOPOVER_* - #5707

Merged
JSONbored merged 1 commit into
mainfrom
rebrand-env-vars
Jul 14, 2026
Merged

feat(miner)!: rename GITTENSORY_MINER_*/GITTENSORY_* env vars to LOOPOVER_MINER_*/LOOPOVER_*#5707
JSONbored merged 1 commit into
mainfrom
rebrand-env-vars

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

Phase 1 of #5705 (the gittensory -> loopover rebrand epic). Full cutover, no dual-read per explicit maintainer decision.

  • GITTENSORY_MINER_* -> LOOPOVER_MINER_* across every file that reads/sets/documents it: packages/gittensory-miner/lib/**, packages/gittensory-engine/src/governor/{action-mode,kill-switch}.ts, k8s/miner-deployment.yaml, docker-compose.yml, systemd/*.service.example, grafana/provisioning/datasources/ams-ledgers.yml, all packages/gittensory-miner/docs/*.md, the CLI's own --help text options section, the miner extension's test-mode global flag.
  • The secondary self-host AMS-reporting family also renamed: GITTENSORY_API_TOKEN_FILE, GITTENSORY_MCP_TOKEN_FILE, GITTENSORY_MEM_LIMIT, GITTENSORY_REPORTING_SOURCE_DB, GITTENSORY_REPORTING_DIR, GITTENSORY_REPORTING_DB, GITTENSORY_AMS_REPORTING_EXPORT_INTERVAL_SECONDS.
  • Fixed a stray inconsistency found along the way: .env.example's LOOPOVER_REPORTING_SOURCE_DB comment illustrated the old /appdb/gittensory.sqlite value even though docker-compose.yml's own real default was already /appdb/loopover.sqlite.
  • Fixed two regex patterns that a straight substring replace couldn't catch ((?:GITTENSORY_MINER|MINER)_ — the literal GITTENSORY_MINER_ substring never appears contiguously in that alternation) in packages/gittensory-miner/lib/deployment-docs-audit.js and its test.
  • Regenerated packages/gittensory-miner/docs/env-reference.md last, per this repo's own documented generator gotcha (regenerating early then adding more var changes re-breaks the file).

Out of scope for this PR (tracked separately in #5705): directory names, the CLI binary name, the @gittensory mention command, MCP server/tool names, internal code identifiers, Docker/k8s resource names, and doc prose — those are still gittensory-branded pending their own phases.

Breaking change

Every GITTENSORY_MINER_* / GITTENSORY_API_TOKEN_FILE / GITTENSORY_MCP_TOKEN_FILE / GITTENSORY_MEM_LIMIT / GITTENSORY_REPORTING_* env var an existing self-hosted AMS/miner deployment sets today must be renamed to its LOOPOVER_ equivalent — the old names are no longer read anywhere. No dual-read period, per explicit decision (this repo already has precedent for dual-read env migrations from #4774, deliberately not used here).

Test plan

  • node --check on every changed .js file, JSON schema validated
  • npx tsc --noEmit --incremental false clean
  • npm run miner:env-reference (regenerated) + :check clean
  • npm run selfhost:env-reference:check clean (confirms zero unintended overlap with the main worker's own env-var family)
  • npm run test:coverage (unsharded): 831/831 test files, 16146/16146 tests pass, exit 0
  • One genuinely unrelated flaky real-subprocess timing test (selfhost-ai.test.ts, untouched by this PR) confirmed passing 165/165 in isolated retry

Refs #5705

…OVER_MINER_*/LOOPOVER_*

Phase 1 of the gittensory -> loopover rebrand epic (#5705). Full cutover,
no dual-read: GITTENSORY_MINER_* (499 occurrences, 130 files -- the
miner's entire env-var namespace, plus the self-host AMS-reporting
family GITTENSORY_API_TOKEN_FILE/GITTENSORY_MCP_TOKEN_FILE/
GITTENSORY_MEM_LIMIT/GITTENSORY_REPORTING_*) all rename to their
LOOPOVER_ equivalent. Regenerated packages/gittensory-miner/docs/env-reference.md
last, per this repo's documented generator gotcha.

BREAKING CHANGE: every GITTENSORY_MINER_*/GITTENSORY_API_TOKEN_FILE/
GITTENSORY_MCP_TOKEN_FILE/GITTENSORY_MEM_LIMIT/GITTENSORY_REPORTING_*
env var an existing self-hosted AMS/miner deployment sets must be
renamed to its LOOPOVER_ equivalent -- the old names are no longer read.

Refs #5705
@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
loopover-ui 6ddf44e Commit Preview URL

Branch Preview URL
Jul 14 2026, 06:18 AM

@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.85714% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.05%. Comparing base (7515471) to head (6ddf44e).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...ckages/gittensory-miner/lib/deny-hook-synthesis.js 0.00% 2 Missing ⚠️
packages/gittensory-miner/lib/orb-export.js 75.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5707   +/-   ##
=======================================
  Coverage   95.05%   95.05%           
=======================================
  Files         580      580           
  Lines       46127    46127           
  Branches    14793    14793           
=======================================
  Hits        43845    43845           
  Misses       1523     1523           
  Partials      759      759           
Flag Coverage Δ
shard-1 43.93% <28.57%> (ø)
shard-2 35.62% <40.47%> (ø)
shard-3 32.31% <50.00%> (ø)
shard-4 33.02% <54.76%> (+<0.01%) ⬆️
shard-5 31.57% <52.38%> (ø)
shard-6 44.49% <54.76%> (ø)

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

Files with missing lines Coverage Δ
...ages/gittensory-engine/src/governor/action-mode.ts 90.00% <100.00%> (ø)
...ages/gittensory-engine/src/governor/kill-switch.ts 100.00% <100.00%> (ø)
packages/gittensory-engine/src/miner-goal-spec.ts 100.00% <ø> (ø)
packages/gittensory-miner/lib/ams-policy.js 93.33% <100.00%> (ø)
packages/gittensory-miner/lib/attempt-log.js 95.31% <100.00%> (ø)
packages/gittensory-miner/lib/claim-ledger.js 100.00% <100.00%> (ø)
packages/gittensory-miner/lib/cli.js 100.00% <ø> (ø)
packages/gittensory-miner/lib/config-precedence.js 100.00% <100.00%> (ø)
...ages/gittensory-miner/lib/deployment-docs-audit.js 100.00% <100.00%> (ø)
packages/gittensory-miner/lib/event-ledger.js 88.00% <100.00%> (ø)
... and 23 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 14, 2026
@loopover-orb

loopover-orb Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Caution

🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥

🛑 LoopOver review result - fixes required

Review updated: 2026-07-14 06:26:24 UTC

134 files · 1 AI reviewer · 2 blockers · readiness 93/100 · CI failing · unstable

🛑 Suggested Action - Manual Review

Review summary
This is a large, mechanical, full-cutover rename of GITTENSORY_MINER_*/GITTENSORY_* env vars to LOOPOVER_MINER_*/LOOPOVER_* across code, docs, compose/k8s/systemd/terraform manifests, and the corresponding tests, explicitly scoped as Phase 1 of the #5705 rebrand epic. Spot-checking the renamed pairs (docker-compose.yml env values vs the scripts that read them, k8s/Dockerfile ENV vs lib/status.js resolvers, the extension's four files' __LOOPOVER_MINER_EXTENSION_TEST__ guard, config-precedence.js vs action-mode.ts/kill-switch.ts) shows consistent producer/consumer renames with no dual-read leftovers in the visible diff. The two called-out fixes (the `(?:GITTENSORY_MINER|MINER)_` alternation regex in deployment-docs-audit.js, and the stale `.env.example` comment value) are both genuine and correctly applied.

Nits — 5 non-blocking
  • codecov/patch is at 92.85% vs the repo's 99% target — worth checking which renamed lines/branches lack coverage before merge, even though this isn't a functional defect.
  • This is a very large diff (134 files) for a single pass, though the risk is mitigated by it being a pure, mechanical name substitution rather than logic change — still worth a careful second pass for any missed occurrence outside what's shown here.
  • packages/gittensory-miner/docs/discovery-plane-operator-guide.md:45 uses `master` in prose — consider `main`/`primary` per the non-inclusive-terminology note, unrelated to this PR's scope but easy to fix in passing.
  • Confirm the full env-reference.md regeneration (mentioned as done 'last' per the generator gotcha) actually reflects every renamed var — worth a diff-only re-run to be sure nothing regenerated stale.
  • Given this is a breaking change with no dual-read, double check the PR description's breaking-change section enumerates every renamed var (including the AMS family) so operators upgrading don't miss one.

Why this is blocked

  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.
  • Maintainer requires a linked issue — Link the relevant issue (for example Closes #123) before opening the PR.
📋 Copy for AI agents — paste into your coding agent
Fix the following blocker(s) from this PR review:

1. No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.

2. Maintainer requires a linked issue — Link the relevant issue (for example `Closes #123`) before opening the PR.

CI checks failing

  • codecov/patch — 92.85% of diff hit (target 99.00%)
Signal Result Evidence
Code review ❌ 2 blockers 1 reviewer
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
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 (no linked issue context).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 45 registered-repo PR(s), 37 merged, 320 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 45 PR(s), 320 issue(s).
Gate result ❌ Blocking Repo-configured hard blocker found.
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: not available
  • Official Gittensor activity: 45 PR(s), 320 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Treat this as maintainer-lane context rather than normal contributor-lane activity.
  • Explain no-issue PR.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
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
/ desktop before / after /
/ mobile before / (mobile) after / (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 LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot added the manual-review Gittensor contributor context label Jul 14, 2026
@JSONbored
JSONbored merged commit 6714f0c into main Jul 14, 2026
19 of 20 checks passed
@JSONbored
JSONbored deleted the rebrand-env-vars branch July 14, 2026 06:28
JSONbored added a commit that referenced this pull request Jul 14, 2026
…heus metric names to loopover-miner/loopover_miner_

Phase 1 (#5707) renamed GITTENSORY_MINER_*/GITTENSORY_* env vars but
missed two things that env var still fell back to when unset:

- The default local-store config directory (~/.config/gittensory-miner,
  used by governor-state/ledger/plan/prediction/portfolio-queue/run-state/
  claim-ledger/event-ledger/ranked-candidates stores, laptop-init, status,
  repo-clone, and worktree-allocator) via local-store.js's shared
  resolveLocalStoreDbPath() helper -- now ~/.config/loopover-miner.
- 8 Prometheus textfile-exporter metric names (gittensory_miner_events_total,
  gittensory_miner_portfolio_queue_{items,oldest_in_progress_lease_age_seconds},
  gittensory_miner_governor_{rate_limit_remaining_ratio,cap_usage_ratio},
  gittensory_miner_prediction{s,_correct,_incorrect}_total) and their
  matching prometheus/rules/alerts.yml expressions -- left unrenamed, the
  alert rules would have silently queried metric names that no longer exist.

Also renames the miner-ui's own local dev-server auth cookie
(gittensory_miner_ui_token -> loopover_miner_ui_token, apps/gittensory-miner-ui) --
a localhost-only dev cookie, not the core product's production session
cookie (that one is tracked separately, out of scope here).

BREAKING CHANGE: the miner's default config directory and every
gittensory_miner_* Prometheus metric name changed; no dual-read/alias,
per the epic's full-cutover mandate (#5705). A self-hoster's existing
~/.config/gittensory-miner state does not migrate automatically.

Explicitly NOT touched (separate, larger, higher-risk scopes):
- packages/gittensory-miner/bin/gittensory-miner-mcp.js's gittensory_miner_*
  MCP tool names and packages/gittensory-mcp's own tool names (Phase 4:
  MCP server + 96 tool names, external-client breaking change).
- The .gittensory-miner.yml per-repo config filename and its ~30 references
  across the miner's goal-spec/config-precedence system (new, separate gap
  discovered while investigating this fix; needs its own dedicated pass,
  mirroring the .gittensory.yml -> .loopover.yml rename already done for
  the core product).
- packages/gittensory-miner/ as a directory/package name, and the
  gittensory-miner CLI binary name (Phase 3/5).
JSONbored added a commit that referenced this pull request Jul 14, 2026
…heus metric names (#5721)

* fix(miner)!: full-cutover rename gittensory-miner config dir + Prometheus metric names to loopover-miner/loopover_miner_

Phase 1 (#5707) renamed GITTENSORY_MINER_*/GITTENSORY_* env vars but
missed two things that env var still fell back to when unset:

- The default local-store config directory (~/.config/gittensory-miner,
  used by governor-state/ledger/plan/prediction/portfolio-queue/run-state/
  claim-ledger/event-ledger/ranked-candidates stores, laptop-init, status,
  repo-clone, and worktree-allocator) via local-store.js's shared
  resolveLocalStoreDbPath() helper -- now ~/.config/loopover-miner.
- 8 Prometheus textfile-exporter metric names (gittensory_miner_events_total,
  gittensory_miner_portfolio_queue_{items,oldest_in_progress_lease_age_seconds},
  gittensory_miner_governor_{rate_limit_remaining_ratio,cap_usage_ratio},
  gittensory_miner_prediction{s,_correct,_incorrect}_total) and their
  matching prometheus/rules/alerts.yml expressions -- left unrenamed, the
  alert rules would have silently queried metric names that no longer exist.

Also renames the miner-ui's own local dev-server auth cookie
(gittensory_miner_ui_token -> loopover_miner_ui_token, apps/gittensory-miner-ui) --
a localhost-only dev cookie, not the core product's production session
cookie (that one is tracked separately, out of scope here).

BREAKING CHANGE: the miner's default config directory and every
gittensory_miner_* Prometheus metric name changed; no dual-read/alias,
per the epic's full-cutover mandate (#5705). A self-hoster's existing
~/.config/gittensory-miner state does not migrate automatically.

Explicitly NOT touched (separate, larger, higher-risk scopes):
- packages/gittensory-miner/bin/gittensory-miner-mcp.js's gittensory_miner_*
  MCP tool names and packages/gittensory-mcp's own tool names (Phase 4:
  MCP server + 96 tool names, external-client breaking change).
- The .gittensory-miner.yml per-repo config filename and its ~30 references
  across the miner's goal-spec/config-precedence system (new, separate gap
  discovered while investigating this fix; needs its own dedicated pass,
  mirroring the .gittensory.yml -> .loopover.yml rename already done for
  the core product).
- packages/gittensory-miner/ as a directory/package name, and the
  gittensory-miner CLI binary name (Phase 3/5).

* test(miner): cover resolveDenyHookSynthesisDbPath's home-default fallback

Every sibling local-store resolver (governor-ledger, laptop-init, plan-store,
prediction-ledger, etc.) already has this exact "env override, config dir,
XDG, then home default" test; deny-hook-synthesis.js was missing it, which
is why the config-dir rename's line 75 touch dropped patch coverage below
the gate's 99% target.
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.

Epic: complete the gittensory -> loopover rebrand (full cutover, no dual-support)

1 participant