feat(selfhost): bridge fleet-mode miner state to the ams-observability exporter - #5844
Conversation
…y exporter Fleet mode (docker-compose.miner.yml) keeps miner state in a named miner-data volume, but ORB's ams-reporting-exporter reads the ledgers from a host bind mount defaulting to ~/.config/loopover-miner, so the two never line up and the Grafana AMS datasources stay silently empty (JSONbored#5805). Add an opt-in docker-compose.miner.override.yml.example that relocates /data/miner onto the SAME ${LOOPOVER_MINER_CONFIG_DIR:-~/.config/loopover-miner} host path the exporter already uses, a DEPLOYMENT.md walkthrough with the combined three-file command, a cross-link comment on the exporter block, and a gitignore for the operator's copy. A static parity test asserts the override and exporter bind sources match and the docs can't silently drift. Additive: the named-volume default is unchanged for operators who don't enable observability. Closes JSONbored#5805
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5844 +/- ##
=======================================
Coverage 95.11% 95.11%
=======================================
Files 587 587
Lines 46509 46509
Branches 14870 14870
=======================================
Hits 44238 44238
Misses 1515 1515
Partials 756 756
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-14 20:02:46 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 5 non-blocking
Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk 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.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands 🟩 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.
|
Summary
Fleet mode (
packages/loopover-miner/docker-compose.miner.yml) keeps miner state in a Docker-managed named volume (miner-data), whose host path is an internal detail. ORB'sams-reporting-exporter(rootdocker-compose.yml,--profile ams-observability) reads the miner's ledgers from a host bind mount defaulting to~/.config/loopover-miner. The two never resolve to the same location, so an operator who installs AMS the documented containerized way and enables the observability profile gets a silently non-functional bridge — the exporter reads an empty directory and the Grafana AMS datasources stay empty with no error (#5805).This wires the missing connective tissue, purely additively:
packages/loopover-miner/docker-compose.miner.override.yml.example— an opt-in override (mirroring the rootdocker-compose.override.yml.examplepattern) that bind-mounts/data/mineronto the same${LOOPOVER_MINER_CONFIG_DIR:-~/.config/loopover-miner}host path the exporter already uses. Because it reuses that exact variable + default, the two profiles read one location with zero extra config; Compose merges the service'svolumesby target, so it replaces the named-volume mount rather than adding a second mount to/data/miner.DEPLOYMENT.md— a new "Running fleet mode alongside ORB'sams-observabilityprofile" section with the exact combined three-filedocker compose -f … -f … -f …command.ams-reporting-exporterblock in rootdocker-compose.ymlpointing at that walkthrough..gitignorefor the operator's copieddocker-compose.miner.override.yml(only the.exampleis tracked).test/unit/ams-observability-compose-parity.test.ts) that parses the three compose files and asserts the override's and exporter's bind sources match, the override replaces/data/minerwith no duplicate-target collision, introduces no colliding top-level names, and thatDEPLOYMENT.mddocuments the override + combined command + shared variable — so the two can never silently drift apart again the way the originals did.The default (no-override) behavior of
docker-compose.miner.ymlis unchanged — the named-volume default stays for operators who don't need the observability bridge.Scope
CONTRIBUTING.md; nosite//CNAME/lovable.Validation
git diff --checknpm run typecheckcleannpm run test:coverage— the 5-case parity test passes. The primary artifacts (.examplecompose override, Markdown docs, root compose comment,.gitignore) sit outsidesrc/**and aren't measured by Codecov's patch gate; no code undersrc/**was added, so there are no new coverable lines.npm run selfhost:validate-observability— dashboards and alert rules still valid.npm run docs:drift-check— passes.yamlparser) — no Docker daemon required — asserting no service/volume/network name collisions between the three files, covering both the "paths match" (pass) and, by construction of the shared-source assertions, guarding the "paths could drift" failure mode.mainimmediately before pushing — no base conflict.Per house style: no regression test applies — this is net-new interoperability tooling for a bridge that was never wired, not a fix to previously-working behavior.
If any required check was skipped, explain why:
actionlint,test:workers,ui:*,npm auditwere not run — no workflow, worker, UI, or dependency surface changed. The fullnpm run test:ciruns them on CI.Safety
.exampletemplate with a documented default; the operator's real copy is gitignored), and the exporter's read-only + redaction behavior is unchanged.DEPLOYMENT.md); no changelog edited.Auth/CORS/session, API/OpenAPI/MCP, and UI safety boxes are not applicable.